CN108469960B - Version management method and device - Google Patents

Version management method and device Download PDF

Info

Publication number
CN108469960B
CN108469960B CN201710631648.2A CN201710631648A CN108469960B CN 108469960 B CN108469960 B CN 108469960B CN 201710631648 A CN201710631648 A CN 201710631648A CN 108469960 B CN108469960 B CN 108469960B
Authority
CN
China
Prior art keywords
version
mode
upgrading
degradation
restart
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710631648.2A
Other languages
Chinese (zh)
Other versions
CN108469960A (en
Inventor
杨益泉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201710631648.2A priority Critical patent/CN108469960B/en
Publication of CN108469960A publication Critical patent/CN108469960A/en
Application granted granted Critical
Publication of CN108469960B publication Critical patent/CN108469960B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The application provides a version management method and a version management device, wherein the method comprises the following steps: comparing the current version and the target version of the delivered part according to the version number; if the target version is higher than the current version, comparing the version number of the current version with a first minimum version number supporting incremental upgrading to the target version and a second minimum version number supporting compatible restarting upgrading to the target version respectively, and determining an upgrading mode of the delivery part from the current version to the target version according to a comparison result; if the target version is lower than the current version, the version number of the target version is respectively compared with a third minimum version number to which the current version supports incremental degradation and a fourth minimum version number to which the current version supports compatible restart degradation, and a degradation mode of the delivered part from the current version to the target version is determined according to a comparison result. According to the technical scheme, the accuracy and the rationality of the selection of the upgrading mode can be guaranteed, and the stacking equipment can be upgraded by adopting a correct upgrading mode.

Description

Version management method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a version management method and apparatus.
Background
An IRF (Intelligent Resilient Framework) stacking device may be simply referred to as a stacking device, and is a logical device formed by multiple physical devices through an IRF protocol, where each physical device in the stacking device may be referred to as a member device. Among them, the stacking device usually supports ISSU (In-Service Software Upgrade) and ISSD (In-Service Software download), that is, Upgrade or downgrade of the stacking device is completed without interrupting traffic.
Taking the upgrade process as an example, the upgrade mode includes incremental upgrade, compatible restart upgrade, and incompatible restart upgrade. Wherein, incremental upgrading refers to: in the upgrading process, only the affected process is restarted, but all member devices of the stacking device are in a normal working state, so that the user service can be ensured not to be interrupted. Compatible restart upgrade refers to: in the upgrading process, the member devices are restarted in sequence, and after a certain member device is restarted, the version of the member device is compatible with that of the un-restarted member device, so that the user service can be ensured not to be interrupted. Incompatible reboot upgrades refer to: in the upgrading process, the member devices are restarted in sequence, and after a certain member device is restarted, the version of the member device is incompatible with that of the un-restarted member device, so that the user service cannot be guaranteed not to be interrupted.
Because the upgrading mode includes incremental upgrading, compatible restart upgrading, and incompatible restart upgrading, a proper upgrading mode needs to be selected from the upgrading modes, but in the conventional mode, a proper upgrading mode selection strategy is not available, so that the upgrading processing cannot be performed by adopting the proper upgrading mode. Similarly, there is no suitable degradation mode selection strategy, so that the degradation processing cannot be performed by adopting a suitable degradation mode.
Disclosure of Invention
The application provides a version management method, which is applied to stacking equipment and comprises the following steps:
comparing the current version and the target version of the delivered part according to the version number;
if the target version is higher than the current version, comparing the version number of the current version with a first minimum version number supporting incremental upgrading to the target version and a second minimum version number supporting compatible restarting upgrading to the target version respectively, and determining an upgrading mode of the delivery part from the current version to the target version according to a comparison result;
if the target version is lower than the current version, the version number of the target version is respectively compared with a third minimum version number to which the current version supports incremental degradation and a fourth minimum version number to which the current version supports compatible restart degradation, and a degradation mode of the delivered part from the current version to the target version is determined according to a comparison result.
The application provides a version management device, is applied to and piles up equipment, the device includes:
the comparison module is used for comparing the current version and the target version of the delivered part according to the version number;
the upgrade management module is used for respectively comparing the version number of the current version with a first minimum version number supporting incremental upgrade to the target version and a second minimum version number supporting compatible restart upgrade to the target version when the target version is higher than the current version, and determining an upgrade mode of the delivered part from the current version to the target version according to a comparison result;
and the degradation management module is used for comparing the version number of the target version with a third minimum version number to which the current version supports incremental degradation and a fourth minimum version number to which the current version supports compatible restart degradation respectively when the target version is lower than the current version, and determining a degradation mode of the delivered part from the current version to the target version according to a comparison result.
Based on the technical scheme, in the embodiment of the application, a proper upgrading mode can be selected, the upgrading mode is used for upgrading, the accuracy and the reasonability of the selection of the upgrading mode can be ensured, and the correct upgrading mode can be adopted for upgrading. The appropriate degradation mode can be selected, and the degradation processing is carried out by using the degradation mode, so that the accuracy and the rationality of the selection of the degradation mode can be ensured, and the upgrading processing can be carried out by adopting the correct degradation mode. The upgrading/degrading mode ensures that the service is not interrupted as much as possible.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1 is a flow diagram of a version management method in one embodiment of the present application;
FIG. 2 is a block diagram of a version management device according to an embodiment of the present application;
fig. 3 is a hardware configuration diagram of a stacking apparatus according to an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The embodiment of the application provides a version management method, which can be applied to stacking equipment (such as IRF stacking equipment), and is used for realizing upgrading/degrading of software version files. In the upgrading process, the upgrading mode may include: incremental upgrading, compatible restarting upgrading and incompatible restarting upgrading. In the degrading process, the degrading mode may include: incremental destaging, compatible restart destaging, incompatible restart destaging.
In one example, the software version file may include at least one delivery part, and the delivery part in the software version file may include, but is not limited to, one or more of a kernel module (ko), a user mode daemon (daemon), a user mode library file (library), and a user mode plugin (plugin).
In one example, in order to upgrade/downgrade the software version file, an upgrade manner/downgrade manner of each delivered part in the software version file may be determined first, then the upgrade manner/downgrade manner of the software version file may be determined by using the upgrade manner/downgrade manner of each delivered part, and then the upgrade manner/downgrade manner of the software version file may be used to upgrade/downgrade the software version file.
In one example, each version of a delivery piece corresponds to version-compatible data, which may include, but is not limited to: the version number C of the current version supports incremental upgrade to a first minimum version number U1 of the current version, supports compatible restart upgrade to a second minimum version number U2 of the current version, supports a third minimum version number D1 of the current version, and supports compatible restart downgraded to a fourth minimum version number D2 of the current version. Based on the version compatibility data, an upgrade/downgrade mode of the delivered part may be determined.
Referring to fig. 1, a flowchart of a method for managing a version of a delivered part, which is used to determine an upgrade manner/downgrade manner of the delivered part and can be applied to a stacking apparatus, includes:
step 101, comparing the current version and the target version of the delivered part according to the version number. If the target version is higher than the current version, it indicates that the delivered part needs to be upgraded, and step 102 is executed; if the target version is lower than the current version, it indicates that the delivered part needs to be downgraded, and step 103 is performed.
In one example, since each version of the delivery can correspond to the version-compatible data, the version-compatible data of the current version and the version-compatible data of the target version can be obtained.
The version-compatible data of the current version may include a version number C of the current version, a first minimum version number U1 supporting incremental upgrade to the current version, a second minimum version number U2 supporting compatible restart upgrade to the current version, a third minimum version number D1 supporting incremental downgrading of the current version, and a fourth minimum version number D2 supporting compatible restart downgrading of the current version. In addition, the version-compatible data of the target version may include a version number C of the target version, a first minimum version number U1 supporting incremental upgrade to the target version, a second minimum version number U2 supporting compatible restart upgrade to the target version, a third minimum version number D1 supporting incremental downgrading of the target version, and a fourth minimum version number D2 supporting compatible restart downgrading to the target version.
In one example, after the version-compatible data is acquired, if the version number C of the current version is smaller than the version number C of the target version, it indicates that the target version is higher than the current version, the delivered part needs to be upgraded, and step 102 is executed. If the version number C of the current version is greater than the version number C of the target version, it indicates that the target version is lower than the current version, the delivered part needs to be downgraded, and step 103 is executed.
In one example, the software version file may include version-compatible data, and therefore, the stacking device may acquire the version-compatible data from the software version file, without limitation to the acquisition process. Furthermore, since the software version file may be composed of a plurality of delivery pieces, in order to distinguish version-compatible data of different delivery pieces, the software version file includes a correspondence relationship between a delivery piece identifier and the version-compatible data, based on which the stacking apparatus can query the corresponding version-compatible data through the delivery piece identifier.
And 102, respectively comparing the version number C of the current version with a first minimum version number U1 supporting incremental upgrade to the target version and a second minimum version number U2 supporting compatible restart upgrade to the target version, and determining the upgrade mode of the delivered part from the current version to the target version according to the comparison result.
In one example, the process for "determining the upgrade manner for upgrading the delivered part from the current version to the target version according to the comparison result" may include, but is not limited to: if the version number C of the current version is greater than or equal to the first minimum version number U1 corresponding to the target version, the upgrading mode of the delivered part from the current version to the target version can be determined to be incremental upgrading; or if the version number C of the current version is less than the first minimum version number U1 corresponding to the target version, and the version number C of the current version is greater than or equal to the second minimum version number U2 corresponding to the target version, it may be determined that the upgrade mode of the delivered part from the current version to the target version is compatible restart upgrade; or, if the version number C of the current version is smaller than the first minimum version number U1 corresponding to the target version, and the version number C of the current version is smaller than the second minimum version number U2 corresponding to the target version, it may be determined that the upgrade mode of the delivered part from the current version to the target version is incompatible restart upgrade.
For example, the process of determining the upgrade mode of the delivered part can be implemented by the following steps:
step 1, judging whether the version number C of the current version is greater than or equal to a first minimum version number U1 corresponding to the target version. If so, step 2 may be performed; if not, step 3 may be performed.
And 2, determining the upgrading mode from the current version to the target version as incremental upgrading.
And 3, judging whether the version number C of the current version is greater than or equal to a second minimum version number U2 corresponding to the target version. If so, step 4 may be performed; if not, step 5 may be performed.
And 4, determining that the upgrading mode from the current version to the target version is compatible restart upgrading.
And 5, determining that the upgrading mode from the current version to the target version is incompatible restart upgrading.
Step 103, comparing the version number C of the target version with a third minimum version number D1 to which the current version supports incremental downgrading and a fourth minimum version number D2 to which the current version supports compatible restart downgrading respectively, and determining a downgrading mode of the delivered piece from the current version to the target version according to a comparison result.
In one example, the process for "determining the demotion mode for demoting the delivery from the current version to the target version according to the comparison result" may include, but is not limited to: if the version number C of the target version is greater than or equal to the third minimum version number D1 corresponding to the current version, determining that the downgrading mode of the delivered part from the current version to the target version is incremental downgrading; or, if the version number C of the target version is smaller than the third minimum version number D1 corresponding to the current version, and the version number C of the target version is greater than or equal to the fourth minimum version number D2 corresponding to the current version, it may be determined that the degradation mode in which the delivered piece is degraded from the current version to the target version is compatible restart degradation; or, if the version number C of the target version is smaller than the third minimum version number D1 corresponding to the current version, and the version number C of the target version is smaller than the fourth minimum version number D2 corresponding to the current version, it may be determined that the downgrading manner in which the delivered part is downgraded from the current version to the target version is incompatible restart downgrading.
For example, the above-mentioned process of determining the degradation mode of the delivered part can be implemented by the following steps:
step 1, judging whether the version number C of the target version is greater than or equal to a third minimum version number D1 corresponding to the current version. If so, step 2 may be performed; if not, step 3 may be performed.
And 2, determining that the degradation mode from the current version to the target version is incremental degradation.
And 3, judging whether the version number C of the target version is greater than or equal to a fourth minimum version number D2 corresponding to the current version. If so, step 4 may be performed; if not, step 5 may be performed.
And 4, determining that the degradation mode from the current version to the target version is compatible restart degradation.
And 5, determining that the degradation mode from the current version to the target version is incompatible restart degradation.
In one example, after determining the upgrading mode of the delivered part from the current version to the target version according to the comparison result, the upgrading mode of the software version file may also be determined based on the upgrading mode of each delivered part, and the software version file is upgraded according to the upgrading mode of the software version file.
In one example, the process for "determining the upgrade of the software version file based on the upgrade of each delivered part" may include, but is not limited to, the following: if the upgrading mode of the delivered part is incompatible restart upgrading, the upgrading mode of the software version file can be determined to be incompatible restart upgrading; or if the upgrading mode of the delivered part is not incompatible restart upgrading but the upgrading mode of the delivered part is compatible restart upgrading, determining that the upgrading mode of the software version file is compatible restart upgrading; or, if the upgrade mode without the delivered part is incompatible restart upgrade and the upgrade mode without the delivered part is compatible restart upgrade, it may be determined that the upgrade mode of the software version file is incremental upgrade.
For example, it is assumed that the software version file may include a delivered part 1, a delivered part 2, and a delivered part 3, if the upgrade mode of the delivered part 1 is incremental upgrade, the upgrade mode of the delivered part 2 is compatible restart upgrade, and the upgrade mode of the delivered part 3 is incompatible restart upgrade, it may be determined that the upgrade mode of the software version file is incompatible restart upgrade, and the delivered part 1, the delivered part 2, and the delivered part 3 may be upgraded from the current version to the target version by the incompatible restart upgrade mode. If the upgrading mode of the delivered piece 1 is incremental upgrading, the upgrading mode of the delivered piece 2 is compatible restart upgrading, and the upgrading mode of the delivered piece 3 is compatible restart upgrading, the upgrading mode of the software version file can be determined to be compatible restart upgrading, and the delivered piece 1, the delivered piece 2 and the delivered piece 3 can be upgraded from the current version to the target version in a compatible restart upgrading mode. If the upgrading mode of the delivered piece 1 is increment upgrading, the upgrading mode of the delivered piece 2 is increment upgrading, and the upgrading mode of the delivered piece 3 is increment upgrading, the upgrading mode of the software version file can be determined to be increment upgrading, and the delivered piece 1, the delivered piece 2 and the delivered piece 3 can be upgraded to the target version from the current version through the upgrading mode of the increment upgrading.
In one example, after determining the degradation mode of the delivered part from the current version to the target version according to the comparison result, the degradation mode of the software version file can be determined based on the degradation mode of each delivered part, and the software version file is subjected to degradation processing according to the degradation mode of the software version file.
In one example, the process for "determining the demotion mode of the software version file based on the demotion mode of each delivered part" may include, but is not limited to, the following modes: if the degradation mode of the delivered part is incompatible restart degradation, determining that the degradation mode of the software version file is incompatible restart degradation; or, if the degradation mode of the delivered-to-part is incompatible restart degradation but the degradation mode of the delivered-to-part is compatible restart degradation, determining that the degradation mode of the software version file is compatible restart degradation; or, if the downgrading mode of no delivered part is incompatible restart downgrading and the downgrading mode of no delivered part is compatible restart downgrading, determining that the downgrading mode of the software version file is incremental downgrading.
For example, assuming that the software version file may include delivered piece 1, delivered piece 2, and delivered piece 3, if the downgrading mode of delivered piece 1 is incremental downgrading, the downgrading mode of delivered piece 2 is compatible restart downgrading, and the downgrading mode of delivered piece 3 is incompatible restart downgrading, it may be determined that the downgrading mode of the software version file is incompatible restart downgrading, and delivered piece 1, delivered piece 2, and delivered piece 3 may be downgraded from the current version to the target version by the incompatible restart downgrading. If the downgrading mode of the delivered part 1 is incremental downgrading, the downgrading mode of the delivered part 2 is compatible restart downgrading, and the downgrading mode of the delivered part 3 is compatible restart downgrading, it can be determined that the downgrading mode of the software version file is compatible restart downgrading, and the delivered parts 1, 2, and 3 can be downgraded from the current version to the target version by the compatible restart downgrading mode. If the downgrading mode of the delivered part 1 is incremental downgrading, the downgrading mode of the delivered part 2 is incremental downgrading, and the downgrading mode of the delivered part 3 is incremental downgrading, it can be determined that the downgrading mode of the software version file is incremental downgrading, and the delivered parts 1, 2 and 3 can be downgraded from the current version to the target version through the incremental downgrading mode.
Based on the technical scheme, in the embodiment of the application, a proper upgrading mode can be selected, the upgrading mode is used for upgrading, the accuracy and the reasonability of the selection of the upgrading mode can be ensured, and the correct upgrading mode can be adopted for upgrading. The appropriate degradation mode can be selected, and the degradation processing is carried out by using the degradation mode, so that the accuracy and the rationality of the selection of the degradation mode can be ensured, and the upgrading processing can be carried out by adopting the correct degradation mode. The upgrading/degrading mode ensures that the service is not interrupted as much as possible.
In one example, the version-compatible data may also include an isolated version list I that includes version numbers to which demotion from the current version is prohibited. Based on this, before comparing the version number of the target version with the third minimum version number to which the current version supports incremental downgrading and the fourth minimum version number to which the current version supports compatible restart downgrading, respectively, an isolated version list of the current version can be obtained, wherein the isolated version list comprises the version numbers to which downgrading is prohibited from the current version; then, if the version number of the target version is in the isolation version list, the target version is the isolation version of the current version, and the delivered part is prohibited to be degraded from the current version to the target version; and if the version number of the target version is not in the isolation version list, executing a process of comparing the version number of the target version with a third minimum version number to which the current version supports incremental downgrading and a fourth minimum version number to which the current version supports compatible restart downgrading respectively.
Wherein, for all delivered parts, if any one delivered part has the following determination result: prohibiting the downgrading of the delivered from the current version to the target version eventually requires prohibiting the downgrading of the software version file.
The above technical solution of the embodiment of the present application is described below with reference to specific application scenarios.
For example, the initial version is version 1, the version compatibility data is shown in table 1, C is 100, and there is no compatible version. The version released for the second time is version 2, the version compatibility data is shown in table 2, C is 200, U1 and U2 are both 100, and D1 and D2 are both 100. The third release is version 3, the version compatibility data is shown in table 3, C is 300, U1 is 200, U2 is 100, D1 is 200, and D2 is 100. The version released for the fourth time is version 4, and the version compatibility data is shown in table 4, wherein C is 400, U1 is 300, U2 is 200, D1 is 300, and D2 is 200. The version released for the fifth time is version 5, and the version compatibility data is shown in table 5, where C is 500, U1 is 300, U2 is 200, D1 is 400, and D2 is 400.
When the first version is version 1 and the second version is version 2, upgrading the version 1 increment to version 2; when the first version is version 1 and the second version is version 3, the version 1 is compatible, restarted and upgraded to the version 3; when the first version is version 1 and the second version is version 4, the version 1 is incompatible and restarted and upgraded to the version 4, namely the version 4 is incompatible with the version 1; and when the first version is version 1 and the second version is version 5, restarting and upgrading the version 1 incompatibility to version 5, namely, the version 5 is incompatible with the version 1.
Since the version 1 incompatible restart upgrade to version 4/version 5 may cause traffic disruption, version 2/version 3 may be used as a transitional version to avoid traffic disruption. Specifically, version 1 is upgraded to version 2 in an incremental manner, and then version 2 is upgraded to version 4 in a compatible restart manner, or version 1 is upgraded to version 3 in a compatible restart manner, and then version 3 is upgraded to version 4 in an incremental manner, so that version 1 can be prevented from being upgraded to version 4 in an incompatible restart manner. In addition, the process of upgrading version 1 to version 5 is similar and is not described in detail. Obviously, the above-mentioned method can support the transition version, and provide a compatible bridge between the incompatible versions.
As can be seen from table 5, version 3 can be promoted to version 5 in increments, and version 2 can be promoted to version 5 in a compatible restart, but version 5 can only be promoted to version 4 in increments, and cannot be promoted to version 2 in increments, and cannot be promoted to version 3 in increments, so that the above manner can support asymmetric upgrading and downgrading.
TABLE 1
Version number (C) Minimum version number (U1) Minimum version number (U2) Minimum version number (D1) Minimum version number (D2) Isolation version list (I)
100
TABLE 2
Version number (C) Minimum version number (U1) Minimum version number (U2) Minimum version number (D1) Minimum version number (D2) Isolation version list (I)
100
200 100 100 100 100
TABLE 3
Version number (C) Minimum version number (U1) Minimum version number (U2) Minimum version number (D1) Minimum version number (D2) Isolation version list (I)
100
200 100 100 100 100
300 300 100 300 100
TABLE 4
Version number (C) Minimum version number (U1) Minimum version number (U2) Minimum version number (D1) Minimum version number (D2) Isolation version list (I)
100
200 100 100 100 100
300 200 100 200 100
400 300 200 300 200
TABLE 5
Version number (C) Minimum version number (U1) Minimum version number (U2) Minimum version number (D1) Minimum version number (D2) Isolation version list (I)
100
200 100 100 100 100
300 200 100 200 100
400 300 200 300 200
500 300 200 400 400
Further, assume that the version released at the sixth time is version 6, the version compatibility data is shown in table 6, C is 600, U1 is 300, U2 is 200, D1 is 400, and D2 is 400. Assuming that version 6 is a problem version and needs to be isolated from subsequent versions, i.e. only upgrade from version 6 to normal version, but not downgrade from normal version to version 6, when version 7 is released, the version compatibility data are shown in table 7, C is 700, U1 is 300, U2 is 200, D1 is 400, D2 is 400, and the isolated version is 600.
Obviously, based on the isolated version 600, the version 6 can be promoted to the version 7, but can not be demoted from the version 7 to the version 6, that is, the above manner can support the isolated processing of the problem version.
TABLE 6
Version number (C) Minimum version number (U1) Minimum version number (U2) Minimum version number (D1) Minimum version number (D2) Isolation version list (I)
100
200 100 100 100 100
300 200 100 200 100
400 300 200 300 200
500 300 200 400 400
600 300 200 400 400
TABLE 7
Figure BDA0001363990000000101
Figure BDA0001363990000000111
Further, assume that the version released for the eighth time is version 8, the version compatibility data is shown in table 8, C is 800, U1 is 500, U2 is 300, D1 is 500, D2 is 400, and the isolated version is 600. Suppose that the version released the ninth time is version 9, the version compatibility data is shown in table 9, C is 900, U1 is 700, U2 is 700, D1 is 700, D2 is 700, and the isolated version is 600.
TABLE 8
Version number (C) Minimum version number (U1) Minimum version number (U2) Minimum version number (D1) Minimum version number (D2) Isolation version list (I)
100
200 100 100 100 100
300 200 100 200 100
400 300 200 300 200
500 300 200 400 400
600 300 200 400 400
700 300 200 400 400 600
800 500 300 500 400 600
TABLE 9
Version number (C) Minimum version number (U1) Minimum version number (U2) Minimum version number (D1) Minimum version number (D2) Isolation version list (I)
100
200 100 100 100 100
300 200 100 200 100
400 300 200 300 200
500 300 200 400 400
600 300 200 400 400
700 300 200 400 400 600
800 500 300 500 400 600
900 700 700 700 700 600
Further, assume that the version released the tenth time is version 11, the version compatibility data is shown in table 10, C is 1100, U1 is 1000, U2 is 1000, D1 is 1000, D2 is 1000, and the isolated version is 600. Version 11 is incompatible with the previous 9 versions, i.e. version 11 is an incompatible version, but a compatibility condition is reserved. If the version 1-version 9 needs to be upgraded to the version 11, the version 10 with the version number of 1000 can be released, and the version 1-version 9 can be upgraded to the version 11 through the version 10.
Watch 10
Version number (C) Minimum version number (U1) Minimum version number (U2) Minimum version number (D1) Minimum version number (D2) Isolation version list (I)
100
200 100 100 100 100
300 200 100 200 100
400 300 200 300 200
500 300 200 400 400
600 300 200 400 400
700 300 200 400 400 600
800 500 300 500 400 600
900 700 700 700 700 600
1100 1000 1000 1000 1000 600
As shown in fig. 2, which is a structural diagram of a version management apparatus proposed in the embodiment of the present application, the version management apparatus may be applied to a stacking device, and the version management apparatus may include:
a comparison module 201, configured to compare the current version and the target version of the delivered part according to the version number;
the upgrade management module 202 is configured to, when the target version is higher than the current version, compare the version number of the current version with a first minimum version number that supports incremental upgrade to the target version and a second minimum version number that supports compatible restart upgrade to the target version, and determine an upgrade manner in which the delivered part is upgraded from the current version to the target version according to a comparison result;
and the degradation management module 203 is configured to, when the target version is lower than the current version, compare the version number of the target version with a third minimum version number to which the current version supports incremental degradation and a fourth minimum version number to which the current version supports compatible restart degradation, and determine a degradation mode in which the delivered part is degraded from the current version to the target version according to a comparison result.
The upgrade management module 202 is specifically configured to, in the process of determining, according to the comparison result, an upgrade manner in which the delivered component is upgraded from the current version to the target version, determine, if the version number of the current version is greater than or equal to the first minimum version number, that the upgrade manner in which the delivered component is upgraded from the current version to the target version is incremental upgrade; or if the version number of the current version is smaller than the first minimum version number and the version number of the current version is larger than or equal to the second minimum version number, determining that the upgrading mode of the delivered part from the current version to the target version is compatible restart upgrading; or if the version number of the current version is smaller than the second minimum version number, determining that the upgrading mode of the delivered part from the current version to the target version is incompatible restart upgrading.
The degradation management module 203 is specifically configured to, in the process of determining a degradation manner in which the delivered component is degraded from the current version to the target version according to the comparison result, determine that the degradation manner in which the delivered component is degraded from the current version to the target version is incremental degradation if the version number of the target version is greater than or equal to the third minimum version number; or if the version number of the target version is smaller than the third minimum version number and the version number of the target version is larger than or equal to the fourth minimum version number, determining that the degradation mode of the delivered part from the current version to the target version is compatible restart degradation; or, if the version number of the target version is smaller than the fourth minimum version number, determining that the downgrading mode of the delivered part from the current version to the target version is incompatible restart downgrading.
In one example, the stacking device includes a software version file including at least one delivery;
the upgrade management module 202 is further configured to determine, based on the upgrade mode of each delivery member, an upgrade mode of the software version file after determining, according to the comparison result, an upgrade mode in which the delivery member is upgraded from the current version to the target version, and upgrade the software version file according to the upgrade mode of the software version file;
the degradation management module 203 is further configured to determine a degradation mode of the software version file based on the degradation mode of each delivery part after determining the degradation mode of the delivery part from the current version to the target version according to the comparison result, and perform degradation processing on the software version file according to the degradation mode of the software version file.
The upgrade management module 202 is specifically configured to, in the process of determining the upgrade manner of the software version file, determine that the upgrade manner of the software version file is incompatible restart upgrade if the upgrade manner of a delivered part is incompatible restart upgrade; or if the upgrading mode of the delivered part is not incompatible restart upgrading, the upgrading mode of the delivered part is compatible restart upgrading, and the upgrading mode of the software version file is determined to be compatible restart upgrading; or if the upgrading mode without the delivered part is incompatible restart upgrading and the upgrading mode without the delivered part is compatible restart upgrading, determining the upgrading mode of the software version file as incremental upgrading.
The degradation management module 203 is specifically configured to, in the process of determining the degradation mode of the software version file, determine that the degradation mode of the software version file is incompatible restart degradation if the degradation mode of a delivery part is incompatible restart degradation; or if the degradation mode of the delivered part is incompatible restart degradation and the degradation mode of the delivered part is compatible restart degradation, determining the degradation mode of the software version file as compatible restart degradation; or if the downgrading mode without the delivered part is incompatible restart downgrading, the downgrading mode without the delivered part is compatible restart downgrading, and determining the downgrading mode of the software version file to be incremental downgrading.
In an example, the demotion management module 203 is further configured to obtain an isolated version list of the current version, where the isolated version list includes a version number to which demotion is prohibited from the current version; if the version number of the target version is located in the isolated version list, prohibiting the delivery part from being downgraded from the current version to the target version; and if the version number of the target version is not in the isolation version list, comparing the version number of the target version with a third minimum version number to which the current version supports incremental downgrading and a fourth minimum version number to which the current version supports compatible restart downgrading respectively.
For the stacking apparatus provided in the embodiment of the present application, in terms of hardware, a schematic diagram of a hardware architecture may specifically refer to fig. 3. The method comprises the following steps: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the method comprises the steps of communicating with a machine-readable storage medium, reading and executing instruction codes stored in the machine-readable storage medium, and realizing version management operation disclosed in the above examples of the application.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (12)

1. A version management method applied to a stacking device, the method comprising:
comparing the current version and the target version of the delivered part according to the version number;
if the target version is higher than the current version, comparing the version number of the current version with a first minimum version number supporting incremental upgrading to the target version and a second minimum version number supporting compatible restarting upgrading to the target version respectively, and determining an upgrading mode of the delivery part from the current version to the target version according to a comparison result; if the version number of the current version is greater than or equal to the first minimum version number, the upgrading mode is incremental upgrading; if the version number of the current version is smaller than a first minimum version number and the version number of the current version is larger than or equal to a second minimum version number, the upgrading mode is compatible restart upgrading; if the version number of the current version is smaller than a second minimum version number, the upgrading mode is incompatible restart upgrading;
if the target version is lower than the current version, the version number of the target version is respectively compared with a third minimum version number to which the current version supports incremental degradation and a fourth minimum version number to which the current version supports compatible restart degradation, and a degradation mode of the delivered part from the current version to the target version is determined according to a comparison result.
2. The method according to claim 1, wherein the process of determining a degradation mode for degrading the delivered part from the current version to the target version according to the comparison result specifically comprises:
if the version number of the target version is larger than or equal to the third minimum version number, determining that the downgrading mode of the delivered part from the current version to the target version is incremental downgrading; or if the version number of the target version is smaller than the third minimum version number and the version number of the target version is greater than or equal to the fourth minimum version number, determining that the degradation mode of the delivered part from the current version to the target version is compatible restart degradation; or, if the version number of the target version is smaller than the fourth minimum version number, determining that the downgrading mode of the delivered part from the current version to the target version is incompatible restart downgrading.
3. The method according to claim 1 or 2,
the stacking device comprises a software version file comprising at least one delivery member;
after the upgrading mode of the delivered part from the current version to the target version is determined according to the comparison result, the upgrading mode of the software version file is determined based on the upgrading mode of each delivered part, and the software version file is upgraded according to the upgrading mode of the software version file;
and after determining the degradation mode of the delivered part from the current version to the target version according to the comparison result, determining the degradation mode of the software version file based on the degradation mode of each delivered part, and performing degradation processing on the software version file according to the degradation mode of the software version file.
4. The method of claim 3,
the determining the upgrading mode of the software version file based on the upgrading mode of each delivered part comprises the following steps:
if the upgrading mode of the delivered part is incompatible restart upgrading, determining that the upgrading mode of the software version file is incompatible restart upgrading; or if the upgrading mode of the delivered part is not incompatible restart upgrading, the upgrading mode of the delivered part is compatible restart upgrading, and the upgrading mode of the software version file is determined to be compatible restart upgrading; or if the upgrading mode without the delivered part is incompatible restart upgrading and the upgrading mode without the delivered part is compatible restart upgrading, determining the upgrading mode of the software version file as incremental upgrading.
5. The method of claim 3,
the determining the degradation mode of the software version file based on the degradation mode of each delivered part comprises the following steps:
if the degradation mode of the delivered part is incompatible restart degradation, determining the degradation mode of the software version file as incompatible restart degradation; or if the degradation mode of the delivered part is incompatible restart degradation and the degradation mode of the delivered part is compatible restart degradation, determining the degradation mode of the software version file as compatible restart degradation; or if the downgrading mode without the delivered part is incompatible restart downgrading, the downgrading mode without the delivered part is compatible restart downgrading, and determining the downgrading mode of the software version file to be incremental downgrading.
6. The method of claim 1, wherein before comparing the version number of the target version with a third minimum version number to which the current version supports incremental demotion and a fourth minimum version number to which the current version supports compatible restart demotion, respectively, the method further comprises:
obtaining an isolation version list of a current version, wherein the isolation version list comprises a version number to which the current version is forbidden to be degraded; if the version number of the target version is located in the isolated version list, prohibiting the delivery part from being downgraded from the current version to the target version; and if the version number of the target version is not in the isolation version list, executing a process of comparing the version number of the target version with a third minimum version number to which the current version supports incremental downgrading and a fourth minimum version number to which the current version supports compatible restart downgrading respectively.
7. A version management apparatus applied to a stacking device, the apparatus comprising:
the comparison module is used for comparing the current version and the target version of the delivered part according to the version number;
the upgrade management module is used for respectively comparing the version number of the current version with a first minimum version number supporting incremental upgrade to the target version and a second minimum version number supporting compatible restart upgrade to the target version when the target version is higher than the current version, and determining an upgrade mode of the delivered part from the current version to the target version according to a comparison result; if the version number of the current version is greater than or equal to the first minimum version number, the upgrading mode is incremental upgrading; if the version number of the current version is smaller than a first minimum version number and the version number of the current version is larger than or equal to a second minimum version number, the upgrading mode is compatible restart upgrading; if the version number of the current version is smaller than a second minimum version number, the upgrading mode is incompatible restart upgrading;
and the degradation management module is used for comparing the version number of the target version with a third minimum version number to which the current version supports incremental degradation and a fourth minimum version number to which the current version supports compatible restart degradation respectively when the target version is lower than the current version, and determining a degradation mode of the delivered part from the current version to the target version according to a comparison result.
8. The apparatus according to claim 7, wherein the downgrade management module is specifically configured to, in the process of determining a downgrade manner for the delivered part to downgrade from the current version to the target version according to the comparison result, determine, if the version number of the target version is greater than or equal to the third minimum version number, that the downgrade manner for the delivered part to downgrade from the current version to the target version is incremental downgrade; or if the version number of the target version is smaller than the third minimum version number and the version number of the target version is greater than or equal to the fourth minimum version number, determining that the degradation mode of the delivered part from the current version to the target version is compatible restart degradation; or, if the version number of the target version is smaller than the fourth minimum version number, determining that the downgrading mode of the delivered part from the current version to the target version is incompatible restart downgrading.
9. The apparatus according to claim 7 or 8,
the stacking device comprises a software version file comprising at least one delivery member;
the upgrade management module is also used for determining the upgrade mode of the software version file based on the upgrade mode of each delivery piece after determining the upgrade mode of the delivery piece from the current version to the target version according to the comparison result, and upgrading the software version file according to the upgrade mode of the software version file;
and the degradation management module is also used for determining the degradation mode of the software version file based on the degradation mode of each delivered part after determining the degradation mode of the delivered part from the current version to the target version according to the comparison result, and performing degradation processing on the software version file according to the degradation mode of the software version file.
10. The apparatus of claim 9,
the upgrade management module is specifically used for determining that the upgrade mode of the software version file is incompatible restart upgrade if the upgrade mode of a delivered piece is incompatible restart upgrade in the process of determining the upgrade mode of the software version file; or if the upgrading mode of the delivered part is not incompatible restart upgrading, the upgrading mode of the delivered part is compatible restart upgrading, and the upgrading mode of the software version file is determined to be compatible restart upgrading; or if the upgrading mode without the delivered part is incompatible restart upgrading and the upgrading mode without the delivered part is compatible restart upgrading, determining the upgrading mode of the software version file as incremental upgrading.
11. The apparatus of claim 9,
the degradation management module is specifically configured to determine that the degradation mode of the software version file is incompatible restart degradation if the degradation mode of the delivered part is incompatible restart degradation in the process of determining the degradation mode of the software version file; or if the degradation mode of the delivered part is incompatible restart degradation and the degradation mode of the delivered part is compatible restart degradation, determining the degradation mode of the software version file as compatible restart degradation; or if the downgrading mode without the delivered part is incompatible restart downgrading, the downgrading mode without the delivered part is compatible restart downgrading, and determining the downgrading mode of the software version file to be incremental downgrading.
12. The apparatus of claim 7, wherein the demotion management module is further configured to obtain a quarantined version list of a current version, the quarantined version list comprising version numbers to which demotion from the current version is prohibited; if the version number of the target version is located in the isolated version list, prohibiting the delivery part from being downgraded from the current version to the target version; and if the version number of the target version is not in the isolation version list, comparing the version number of the target version with a third minimum version number to which the current version supports incremental downgrading and a fourth minimum version number to which the current version supports compatible restart downgrading respectively.
CN201710631648.2A 2017-07-28 2017-07-28 Version management method and device Active CN108469960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710631648.2A CN108469960B (en) 2017-07-28 2017-07-28 Version management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710631648.2A CN108469960B (en) 2017-07-28 2017-07-28 Version management method and device

Publications (2)

Publication Number Publication Date
CN108469960A CN108469960A (en) 2018-08-31
CN108469960B true CN108469960B (en) 2021-08-24

Family

ID=63266891

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710631648.2A Active CN108469960B (en) 2017-07-28 2017-07-28 Version management method and device

Country Status (1)

Country Link
CN (1) CN108469960B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109324821B (en) * 2018-10-10 2021-11-05 湖南长城医疗科技有限公司 Self-service terminal system version management method
CN109874057B (en) * 2019-01-23 2021-04-23 视联动力信息技术股份有限公司 Processing method and device for live broadcast service
CN113535219B (en) * 2020-04-15 2023-12-01 北京世标认证中心有限公司 APP information release method, device, medium and computer equipment
CN115208761A (en) * 2022-06-01 2022-10-18 上海黑眸智能科技有限责任公司 OTA upgrading system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724308A (en) * 2012-06-13 2012-10-10 腾讯科技(深圳)有限公司 Software update method and software update system
CN103581008B (en) * 2012-08-07 2017-04-12 杭州华三通信技术有限公司 Router and software upgrading method thereof
US9306804B2 (en) * 2013-04-16 2016-04-05 Arista Networks, Inc. Method and system for multichassis link aggregation in-service software update
US20140372583A1 (en) * 2013-06-13 2014-12-18 Johnny Tseng Expandable departmental cloud server systems
FR3018367B1 (en) * 2014-03-07 2017-07-21 Schneider Electric Ind Sas ELECTRONIC SYSTEM COMPRISING ELECTRONIC DEVICES, CIRCUIT BREAKER COMPRISING SUCH A SYSTEM, METHOD FOR GENERATING A DEVICE INDICATOR IN CASE OF INCOMPATIBILITY BETWEEN DEVICES AND COMPUTER PROGRAM PRODUCT
CN104394016B (en) * 2014-11-25 2018-08-24 新华三技术有限公司 ISSU upgrade methods and device

Also Published As

Publication number Publication date
CN108469960A (en) 2018-08-31

Similar Documents

Publication Publication Date Title
CN108469960B (en) Version management method and device
CN106899666B (en) Data processing method and device for service identification
US11003438B2 (en) Method and device for incremental upgrade
CN106708543B (en) OTA (over the air) upgrading method and device of operating system
CN107038041B (en) Data processing method, error code dynamic compatibility method, device and system
US20100268867A1 (en) Method and apparatus for updating firmware as a background task
EP3267308A1 (en) Application loading method and device
CN105446811A (en) Application process associated starting method and associated starting apparatus
CN105930197A (en) Software upgrading method and electronic equipment
CN107578338B (en) Service publishing method, device and equipment
US20090271602A1 (en) Method for Recovering Data Processing System Failures
CN104685443A (en) Pinning boot data for faster boot
CN104461621A (en) Attribute information updating method and device
US10503430B2 (en) Method and device for clearing data and electronic device
CN107943544B (en) Kernel patch loading method and device
US20180113735A1 (en) Launch method for applications with early-time memory reclaim and electronic device
CN111797390B (en) Program running method, program running device, electronic equipment and computer readable storage medium
CN109582388B (en) Parameter configuration method, device and equipment
CN111381905B (en) Program processing method, device and equipment
CN113342376B (en) Method and device for upgrading operating system of Internet of things equipment
JP7355876B2 (en) Program startup method, equipment, and storage medium
CN105808556A (en) Operating method for database and database engine
CN111371818B (en) Data request verification method, device and equipment
CN112286572A (en) Configuration method and device of business process
CN108121562B (en) Firmware version switching method, electronic device and BIOS chip

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant