WO2017088547A1 - 一种数据升级方法和装置 - Google Patents

一种数据升级方法和装置 Download PDF

Info

Publication number
WO2017088547A1
WO2017088547A1 PCT/CN2016/097852 CN2016097852W WO2017088547A1 WO 2017088547 A1 WO2017088547 A1 WO 2017088547A1 CN 2016097852 W CN2016097852 W CN 2016097852W WO 2017088547 A1 WO2017088547 A1 WO 2017088547A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
version
version number
upgrade method
upgrade
Prior art date
Application number
PCT/CN2016/097852
Other languages
English (en)
French (fr)
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 中兴通讯股份有限公司
Publication of WO2017088547A1 publication Critical patent/WO2017088547A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a data upgrade method and apparatus.
  • Data upgrade is usually required to ensure the smooth running of the software.
  • Data upgrade is usually to analyze the data difference rules before and after the upgrade before the release of the version, and to develop data upgrade software.
  • the data upgrade software in addition to the normal function development, the data upgrade software is separately developed for the released software version, and the data upgrade software corresponds to the software version to be released. Since the implementation of agile development, the software version release cycle has been shortened, sometimes only 1-2 weeks, the development of data upgrade software will seriously affect the release schedule, which will easily lead to software version release lag. Moreover, there are many different versions of the actual version, and it is usually not possible to specify which versions to use for the customer's needs. To avoid the excessive workload of developing the upgrade software, only the version A can be upgraded to the B version, and then the B version is upgraded to the C version. The prior art does not support cross-version upgrades.
  • a version to C version upgrade A version can be upgraded to B version, B version can be upgraded to C version, but may not support A version to C version upgrade, because A to C is another set of rules, need additional
  • the workload is to develop an upgrade software suitable for the A to C version upgrade.
  • the embodiment of the present invention provides a data upgrade method and device, which can cope with fast and short-term software version release, and supports cross-version upgrade.
  • An embodiment of the present invention provides a data upgrade method, where the data upgrade method includes:
  • the data version number includes at least: a data generation time
  • the name of the upgrade method includes at least: an upgrade method version number and a table name, wherein the upgrade method version number corresponds to the data version number one-to-one.
  • the global data upgrade method list includes: all upgrade methods of the data version number, wherein all upgrade methods in the global data upgrade method list are sorted from a low version to a high version according to the upgrade method version number.
  • Determining the upgrade method corresponding to the data version number of the current version in the global data upgrade method list, and executing the upgrade method including:
  • the method version number is the first upgrade method version number
  • the data version number of the current version is updated to the upgraded data version number when the upgrade is performed.
  • the embodiment of the present invention further provides a data upgrading device, where the data upgrading device includes: an acquiring unit and a processing unit, where
  • the obtaining unit is configured to obtain a data version number of the current version and a global data upgrade method list
  • the processing unit is configured to determine an upgrade method corresponding to the data version number of the current version in the global data upgrade method list, and execute the upgrade method.
  • the data version number includes at least: a data generation time
  • the name of the upgrade method includes at least: an upgrade method version number and a table name, wherein the upgrade method version number corresponds to the data version number one-to-one.
  • the global data upgrade method list includes: all upgrade methods of the data version number, wherein all upgrade methods in the global data upgrade method list are sorted from a low version to a high version according to the upgrade method version number.
  • the processing unit is configured to search, in the global data upgrade method list, an upgrade method version number that is the same as the data version number of the current version as a first upgrade method version number, and is further configured to use the upgrade method version number according to the upgrade method In the order from the low version to the high version, the upgrade is performed in order from the upgrade method corresponding to the version number of the first upgrade method until the data version number of the current version is updated to the data version number of the latest version.
  • the processing unit is configured to update the data version number of the current version when the upgrade is performed to an upgraded data version number.
  • An embodiment of the present invention provides a data upgrade method and apparatus, which acquires a current version of a data version number and a global data upgrade method list, and determines an upgrade method corresponding to the current version of the data version number in the global data upgrade method list. And execute the upgrade method.
  • the data upgrading method and device provided by the embodiments of the present invention can implement data version upgrade, upgrade across any version, data upgrade method and data code are generated at the same time, and can cope with fast and short-term software version release.
  • FIG. 1 is a schematic flowchart 1 of a data upgrading method according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of a global data upgrade method list according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart 2 of a data upgrading method according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of a data upgrading apparatus according to an embodiment of the present invention.
  • the embodiment of the invention provides a data upgrading method. As shown in FIG. 1 , the data upgrading method includes:
  • Step 101 The data upgrading apparatus acquires a data version number of the current version and a global data upgrade method list.
  • the data upgrading device detects the current version of the data version number and the current version of the global data upgrade method list.
  • the data version number includes at least: a data generation time.
  • the data version number is “201505161200”, and the data generation time is 12:00 on May 16, 2015.
  • the name of the upgrade method includes at least: an upgrade method version number and a table name, where the upgrade method version number is a data generation time, and the upgrade method version number has a one-to-one correspondence with the data version number.
  • the upgrade method version name of the upgrade method name "D_201411041407_create_TableA” is "201411041407”, indicating that the code was submitted at 14:07 on November 4, 2014, and the table A was created in the code.
  • the global data upgrade method list includes: all upgrade methods of the data version number, wherein all upgrade methods in the global data upgrade method list are performed according to the upgrade method version number. Sort from low version to high version.
  • the version number of the upgrade method is the generation time of the data, that is, the order is sorted according to the generation time of the data.
  • the generating of the upgrade method may include: a rule indicating that the table changes in the previous two versions, for example, adding a table or deleting a table, adding, deleting, and modifying a field; and naming the upgrade method by modifying the code submission time of the data.
  • the version number for example, -year-month-day-hour-minute
  • name the upgrade method with the upgrade method version number, table operation name, and table name for example, "D_201505211100_update_TableE”
  • the upgrade method version number is "201505211100”
  • table operation name is "update”
  • table name is "TableE”
  • the upgrade method carrying the data version number is registered to the global data upgrade method list
  • the test case is written to ensure the correctness of the upgrade method; Submit upgrade methods and test cases.
  • Step 102 The data upgrading apparatus determines an upgrade method corresponding to the data version number of the current version in the global data upgrade method list, and executes the upgrade method.
  • the data upgrading apparatus searches the global data upgrade method list for the upgrade method version number that is the same as the data version number of the current version, and is the first upgrade method version number, and then, according to the upgrade method, the version number is low.
  • the order of the version to the high version is upgraded in order from the upgrade method corresponding to the version number of the first upgrade method until the data version number of the current version is updated to the data version number of the latest version.
  • the data version number of the current version is updated to the upgraded data version number when the upgrade is performed.
  • the global data upgrade method list is sorted according to the upgrade method version number, and the data upgrading device detects the current version data version number “201505161200” in the global data upgrade method list corresponding to the upgrade method according to the data version number.
  • the position of the version number is determined and described
  • the upgrade method version number of the current version is the same as the first upgrade method version number.
  • the upgrade method corresponding to the version number of the first upgrade method is D_201505161200_update_TableD.
  • the upgrade is performed in order from "D_201505161200_update_TableD" until the data version number of the current version is updated to the latest version data version number.
  • the data version number concept is introduced, and the code submission time is used as the data version number, and the upgrade method carries the data version number to be registered in the global data upgrade method list, and is submitted when the data code is submitted.
  • the difference between the current version version number and the global data upgrade method is automatically detected at power-on, and the data upgrade method is performed and the version number of the current version is updated to complete the upgrade.
  • the data upgrade method provided by the embodiment of the invention can implement the upgrade of the data version and the upgrade of any version, the data upgrade method and the data code are generated at the same time, and can cope with the fast and short-term software version release.
  • An embodiment of the present invention provides a data upgrade method. As shown in FIG. 2, the data upgrade method includes:
  • Step 201 The data upgrading apparatus acquires a data version number of the current version and a global data upgrade method list.
  • the data upgrading device detects the current version of the data version number and the current version of the global data upgrade method list.
  • the data version number includes at least: a data generation time.
  • the data version number is “201505161200”, and the data generation time is 12:00 on May 16, 2015.
  • the global data upgrade method list includes: all upgrade methods of the data version number, wherein all upgrade methods in the global data upgrade method list are performed according to the upgrade method version number. Sort from low version to high version.
  • the version number of the upgrade method is the generation time of the data, that is, the order is sorted according to the generation time of the data.
  • the name of the upgrade method includes at least: an upgrade method version number and a table name, where the upgrade method version number is a data generation time, and the upgrade method version number has a one-to-one correspondence with the data version number.
  • each upgrade method in the global data upgrade method list corresponds to an upgrade method version number, which is the same as the data version number.
  • the upgrade method version number of the upgrade method “D_201411041407_create_TableA” is “201411041407”. Indicated that the code was submitted at 14:07 on November 4, 2014, and Table A was created in the code.
  • the generating of the upgrade method may include: a rule indicating that the table changes in two versions, for example, adding a table or deleting a table, adding, deleting, and modifying a field; and naming the code submission time by modifying the data.
  • the version number of the method for example, -year-month-day-hour-minute; name the upgrade method with the upgrade method version number, table operation name, and table name, for example, "D_201505211100_update_TableE”, the upgrade method version number is " 201505211100", the table operation name is "update”, the table name is "TableE”; the upgrade method carrying the data version number is registered to the global data upgrade method list; the test case is written to ensure the correctness of the upgrade method; when the function code is submitted Submit upgrade methods and test cases together.
  • the upgrade method in the embodiment of the present invention describes rules for changing the structure of the table, including adding, deleting, changing, etc., how the table structure changes before and after the execution of an upgrade method, and the expression can be clearly and clearly expressed by only one data rule.
  • Step 202 The data upgrading apparatus searches the global data upgrade method list for the upgrade method version number that is the same as the data version number of the current version, and is the first upgrade method version number.
  • the global data upgrade method list is sorted according to the upgrade method version number.
  • the data upgrading device obtains the location of the data version number of the current version in the global data upgrading method, that is, the data upgrading device detects the version number of the current version of the data version number "201505161200" in the global data upgrading method list according to the data version number.
  • the location of the upgrade method is the same as the data version number of the current version, and the version number of the upgrade method is the first upgrade method version number.
  • the upgrade method corresponding to the version number of the first upgrade method is D_201505161200_update_TableD. ".
  • Step 203 The data upgrading apparatus upgrades sequentially according to the upgrade method corresponding to the version number of the first upgrade method according to the upgrade method version number from the low version to the high version, until the data version number of the current version is updated.
  • the version number of the latest version of the data is updated.
  • the data upgrading apparatus upgrades in order from "D_201505161200_update_TableD" until the data version number of the current version is updated to the data version number of the latest version.
  • the data upgrade method needs to be executed multiple times.
  • the upgrade method version number is from the lower version to the higher version, that is, the upgrade method version number is in chronological order.
  • the data upgrade method "D_201505211100_update_TableE” is executed first.
  • the data version number of the database is updated to "201505211100”
  • the upgrade method "D_201505220805_update_TableC” is executed, and the execution is performed until the "D_201507031639_update_TableI” is executed.
  • the current data version number is updated to "201507031639", and the data upgrade is completed.
  • the data version number concept is introduced, and the code submission time is used as the data version number, and the upgrade method carries the data version number to be registered in the global data upgrade method list, and is submitted when the data code is submitted.
  • the difference between the current version version number and the global data upgrade method is automatically detected at power-on, and the data upgrade method is performed and the version number of the current version is updated to complete the upgrade.
  • the data upgrade method provided by the embodiment of the invention can implement the upgrade of the data version and the upgrade of any version, the data upgrade method and the data code are generated at the same time, and can cope with the fast and short-term software version release.
  • the embodiment of the present invention provides a data upgrading apparatus 1.
  • the data upgrading apparatus includes: an obtaining unit 10 and a processing unit 11, wherein
  • the obtaining unit 10 is configured to obtain a data version number of the current version and a global data upgrade method list.
  • the processing unit 11 is configured to determine an upgrade method corresponding to the data version number of the current version in the global data upgrade method list, and execute the upgrade method.
  • the data version number includes at least: a data generation time
  • the name of the upgrade method includes at least: an upgrade method version number and a table name, wherein the upgrade method version number corresponds to the data version number one-to-one.
  • the global data upgrade method list includes: all upgrade methods of the data version number, wherein all upgrade methods in the global data upgrade method list are sorted from a low version to a high version according to the upgrade method version number. .
  • the processing unit 11 is configured to search, in the global data upgrade method list, an upgrade method version number that is the same as the data version number of the current version as a first upgrade method version number;
  • the upgrade method version number is updated from the lower version to the higher version, and the upgrade is performed in sequence from the upgrade method corresponding to the version number of the first upgrade method until the data version number of the current version is updated to the latest version of the data version number.
  • processing unit 11 is configured to update the data version number of the current version when upgrading to an upgraded data version number.
  • the data upgrading apparatus provided by the embodiment of the invention can implement the upgrade of the data version and the upgrade of any version, the data upgrading method and the data code are generated at the same time, and can cope with the rapid and short-term software version release.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the device is implemented in a flow or a flow and/or a block diagram of the flowchart The function specified in a box or multiple boxes.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • the invention is applicable to the field of computer technology and is used for realizing rapid and short-term software version release.

