Search

CN-121984953-A - Multi-system upgrading method and device, electronic equipment and storage medium

CN121984953ACN 121984953 ACN121984953 ACN 121984953ACN-121984953-A

Abstract

The application provides a multi-system upgrading method, a multi-system upgrading device, electronic equipment and a storage medium, wherein the method comprises the steps of obtaining a starting state corresponding to each upgraded system, wherein the starting state corresponding to each upgraded system is used for indicating whether starting in at least one small kernel stage is successful after each upgraded system finishes OTA upgrading, and triggering all the upgraded systems to roll back under the condition that the starting state of each upgraded system indicates that at least one upgraded system fails to start, so that each upgraded system rolls back to a corresponding pre-upgraded system. The application solves the problem of chaotic starting state caused by the fact that rollback cannot be synchronized during multi-system upgrading in the related technology.

Inventors

  • Luo Chonggang

Assignees

  • 深圳市广通远驰科技有限公司

Dates

Publication Date
20260505
Application Date
20251229

Claims (10)

  1. 1. A method of multi-system upgrade, comprising: Acquiring a starting state corresponding to each upgraded system, wherein the starting state corresponding to each upgraded system is used for indicating whether starting in at least one small kernel stage is successful after each upgraded system finishes OTA upgrading; And triggering all the updated systems to roll back under the condition that the starting state of each updated system indicates that at least one updated system fails to start, so that each updated system rolls back to the corresponding pre-updated system.
  2. 2. The method of claim 1, wherein the obtaining the start-up status corresponding to each upgraded system comprises: acquiring OTA upgrade state information corresponding to the upgraded systems from a special storage partition, wherein the special storage partition stores OTA upgrade state information of each upgraded system in all the upgraded systems; acquiring a Slot switching state corresponding to the upgraded system after upgrading to the upgraded system from the OTA upgrading state information; and determining the starting state corresponding to the upgraded system based on the Slot switching state.
  3. 3. The method of claim 1, wherein the successful start-up in the at least one mini-kernel phase after each upgraded system completes the OTA upgrade comprises: and after the OTA upgrading is finished by the system after upgrading, when the system after upgrading is determined to be started successfully in a small kernel stage within a preset frequency threshold, judging that the starting state of the system after upgrading is the starting success.
  4. 4. The method of claim 1, wherein the triggering all of the upgraded systems to roll back each of the upgraded systems to a corresponding pre-upgrade system if it is determined that the boot-up status of each of the upgraded systems indicates that there is at least one of the post-upgrade systems failed to boot up, comprises: And under the condition that the first upgraded system is failed to start, triggering the first upgraded system and the second upgraded system to roll back so as to enable the first upgraded system and the second upgraded system to roll back to the corresponding pre-upgraded system, wherein the second upgraded system is started after the first upgraded system is started.
  5. 5. The method of claim 1, wherein the triggering all of the upgraded systems to roll back each of the upgraded systems to a corresponding pre-upgrade system if it is determined that the boot-up status of each of the upgraded systems indicates that there is at least one of the post-upgrade systems failed to boot up, comprises: under the condition that the first upgraded system is successfully started, sequentially starting each second upgraded system, wherein the second upgraded system is started after the first upgraded system is started; And under the condition that at least one second upgraded system in all the second upgraded systems fails to be started, triggering the first upgraded system and the second upgraded system to roll back so as to enable the first upgraded system and the second upgraded system to roll back to the corresponding pre-upgraded system.
  6. 6. The method of claim 2, wherein the triggering all of the upgraded systems to roll back comprises: marking the Slot switching state corresponding to the upgraded system with failed starting as abnormal; Writing a rollback flag into the dedicated memory partition; And in response to the rollback flag, rolling back all the upgraded systems.
  7. 7. A method according to claim 3, wherein said determining that the upgraded system has been successfully booted in a mini-kernel phase within a preset number of times threshold comprises: Obtaining the residual restarting quantity of the upgraded system in the small kernel stage, wherein the maximum value of the residual restarting quantity is a preset frequency threshold value, and the residual restarting quantity of the corresponding preset frequency threshold value is reduced by one when the upgraded system fails to start in the small kernel stage; and under the condition that the residual restarting quantity is more than or equal to 0, when the upgraded system is started in the small kernel stage, determining that the upgraded system is started successfully in the small kernel stage within a preset frequency threshold.
  8. 8. A multi-system upgrade apparatus, comprising: The system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring a starting state corresponding to each upgraded system, wherein the starting state corresponding to each upgraded system is used for indicating whether starting in at least one small kernel stage is successful after each upgraded system finishes OTA upgrading; and the rollback module is used for triggering all the upgraded systems to rollback under the condition that the starting state of each upgraded system indicates that at least one upgraded system fails to start, so that each upgraded system rolls back to the corresponding pre-upgraded system.
  9. 9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus, characterized in that, The memory is used for storing a computer program; the processor is configured to perform the method of any one of claims 1 to 7 by running the computer program stored on the memory.
  10. 10. A computer-readable storage medium, characterized in that the storage medium has stored therein a computer program, wherein the computer program is arranged to perform the method of any of claims 1 to 7 when run on a processor.

