CN117917636A - Version upgrading method, device, electronic equipment, storage medium and program product - Google Patents

Version upgrading method, device, electronic equipment, storage medium and program product Download PDF

Info

Publication number
CN117917636A
CN117917636A CN202211295714.0A CN202211295714A CN117917636A CN 117917636 A CN117917636 A CN 117917636A CN 202211295714 A CN202211295714 A CN 202211295714A CN 117917636 A CN117917636 A CN 117917636A
Authority
CN
China
Prior art keywords
version
device list
upgraded
list
compatible
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.)
Pending
Application number
CN202211295714.0A
Other languages
Chinese (zh)
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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN202211295714.0A priority Critical patent/CN117917636A/en
Publication of CN117917636A publication Critical patent/CN117917636A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a version upgrading method, a version upgrading device, electronic equipment, storage media and program products, wherein the method comprises the following steps: determining a version to be upgraded; if the version package of the version to be upgraded does not contain the compatible device list of the version to be upgraded, carrying out compatibility verification based on the device list of the local terminal equipment and the downward compatible device list contained in the version package of the current version installed by the local terminal equipment; and if the compatibility verification is passed, carrying out version upgrading based on the version package of the version to be upgraded. According to the method, the device, the electronic equipment, the storage medium and the program product, the downward compatible device list carried in the version package of the current version installed by the local equipment is applied to perform compatibility verification in cooperation with the device list of the local equipment, so that the problem that the local equipment upgrades an unsuitable version due to the lack of a referenceable compatible device list during version rollback is avoided, various running problems are caused, and the feasibility and the reliability of version upgrade are improved.

Description