Landscapes

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

Abstract

一种数据升级方法以及装置,所述方法包括:获取当前版本的数据版本号和全局数据升级方法列表(101);确定所述全局数据升级方法列表中与所述当前版本的数据版本号对应的升级方法,并执行所述升级方法(102)。

Description

一种数据升级方法和装置 技术领域
本发明涉及计算机技术领域,尤其涉及一种数据升级方法和装置。
背景技术
软件升级后,通常需要进行数据升级才能保证软件顺利运行。数据升级通常是在版本发布前对升级前后版本数据差异规则进行分析,开发数据升级软件。
现有技术中,除了正常功能开发外,对发布的软件版本要单独开发数据升级软件,该数据升级软件与待发布的软件版本对应。实现敏捷开发以来,软件版本发布周期不断缩短,有时只需1-2周,数据升级软件的开发将严重影响版本发布进度,这样容易导致软件版本发布滞后。而且,实际使用的版本种类繁多,通常不能针对客户需求指定使用哪些版本,为避免开发升级软件过多的工作量,只能从A版本升级到B版本,再从B版本升级到C版本,即现有技术不支持跨版本升级。例如,A版本到C版本升级,A版本能升级到B版本,B版本能升级到C版本,但可能不支持A版本到C版本升级,因为A到C又是另外一套规则,需要额外的工作量制定适合A到C版本升级的升级软件。
发明内容
为解决上述技术问题,本发明实施例提供一种数据升级方法和装置,可以应对快速短期的软件版本发布,而且,支持跨版本的升级。
本发明的技术方案是这样实现的:
本发明实施例提供一种数据升级方法,所述数据升级方法包括:
获取当前版本的数据版本号和全局数据升级方法列表;
确定所述全局数据升级方法列表中与所述当前版本的数据版本号对应的升级方法,并执行所述升级方法。
所述数据版本号至少包括:数据的生成时间;
所述升级方法的名称至少包括:升级方法版本号和表名,其中,所述升级方法版本号与所述数据版本号一一对应。
所述全局数据升级方法列表包括:所述数据版本号的所有升级方法,其中,所述全局数据升级方法列表中的所有升级方法按照所述升级方法版本号由低版本到高版本排序。
所述确定所述全局数据升级方法列表中与所述当前版本的数据版本号对应的升级方法,并执行所述升级方法,包括:
在所述全局数据升级方法列表中查找与所述当前版本的数据版本号相同的升级 方法版本号为第一升级方法版本号;
根据所述升级方法版本号由低版本到高版本的顺序,从所述第一升级方法版本号对应的升级方法开始依次进行升级,直至所述当前版本的数据版本号更新至最新版本的数据版本号。
执行升级时所述当前版本的数据版本号更新为升级后的数据版本号。
本发明实施例同时还提供一种数据升级装置,所述数据升级装置包括:获取单元、处理单元,其中,
所述获取单元,用于获取当前版本的数据版本号和全局数据升级方法列表;
所述处理单元,用于确定所述全局数据升级方法列表中与所述当前版本的数据版本号对应的升级方法,并执行所述升级方法。
所述数据版本号至少包括:数据的生成时间;
所述升级方法的名称至少包括:升级方法版本号和表名,其中,所述升级方法版本号与所述数据版本号一一对应。
所述全局数据升级方法列表包括:所述数据版本号的所有升级方法,其中,所述全局数据升级方法列表中的所有升级方法按照所述升级方法版本号由低版本到高版本排序。
所述处理单元,用于在所述全局数据升级方法列表中查找与所述当前版本的数据版本号相同的升级方法版本号为第一升级方法版本号;还用于根据所述升级方法版本号由低版本到高版本的顺序,从所述第一升级方法版本号对应的升级方法开始依次进行升级,直至所述当前版本的数据版本号更新至最新版本的数据版本号。
所述处理单元,用于执行升级时所述当前版本的数据版本号更新为升级后的数据版本号。
本发明实施例提供了一种数据升级方法和装置,获取当前版本的数据版本号和全局数据升级方法列表;确定所述全局数据升级方法列表中与所述当前版本的数据版本号对应的升级方法,并执行所述升级方法。本发明实施例提供的数据升级方法和装置,可以实现数据版本的升级,以及跨任意版本的升级,数据升级方法与数据代码同时生成,可以应对快速短期的软件版本发布。
附图说明
图1为本发明实施例提供的数据升级方法流程示意图一;
图2为本发明实施例提供的全局数据升级方法列表示意图;
图3为本发明实施例提供的数据升级方法流程示意图二;
图4为本发明实施例提供的数据升级装置结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。
实施例一
本发明实施例提供一种数据升级方法,如图1所示,所述数据升级方法包括:
步骤101、数据升级装置获取当前版本的数据版本号和全局数据升级方法列表。
具体的,数据升级装置检测当前版本的数据版本号和当前版本的全局数据升级方法列表。其中,所述数据版本号至少包括:数据的生成时间。
示例性的,如图2所示,数据版本号为“201505161200”,数据的生成时间为2015年05月16日12点00分。
具体的,所述升级方法的名称至少包括:升级方法版本号和表名,其中,所述升级方法版本号为数据的生成时间,所述升级方法版本号与所述数据版本号一一对应。
示例性的,如图2所示,升级方法的名称“D_201411041407_create_TableA”的升级方法版本号为“201411041407”,表明在2014年11月04日14点07分提交了代码,代码中创建了表A。
具体的,如图2所示,所述全局数据升级方法列表包括:所述数据版本号的所有升级方法,其中,所述全局数据升级方法列表中的所有升级方法按照所述升级方法版本号由低版本到高版本排序。所述升级方法版本号为数据的生成时间,即根据数据的生成时间的先后进行排序。
其中,所述升级方法的生成可以包括:说明表在前后两个版本变化的规则,例如,新增表或者删除表,字段的增加、删除和修改等;以修改数据的代码提交时间命名升级方法版本号,例如,-年-月-日-时-分;以升级方法版本号、表操作名称、表名一起命名为升级方法的名称,例如,“D_201505211100_update_TableE”,升级方法版本号为“201505211100”,表操作名称为“update”,表名为“TableE”;将携带数据版本号的升级方法注册到全局数据升级方法列表;书写测试用例,以保证升级方法的正确性;提交功能代码时一并提交升级方法和测试用例。
步骤102、数据升级装置确定所述全局数据升级方法列表中与所述当前版本的数据版本号对应的升级方法,并执行所述升级方法。
具体的,数据升级装置在所述全局数据升级方法列表中查找与所述当前版本的数据版本号相同的升级方法版本号为第一升级方法版本号,然后,根据所述升级方法版本号由低版本到高版本的顺序,从所述第一升级方法版本号对应的升级方法开始依次进行升级,直至所述当前版本的数据版本号更新至最新版本的数据版本号。其中,在执行升级时所述当前版本的数据版本号更新为升级后的数据版本号。
示例性的,如图2所示,全局数据升级方法列表按照升级方法版本号排序,数据升级装置根据数据版本号,检测当前版本的数据版本号“201505161200”在全局数据升级方法列表中对应升级方法版本号的位置,如图2中箭头所示的位置,确定与所述 当前版本的数据版本号相同的升级方法版本号为第一升级方法版本号,第一升级方法版本号对应的升级方法为“D_201505161200_update_TableD”。从“D_201505161200_update_TableD”开始依次进行升级,直至所述当前版本的数据版本号更新至最新版本的数据版本号。
如图2所示,本次需要执行多次数据升级方法。按升级方法版本号由低版本到高版本的顺序,即升级方法版本号时间先后顺序,先执行数据升级方法“D_201505211100_update_TableE”,并将数据库的数据版本号更新为“201505211100”,再继续执行升级方法“D_201505220805_update_TableC”,依次执行,直到执行完“D_201507031639_update_TableI”,当前数据版本号更新为“201507031639”,数据升级执行完毕。
本发明实施例提供的数据升级方法中引入数据版本号概念,将代码提交时间作为数据版本号,升级方法携带数据版本号注册到全局数据升级方法列表中,提交数据代码时一并提交。系统升级后,上电时自动检测当前版本的版本号和全局数据升级方法的差异,并执行数据升级方法及更新当前版本的版本号,完成升级。
本发明实施例提供的数据升级方法,可以实现数据版本的升级,以及跨任意版本的升级,数据升级方法与数据代码同时生成,可以应对快速短期的软件版本发布。
实施例二
本发明实施例提供一种数据升级方法,如图2所示,所述数据升级方法包括:
步骤201、数据升级装置获取当前版本的数据版本号和全局数据升级方法列表。
具体的,数据升级装置检测当前版本的数据版本号和当前版本的全局数据升级方法列表。其中,所述数据版本号至少包括:数据的生成时间。
示例性的,如图2所示,数据版本号为“201505161200”,数据的生成时间为2015年05月16日12点00分。
具体的,如图2所示,所述全局数据升级方法列表包括:所述数据版本号的所有升级方法,其中,所述全局数据升级方法列表中的所有升级方法按照所述升级方法版本号由低版本到高版本排序。所述升级方法版本号为数据的生成时间,即根据数据的生成时间的先后进行排序。
具体的,所述升级方法的名称至少包括:升级方法版本号和表名,其中,所述升级方法版本号为数据的生成时间,所述升级方法版本号与所述数据版本号一一对应。
示例性的,如图2所示,全局数据升级方法列表中每一个升级方法都对应一个升级方法版本号,与数据版本号相同,如升级方法“D_201411041407_create_TableA”的升级方法版本号为“201411041407”,表明在2014年11月04日14点07分提交了代码,代码中创建了表A。
其中,所述升级方法的生成可以包括:说明表在前后两个版本变化的规则,例如,新增表或者删除表,字段的增加、删除和修改等;以修改数据的代码提交时间命名升 级方法版本号,例如,-年-月-日-时-分;以升级方法版本号、表操作名称、表名一起命名为升级方法的名称,例如,“D_201505211100_update_TableE”,升级方法版本号为“201505211100”,表操作名称为“update”,表名为“TableE”;将携带数据版本号的升级方法注册到全局数据升级方法列表;书写测试用例,以保证升级方法的正确性;提交功能代码时一并提交升级方法和测试用例。
具体的,本发明实施例中的升级方法描述了表结构变化的规则,包括增、删、改等,一条升级方法执行前后表结构如何变化,仅用一条数据规则就能清晰明了的表达。
步骤202、数据升级装置在所述全局数据升级方法列表中查找与所述当前版本的数据版本号相同的升级方法版本号为第一升级方法版本号。
具体的,如图2所示,全局数据升级方法列表按照升级方法版本号排序。数据升级装置获取当前版本的数据版本号在全局数据升级方法中的位置,即数据升级装置根据数据版本号,检测当前版本的数据版本号“201505161200”在全局数据升级方法列表中对应升级方法版本号的位置,如图2中箭头所示的位置,确定与所述当前版本的数据版本号相同的升级方法版本号为第一升级方法版本号,第一升级方法版本号对应的升级方法为“D_201505161200_update_TableD”。
步骤203、数据升级装置根据所述升级方法版本号由低版本到高版本的顺序,从所述第一升级方法版本号对应的升级方法开始依次进行升级,直至所述当前版本的数据版本号更新至最新版本的数据版本号。
具体的,数据升级装置从“D_201505161200_update_TableD”开始依次进行升级,直至所述当前版本的数据版本号更新至最新版本的数据版本号。
如图2所示,本次需要执行多次数据升级方法,按升级方法版本号由低版本到高版本的顺序,即升级方法版本号时间先后顺序,先执行数据升级方法“D_201505211100_update_TableE”,并将数据库的数据版本号更新为“201505211100”,再继续执行升级方法“D_201505220805_update_TableC”,依次执行,直到执行完“D_201507031639_update_TableI”,当前数据版本号更新为“201507031639”,数据升级执行完毕。
本发明实施例提供的数据升级方法中引入数据版本号概念,将代码提交时间作为数据版本号,升级方法携带数据版本号注册到全局数据升级方法列表中,提交数据代码时一并提交。系统升级后,上电时自动检测当前版本的版本号和全局数据升级方法的差异,并执行数据升级方法及更新当前版本的版本号,完成升级。
本发明实施例提供的数据升级方法,可以实现数据版本的升级,以及跨任意版本的升级,数据升级方法与数据代码同时生成,可以应对快速短期的软件版本发布。
实施例三
本发明实施例提供一种数据升级装置1,如图4所示,所述数据升级装置包括:获取单元10、处理单元11,其中,
所述获取单元10,用于获取当前版本的数据版本号和全局数据升级方法列表;
所述处理单元11,用于确定所述全局数据升级方法列表中与所述当前版本的数据版本号对应的升级方法,并执行所述升级方法。
进一步地,所述数据版本号至少包括:数据的生成时间;
所述升级方法的名称至少包括:升级方法版本号和表名,其中,所述升级方法版本号与所述数据版本号一一对应。
进一步地,所述全局数据升级方法列表包括:所述数据版本号的所有升级方法,其中,所述全局数据升级方法列表中的所有升级方法按照所述升级方法版本号由低版本到高版本排序。
进一步地,所述处理单元11,用于在所述全局数据升级方法列表中查找与所述当前版本的数据版本号相同的升级方法版本号为第一升级方法版本号;还用于根据所述升级方法版本号由低版本到高版本的顺序,从所述第一升级方法版本号对应的升级方法开始依次进行升级,直至所述当前版本的数据版本号更新至最新版本的数据版本号。
进一步地,所述处理单元11,用于执行升级时所述当前版本的数据版本号更新为升级后的数据版本号。
具体的,本发明实施例提供的数据升级装置的理解可以参考实施例一和实施例二的数据升级方法的说明,本发明实施例在此不再赘述。
本发明实施例提供的数据升级装置,可以实现数据版本的升级,以及跨任意版本的升级,数据升级方法与数据代码同时生成,可以应对快速短期的软件版本发布。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一 个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。
工业实用性
本发明适用于计算机技术领域,用以实现快速短期的软件版本发布。

