WO2016202000A1 - Differential rollback upgrading method and apparatus - Google Patents

Differential rollback upgrading method and apparatus Download PDF

Info

Publication number
WO2016202000A1
WO2016202000A1 PCT/CN2016/073929 CN2016073929W WO2016202000A1 WO 2016202000 A1 WO2016202000 A1 WO 2016202000A1 CN 2016073929 W CN2016073929 W CN 2016073929W WO 2016202000 A1 WO2016202000 A1 WO 2016202000A1
Authority
WO
WIPO (PCT)
Prior art keywords
differential
upgrade
package
information
module
Prior art date
Application number
PCT/CN2016/073929
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 中兴通讯股份有限公司
Publication of WO2016202000A1 publication Critical patent/WO2016202000A1/en

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

Definitions

  • This document relates to the field of application upgrade technologies, and in particular, to a differential fallback upgrade method and apparatus.
  • the main purpose of the present invention is to provide a differential fallback upgrade method and device, which is to solve the problem that the version cannot be rolled back in time after the upgrade fails.
  • a differential fallback upgrade method includes:
  • the application to be upgraded is rolled back according to the generated differential backoff package.
  • the step of generating a differential backoff packet according to the obtained backoff information includes:
  • the step of generating the differential backoff packet according to the path information includes:
  • the obtained application data segment is encapsulated and digitally signed to generate the differential backoff packet.
  • the method further includes:
  • the differential backoff packet is stored.
  • the method further includes:
  • a differential fallback upgrade device includes an acquisition module, a generation module, an upgrade module, and a first fallback module, where:
  • the obtaining module is configured to: obtain an upgrade package and rollback information corresponding to the upgrade package;
  • the generating module is configured to: generate a differential back-off packet according to the obtained back-off information
  • the upgrade module is configured to: upgrade the application to be upgraded according to the obtained upgrade package;
  • the first back-off module is configured to perform a rollback operation on the to-be-upgraded application according to the generated differential back-off package when the upgrade fails.
  • the generating module includes a parsing unit and a generating unit, where:
  • the parsing unit is configured to: parse the obtained back information, and obtain path information according to the back information;
  • the generating unit is configured to: generate the differential backoff packet according to the path information.
  • the generating unit includes an extracting subunit and a compressing signature subunit, wherein:
  • the extracting subunit is configured to: extract an application data segment corresponding to the path information in application data corresponding to the to-be-upgraded application;
  • the compression signature subunit is configured to encapsulate and digitally sign the acquired application data segment to generate the differential backoff packet.
  • the device further includes:
  • the storage module is configured to: store the differential backoff package.
  • the device further includes a receiving module, an extracting module, and a second backing module, where:
  • the receiving module is configured to: after the upgrade is successful, receive a backoff instruction;
  • the extracting module is configured to: extract the differential back-off package corresponding to the received back-off instruction;
  • the second back-off module is configured to perform a rollback operation on the upgraded application to be upgraded according to the extracted differential back-off package.
  • a computer program comprising program instructions that, when executed by a terminal, cause the terminal to perform any of the differential fallback upgrade methods described above.
  • the differential back-off upgrade method and device obtaineds a differential upgrade package and a differential fallback script by using a complete upgrade data packet, and before the upgrade, a differential back-off package is created according to the differential fallback script, and the digital Sign and save to roll back after the upgrade fails; and if the user does not want to use the upgraded version after the upgrade is successful, you can call the generated differential fallback package to roll back to the pre-upgrade version at any time.
  • FIG. 1 is a flowchart of a first embodiment of a differential fallback upgrade method according to the present invention
  • FIG. 2 is a schematic diagram of a refinement process of step S20 in FIG. 1;
  • step S202 in FIG. 2 is a schematic diagram of a refinement process of step S202 in FIG. 2;
  • FIG. 4 is a flowchart of a second embodiment of a differential fallback upgrade method according to the present invention.
  • FIG. 5 is a schematic diagram of functional modules of a first embodiment of a differential fallback upgrade apparatus according to the present invention.
  • FIG. 6 is a schematic diagram of a refinement function module of the generation module in FIG. 5;
  • FIG. 7 is a schematic diagram of a refinement function module of the generating unit in FIG. 5;
  • FIG. 8 is a schematic diagram of functional modules of a second embodiment of a differential fallback upgrade apparatus according to the present invention.
  • the embodiment of the invention provides a differential fallback upgrade method.
  • FIG. 1 it is a flowchart of a first embodiment of a differential fallback upgrade method according to the present invention.
  • the differential fallback upgrade method includes:
  • Step S10 Obtain an upgrade package and rollback information corresponding to the upgrade package.
  • the upgrade package creation tool on the server to detect whether there is any difference.
  • the version difference is not detected, continue to obtain a comparison analysis between the new version application and the old version application;
  • the upgrade package file is generated according to the comparison result.
  • the rollback information is generated, and the rollback information can be packaged into the upgrade package when the upgrade package is generated by using the upgrade package creation tool.
  • the fallback information can also be saved separately and associated with the upgrade package, for example, it can be named with the same version number, or a method such as adding an identifier to the rollback information.
  • the upgrade package here may be a complete upgrade package, a differential upgrade package, or both upgrade packages, so that the user can enter the upgrade as needed. Line selection; Moreover, the upgrade here may be an upgrade of the operating system of the terminal, or an application software upgrade on the terminal, the principle is the same.
  • the full version of the data packet occupies a large memory and the upgrade speed is slow, and the differential upgrade package differentiates the new version file from the data of the old version application, and obtains the updated patch file.
  • the old version file has 5M
  • the new version file has 8M.
  • the updated part may only be about 3M (here, it should be noted that the differential packet size is not a simple subtraction, in fact, it needs to contain some context-related things), the benefits of using differential upgrade are obvious, users do not need to download the complete 8M
  • the file only needs to download the update part, and the update part may only have 3-4M, which can greatly reduce the loss of traffic. Therefore, in this embodiment, it is preferable to generate a differential upgrade package for upgrading.
  • the backoff information includes the path information of the old version data segment corresponding to the difference data applied by the new and old versions, for example, “xx/xx/filename”, because the difference file generally includes multiple, so back
  • the content of the return information can be:
  • the rollback information may be defined in other manners.
  • the rollback information may include the identifier information of the old version file corresponding to the difference file of the new and old version files, so as to extract corresponding data segments according to the flag information. .
  • Step S20 Generate a differential backoff packet according to the obtained backoff information.
  • step S20 includes the following refinement steps:
  • Step S201 analyzes the obtained back-off information, and acquires path information according to the back-off information.
  • Step S202 generating the differential backoff packet according to the path information. As shown in FIG. 3, step S202 includes the following refinement steps:
  • Step S211 Extract an application data segment corresponding to the path information in the application data corresponding to the to-be-upgraded application.
  • Step S212 the obtained application data segment is encapsulated and digitally signed to generate the differential backoff packet.
  • the information about the corresponding application data segment is included in the rollback information, and the corresponding application data segment is obtained from the terminal system file in the order of multiple fallback subcommands, and the obtained information is obtained after the rollback information line is executed. All the application data segments are encapsulated. After the encapsulation is completed, it can be compressed into a zip file or compressed in another compression format. According to the signature key sent by the server or the signature key preset by the terminal, the number is returned for the rollback packet. Signature, digital signature is a common technical means, and will not be repeated here.
  • step S30 the upgrade application is upgraded according to the obtained upgrade package.
  • Step S40 Perform a rollback operation on the to-be-upgraded application according to the generated differential back-off package when the upgrade fails.
  • An upgrade failure may occur during the upgrade.
  • the differential rollback package is automatically retrieved to roll back and the system is rolled back to the original state.
  • the differential back-off upgrade method proposed in this embodiment uses the data of the new and old versions to compare and obtain the upgrade package and the difference information. Before the upgrade, the differential back-off package is generated according to the difference information, and is digitally signed and saved. Roll back after the upgrade failed.
  • the method further includes:
  • Step S50 storing the differential backoff package.
  • step S60 after the upgrade is successful, a rollback command is received.
  • Step S70 extracting the differential back-off package corresponding to the received back-off instruction.
  • Step S80 Perform a rollback operation on the upgraded application to be upgraded according to the extracted differential backoff package.
  • the user may be provided with a selection interface. The user sends a back-off instruction based on the selection interface. After receiving the back-off instruction issued by the user, the user sends the differential back-off package corresponding to the received back-off instruction, and the application is to be upgraded. Perform a version rollback.
  • the previously generated differential backoff package can be called back to the version before the upgrade.
  • the embodiment of the invention further provides a differential back-off upgrade device.
  • FIG. 5 is a schematic diagram of a first embodiment of a differential fallback upgrade apparatus according to the present invention.
  • the differential fallback upgrade device includes:
  • the obtaining module 10 is configured to: obtain an upgrade package and rollback information corresponding to the upgrade package.
  • the upgrade package creation tool on the server to detect whether there is any difference.
  • the version difference is not detected, continue to obtain a comparison analysis between the new version application and the old version application;
  • the upgrade package file is generated according to the comparison result.
  • the rollback information is generated, and the rollback information can be packaged into the upgrade package when the upgrade package is generated by using the upgrade package creation tool.
  • the fallback information can also be saved separately and associated with the upgrade package, for example, it can be named with the same version number, or a method such as adding an identifier to the rollback information.
  • the upgrade package here may be a complete upgrade package, a differential upgrade package, or both upgrade packages, so that users can select them according to their needs when they need to upgrade.
  • the full version of the data packet occupies a large memory and the upgrade speed is slow, and the differential upgrade package differentiates the new version file from the data of the old version application, and obtains the updated patch file.
  • the old version file has 5M
  • the new version file has 8M.
  • the updated part may only be about 3M (here, it should be noted that the differential packet size is not a simple subtraction, in fact, it needs to contain some context-related things), the benefits of using differential upgrade are obvious, users do not need to download the complete 8M
  • the file only needs to download the update part, and the update part may only have 3-4M, which can greatly reduce the loss of traffic. Therefore, in this embodiment, it is preferable to generate a differential upgrade package for upgrading.
  • the backoff information includes the path information of the old version data segment corresponding to the difference data applied by the new and old versions, for example, “xx/xx/filename”, because the difference file generally includes multiple, so back
  • the content of the return information can be:
  • the rollback information may be defined in other manners.
  • the rollback information may include the identifier information of the old version data corresponding to the difference data of the new and old version applications, so that the corresponding file is subsequently extracted according to the identifier information. .
  • the generating module 20 is configured to: generate a differential back-off packet according to the obtained back-off information.
  • the generating module 20 includes the following units:
  • the parsing unit 210 is configured to: parse the acquired back information, and obtain path information according to the back information.
  • the parsing unit 210 analyzes the data in the rollback information, and obtains path information of the original version file corresponding to the upgrade package included therein.
  • the generating unit 220 is configured to: generate the differential backoff packet according to the path information.
  • the generating unit 220 generates a differential back-off packet according to the path information acquired by the parsing unit 210, and the specific process is as follows:
  • the generating unit 220 includes the following subunits:
  • the extraction sub-unit 221 is configured to: extract an application data segment corresponding to the path information in the application data corresponding to the to-be-upgraded application.
  • the compression signature sub-unit 222 is configured to: encapsulate and digitally sign the obtained application data segment to generate the differential back-off packet.
  • the extraction sub-unit 221 obtains the corresponding application data segment from the terminal system file in the order of the multiple fallback sub-commands, and the extraction sub-unit 221 obtains the corresponding application data segment from the terminal system file.
  • the compression signature sub-unit 222 encapsulates and compresses all the acquired application data segments.
  • the compression signature sub-unit 222 is configured according to the signature key sent by the server or the signature key preset by the terminal.
  • the back-off package is digitally signed, and the digital signature is a conventional technical means, and will not be described here.
  • the upgrade module 30 is configured to: upgrade the application to be upgraded according to the obtained upgrade package.
  • the first fallback module 40 when the upgrade fails, the application to be upgraded is rolled back according to the generated differential backoff package.
  • Upgrade failure may occur when upgrade module 30 upgrades the application to be upgraded. At this time, the first The rollback module 40 automatically retrieves the differential rollback package and rolls back the application to be upgraded, so that the system rolls back to the version before the upgrade.
  • the differential back-off upgrade device proposed in this embodiment obtains a differential upgrade package and a differential fallback script by using a complete upgrade data packet, and performs a differential fallback packet according to the differential fallback script before performing the upgrade, and digitally signs and saves the packet. In order to roll back after the application upgrade fails.
  • the apparatus further includes:
  • the storage module 50 is configured to: store the differential backoff package.
  • the receiving module 60 is configured to: after the upgrade is successful, receive a fallback command.
  • the extraction module 70 is configured to: extract the differential back-off package corresponding to the received back-off instruction.
  • the second back-off module 80 is configured to perform a rollback operation on the upgraded application to be upgraded according to the extracted differential back-off package.
  • the storage module 50 saves the generated differential back-off package to the terminal for subsequent use by the user. For example, after a successful upgrade, if there is a system error or an application error, the user does not want to use the current version. If you want to roll back the version, you can directly select the differential rollback package for version rollback. You do not need to download the complete rollback package from the server. , can achieve the purpose of rapid rollback.
  • the user may be provided with a selection interface, and the user sends a back-off instruction based on the selection interface.
  • the extraction module 70 extracts the differential back corresponding to the received back-off instruction.
  • the second back-off module 80 performs version rollback on the upgraded application to be upgraded according to the extracted back-off package.
  • first backoff module 40 and the second backoff module 80 may be the same module.
  • the differential upgrade device proposed in this embodiment can call the previously generated differential backoff package to roll back to the version before the upgrade if the user does not want to use the upgraded application version.
  • the embodiment of the invention also discloses a computer program, including program instructions, when the program instruction When executed by the terminal, the terminal can perform any of the above differential fallback upgrade methods.
  • the embodiment of the invention also discloses a carrier carrying the computer program.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the technical solution of the present invention Before the upgrade, the technical solution of the present invention generates a differential backoff packet according to the rollback information, so as to perform the rollback after the upgrade fails, and solves the problem that the version cannot be rolled back in time after the upgrade fails. Therefore, the present invention has strong industrial applicability.