Description

Multi-system upgrading method and device, electronic equipment and storage medium Technical Field The present application relates to The field of OTA (Over The Air) technology, and in particular, to a method and apparatus for multi-system upgrade, an electronic device, and a storage medium. Background OTA upgrades are indispensable at each vehicle factory under the on-board scenario of the currently mainstream Hypervisor system. At present, single OS (Operating System) upgrade cannot guarantee consistency of multiple OSs, namely, the existing OTA scheme generally only processes upgrade of a single OS, lacks a cross-OS coordination mechanism, and under a multi-OS environment, if any OS upgrade fails, the Slot states (namely, slot states) of other OSs are possibly inconsistent, so that the whole vehicle-mounted System cannot be started or has abnormal functions. Secondly, in the related art, a cross-OS rollback trigger mechanism is lacking, rollback operation of each OS is usually independently executed, other OS upgrade failure conditions cannot be automatically perceived, rollback cannot be synchronized, and a starting state may be disordered. Therefore, the technical problem that rollbacks cannot be synchronized during multi-system upgrading, so that starting states are disordered exists in the related art. Disclosure of Invention The application provides a multi-system upgrading method and device, electronic equipment and a storage medium, which at least solve the technical problem that in the related art, rollbacks cannot be synchronized when a plurality of systems are upgraded, so that starting states are disordered. According to an aspect of an embodiment of the present application, there is provided a multi-system upgrade method, including: Acquiring a starting state corresponding to each upgraded system, wherein the starting state corresponding to each upgraded system is used for indicating whether starting in at least one small kernel stage is successful after each upgraded system finishes OTA upgrading; And triggering all the updated systems to roll back under the condition that the starting state of each updated system indicates that at least one updated system fails to start, so that each updated system rolls back to the corresponding pre-updated system. Optionally, in the foregoing method, the acquiring a start state corresponding to each upgraded system includes: acquiring OTA upgrade state information corresponding to the upgraded systems from a special storage partition, wherein the special storage partition stores OTA upgrade state information of each upgraded system in all the upgraded systems; acquiring a Slot switching state corresponding to the upgraded system after upgrading to the upgraded system from the OTA upgrading state information; and determining the starting state corresponding to the upgraded system based on the Slot switching state. Optionally, as in the previous method, after each of the post-upgrade systems completes the OTA upgrade, successful start-up in at least one mini-kernel phase, comprising: and after the OTA upgrading is finished by the system after upgrading, when the system after upgrading is determined to be started successfully in a small kernel stage within a preset frequency threshold, judging that the starting state of the system after upgrading is the starting success. Optionally, in the foregoing method, when it is determined that the startup status of each upgraded system indicates that there is at least one startup failure of the upgraded system, the method triggers all the upgraded systems to roll back, so that each upgraded system rolls back to a corresponding pre-upgrade system, including: And under the condition that the first upgraded system is failed to start, triggering the first upgraded system and the second upgraded system to roll back so as to enable the first upgraded system and the second upgraded system to roll back to the corresponding pre-upgraded system, wherein the second upgraded system is started after the first upgraded system is started. Optionally, in the foregoing method, when it is determined that the startup status of each upgraded system indicates that there is at least one startup failure of the upgraded system, the method triggers all the upgraded systems to roll back, so that each upgraded system rolls back to a corresponding pre-upgrade system, including: under the condition that the first upgraded system is successfully started, sequentially starting each second upgraded system, wherein the second upgraded system is started after the first upgraded system is started; And under the condition that at least one second upgraded system in all the second upgraded systems fails to be started, triggering the first upgraded system and the second upgraded system to roll back so as to enable the first upgraded system and the second upgraded system to roll back to the corresponding pre-upgraded system. Optionally, in the foregoing met