Claims (10)

  1. 一种数据升级方法,包括:
    获取当前版本的数据版本号和全局数据升级方法列表;
    确定所述全局数据升级方法列表中与所述当前版本的数据版本号对应的升级方法,并执行所述升级方法。
  2. 根据权利要求1所述的数据升级方法,其中,
    所述数据版本号至少包括:数据的生成时间;
    所述升级方法的名称至少包括:升级方法版本号和表名,其中,所述升级方法版本号与所述数据版本号一一对应。
  3. 根据权利要求2所述的数据升级方法,其中,所述全局数据升级方法列表包括:所述数据版本号的所有升级方法,其中,所述全局数据升级方法列表中的所有升级方法按照所述升级方法版本号由低版本到高版本排序。
  4. 根据权利要求3所述的数据升级方法,其中,所述确定所述全局数据升级方法列表中与所述当前版本的数据版本号对应的升级方法,并执行所述升级方法,包括:
    在所述全局数据升级方法列表中查找与所述当前版本的数据版本号相同的升级方法版本号为第一升级方法版本号;
    根据所述升级方法版本号由低版本到高版本的顺序,从所述第一升级方法版本号对应的升级方法开始依次进行升级,直至所述当前版本的数据版本号更新至最新版本的数据版本号。
  5. 根据权利要求4所述的数据升级方法,其中,执行升级时所述当前版本的数据版本号更新为升级后的数据版本号。
  6. 一种数据升级装置,包括:获取单元、处理单元,其中,
    所述获取单元,设置为获取当前版本的数据版本号和全局数据升级方法列表;
    所述处理单元,设置为确定所述全局数据升级方法列表中与所述当前版本的数据版本号对应的升级方法,并执行所述升级方法。
  7. 根据权利要求6所述的数据升级装置,其中,
    所述数据版本号至少包括:数据的生成时间;
    所述升级方法的名称至少包括:升级方法版本号和表名,其中,所述升级方法版本号与所述数据版本号一一对应。
  8. 根据权利要求7所述的数据升级装置,其中,所述全局数据升级方法列表包括:所述数据版本号的所有升级方法,其中,所述全局数据升级方法列表中的所有升级方法按照所述升级方法版本号由低版本到高版本排序。
  9. 根据权利要求8所述的数据升级装置,其中,所述处理单元设置为在所述全局数据升级方法列表中查找与所述当前版本的数据版本号相同的升级方法版本号为 第一升级方法版本号;还设置为根据所述升级方法版本号由低版本到高版本的顺序,从所述第一升级方法版本号对应的升级方法开始依次进行升级,直至所述当前版本的数据版本号更新至最新版本的数据版本号。
  10. 根据权利要求9所述的数据升级装置,其中,所述处理单元设置为执行升级时所述当前版本的数据版本号更新为升级后的数据版本号。
PCT/CN2016/097852 2015-11-27 2016-09-02 一种数据升级方法和装置 WO2017088547A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510851413.5A CN106815034A (zh) 2015-11-27 2015-11-27 一种数据升级方法和装置
CN201510851413.5 2015-11-27

Publications (1)

Publication Number Publication Date
WO2017088547A1 true WO2017088547A1 (zh) 2017-06-01

Family

ID=58762972

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/097852 WO2017088547A1 (zh) 2015-11-27 2016-09-02 一种数据升级方法和装置

Country Status (2)

Country Link
CN (1) CN106815034A (zh)
WO (1) WO2017088547A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256309A (zh) * 2020-11-12 2021-01-22 上海达梦数据库有限公司 一种程序升级方法、装置、设备及存储介质
CN112783549A (zh) * 2021-01-08 2021-05-11 东风汽车股份有限公司 一种汽车电控件数据版本号升级方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000010787A (ja) * 1998-06-24 2000-01-14 Nec Corp プログラムダウンロード装置および方法
CN1713154A (zh) * 2004-06-22 2005-12-28 中兴通讯股份有限公司 一种移动通信网管系统的升级方法
CN101169719A (zh) * 2007-11-30 2008-04-30 华为技术有限公司 一种实现数据升级的方法、系统和升级客户端
JP2009151426A (ja) * 2007-12-19 2009-07-09 Sony Ericsson Mobilecommunications Japan Inc ソフトウェアプログラムの更新処理装置、ソフトウェアプログラムの更新処理方法、ソフトウェアプログラムの更新処理プログラム、及び携帯端末装置
CN103995854A (zh) * 2014-05-13 2014-08-20 大唐移动通信设备有限公司 一种设备跨版本升级方法和装置
CN104301383A (zh) * 2014-09-05 2015-01-21 小米科技有限责任公司 一种升级方法、装置及设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000010787A (ja) * 1998-06-24 2000-01-14 Nec Corp プログラムダウンロード装置および方法
CN1713154A (zh) * 2004-06-22 2005-12-28 中兴通讯股份有限公司 一种移动通信网管系统的升级方法
CN101169719A (zh) * 2007-11-30 2008-04-30 华为技术有限公司 一种实现数据升级的方法、系统和升级客户端
JP2009151426A (ja) * 2007-12-19 2009-07-09 Sony Ericsson Mobilecommunications Japan Inc ソフトウェアプログラムの更新処理装置、ソフトウェアプログラムの更新処理方法、ソフトウェアプログラムの更新処理プログラム、及び携帯端末装置
CN103995854A (zh) * 2014-05-13 2014-08-20 大唐移动通信设备有限公司 一种设备跨版本升级方法和装置
CN104301383A (zh) * 2014-09-05 2015-01-21 小米科技有限责任公司 一种升级方法、装置及设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256309A (zh) * 2020-11-12 2021-01-22 上海达梦数据库有限公司 一种程序升级方法、装置、设备及存储介质
CN112783549A (zh) * 2021-01-08 2021-05-11 东风汽车股份有限公司 一种汽车电控件数据版本号升级方法