Abstract

A differential rollback upgrading method and apparatus. The method comprises: acquiring an upgrade package and rollback information (S10); generating, according to the rollback information, a differential rollback package (S20); upgrading, according to the upgrade package, an application to be upgraded (S30); and when upgrading fails, rolling back, according to the differential rollback package, the application to be upgraded (S40). Before upgrading, a differential rollback package is generated according to rollback information such that rollback is performed after upgrading fails, thereby resolving the problem of delayed version rollback after upgrading fails.

Description

差分回退升级方法及装置Differential fallback upgrade method and device 技术领域Technical field
本文涉及应用升级技术领域,尤其涉及一种差分回退升级方法及装置。This document relates to the field of application upgrade technologies, and in particular, to a differential fallback upgrade method and apparatus.
背景技术Background technique
目前大厂商均未提供差分回退包,只有各个版本的升级包,而且这些升级包需要到各个厂商的网站上查找,并且各个版本的升级包占用内存比较大,需要将升级包从电脑拷贝到终端再做升级,操作复杂,过程麻烦,需要一定的技巧性,不利于用户体验。At present, most manufacturers do not provide differential rollback packages, only the upgrade packages of each version, and these upgrade packages need to be searched on the websites of various vendors, and each version of the upgrade package occupies a large memory, and the upgrade package needs to be copied from the computer to The terminal is upgraded again, the operation is complicated, the process is troublesome, and it requires certain skill, which is not conducive to the user experience.
而且,如果升级失败,无法直接进行版本回退,需要从网站下载回退包才能进行回退。Moreover, if the upgrade fails, you cannot directly roll back the version. You need to download the rollback package from the website to roll back.
发明内容Summary of the invention
本发明的主要目的在于提供一种差分回退升级方法及装置,旨在解决升级失败后无法及时回退版本的问题。The main purpose of the present invention is to provide a differential fallback upgrade method and device, which is to solve the problem that the version cannot be rolled back in time after the upgrade fails.
为实现上述目的,采用如下技术方案:In order to achieve the above objectives, the following technical solutions are adopted:
一种差分回退升级方法,包括:A differential fallback upgrade method includes:
获取升级包和与所述升级包对应的回退信息;Obtaining an upgrade package and rollback information corresponding to the upgrade package;
根据获取到的所述回退信息生成差分回退包;Generating a differential backoff packet according to the obtained backoff information;
根据获取到的所述升级包对待升级应用进行升级;Upgrading the application to be upgraded according to the obtained upgrade package;
当升级失败时,根据生成的所述差分回退包对所述待升级应用进行回退操作。When the upgrade fails, the application to be upgraded is rolled back according to the generated differential backoff package.
可选地,当所述回退信息包括路径信息时,所述根据获取到的所述回退信息生成差分回退包的步骤包括:Optionally, when the rollback information includes the path information, the step of generating a differential backoff packet according to the obtained backoff information includes:
解析获取到的所述回退信息,根据所述回退信息获取路径信息;Parsing the obtained back information, and acquiring path information according to the back information;
根据所述路径信息生成所述差分回退包。 Generating the differential backoff packet according to the path information.
可选地,所述根据所述路径信息生成所述差分回退包的步骤包括:Optionally, the step of generating the differential backoff packet according to the path information includes:
在所述待升级应用对应的应用数据中提取与所述路径信息对应的应用数据段;Extracting an application data segment corresponding to the path information in the application data corresponding to the to-be-upgraded application;
对获取的所述应用数据段封装并进行数字签名,以生成所述差分回退包。The obtained application data segment is encapsulated and digitally signed to generate the differential backoff packet.
可选地,所述根据获取到的所述回退信息生成差分回退包的步骤之后,所述根据获取到的所述升级包对待升级应用进行升级的步骤之后,该方法还包括:Optionally, after the step of generating the differential back-off package according to the obtained the back-off information, after the step of upgrading the upgrade-up application according to the obtained upgrade package, the method further includes:
存储所述差分回退包。The differential backoff packet is stored.
可选地,所述根据生成的所述差分升级包对被待升级应用进行升级的步骤之后,该方法还包括:Optionally, after the step of upgrading the application to be upgraded according to the generated differential upgrade package, the method further includes:
在升级成功后,接收回退指令;After the upgrade is successful, receiving a fallback instruction;
提取与接收到的所述回退指令对应的所述差分回退包;Extracting the differential back-off packet corresponding to the received back-off instruction;
根据提取到的所述差分回退包对升级后的所述待升级应用进行回退操作。And performing a rollback operation on the upgraded application to be upgraded according to the extracted differential backoff package.
一种差分回退升级装置,包括获取模块、生成模块、升级模块和第一回退模块,其中:A differential fallback upgrade device includes an acquisition module, a generation module, an upgrade module, and a first fallback module, where:
所述获取模块设置成:获取升级包和与所述升级包对应的回退信息;The obtaining module is configured to: obtain an upgrade package and rollback information corresponding to the upgrade package;
所述生成模块设置成:根据获取到的所述回退信息生成差分回退包;The generating module is configured to: generate a differential back-off packet according to the obtained back-off information;
所述升级模块设置成:根据获取到的所述升级包对待升级应用进行升级;The upgrade module is configured to: upgrade the application to be upgraded according to the obtained upgrade package;
所述第一回退模块设置成:当升级失败时,根据生成的所述差分回退包对所述待升级应用进行回退操作。The first back-off module is configured to perform a rollback operation on the to-be-upgraded application according to the generated differential back-off package when the upgrade fails.
可选地,所述生成模块包括解析单元和生成单元,其中:Optionally, the generating module includes a parsing unit and a generating unit, where:
所述解析单元设置成:解析获取到的所述回退信息,根据所述回退信息获取路径信息;The parsing unit is configured to: parse the obtained back information, and obtain path information according to the back information;
所述生成单元设置成:根据所述路径信息生成所述差分回退包。 The generating unit is configured to: generate the differential backoff packet according to the path information.
可选地,所述生成单元包括提取子单元和压缩签名子单元,其中:Optionally, the generating unit includes an extracting subunit and a compressing signature subunit, wherein:
所述提取子单元设置成:在所述待升级应用对应的应用数据中提取与所述路径信息对应的应用数据段;The extracting subunit is configured to: extract an application data segment corresponding to the path information in application data corresponding to the to-be-upgraded application;
所述压缩签名子单元设置成:对获取的所述应用数据段封装并进行数字签名,以生成所述差分回退包。The compression signature subunit is configured to encapsulate and digitally sign the acquired application data segment to generate the differential backoff packet.
可选地,该装置还包括:Optionally, the device further includes:
存储模块,设置成:存储所述差分回退包。The storage module is configured to: store the differential backoff package.
可选地,该装置还包括接收模块、提取模块和第二回退模块,其中:Optionally, the device further includes a receiving module, an extracting module, and a second backing module, where:
所述接收模块设置成:在升级成功后,接收回退指令;The receiving module is configured to: after the upgrade is successful, receive a backoff instruction;
所述提取模块设置成:提取与接收到的所述回退指令对应的所述差分回退包;The extracting module is configured to: extract the differential back-off package corresponding to the received back-off instruction;
所述第二回退模块设置成:根据提取到的所述差分回退包对升级后的所述待升级应用进行回退操作。The second back-off module is configured to perform a rollback operation on the upgraded application to be upgraded according to the extracted differential back-off package.
一种计算机程序,包括程序指令,当该程序指令被终端执行时,使得该终端可执行上述任意的差分回退升级方法。A computer program comprising program instructions that, when executed by a terminal, cause the terminal to perform any of the differential fallback upgrade methods described above.
一种载有所述的计算机程序的载体。A carrier carrying the computer program as described.
本发明技术方案提出的差分回退升级方法及装置,利用完整的升级数据包获取差分升级包和差分回退脚本,在进行升级之前,根据差分回退脚本制作差分回退包,对其进行数字签名并保存,以便于在升级失败后进行回退;而且在升级成功之后如果用户不想使用升级后的版本,可以随时调用生成的差分回退包回退到升级之前的版本。The differential back-off upgrade method and device provided by the technical solution of the present invention obtains a differential upgrade package and a differential fallback script by using a complete upgrade data packet, and before the upgrade, a differential back-off package is created according to the differential fallback script, and the digital Sign and save to roll back after the upgrade fails; and if the user does not want to use the upgraded version after the upgrade is successful, you can call the generated differential fallback package to roll back to the pre-upgrade version at any time.
附图概述BRIEF abstract
图1为本发明差分回退升级方法的第一实施例的流程图;1 is a flowchart of a first embodiment of a differential fallback upgrade method according to the present invention;
图2为图1中步骤S20的细化流程示意图; 2 is a schematic diagram of a refinement process of step S20 in FIG. 1;
图3为图2中步骤S202的细化流程示意图;3 is a schematic diagram of a refinement process of step S202 in FIG. 2;
图4为本发明差分回退升级方法的第二实施例的流程图;4 is a flowchart of a second embodiment of a differential fallback upgrade method according to the present invention;
图5为本发明差分回退升级装置的第一实施例的功能模块示意图;FIG. 5 is a schematic diagram of functional modules of a first embodiment of a differential fallback upgrade apparatus according to the present invention; FIG.
图6为图5中生成模块的细化功能模块示意图;6 is a schematic diagram of a refinement function module of the generation module in FIG. 5;
图7为图5中生成单元的细化功能模块示意图;7 is a schematic diagram of a refinement function module of the generating unit in FIG. 5;
图8为本发明差分回退升级装置的第二实施例的功能模块示意图。FIG. 8 is a schematic diagram of functional modules of a second embodiment of a differential fallback upgrade apparatus according to the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
本发明的较佳实施方式Preferred embodiment of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明实施例提供一种差分回退升级方法。The embodiment of the invention provides a differential fallback upgrade method.
参照图1所示,为本发明差分回退升级方法第一实施例的流程图。Referring to FIG. 1 , it is a flowchart of a first embodiment of a differential fallback upgrade method according to the present invention.
在第一实施例中,差分回退升级方法包括:In the first embodiment, the differential fallback upgrade method includes:
步骤S10,获取升级包和与所述升级包对应的回退信息;Step S10: Obtain an upgrade package and rollback information corresponding to the upgrade package.
在服务器上通过升级包制作工具将旧版本应用的数据与新版本应用的数据进行对比分析,检测是否有差异,当检测不到版本差异时,继续获取新版本应用与旧版本应用对比分析;当检测到差异时,根据比对结果生成升级包文件,与此同时,根据对比的结果,生成回退信息,可以在利用升级包制作工具生成升级包的时候将回退信息打包到升级包中,也可以将回退信息单独保存并且与升级包建立关联,例如可以以相同的版本号进行命名,或者在回退信息中添加标示符等方法。Compare and analyze the data of the old version application with the data of the new version application by using the upgrade package creation tool on the server to detect whether there is any difference. When the version difference is not detected, continue to obtain a comparison analysis between the new version application and the old version application; When the difference is detected, the upgrade package file is generated according to the comparison result. At the same time, according to the comparison result, the rollback information is generated, and the rollback information can be packaged into the upgrade package when the upgrade package is generated by using the upgrade package creation tool. The fallback information can also be saved separately and associated with the upgrade package, for example, it can be named with the same version number, or a method such as adding an identifier to the rollback information.
需要说明的是,此处的升级包可以是完整的升级数据包,也可以是差分升级包,也可以生成这两种升级包,以供用户在需要升级的时候根据需要进 行选择;而且,此处的升级可以是对终端的操作系统进行升级,也可以是对终端上的应用软件升级,其原理相同。It should be noted that the upgrade package here may be a complete upgrade package, a differential upgrade package, or both upgrade packages, so that the user can enter the upgrade as needed. Line selection; Moreover, the upgrade here may be an upgrade of the operating system of the terminal, or an application software upgrade on the terminal, the principle is the same.
完整版的数据包占用内存大且升级速度慢,而差分升级包是将新版本文件与旧版本应用的数据做差分,得到更新的补丁文件,例如旧版本的文件有5M,新版的文件有8M,更新的部分则可能只有3M左右(这里需要说明的是,差分包大小并不是简单的相减,其实需要包含一些上下文相关的东西),使用差分升级的好处显而易见,用户不需要下载完整的8M文件,只需要下载更新部分就可以,而更新部分可能只有3-4M,可以很大程度上减少流量的损失,因此本实施例中优选生成差分升级包进行升级。The full version of the data packet occupies a large memory and the upgrade speed is slow, and the differential upgrade package differentiates the new version file from the data of the old version application, and obtains the updated patch file. For example, the old version file has 5M, and the new version file has 8M. The updated part may only be about 3M (here, it should be noted that the differential packet size is not a simple subtraction, in fact, it needs to contain some context-related things), the benefits of using differential upgrade are obvious, users do not need to download the complete 8M The file only needs to download the update part, and the update part may only have 3-4M, which can greatly reduce the loss of traffic. Therefore, in this embodiment, it is preferable to generate a differential upgrade package for upgrading.
本实施例中该回退信息中包含有新、旧版本应用的差异数据对应的旧版本数据段的路径信息,例如“xx/xx/filename”,由于差异文件一般情况下包括多个,所以回退信息的内容可以为:In this embodiment, the backoff information includes the path information of the old version data segment corresponding to the difference data applied by the new and old versions, for example, “xx/xx/filename”, because the difference file generally includes multiple, so back The content of the return information can be:
“rollback:"rollback:
“xx/xx/filename1”"xx/xx/filename1"
“xx/xx/filename2”"xx/xx/filename2"
“xx/xx/filename3”"xx/xx/filename3"
……”......"
在其他的实施例中也可以其他的方式定义回退信息,例如回退信息可以包括新、旧版本文件的差异文件对应的旧版本文件的标识信息,以供后续根据标志信息提取相应的数据段。In other embodiments, the rollback information may be defined in other manners. For example, the rollback information may include the identifier information of the old version file corresponding to the difference file of the new and old version files, so as to extract corresponding data segments according to the flag information. .
步骤S20,根据获取到的所述回退信息生成差分回退包。Step S20: Generate a differential backoff packet according to the obtained backoff information.
如图2所示,步骤S20包括如下细化步骤:As shown in FIG. 2, step S20 includes the following refinement steps:
步骤S201解析获取到的所述回退信息,根据所述回退信息获取路径信息。Step S201 analyzes the obtained back-off information, and acquires path information according to the back-off information.
步骤S202,根据所述路径信息生成所述差分回退包。如图3所示,步骤S202包括如下细化步骤:Step S202, generating the differential backoff packet according to the path information. As shown in FIG. 3, step S202 includes the following refinement steps:
步骤S211,在所述待升级应用对应的应用数据中提取与所述路径信息对应的应用数据段。Step S211: Extract an application data segment corresponding to the path information in the application data corresponding to the to-be-upgraded application.
步骤S212,对获取的所述应用数据段封装并进行数字签名,以生成所述差分回退包。 Step S212, the obtained application data segment is encapsulated and digitally signed to generate the differential backoff packet.
由于回退信息中包含多个对应的应用数据段的路径信息,按照多个回退子命令的顺序从终端系统文件中获取对应的应用数据段,直至回退信息行执行完毕,将获取到的全部应用数据段封装,封装完成后,可以将其压缩成zip格式的文件或者以其他的压缩格式进行压缩,根据服务器下发的签名的key或者终端预置的签名key,针对回退包做数字签名,数字签名为惯用技术手段,在此不再赘述。The information about the corresponding application data segment is included in the rollback information, and the corresponding application data segment is obtained from the terminal system file in the order of multiple fallback subcommands, and the obtained information is obtained after the rollback information line is executed. All the application data segments are encapsulated. After the encapsulation is completed, it can be compressed into a zip file or compressed in another compression format. According to the signature key sent by the server or the signature key preset by the terminal, the number is returned for the rollback packet. Signature, digital signature is a common technical means, and will not be repeated here.
步骤S30,根据获取到的所述升级包对待升级应用进行升级。In step S30, the upgrade application is upgraded according to the obtained upgrade package.
步骤S40,当升级失败时,根据生成的所述差分回退包对所述待升级应用进行回退操作。Step S40: Perform a rollback operation on the to-be-upgraded application according to the generated differential back-off package when the upgrade fails.
在进行升级时可能会出现升级失败,这时会自动调取差分回退包进行回退,使系统回退到原始状态。An upgrade failure may occur during the upgrade. In this case, the differential rollback package is automatically retrieved to roll back and the system is rolled back to the original state.
本实施例提出的差分回退升级方法,利用新旧版本应用的数据进行对比,获取升级包和差分信息,在进行升级之前,根据差分信息制作差分回退包,对其进行数字签名并保存,以便于在升级失败后进行回退。The differential back-off upgrade method proposed in this embodiment uses the data of the new and old versions to compare and obtain the upgrade package and the difference information. Before the upgrade, the differential back-off package is generated according to the difference information, and is digitally signed and saved. Roll back after the upgrade failed.
参照图4,基于第一实施例提出本发明差分回退升级方法第二实施例,在本实施例中,步骤S40之后,该方法还包括:Referring to FIG. 4, a second embodiment of the differential rollback upgrade method of the present invention is proposed based on the first embodiment. In this embodiment, after the step S40, the method further includes:
步骤S50,存储所述差分回退包。Step S50, storing the differential backoff package.
步骤S60,在升级成功后,接收回退指令。In step S60, after the upgrade is successful, a rollback command is received.
步骤S70,提取与接收到的所述回退指令对应的所述差分回退包。Step S70, extracting the differential back-off package corresponding to the received back-off instruction.
步骤S80,根据提取到的所述差分回退包对升级后的所述待升级应用进行回退操作。Step S80: Perform a rollback operation on the upgraded application to be upgraded according to the extracted differential backoff package.
将差分回退包保存在终端,以供用户使用。例如在成功升级之后,如果出现系统报错、应用报错的情况,用户不想使用当前版本,想回退版本,则可直接选择差分回退包进行版本回退,无需再从服务器下载完整的回退包,可以达到快速回退的目的。此时可以为用户提供选择界面,用户基于该选择界面发出回退指令,当接收到用户发出的回退指令后,提取与接收到的回退指令对应的所述差分回退包,对待升级应用进行版本回退。 Save the differential fallback package to the terminal for the user to use. For example, after a successful upgrade, if there is a system error or an application error, the user does not want to use the current version. If you want to roll back the version, you can directly select the differential rollback package for version rollback. You do not need to download the complete rollback package from the server. , can achieve the purpose of rapid rollback. At this time, the user may be provided with a selection interface. The user sends a back-off instruction based on the selection interface. After receiving the back-off instruction issued by the user, the user sends the differential back-off package corresponding to the received back-off instruction, and the application is to be upgraded. Perform a version rollback.
本实施例提出的差分回退升级方法,在差分升级完成之后如果用户不想使用升级后的版本,可以随时调用之前制作的差分回退包回退到升级之前的版本。In the differential rollback upgrade method in this embodiment, if the user does not want to use the upgraded version after the differential upgrade is completed, the previously generated differential backoff package can be called back to the version before the upgrade.
本发明实施例还提出一种差分回退升级装置。The embodiment of the invention further provides a differential back-off upgrade device.
参照图5,图5为本发明差分回退升级装置第一实施例的示意图。Referring to FIG. 5, FIG. 5 is a schematic diagram of a first embodiment of a differential fallback upgrade apparatus according to the present invention.
在该实施例中,差分回退升级装置包括:In this embodiment, the differential fallback upgrade device includes:
获取模块10,设置成:获取升级包和与所述升级包对应的回退信息。The obtaining module 10 is configured to: obtain an upgrade package and rollback information corresponding to the upgrade package.
在服务器上通过升级包制作工具将旧版本应用的数据与新版本应用的数据进行对比分析,检测是否有差异,当检测不到版本差异时,继续获取新版本应用与旧版本应用对比分析;当检测到差异时,根据比对结果生成升级包文件,与此同时,根据对比的结果,生成回退信息,可以在利用升级包制作工具生成升级包的时候将回退信息打包到升级包中,也可以将回退信息单独保存并且与升级包建立关联,例如可以以相同的版本号进行命名,或者在回退信息中添加标示符等方法。Compare and analyze the data of the old version application with the data of the new version application by using the upgrade package creation tool on the server to detect whether there is any difference. When the version difference is not detected, continue to obtain a comparison analysis between the new version application and the old version application; When the difference is detected, the upgrade package file is generated according to the comparison result. At the same time, according to the comparison result, the rollback information is generated, and the rollback information can be packaged into the upgrade package when the upgrade package is generated by using the upgrade package creation tool. The fallback information can also be saved separately and associated with the upgrade package, for example, it can be named with the same version number, or a method such as adding an identifier to the rollback information.
需要说明的是,此处的升级包可以是完整的升级数据包,也可以是差分升级包,也可以生成这两种升级包,以供用户在需要升级的时候根据需要进行选择。It should be noted that the upgrade package here may be a complete upgrade package, a differential upgrade package, or both upgrade packages, so that users can select them according to their needs when they need to upgrade.
完整版的数据包占用内存大且升级速度慢,而差分升级包是将新版本文件与旧版本应用的数据做差分,得到更新的补丁文件,例如旧版本的文件有5M,新版的文件有8M,更新的部分则可能只有3M左右(这里需要说明的是,差分包大小并不是简单的相减,其实需要包含一些上下文相关的东西),使用差分升级的好处显而易见,用户不需要下载完整的8M文件,只需要下载更新部分就可以,而更新部分可能只有3-4M,可以很大程度上减少流量的损失,因此本实施例中优选生成差分升级包进行升级。The full version of the data packet occupies a large memory and the upgrade speed is slow, and the differential upgrade package differentiates the new version file from the data of the old version application, and obtains the updated patch file. For example, the old version file has 5M, and the new version file has 8M. The updated part may only be about 3M (here, it should be noted that the differential packet size is not a simple subtraction, in fact, it needs to contain some context-related things), the benefits of using differential upgrade are obvious, users do not need to download the complete 8M The file only needs to download the update part, and the update part may only have 3-4M, which can greatly reduce the loss of traffic. Therefore, in this embodiment, it is preferable to generate a differential upgrade package for upgrading.
本实施例中该回退信息中包含有新、旧版本应用的差异数据对应的旧版本数据段的路径信息,例如“xx/xx/filename”,由于差异文件一般情况下包括多个,所以回退信息的内容可以为:In this embodiment, the backoff information includes the path information of the old version data segment corresponding to the difference data applied by the new and old versions, for example, “xx/xx/filename”, because the difference file generally includes multiple, so back The content of the return information can be:
“rollback:"rollback:
“xx/xx/filename1” "xx/xx/filename1"
“xx/xx/filename2”"xx/xx/filename2"
“xx/xx/filename3”"xx/xx/filename3"
……”......"
在其他的实施例中也可以其他的方式定义回退信息,例如回退信息可以包括新、旧版本应用的差异数据对应的旧版本数据的标识信息,以供后续根据该标识信息提取相应的文件。In other embodiments, the rollback information may be defined in other manners. For example, the rollback information may include the identifier information of the old version data corresponding to the difference data of the new and old version applications, so that the corresponding file is subsequently extracted according to the identifier information. .
生成模块20,设置成:根据获取到的所述回退信息生成差分回退包。The generating module 20 is configured to: generate a differential back-off packet according to the obtained back-off information.
如图2所示,生成模块20包括以下单元:As shown in FIG. 2, the generating module 20 includes the following units:
解析单元210,设置成:于解析获取到的所述回退信息,根据所述回退信息获取路径信息。The parsing unit 210 is configured to: parse the acquired back information, and obtain path information according to the back information.
在获取模块10获取到回退信息10之后,解析单元210对回退信息中的数据进行分析,从中获取其包含的升级包对应的原始版本文件的路径信息。After the obtaining module 10 obtains the rollback information 10, the parsing unit 210 analyzes the data in the rollback information, and obtains path information of the original version file corresponding to the upgrade package included therein.
生成单元220,设置成:根据所述路径信息生成所述差分回退包。The generating unit 220 is configured to: generate the differential backoff packet according to the path information.
生成单元220根据解析单元210获取到的路径信息生成差分回退包,其具体过程如下:The generating unit 220 generates a differential back-off packet according to the path information acquired by the parsing unit 210, and the specific process is as follows:
如图3所示,生成单元220包括如下子单元:As shown in FIG. 3, the generating unit 220 includes the following subunits:
提取子单元221,设置成:在所述待升级应用对应的应用数据中提取与所述路径信息对应的应用数据段。The extraction sub-unit 221 is configured to: extract an application data segment corresponding to the path information in the application data corresponding to the to-be-upgraded application.
压缩签名子单元222,设置成:对获取的所述应用数据段封装并进行数字签名,以生成所述差分回退包。The compression signature sub-unit 222 is configured to: encapsulate and digitally sign the obtained application data segment to generate the differential back-off packet.
由于获取模块10所获取到的回退信息中包含多个对应的应用数据段的路径信息,提取子单元221按照多个回退子命令的顺序从终端系统文件中获取对应的应用数据段,直至回退信息行执行完毕,压缩签名子单元222将获取到的全部应用数据段封装压缩,封装压缩完成后,压缩签名子单元222根据服务器下发的签名的key或者终端预置的签名key,针对回退包做数字签名,数字签名为惯用技术手段,在此不再赘述。The extraction sub-unit 221 obtains the corresponding application data segment from the terminal system file in the order of the multiple fallback sub-commands, and the extraction sub-unit 221 obtains the corresponding application data segment from the terminal system file. After the execution of the rollback information line is completed, the compression signature sub-unit 222 encapsulates and compresses all the acquired application data segments. After the package compression is completed, the compression signature sub-unit 222 is configured according to the signature key sent by the server or the signature key preset by the terminal. The back-off package is digitally signed, and the digital signature is a conventional technical means, and will not be described here.
升级模块30,设置成:根据获取到的所述升级包对待升级应用进行升级。The upgrade module 30 is configured to: upgrade the application to be upgraded according to the obtained upgrade package.
第一回退模块40,当升级失败时,根据生成的所述差分回退包对所述待升级应用进行回退。The first fallback module 40, when the upgrade fails, the application to be upgraded is rolled back according to the generated differential backoff package.
在升级模块30对待升级应用进行升级时可能会出现升级失败,这时第一 回退模块40会自动调取差分回退包对待升级应用进行回退,使系统回退到升级之前的版本。Upgrade failure may occur when upgrade module 30 upgrades the application to be upgraded. At this time, the first The rollback module 40 automatically retrieves the differential rollback package and rolls back the application to be upgraded, so that the system rolls back to the version before the upgrade.
本实施例提出的差分回退升级装置,利用完整的升级数据包获取差分升级包和差分回退脚本,在进行升级之前,根据差分回退脚本制作差分回退包,对其进行数字签名并保存,以便于在应用升级失败后进行回退。The differential back-off upgrade device proposed in this embodiment obtains a differential upgrade package and a differential fallback script by using a complete upgrade data packet, and performs a differential fallback packet according to the differential fallback script before performing the upgrade, and digitally signs and saves the packet. In order to roll back after the application upgrade fails.
参照图8,基于第一实施例提出本发明差分回退升级装置第二实施例,在本实施例中,该装置还包括:Referring to FIG. 8 , a second embodiment of the differential fallback upgrading apparatus of the present invention is proposed based on the first embodiment. In this embodiment, the apparatus further includes:
存储模块50,设置成:存储所述差分回退包。The storage module 50 is configured to: store the differential backoff package.
接收模块60,设置成:在升级成功后,接收回退指令。The receiving module 60 is configured to: after the upgrade is successful, receive a fallback command.
提取模块70,设置成:提取与接收到的所述回退指令对应的所述差分回退包。The extraction module 70 is configured to: extract the differential back-off package corresponding to the received back-off instruction.
第二回退模块80,设置成:根据提取到的所述差分回退包对升级后的所述待升级应用进行回退操作。The second back-off module 80 is configured to perform a rollback operation on the upgraded application to be upgraded according to the extracted differential back-off package.
存储模块50将生成的差分回退包保存在终端,以供用户后续使用。例如在成功升级之后,如果出现系统报错、应用报错的情况,用户不想使用当前版本,想回退版本,则可直接选择差分回退包进行版本回退,无需再从服务器下载完整的回退包,可以达到快速回退的目的。此时可以为用户提供选择界面,用户基于该选择界面发出回退指令,当接收模块60接收到用户发出的回退指令后,提取模块70提取与接收到的回退指令对应的所述差分回退包,第二回退模块80根据提取到的回退包对升级后的待升级应用进行版本回退。The storage module 50 saves the generated differential back-off package to the terminal for subsequent use by the user. For example, after a successful upgrade, if there is a system error or an application error, the user does not want to use the current version. If you want to roll back the version, you can directly select the differential rollback package for version rollback. You do not need to download the complete rollback package from the server. , can achieve the purpose of rapid rollback. At this time, the user may be provided with a selection interface, and the user sends a back-off instruction based on the selection interface. After the receiving module 60 receives the back-off instruction issued by the user, the extraction module 70 extracts the differential back corresponding to the received back-off instruction. After the packet is returned, the second back-off module 80 performs version rollback on the upgraded application to be upgraded according to the extracted back-off package.
需要说明的是,第一回退模块40和第二回退模块80可以是同一个模块。It should be noted that the first backoff module 40 and the second backoff module 80 may be the same module.
本实施例提出的差分升级装置在差分升级成功之后,如果用户不想使用升级后的应用版本,可以随时调用之前制作的差分回退包回退到升级之前的版本。After the differential upgrade is successful, the differential upgrade device proposed in this embodiment can call the previously generated differential backoff package to roll back to the version before the upgrade if the user does not want to use the upgraded application version.
本发明实施例还公开了一种计算机程序,包括程序指令,当该程序指令 被终端执行时,使得该终端可执行上述任意的差分回退升级方法。The embodiment of the invention also discloses a computer program, including program instructions, when the program instruction When executed by the terminal, the terminal can perform any of the above differential fallback upgrade methods.
本发明实施例还公开了一种载有所述的计算机程序的载体。The embodiment of the invention also discloses a carrier carrying the computer program.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art will appreciate that all or a portion of the steps of the above-described embodiments can be implemented using a computer program flow, which can be stored in a computer readable storage medium, such as on a corresponding hardware platform (eg, The system, device, device, device, etc. are executed, and when executed, include one or a combination of the steps of the method embodiments.
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Alternatively, all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。The devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. The above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求所述的保护范围为准。Variations or substitutions are readily conceivable within the scope of the present invention by those skilled in the art and are within the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.
工业实用性Industrial applicability
本发明技术方案在进行升级之前,根据回退信息制作差分回退包以便于在升级失败后进行回退,解决了升级失败后无法及时回退版本的问题。因此本发明具有很强的工业实用性。 Before the upgrade, the technical solution of the present invention generates a differential backoff packet according to the rollback information, so as to perform the rollback after the upgrade fails, and solves the problem that the version cannot be rolled back in time after the upgrade fails. Therefore, the present invention has strong industrial applicability.

Claims (12)

  1. 一种差分回退升级方法,包括:A differential fallback upgrade method includes:
    获取升级包和与所述升级包对应的回退信息;Obtaining an upgrade package and rollback information corresponding to the upgrade package;
    根据获取到的所述回退信息生成差分回退包;Generating a differential backoff packet according to the obtained backoff information;
    根据获取到的所述升级包对待升级应用进行升级;Upgrading the application to be upgraded according to the obtained upgrade package;
    当升级失败时,根据生成的所述差分回退包对所述待升级应用进行回退操作。When the upgrade fails, the application to be upgraded is rolled back according to the generated differential backoff package.
  2. 根据权利要求1所述的差分回退升级方法,其中,当所述回退信息包括路径信息时,所述根据获取到的所述回退信息生成差分回退包的步骤包括:The differential fallback upgrade method according to claim 1, wherein when the fallback information includes the path information, the step of generating a differential backoff packet according to the obtained backoff information includes:
    解析获取到的所述回退信息,根据所述回退信息获取路径信息;Parsing the obtained back information, and acquiring path information according to the back information;
    根据所述路径信息生成所述差分回退包。Generating the differential backoff packet according to the path information.
  3. 根据权利要求2所述的差分回退升级方法,其中,所述根据所述路径信息生成所述差分回退包的步骤包括:The differential fallback upgrade method according to claim 2, wherein the step of generating the differential backoff packet according to the path information comprises:
    在所述待升级应用对应的应用数据中提取与所述路径信息对应的应用数据段;Extracting an application data segment corresponding to the path information in the application data corresponding to the to-be-upgraded application;
    对获取的所述应用数据段封装并进行数字签名,以生成所述差分回退包。The obtained application data segment is encapsulated and digitally signed to generate the differential backoff packet.
  4. 根据权利要求1所述的差分回退升级方法,其中,所述根据获取到的所述回退信息生成差分回退包的步骤之后,所述根据获取到的所述升级包对待升级应用进行升级的步骤之前,该方法还包括:The differential fallback upgrade method according to claim 1, wherein after the step of generating a differential backoff packet according to the obtained backoff information, the upgrading the application to be upgraded according to the obtained upgrade package Before the steps, the method further includes:
    存储所述差分回退包。The differential backoff packet is stored.
  5. 根据权利要求4所述的差分回退升级方法,其中,所述根据生成的所述差分升级包对被待升级应用进行升级的步骤之后,该方法还包括:The differential fallback upgrade method according to claim 4, wherein after the step of upgrading the application to be upgraded according to the generated differential upgrade package, the method further includes:
    在升级成功后,接收回退指令;After the upgrade is successful, receiving a fallback instruction;
    提取与接收到的所述回退指令对应的所述差分回退包;Extracting the differential back-off packet corresponding to the received back-off instruction;
    根据提取到的所述差分回退包对升级后的所述待升级应用进行回退操作。 And performing a rollback operation on the upgraded application to be upgraded according to the extracted differential backoff package.
  6. 一种差分回退升级装置,包括获取模块、生成模块、升级模块和第一回退模块,其中:A differential fallback upgrade device includes an acquisition module, a generation module, an upgrade module, and a first fallback module, where:
    所述获取模块设置成:获取升级包和与所述升级包对应的回退信息;The obtaining module is configured to: obtain an upgrade package and rollback information corresponding to the upgrade package;
    所述生成模块设置成:根据获取到的所述回退信息生成差分回退包;The generating module is configured to: generate a differential back-off packet according to the obtained back-off information;
    所述升级模块设置成:根据获取到的所述升级包对待升级应用进行升级;The upgrade module is configured to: upgrade the application to be upgraded according to the obtained upgrade package;
    所述第一回退模块设置成:当升级失败时,根据生成的所述差分回退包对所述待升级应用进行回退操作。The first back-off module is configured to perform a rollback operation on the to-be-upgraded application according to the generated differential back-off package when the upgrade fails.
  7. 根据权利要求6所述的差分回退升级装置,其中,所述生成模块包括解析单元和生成单元,其中:The differential back-off upgrading apparatus according to claim 6, wherein the generating module comprises a parsing unit and a generating unit, wherein:
    所述解析单元设置成:解析获取到的所述回退信息,根据所述回退信息获取路径信息;The parsing unit is configured to: parse the obtained back information, and obtain path information according to the back information;
    所述生成单元设置成:根据所述路径信息生成所述差分回退包。The generating unit is configured to: generate the differential backoff packet according to the path information.
  8. 根据权利要求7所述的差分回退升级装置,其中,所述生成单元包括提取子单元和压缩签名子单元,其中:The differential fallback upgrading apparatus according to claim 7, wherein said generating unit comprises an extracting subunit and a compressing signature subunit, wherein:
    所述提取子单元设置成:在所述待升级应用对应的应用数据中提取与所述路径信息对应的应用数据段;The extracting subunit is configured to: extract an application data segment corresponding to the path information in application data corresponding to the to-be-upgraded application;
    所述压缩签名子单元设置成:对获取的所述应用数据段封装并进行数字签名,以生成所述差分回退包。The compression signature subunit is configured to encapsulate and digitally sign the acquired application data segment to generate the differential backoff packet.
  9. 根据权利要求6所述的差分回退升级装置,该装置还包括:The differential fallback upgrading apparatus according to claim 6, further comprising:
    存储模块,设置成:存储所述差分回退包。The storage module is configured to: store the differential backoff package.
  10. 根据权利要求9所述的差分回退升级装置,该装置还包括接收模块、提取模块和第二回退模块,其中:The differential fallback upgrading apparatus according to claim 9, further comprising a receiving module, an extracting module, and a second backing module, wherein:
    所述接收模块设置成:在升级成功后,接收回退指令;The receiving module is configured to: after the upgrade is successful, receive a backoff instruction;
    所述提取模块设置成:提取与接收到的所述回退指令对应的所述差分回退包; The extracting module is configured to: extract the differential back-off package corresponding to the received back-off instruction;
    所述第二回退模块设置成:根据提取到的所述差分回退包对升级后的所述待升级应用进行回退操作。The second back-off module is configured to perform a rollback operation on the upgraded application to be upgraded according to the extracted differential back-off package.
  11. 一种计算机程序,包括程序指令,当该程序指令被终端执行时,使得该终端可执行如权利要求1-5中任一项所述的差分回退升级方法。A computer program comprising program instructions that, when executed by a terminal, cause the terminal to perform the differential fallback upgrade method of any of claims 1-5.
  12. 一种载有如权利要求11所述的计算机程序的载体。 A carrier carrying the computer program of claim 11.
PCT/CN2016/073929 2015-06-15 2016-02-17 Differential rollback upgrading method and apparatus WO2016202000A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510330186.1A CN106325892A (en) 2015-06-15 2015-06-15 Method and device for difference backspacing upgrade
CN201510330186.1 2015-06-15

Publications (1)

Publication Number Publication Date
WO2016202000A1 true WO2016202000A1 (en) 2016-12-22

Family

ID=57544978

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/073929 WO2016202000A1 (en) 2015-06-15 2016-02-17 Differential rollback upgrading method and apparatus

Country Status (2)

Country Link
CN (1) CN106325892A (en)
WO (1) WO2016202000A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710458A (en) * 2018-12-13 2019-05-03 北京长城华冠汽车技术开发有限公司 Software rollback method and system after a kind of upgrading failure of communication module
CN110377322A (en) * 2019-07-18 2019-10-25 上海擎感智能科技有限公司 Data processing method, system and equipment
CN112398666A (en) * 2019-08-13 2021-02-23 中兴通讯股份有限公司 Software differential upgrading method, device, equipment and storage medium
CN113574839A (en) * 2020-02-28 2021-10-29 华为技术有限公司 Software version rollback method, device and system
CN112398666B (en) * 2019-08-13 2024-04-30 中兴通讯股份有限公司 Software differential upgrading method, device, equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943511A (en) * 2017-11-08 2018-04-20 上海青橙实业有限公司 Upgrade method and mobile terminal
CN108491225B (en) * 2018-03-15 2021-10-12 维沃移动通信有限公司 Update package generation method and mobile terminal
CN113094073B (en) * 2021-04-29 2024-03-12 芜湖雄狮汽车科技有限公司 Vehicle remote upgrading method, device and server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1909693A (en) * 2006-08-07 2007-02-07 华为技术有限公司 Method and device for transformation of data configuration file in different editions of software
CN101038549A (en) * 2007-03-28 2007-09-19 北京启明星辰信息技术有限公司 A software updating method capable of crossing system
CN101169749A (en) * 2007-11-20 2008-04-30 中兴通讯股份有限公司 Software edition upgrading management device and software edition upgrading management method
CN101778376A (en) * 2009-12-31 2010-07-14 中兴通讯股份有限公司 Method and device for realizing wireless firmware update

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420431B (en) * 2008-11-28 2012-07-04 中兴通讯股份有限公司 FOTA server, terminal and software version processing method and system therefor
CN101782934A (en) * 2009-01-16 2010-07-21 苏州市蜗牛电子有限公司 Updating method supporting version conversion of game client
CN101593119B (en) * 2009-05-26 2013-07-03 中兴通讯股份有限公司 Method and device for firmware over-the-air of exclusive flash memory combined equipment
CN102609328B (en) * 2012-01-29 2015-04-15 华为终端有限公司 System difference upgrade method and device and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1909693A (en) * 2006-08-07 2007-02-07 华为技术有限公司 Method and device for transformation of data configuration file in different editions of software
CN101038549A (en) * 2007-03-28 2007-09-19 北京启明星辰信息技术有限公司 A software updating method capable of crossing system
CN101169749A (en) * 2007-11-20 2008-04-30 中兴通讯股份有限公司 Software edition upgrading management device and software edition upgrading management method
CN101778376A (en) * 2009-12-31 2010-07-14 中兴通讯股份有限公司 Method and device for realizing wireless firmware update

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710458A (en) * 2018-12-13 2019-05-03 北京长城华冠汽车技术开发有限公司 Software rollback method and system after a kind of upgrading failure of communication module
CN110377322A (en) * 2019-07-18 2019-10-25 上海擎感智能科技有限公司 Data processing method, system and equipment
CN112398666A (en) * 2019-08-13 2021-02-23 中兴通讯股份有限公司 Software differential upgrading method, device, equipment and storage medium
CN112398666B (en) * 2019-08-13 2024-04-30 中兴通讯股份有限公司 Software differential upgrading method, device, equipment and storage medium
CN113574839A (en) * 2020-02-28 2021-10-29 华为技术有限公司 Software version rollback method, device and system
CN113574839B (en) * 2020-02-28 2024-04-09 华为技术有限公司 Software version rollback method, device and system

Also Published As

Publication number Publication date
CN106325892A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
WO2016202000A1 (en) Differential rollback upgrading method and apparatus
CN107665233B (en) Database data processing method and device, computer equipment and storage medium
CN110058873B (en) Application page updating method, device, equipment and storage medium
WO2017166446A1 (en) Vulnerability-fixing method and device
WO2019201039A1 (en) Method and system for updating application and application server
CN108650287B (en) Upgrading method and device for terminal device in Internet of things and computer readable medium
CN111061643B (en) SDK cluster compatibility detection method and device, electronic equipment and storage medium
CN110825399B (en) Deployment method and device of application program
WO2017036228A1 (en) Method and apparatus for implementing system upgrading
US9355250B2 (en) Method and system for rapidly scanning files
WO2021121407A1 (en) Capacity changing method and apparatus for virtual machine
US10365910B2 (en) Systems and methods for uninstalling or upgrading software if package cache is removed or corrupted
CN114328029B (en) Backup method and device of application resources, electronic equipment and storage medium
US20190073198A1 (en) Multi-flavored software execution from a singular code base
US20150089018A1 (en) Centralized management of webservice resources in an enterprise
WO2020113382A1 (en) Hardware upgrading method, apparatus and device, and storage medium
US8959088B2 (en) Log management method, log management system, and information processing apparatus
CN106708541A (en) Version upgrading processing method and apparatus
CN107092601B (en) Resource file construction method, resource file application method and device
CN112667491B (en) Function test method and device for virtual machine
US10038604B2 (en) Processing method and apparatus for signaling tracing
CN104407846B (en) Information processing method and device
WO2016173136A1 (en) Terminal application processing method and device thereof
CN110888686B (en) Application program starting method, device and storage medium
JP6178119B2 (en) Data migration system and data migration method

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

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

Country of ref document: EP

Kind code of ref document: A1