Version upgrading method, device, electronic equipment, storage medium and program product
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a version upgrade method, apparatus, electronic device, storage medium, and program product.
Background
With rapid development of technology, device versions of various intelligent devices are updated and iterated very fast, and the same device can face iterative upgrade of multiple devices. Taking IPC (IP Camera) monitoring equipment as an example, after key devices such as a CPU (Central Processing Unit ), an imaging Sensor, a network chip and the like iterate, software versions are basically required to perform adaptation and upgrading on new devices.
Thus, in actual use, the device is often updated with a new device, but a software version which is not adapted to the new device is installed, so that the device is abnormal, and in severe cases, the device cannot be started or the network cannot communicate, so that the maintenance cost is increased. How to avoid the upgrade of the wrong version of the intelligent device is still a problem to be solved in the art.
Disclosure of Invention
The invention provides a version upgrading method, a version upgrading device, electronic equipment, a storage medium and a program product, which are used for solving the defect that equipment is abnormal due to the fact that an unadapted version is mistakenly upgraded in the prior art.
The invention provides a version upgrading method, which comprises the following steps:
determining a version to be upgraded;
If the version package of the version to be upgraded does not contain the compatible device list of the version to be upgraded, carrying out compatibility verification based on the device list of the local terminal equipment and the downward compatible device list contained in the version package of the current version installed by the local terminal equipment;
and if the compatibility verification is passed, carrying out version upgrading based on the version package of the version to be upgraded.
According to the version upgrading method provided by the invention, the version to be upgraded is determined, and then the method further comprises the following steps:
And if the version package of the version to be upgraded contains the compatible device list of the version to be upgraded, performing compatibility verification based on the device list of the local terminal equipment and the compatible device list of the version to be upgraded.
According to the version upgrading method provided by the invention, the compatibility verification is performed based on the device list of the local terminal equipment and the compatible device list of the version to be upgraded, and the method comprises the following steps:
If the device list of the local terminal equipment contains device categories which do not exist in the compatible device list, carrying out compatibility verification based on the device list of the local terminal equipment, the downward compatible device list and the compatible device list of the version to be upgraded;
otherwise, performing compatibility verification based on the device list of the local terminal equipment and the compatible device list of the version to be upgraded.
According to the version upgrading method provided by the invention, the compatibility verification is performed based on the device list of the local terminal equipment, the downward compatible device list and the compatible device list of the version to be upgraded, and the method comprises the following steps:
determining a first type device and a second type device in a device list of the local equipment, wherein the device type of the first type device exists in the compatible device list, and the device type of the second type device is not in the compatible device list;
Matching the device identifier of the first type device with the compatible device identifier in the compatible device list to obtain a first matching result of the first type device;
matching the device identifier of the second type device with the compatible device identifier in the downward compatible device list to obtain a second matching result of the second type device;
And determining that the compatibility check passes or fails based on the first matching result of the first type device and the second matching result of the second type device.
According to the version upgrading method provided by the invention, the device list of the local terminal equipment is determined based on the following steps:
determining a management and control device class based on the device class in the downward compatible device list;
And determining a device list of the local terminal equipment based on the device identifiers of the local terminal devices belonging to the management and control device class in the local terminal equipment.
According to the version upgrading method provided by the invention, the downward compatible device list is obtained by updating the device types added by the compatible device list from version to version on the basis of the initial compatible device list.
According to the version upgrading method provided by the invention, the version to be upgraded is determined, and then the method further comprises the following steps:
if the device list of the local terminal equipment is not detected, or the compatibility verification fails, determining that the version upgrade fails;
and if the downward compatible device list is not detected, carrying out version upgrading based on the version package of the version to be upgraded.
The invention also provides a version upgrading device, which comprises:
The version determining unit is used for determining a version to be upgraded;
The first verification unit is used for carrying out compatibility verification based on a device list of the local terminal equipment and a downward compatible device list contained in the version package of the current version installed by the local terminal equipment if the version package of the version to be upgraded does not contain the compatible device list of the version to be upgraded;
And the upgrading unit is used for upgrading the version based on the version package of the version to be upgraded if the compatibility verification is passed. The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the version upgrade method as described in any one of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a version upgrade method as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a version upgrade method as described in any one of the above.
According to the version upgrading method, the version upgrading device, the electronic equipment, the storage medium and the program product, the downward compatible device list carried in the version package of the current version installed by the local equipment is applied to match the device list of the local equipment to carry out compatibility verification, so that the risks that the local equipment upgrades an unsuitable version due to the lack of the referenceable compatible device list during version rollback, various running problems are caused, and the feasibility and the reliability of version upgrading are improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a version upgrade method according to the present invention;
FIG. 2 is a second flow chart of the version-up method according to the present invention;
FIG. 3 is a version upgrade wiring diagram provided by the present invention;
FIG. 4 is a schematic diagram of a version upgrade apparatus according to the present invention;
Fig. 5 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In practical applications, if the intelligent device upgrades the software version of the device that is not adapted to the intelligent device, the device will be abnormal. Taking the IPC as an example, the IPC mistakenly upgrades the unadapted version, and when serious, equipment can not be started or the network can not be maintained in a communication mode, the equipment needs to climb a pole to restore operation, and the maintenance cost is extremely high.
In order to realize version upgrade verification, an unadapted version is prevented from being upgraded to the intelligent equipment, a software version number verification method is adopted in practical application, namely, the device number or device version of the intelligent equipment is verified with a supporting device number or device version carried in an upgrade target version package, equipment which is not in a version supporting device number or device version list is limited to be upgraded to the target version, but the scheme has poor expansibility, accurate limitation cannot be realized when a limiting device is newly added, and the situation that the wrong version upgrade cannot be limited exists in the upgrade is caused.
Aiming at the situation, the embodiment of the invention provides a version upgrading method. Fig. 1 is a schematic flow chart of a version upgrade method provided in the present invention, as shown in fig. 1, the method may be applied to an intelligent device, and for convenience of explanation, the intelligent device that specifically performs the method is referred to herein as a home device, where the method includes:
step 110, determining the version to be upgraded.
Specifically, the version to be upgraded, that is, the target version desired to be upgraded, may be an old version before the current version installed by the local device, or may be a new version after the current version installed by the local device, which is not particularly limited in the embodiment of the present invention.
And 120, if the version package of the version to be upgraded does not contain the compatible device list of the version to be upgraded, performing compatibility verification based on the device list of the local terminal equipment and the downward compatible device list contained in the version package of the current version installed by the local terminal equipment.
Specifically, after determining the version to be upgraded, a version package of the version to be upgraded may be downloaded, and whether the version package contains a compatible device list of the version to be upgraded may be detected. Here, the compatible device list is used to reflect a list of specific devices under each device class to which the corresponding version is compatible, and taking the version to which the IPC is installed as an example, the compatible device list may include a list of specific devices under the classes of CPU, DDR (Double Data Rate Synchronous Dynamic Random Access Memory ), flash memory, sensor, lens, and the like.
It will be appreciated that, in general, the version package will carry the compatible device list of the version, but if the version package does not carry the compatible device list of the version, it is stated that the version to be upgraded may be an old version with respect to the current version, and the version to be upgraded does not support a scheme of matching the conventional compatible device list with the device list of the local terminal device itself to implement compatibility verification.
For this case, the home terminal device may apply its own device list and a downward compatible device list included in the version package of the current version installed by itself to perform compatibility verification. That is, the implementation premise of the scheme provided by the embodiment of the invention is that the current version installed by the local terminal equipment carries the downward compatible device list in the version package, so that a judgment basis can be provided for whether the local terminal equipment is compatible with the old version under the condition of upgrading from the current version to the old version, namely, under the condition of version rollback.
Here, the downward compatible device list is used to reflect a specific device list under each device class to which the old version before the current version is compatible, and the form of the downward compatible device list may be identical to the form of the compatible device list described above. The list of the downward compatible devices is pre-stored in the version package by the version publisher, and after the installation of the current version is completed, the local device can store the list of the downward compatible devices in the version package of the current version locally, for example, in a device disk or a Flash storage medium of the local device, so as to facilitate the subsequent compatibility verification during version upgrading.
The device list of the home terminal device, that is, the home terminal device identifies the specific devices under each device class installed in the determined home terminal device by itself, it is understood that the device list of the home terminal device may only include specific devices under the device class that needs to be checked for compatibility, and the device class specifically included in the device list of the home terminal device may be consistent with the device class included in the downward compatible device list.
Based on the device list of the local equipment and the downward compatible device list of the current version, performing compatibility verification, specifically, judging whether each device in the device list of the local equipment exists in the downward compatible device list, if the device list of the local equipment is consistent with the device type contained in the downward compatible device list of the current version, if one or more devices in the device list of the local equipment do not exist in the downward compatible device list of the current version, the one or more devices can be considered to be new upgrade iterative devices after the old version is released, belonging to the old version incompatible devices, and if the old version incompatible devices exist in the local equipment, the compatibility verification fails; and if each device in the device list of the local terminal equipment exists in the downward compatible device list of the current version, the old version can be compatible with the local terminal equipment, and the compatibility check passes.
And 130, if the compatibility verification is passed, performing version upgrading based on the version package of the version to be upgraded.
Specifically, after the compatibility verification is completed, whether the local terminal equipment is upgraded to the version to be upgraded can be judged according to the compatibility verification result, namely, if the compatibility verification is passed, the version of the local terminal equipment can be upgraded based on a version package of the version to be upgraded, and if the compatibility verification is not passed, the version of the local terminal equipment is not upgraded.
According to the method provided by the embodiment of the invention, the downward compatible device list carried in the version package of the current version installed by the local terminal equipment is applied to perform compatibility verification in cooperation with the device list of the local terminal equipment, so that the risk that the local terminal equipment upgrades an unsuitable version due to the lack of a referenceable compatible device list during version rollback, various running problems are caused, and the feasibility and reliability of version upgrade are improved.
Based on the above embodiment, step 110 further includes:
And if the version package of the version to be upgraded contains the compatible device list of the version to be upgraded, performing compatibility verification based on the device list of the local terminal equipment and the compatible device list of the version to be upgraded.
Specifically, in the above embodiment, step 120 provides an implementation of the compatibility check in the case that the version package of the version to be upgraded does not include the list of compatible devices of the version to be upgraded. The embodiment of the invention provides an implementation mode of compatibility verification under the condition that a version package of a version to be upgraded contains a compatible device list of the version to be upgraded. It can be understood that the implementation manner provided by the embodiment of the present invention and the implementation manner provided by step 120 in the above embodiment reflect the compatibility checking manner in two different situations, and the embodiment of the present invention and step 120 are alternatively executed in practical applications.
It can be understood that the version package of the version to be upgraded contains a compatible device list of the version to be upgraded, which belongs to the common situation, and the version package carries the compatible device list and cannot be used as a judgment basis for whether the version to be upgraded is a version before or after the current version.
For the case that the version package of the version to be upgraded contains the compatible device list of the version to be upgraded, the compatibility verification can be directly performed based on the device list of the local equipment and the compatible device list of the version to be upgraded, specifically, whether each device in the device list of the local equipment exists in the compatible device list or not can be judged, so that each device in the local equipment can be compatible with the version to be upgraded is judged, and the passing or invalidation of the compatibility verification is determined.
Based on any of the foregoing embodiments, if the version package of the version to be upgraded includes the compatible device list of the version to be upgraded, performing compatibility verification based on the device list of the local device and the compatible device list of the version to be upgraded, where the method specifically includes:
If the device list of the local terminal equipment contains device categories which do not exist in the compatible device list, carrying out compatibility verification based on the device list of the local terminal equipment, the downward compatible device list and the compatible device list of the version to be upgraded;
otherwise, performing compatibility verification based on the device list of the local terminal equipment and the compatible device list of the version to be upgraded.
Specifically, in the process of performing compatibility verification on the device list of the local equipment and the compatible device list of the version to be upgraded, whether the device list of the local equipment is consistent with the device type contained in the compatible device list of the version to be upgraded or whether the device list of the local equipment contains the device type which does not exist in the compatible device list can be compared in advance.
It may be understood that, in the case that the device list of the local device is consistent with the device types included in the compatible device list of the version to be upgraded, if one or more devices in the device list of the local device are not in the compatible device list of the version to be upgraded, the one or more devices may be considered to be devices in a new upgrade iteration after the release of the version to be upgraded, which belong to devices in which the version to be upgraded is incompatible, and the compatibility verification fails because there is a device in which the version to be upgraded is incompatible in the local device; and if each device in the device list of the local terminal equipment exists in the compatible device list of the version to be upgraded, the version to be upgraded can be compatible with the local terminal equipment, and the compatibility check is passed.
In addition, in the case that the device list of the local device is inconsistent with the device types contained in the compatible device list of the version to be upgraded, the device types not involved in the device list of the local device may be specifically contained in the compatible device list, or the device types not involved in the compatible device list may be contained in the device list of the local device:
For the former, that is, the device types not involved in the device list of the local device are included in the compatible device list, it can be understood that the new version of the version to be upgraded appears after the current version, and the version to be upgraded is compatible and controlled for the device types not included in the local device, but the new version is generally downward compatible, so that when the embodiment of the invention performs compatibility verification, the device types not involved in the device list of the local device included in the compatible device list do not need to be focused on, and the compatibility verification can be performed according to the foregoing manner of performing the compatibility verification when the device list of the local device is consistent with the device types included in the compatible device list of the version to be upgraded, which is not repeated herein.
For the latter, that is, the device list of the local device includes the device types not related to the compatible device list, it can be understood that the version to be upgraded is an old version occurring before the current version, and the old version has not yet performed compatibility management and control for a part of the device types in the device list of the local device, so as to prevent that the devices under the part of the device types cannot be compatible with the version to be upgraded, when performing compatibility verification, not only the device list of the local device and the compatible device list of the version to be upgraded need to be compared, but also the device list of the local device and the downward compatible device list carried by the current version need to be compared. It can be understood that, for the device types included in the compatible device list, whether the device of the local device exists in the compatible device list can be determined, and for the device types not included in the compatible device list, whether the device of the local device exists in the downward compatible device list can be determined, so that the condition of checking the compatibility of each device in the device list of the local device can be obtained, and further, the conclusion that the compatibility check passes or fails can be obtained.
In order to avoid the situation that the new device is not compatible with the old version, the method provided by the embodiment of the invention provides a device list based on the local terminal equipment, and a mode of carrying out compatibility verification on the downward compatible device list and the compatible device list of the version to be upgraded, thereby ensuring the realizability of version rollback.
Based on any of the foregoing embodiments, the performing compatibility verification based on the device list of the home device, the downward compatible device list, and the compatible device list of the version to be upgraded includes:
determining a first type device and a second type device in a device list of the local equipment, wherein the device type of the first type device exists in the compatible device list, and the device type of the second type device is not in the compatible device list;
Matching the device identifier of the first type device with the compatible device identifier in the compatible device list to obtain a first matching result of the first type device;
matching the device identifier of the second type device with the compatible device identifier in the downward compatible device list to obtain a second matching result of the second type device;
And determining that the compatibility check passes or fails based on the first matching result of the first type device and the second matching result of the second type device.
Specifically, for the case that the device list of the local device includes a device type that is not related to the compatible device list, the devices included in the device list of the local device may be divided into two types, that is, a first type device and a second type device, where the first type device belongs to a device type that is subjected to compatibility management in the compatible device list of the version to be upgraded, and the second type device belongs to a device type that is not subjected to compatibility management in the compatible device list of the version to be upgraded.
For the first type of device of the local end device, the device identifier of the first type of device can be matched with the compatible device identifier in the compatible device list, and it is understood that the device identifier, namely the code type of the device, reflects the information of the device model. The matching of the device identification, namely the full character matching, and the first matching result obtained by the matching method reflects whether the first type device exists in the compatible device list, if so, the matching success exists, and if not, the matching failure exists.
For the second type of device of the local terminal equipment, the device identifier of the second type of device can be matched with the compatible device identifier in the downward compatible device list, so that the obtained second matching result reflects whether the second type of device exists in the downward compatible device list, if so, the matching is successful, and if not, the matching is failed.
After the matching result of all devices in the device list of the local terminal equipment is obtained, the passing or failure of the compatibility verification can be determined. Specifically, if the first matching results of all the first type devices and the second matching results of all the second type devices are successful in matching, determining that the compatibility verification passes; if there is a first type device and/or a second type device that failed the match, a compatibility check is determined to fail.
Based on any of the above embodiments, the device list of the local device is determined based on the following steps:
determining a management and control device class based on the device class in the downward compatible device list;
And determining a device list of the local terminal equipment based on the device identifiers of the local terminal devices belonging to the management and control device class in the local terminal equipment.
Specifically, the device list of the local device is usually generated by itself after the system is powered on, and in order to ensure that the device types included in the device list of the local device can be consistent with the device types in the downward compatible device list of the current version, when the device list of the local device is generated, the device types in the downward compatible device list need to be referred to, specifically, the device types in the downward compatible device list can be regarded as management device types, and the device of each management device type in the local device is detected, so that the device identifier of the local device belonging to each management device type in the local device is obtained, and then the device list is generated.
Here, the detection of the device in the local device may be implemented by a device tag, that is, a file for recording the device identifier in the model device, or other detection methods capable of obtaining the device identifier, which is not specifically limited in the embodiments of the present invention.
The method provided by the embodiment of the invention ensures that the device types contained in the device list of the local terminal equipment can be consistent with the device types in the downward compatible device list of the current version, and provides conditions for realizing compatibility verification.
Based on any of the above embodiments, the downward compatible device list is updated based on the initial compatible device list by applying device types added by the version-by-version compatible device list.
Specifically, the list of the downward compatible devices is adjusted and updated along with the version change, and the adjustment and update of the list of the downward compatible devices are realized by the version publisher, and the local terminal equipment only needs to acquire the list of the downward compatible devices from the version package of the current version and store the application.
The current version of the downward compatible device list can be that an initially applied device in the previous version of the compatible device list is added compared with a previously added device under the new management and control device category on the basis of the previous version of the downward compatible device list, namely, an old device in the new management and control device category is added to enter a white list, so that when the downward compatible device list maintains the device compatible with the old version, the list content can be adjusted according to the new management and control device category in the version updating iteration, and the types of the devices contained in the compatible device list and the downward compatible device list of the same version are consistent.
It will be appreciated that, for the first version supporting the above-mentioned compatibility checking mode, its list of downward compatible devices has not been subjected to continuous adjustment under the version update iteration, the first list of downward compatible devices supporting the version supporting the above-mentioned compatibility checking mode is denoted as the initial list of compatible devices, and reflects the device compatibility of the previous version of the version, that is, the list of downward compatible devices of the subsequent versions is updated based on the initial list of compatible devices.
According to the method provided by the embodiment of the invention, the downward compatible device list is updated through the device types added by the compatible device list of each version, so that the device types involved in the downward compatible device list when reflecting the devices compatible with the old version can be synchronized with the device types controlled by the new version, and the realizability of the compatibility check is ensured.
And the device list is downwards compatible, so that the expandability of the device upgrading limiting strategy is improved, the continuity of the existing device upgrading limiting strategy can be maintained, the expandability in the subsequent version upgrading of the scheme can be improved, the scheme is also suitable for being inserted in the product release process, and the practicability is higher.
Based on any of the above embodiments, step 110 further comprises:
if the device list of the local terminal equipment is not detected, or the compatibility verification fails, determining that the version upgrade fails;
and if the downward compatible device list is not detected, carrying out version upgrading based on the version package of the version to be upgraded.
Specifically, for version upgrade, the device list of the local device is a necessary condition for compatibility verification, after the version to be upgraded is determined, if the device list of the local device cannot be detected, the compatibility verification cannot be executed, so that whether the local device can adapt to the version to be upgraded cannot be judged, the version upgrade for the version to be upgraded is not executed by default, namely the version upgrade fails, and a prompt of version compatibility errors can be returned;
Further, in the case where the device list of the home terminal apparatus can be detected, the compatibility check is performed, but the execution result may possibly fail. Aiming at the condition that the compatibility verification fails, the fact that the local terminal equipment is not suitable for the version to be upgraded can be determined, the version upgrading aiming at the version to be upgraded is not executed by default, namely the version upgrading fails, and a prompt of version compatibility errors can be returned;
In addition, for the execution of the compatibility check, whether the compatible device list of the version to be upgraded can be detected or not, the downward compatible device list of the current version can be applied in the execution process of the compatibility check. And because the version which is supported by default to execute the compatibility verification should carry the downward compatibility device list, if the downward compatibility device list of the current version cannot be detected, that is, the default current version does not support the compatibility verification, the step of the compatibility verification can be skipped directly, and the version package of the version to be upgraded is applied to upgrade the version.
Based on any of the above embodiments, fig. 2 is a second flowchart of a version upgrade method according to the present invention, where, as shown in fig. 2, the version upgrade method includes:
Firstly, determining a version to be upgraded, starting version upgrading aiming at the version to be upgraded, and finishing downloading and decompressing of a version package of the version to be upgraded; the downloaded version package includes a version image body, may also include a compatible device list complist, or may not include a compatible device list complist. Here, a new version supporting the present compatibility checking scheme supports carrying the list complist of compatible devices in a version package, and a version package not carrying the list complist of compatible devices may be considered a version package not supporting the old version of the present compatibility scheme.
Secondly, judging whether the local terminal equipment locally stores a downward compatible device list default_ complist, namely judging whether the current version supports compatibility verification: if the local end equipment does not store the downward compatible device list default_ complist locally, namely the current version does not support compatibility verification, the version package of the version to be upgraded is directly applied to carry out version upgrading.
If the local equipment locally stores a downward compatible device list default_ complist, continuing to judge whether the local equipment locally stores a device list hwinfo or not, if the local equipment locally does not store a device list hwinfo, defaulting to a version to be upgraded, namely, failing to upgrade the version, and returning a prompt of version compatible errors;
If the local device locally stores the device list hwinfo, further determining whether the version package of the version to be upgraded includes the compatible device list complist of the version to be upgraded:
If the version package contains a compatible device list complist of the version to be upgraded, carrying out compatibility verification based on the compatible device list complist and the device list hwinfo;
If the version package does not contain the compatible device list complist of the version to be upgraded, carrying out compatibility verification based on the downward compatible device list default_ complist and the device list hwinfo;
if the compatibility verification is passed, carrying out version upgrading based on a version package of the version to be upgraded;
If the compatibility check fails, determining that the version upgrade fails, and returning a prompt of version compatibility errors.
Based on any of the above embodiments, each version has a compatible device list complist, and as the versions are changed, the content of the compatible device list complist of each version is also changed according to the device conditions supported by the version adaptation, and the number of device classes specifically managed is only increased or not decreased, and the device identifiers in each class are only increased or not decreased.
The compatible device list complist may be expressed in the form shown in the following table:
In the table, the first column is a row number, the second column is a specific content, in the second column, the brackets indicate the device class under control, such as Flash, sensor, and the device class lists the device identifiers, such as 4006C007, 4006C00J, that belong to the device class and are compatible with the version.
The list of downward compatible devices and the list of devices of the home device may both be of the forms described above.
Based on any of the above embodiments, fig. 3 is a version upgrade wiring diagram provided by the present invention, and the three columns of boxes shown in fig. 3 sequentially represent a device, a current version, and a version to be upgraded from left to right. In the figure, the dotted line divides Old Dev into Old equipment, new Dev1 and New Dev2 into New equipment, old Software into versions which do not support the compatibility check proposed by the embodiment of the invention, and New Software1 and New Software2 into versions which support the compatibility check proposed by the embodiment of the invention.
Based on the device, current version and version to be upgraded shown in fig. 3, the combination can be performed according to the form of the connection lines in the drawing to describe version upgrade in various situations:
case one: limiting the new equipment to fall back to the old version, and combining the processes C1, D4, E4 and E5;
In this case, the combination of the current device and the current version is a new device (new Flash) +a new version (new Flash is adapted), and the new device is restricted from being upgraded to an old version (new Flash is not adapted), i.e. the rollback is refused.
And a second case: allowing the equipment to be upgraded to a device compatible version, and combining flow combinations A2, A3, B5, B6, C2, C3, D5, D6 and E6;
In this case, the combination of the current device and the current version is device (Flash a, sensor a combination) +version a (adaptation Flash a, sensor a), allowing the hardware device to upgrade to software version B (adaptation Flash a, sensor a);
case three: allowing the old equipment plus the new version to fall back to the old version, and combining the flows A1 and B4;
In this case, the combination of the current device and the current version is the old device (Flash a) +the new version (adapted Flash a/B), allowing rollback to the old version;
Case four: allowing the version to be newly added with a new device list, and combining the flows A3, B6, C3, D6 and E6;
In this case, version B is allowed to be newly added, and version upgrade cannot fail because of the new device list;
Case five: limiting new equipment, new version and new device class rollback old version, combining processes E4 and E5;
In this case, the new device newly adds the Lens B, the newly added Lens device needs to check the default_ complist, the other devices check complist, and the Lens in the default_ complist only supports the Lens a, and limits the return to the version that does not support the Lens B, that is, refuses the return.
The version upgrading device provided by the invention is described below, and the version device described below and the version upgrading method described above can be correspondingly referred to each other.
Fig. 4 is a schematic structural diagram of a version upgrade apparatus provided by the present invention, and as shown in fig. 4, the version upgrade apparatus includes:
a version determining unit 410, configured to determine a version to be upgraded;
A verification unit 420, configured to perform compatibility verification based on a device list of the local device and a downward compatible device list included in a version package of a current version installed by the local device, if the version package of the version to be upgraded does not include the compatible device list of the version to be upgraded;
And the upgrading unit 430 is configured to perform version upgrading based on the version package of the version to be upgraded if the compatibility check passes.
According to the device provided by the embodiment of the invention, the downward compatible device list carried in the version package of the current version installed by the local terminal equipment is applied to perform compatibility verification in cooperation with the device list of the local terminal equipment, so that the risk that the local terminal equipment upgrades an unsuitable version due to the lack of a referenceable compatible device list during version rollback, various running problems are caused, and the feasibility and reliability of version upgrade are improved.
Based on any of the above embodiments, the verification unit 420 is further configured to:
And if the version package of the version to be upgraded contains the compatible device list of the version to be upgraded, performing compatibility verification based on the device list of the local terminal equipment and the compatible device list of the version to be upgraded.
Based on any of the above embodiments, the verification unit 420 is specifically configured to:
If the device list of the local terminal equipment contains device categories which do not exist in the compatible device list, carrying out compatibility verification based on the device list of the local terminal equipment, the downward compatible device list and the compatible device list of the version to be upgraded;
otherwise, performing compatibility verification based on the device list of the local terminal equipment and the compatible device list of the version to be upgraded.
Based on any of the above embodiments, the verification unit 420 is specifically configured to:
determining a first type device and a second type device in a device list of the local equipment, wherein the device type of the first type device exists in the compatible device list, and the device type of the second type device is not in the compatible device list;
Matching the device identifier of the first type device with the compatible device identifier in the compatible device list to obtain a first matching result of the first type device;
matching the device identifier of the second type device with the compatible device identifier in the downward compatible device list to obtain a second matching result of the second type device;
And determining that the compatibility check passes or fails based on the first matching result of the first type device and the second matching result of the second type device.
Based on any of the above embodiments, the apparatus further comprises a list determining unit configured to:
determining a management and control device class based on the device class in the downward compatible device list;
And determining a device list of the local terminal equipment based on the device identifiers of the local terminal devices belonging to the management and control device class in the local terminal equipment.
Based on any of the above embodiments, the downward compatible device list is updated based on the initial compatible device list by applying device types added by the version-by-version compatible device list.
Based on any of the above embodiments, the apparatus further includes a failure prompting unit configured to:
if the device list of the local terminal equipment is not detected, or the compatibility verification fails, determining that the version upgrade fails;
the upgrade unit 430 is further configured to:
and if the downward compatible device list is not detected, carrying out version upgrading based on the version package of the version to be upgraded.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, which may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a version-up method comprising: determining a version to be upgraded; if the version package of the version to be upgraded does not contain the compatible device list of the version to be upgraded, carrying out compatibility verification based on the device list of the local terminal equipment and the downward compatible device list contained in the version package of the current version installed by the local terminal equipment; and if the compatibility verification is passed, carrying out version upgrading based on the version package of the version to be upgraded.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of executing the version upgrade method provided by the methods described above, the method comprising: determining a version to be upgraded; if the version package of the version to be upgraded does not contain the compatible device list of the version to be upgraded, carrying out compatibility verification based on the device list of the local terminal equipment and the downward compatible device list contained in the version package of the current version installed by the local terminal equipment; and if the compatibility verification is passed, carrying out version upgrading based on the version package of the version to be upgraded.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the version upgrade method provided by the above methods, the method comprising: determining a version to be upgraded; if the version package of the version to be upgraded does not contain the compatible device list of the version to be upgraded, carrying out compatibility verification based on the device list of the local terminal equipment and the downward compatible device list contained in the version package of the current version installed by the local terminal equipment; and if the compatibility verification is passed, carrying out version upgrading based on the version package of the version to be upgraded.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (11)