Also Published As

Publication number Publication date
CN106815034A (zh) 2017-06-09

Similar Documents

Publication Publication Date Title
AU2019200046B2 (en) Utilizing artificial intelligence to test cloud applications
US10797967B2 (en) Managing service deployment
CN106294533B (zh) 使用数据库复制的分布式工作流
US10983904B1 (en) Test automation for data processing
US9280331B2 (en) Hash-based change tracking for software make tools
WO2019056540A1 (zh) 测试用例自动化管理方法、装置、设备及存储介质
US9626164B1 (en) Test-driven development module for repository-based development
US10223242B1 (en) Testing an application in a production infrastructure temporarily provided by a cloud computing environment
US10120658B2 (en) Method and system for realizing software development tasks
US9405523B2 (en) Automated build and deploy system
US10437885B2 (en) Graph modeling of applications for detection of duplicate modules
CN107408046B (zh) 用于跨异构计算环境供应云服务的系统和方法
US9483384B2 (en) Generation of software test code
US11334348B2 (en) Utilizing machine learning to identify and correct differences in application programming interface (API) specifications
US9507589B2 (en) Search based content inventory comparison
CN105653261A (zh) 基于云计算环境下的开发集成测试方法及系统
US20130014082A1 (en) Method of configuring business logic supporting multi-tenancy
US10990507B2 (en) System and method for provisioning a virtual machine test environment
US20160253157A1 (en) Software refactoring
WO2017088547A1 (zh) 一种数据升级方法和装置
US11194702B2 (en) History based build cache for program builds
US9720690B2 (en) Software architecture by untangling undesired code level dependencies using code refactoring
US20140067358A1 (en) Determining an optimal global quantum for an event-driven simulation
TW201732648A (zh) 原始碼偵錯裝置及偵錯方法
WO2021011117A1 (en) Detecting misconfiguration and/or bug(s) in large service(s) using correlated change analysis

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: 16867774

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: 16867774

Country of ref document: EP

Kind code of ref document: A1