1. A version upgrade method, comprising:
determining a version to be upgraded;
If the version package of the version to be upgraded does not contain the compatible device list of the version to be upgraded, carrying out compatibility verification based on the device list of the local terminal equipment and the downward compatible device list contained in the version package of the current version installed by the local terminal equipment;
and if the compatibility verification is passed, carrying out version upgrading based on the version package of the version to be upgraded.
2. The version-up method of claim 1, wherein said determining the version to be upgraded further comprises thereafter:
And if the version package of the version to be upgraded contains the compatible device list of the version to be upgraded, performing compatibility verification based on the device list of the local terminal equipment and the compatible device list of the version to be upgraded.
3. The version-up method according to claim 2, wherein the performing compatibility verification based on the device list of the home device and the compatible device list of the version to be upgraded includes:
If the device list of the local terminal equipment contains device categories which do not exist in the compatible device list, carrying out compatibility verification based on the device list of the local terminal equipment, the downward compatible device list and the compatible device list of the version to be upgraded;
otherwise, performing compatibility verification based on the device list of the local terminal equipment and the compatible device list of the version to be upgraded.
4. The version-up method according to claim 3, wherein said performing compatibility verification based on the device list of the home device, the downward compatible device list, and the compatible device list of the version to be upgraded includes:
determining a first type device and a second type device in a device list of the local equipment, wherein the device type of the first type device exists in the compatible device list, and the device type of the second type device is not in the compatible device list;
Matching the device identifier of the first type device with the compatible device identifier in the compatible device list to obtain a first matching result of the first type device;
matching the device identifier of the second type device with the compatible device identifier in the downward compatible device list to obtain a second matching result of the second type device;
And determining that the compatibility check passes or fails based on the first matching result of the first type device and the second matching result of the second type device.
5. The version-up method according to any one of claims 1 to 4, wherein the device list of the home terminal apparatus is determined based on the steps of:
determining a management and control device class based on the device class in the downward compatible device list;
And determining a device list of the local terminal equipment based on the device identifiers of the local terminal devices belonging to the management and control device class in the local terminal equipment.
6. The version-up method according to any one of claims 1 to 4, wherein the downward compatible device list is updated by applying device class added to a version-by-version compatible device list on the basis of an initial compatible device list.
7. The version-up method according to any one of claims 1 to 4, wherein said determining a version to be upgraded further comprises thereafter:
if the device list of the local terminal equipment is not detected, or the compatibility verification fails, determining that the version upgrade fails;
and if the downward compatible device list is not detected, carrying out version upgrading based on the version package of the version to be upgraded.
8. A version upgrade apparatus, comprising:
The version determining unit is used for determining a version to be upgraded;
The first verification unit is used for carrying out compatibility verification based on a device list of the local terminal equipment and a downward compatible device list contained in the version package of the current version installed by the local terminal equipment if the version package of the version to be upgraded does not contain the compatible device list of the version to be upgraded;
And the upgrading unit is used for upgrading the version based on the version package of the version to be upgraded if the compatibility verification is passed.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the version upgrade method of any one of claims 1 to 7 when the program is executed by the processor.
10. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the version upgrade method according to any one of claims 1 to 7.
11. A computer program product comprising a computer program, which when executed by a processor implements the version upgrade method according to any one of claims 1 to 7.
CN202211295714.0A 2022-10-21 2022-10-21 Version upgrading method, device, electronic equipment, storage medium and program product Pending CN117917636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211295714.0A CN117917636A (en) 2022-10-21 2022-10-21 Version upgrading method, device, electronic equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211295714.0A CN117917636A (en) 2022-10-21 2022-10-21 Version upgrading method, device, electronic equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN117917636A true CN117917636A (en) 2024-04-23

Family

ID=90729844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211295714.0A Pending CN117917636A (en) 2022-10-21 2022-10-21 Version upgrading method, device, electronic equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN117917636A (en)

Similar Documents

Publication Publication Date Title
CN102364891B (en) Method for upgrading software of embedded Ethernet equipment and embedded Ethernet equipment
US20090077634A1 (en) Firmware update method and system using the same
US10162625B2 (en) Vehicle control storage methods and systems
US20120117557A1 (en) Method and system for upgrading wireless data card
CN105718268A (en) Method and device for verifying OTA multi-pack upgrading
CN110535776B (en) Gateway current limiting method, device, gateway, system and storage medium
CN106843933A (en) A kind of leak restorative procedure of application program, mobile terminal and patch server
CN110543324B (en) Plug-in increment updating method and device for application program
CN106775873B (en) Method and equipment for updating mobile phone software and acquiring patch file
CN110597545A (en) Hot patch intelligent upgrading method and system based on OTA component
CN112615747A (en) Method and device for automatically deploying and configuring network equipment
CN112162770A (en) Firmware version upgrading method and device for realizing integrity verification based on block chain
CN109375953B (en) Operating system starting method and device
CN117917636A (en) Version upgrading method, device, electronic equipment, storage medium and program product
CN112559349B (en) Program running method and running device
CN115766439A (en) KVM device batch upgrading method and device and electronic device
CN111949290B (en) Hot patch management method and device, electronic equipment and storage medium
CN111221556B (en) Remote upgrade RSU mirror image method and system
CN114553477A (en) Page jump method, device, equipment and storage medium
EP3770422A1 (en) Updating software and/or firmware of a plurality of wind turbine devices
CN107967160B (en) Method and device for updating operating system file through Boot Loader
CN112416847A (en) Redis cluster creating method, system and device
CN110825406A (en) Software upgrading method and related equipment
CN114756247B (en) System deployment method, device, equipment and storage medium
CN116107603B (en) Firmware upgrading method and device, storage medium and electronic equipment

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