CN113407377A - OTA upgrade failure rollback version method - Google Patents

OTA upgrade failure rollback version method Download PDF

Info

Publication number
CN113407377A
CN113407377A CN202110685240.XA CN202110685240A CN113407377A CN 113407377 A CN113407377 A CN 113407377A CN 202110685240 A CN202110685240 A CN 202110685240A CN 113407377 A CN113407377 A CN 113407377A
Authority
CN
China
Prior art keywords
firmware
chip
mcu microprocessor
soc
mcu
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.)
Granted
Application number
CN202110685240.XA
Other languages
Chinese (zh)
Other versions
CN113407377B (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.)
Inbo Supercomputing Nanjing Technology Co Ltd
Original Assignee
Inbo Supercomputing Nanjing Technology 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 Inbo Supercomputing Nanjing Technology Co Ltd filed Critical Inbo Supercomputing Nanjing Technology Co Ltd
Priority to CN202110685240.XA priority Critical patent/CN113407377B/en
Publication of CN113407377A publication Critical patent/CN113407377A/en
Application granted granted Critical
Publication of CN113407377B publication Critical patent/CN113407377B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1433Saving, restoring, recovering or retrying at system level during software upgrading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a rollback version method for OTA upgrade failure, which adopts the technical scheme that an SOC main controller, an AI chip and an MCU microprocessor are provided, the AI chip and the MCU microprocessor are in communication connection with the SOC main controller, OTA firmware is downloaded through the SOC main controller, the content in the OTA firmware is distributed to the AI chip, the MCU microprocessor and the SOC main controller, when the AI chip and the MCU microprocessor finish receiving the AI firmware and the MCU firmware, the SOC main controller establishes a new firmware partition, the AI chip and the MCU microprocessor are synchronously upgraded from the new firmware partition, and when the AI chip and/or the MCU microprocessor do not finish receiving the AI firmware and the MCU firmware, the AI chip and the MCU microprocessor synchronously rollback start from the old firmware partition. The system version is kept consistent when the version is upgraded, and the effect that the system is kept in normal operation is achieved.

Description

OTA upgrade failure rollback version method
Technical Field
The invention relates to the technical field of automobile software upgrading, in particular to a rollback version method for OTA upgrading failure.
Background
With the rapid development of artificial intelligence, the automobile field has come to the intelligent era, the technology of intelligent driving is gradually developed and applied, the situation that a chip cannot be used for control in the process of intelligent control is avoided, a single chip is not enough to meet the processing of an automobile intelligent scheme at present, especially, a plurality of artificial intelligence chips are matched with a main control chip for processing in automatic driving, an integral control system also needs to be upgraded when the intelligent control is carried out, so that the intelligent control processing can be better carried out, an over-the-air (OTA) downloading technology is commonly used in the method of upgrading at present and a firmware package is transmitted to the main control chip, and the main control chip controls the upgrading of the artificial intelligence chip and other chips according to configuration files in the firmware package.
At present, the whole OTA upgrading not only relates to a main control chip, but also relates to an artificial intelligence chip and other chips, due to the complexity of the system and the interference of the environment, the upgrading of the chips is successful in the upgrading process, the condition that the versions are inconsistent exists due to the condition that some chips are failed in upgrading, and the normal use of the whole system is influenced due to the fact that the versions are inconsistent, and the system cannot normally work.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a rollback version method for OTA upgrade failure, which has the effects of keeping the system version consistent and realizing the normal operation of the system during the version upgrade.
In order to achieve the purpose, the invention provides the following technical scheme:
a rollback version method for OTA upgrade failure is provided, which comprises providing an SOC main controller, an AI chip and an MCU microprocessor, wherein the SOC main controller is in communication connection with the AI chip and the MCU microprocessor; the method comprises the following specific steps:
s1: the SOC master controller downloads the OTA firmware package to the local through a network transmission channel and caches the OTA firmware package;
s2: the SOC master controller decompresses the OTA firmware package, the decompressed OTA firmware package comprises AI firmware, MCU firmware and local firmware, and the SOC master controller creates a firmware distribution task;
s3: the SOC main controller respectively transmits AI firmware and MCU firmware to an AI chip and an MCU microprocessor according to firmware distribution tasks, the local firmware is stored in the SOC main controller, the AI chip and the MCU microprocessor respectively receive the AI firmware and the MCU firmware, and the AI chip and the MCU microprocessor generate a partition instruction when starting to receive the AI firmware and the MCU firmware and send the partition instruction to the SOC main controller;
s4: the SOC master controller generates a partition switching command when receiving a partition instruction, and the AI chip and the MCU microprocessor generate a partition switching identifier;
s5: if the AI chip and the MCU microprocessor complete the reception of the AI firmware and the MCU firmware, the AI chip and the MCU microprocessor respectively generate a receiving completion instruction and send the receiving completion instruction to the SOC main controller, the SOC main controller sends a partition switching command to the AI chip and the MCU microprocessor, the AI chip and the MCU microprocessor send a partition switching identifier to the SOC main controller, and a new firmware partition is established according to the partition switching identifier;
s6: if the AI chip does not finish receiving AI firmware and/or the MCU microprocessor does not finish receiving MCU firmware, the SOC master controller generates an update canceling instruction, the SOC master controller does not send a partition switching command and respectively sends the update canceling instruction to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor cancel a partition switching identifier and keep an old firmware partition when receiving the update canceling instruction;
s7: when the SOC master controller receives the partition switching identifier or generates an update cancelling command, the SOC master controller generates a restart command and sends the restart command to the AI chip and the MCU microprocessor;
s8: if the SOC master controller sends a restart command to the AI chip and the MCU microprocessor after receiving the switching partition identification, the AI chip and the MCU microprocessor are started from the established new firmware partition and perform version synchronous upgrading treatment, and the SOC master controller performs synchronous upgrading treatment according to local firmware;
s9: and if the SOC master controller generates a cancel upgrading command and then sends a restart command to the AI chip and the MCU microprocessor, restarting the AI chip and the MCU microprocessor from the old firmware partition to perform version synchronous rollback starting, and simultaneously performing synchronous rollback starting by the SOC master controller.
As a further improvement of the present invention, the SOC master includes a firmware verification module therein, and step S1 includes:
s101: the firmware verification module analyzes and verifies the OTA firmware;
s102: if the OTA firmware does not meet the upgrading requirement after the firmware verification module verifies the OTA firmware, the firmware verification module deletes the OTA firmware;
s103: the SOC master controller reestablishes a downloading channel to download the OTA firmware again;
s104: and if the firmware verification module verifies the OTA firmware, the OTA firmware meets the upgrading requirement, and the OTA firmware is cached in the SOC main controller.
As a further improvement of the present invention, the creating of the firmware distribution task in step S2 includes:
s201: the SOC master controller generates a firmware sending instruction and sends the firmware sending instruction to the AI chip and the MCU microprocessor;
s202: the AI chip and the MCU microprocessor generate a firmware confirmation instruction after receiving the firmware sending instruction and send the firmware confirmation instruction back to the SOC main controller;
s203: and the SOC master controller establishes a transmission link after receiving a firmware confirmation instruction, and the AI firmware and the MCU firmware are respectively transmitted to the AI chip and the MCU through the transmission link.
As a further improvement of the present invention, the SOC master controller is further provided with a timing module, the timing module includes a timing unit and a delay unit, the timing module is provided with a timing strategy, a receiving threshold and a delay threshold, and the timing strategy specifically includes:
the timing unit starts timing when the SOC main controller transmits AI firmware and MCU firmware, the timing unit generates a delay signal and transmits the delay signal to the delay unit if the AI chip and the MCU microprocessor do not transmit a receiving completion instruction within the receiving threshold time, the delay unit receives the delay signal to perform timing, and the SOC main controller generates an upgrading cancellation instruction if the AI chip and the MCU microprocessor do not transmit the receiving completion instruction within the delay threshold time;
and if the SOC master controller receives the command of finishing receiving within the receiving threshold and/or the delay threshold, the SOC master controller sends a partition switching command to the AI chip and the MCU microprocessor.
As a further improvement of the present invention, a receiving algorithm for calculating a receiving threshold is provided in the timing unit, and the receiving algorithm specifically includes:
Figure BDA0003124338870000031
wherein: t represents a time value of the reception threshold; m represents the OTA firmware size; g represents the download speed; a represents a weight value of the reception threshold; b represents a weight value of the download speed.
As a further improvement of the present invention, a delay algorithm for calculating a delay threshold is provided in the delay unit, and the delay algorithm specifically includes:
H=CT
wherein: h represents a time value of the delay threshold, and C represents a weight value of the delay threshold.
As a further improvement of the present invention, the step S8 specifically includes:
s801: the SOC master controller generates a version synchronization command and sends the version synchronization command to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor send a confirmation synchronization command to the SOC master controller after receiving the version synchronization command;
s802: if the AI chip or the MCU microprocessor is restarted from the old firmware partition, the SOC master controller generates a version rollback command and sends the version rollback command to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor perform version rollback processing when receiving the version rollback command and generate a confirmation rollback instruction and send the confirmation rollback instruction to the SOC master controller when rollback is completed;
s803: and when the SOC master controller receives the back-off confirmation instruction, the SOC master controller generates an upgrading restart instruction and sends the upgrading restart instruction to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor restart the system after receiving the upgrading restart instruction and synchronously upgrade the system from a new firmware partition.
As a further improvement of the present invention, the SOC master controller is further provided with a time counting module, a restart threshold is preset in the time counting module, and the restart threshold is used for determining the number of times that the AI chip and the MCU microprocessor in S803 receive the upgrade restart instruction;
if the times that the AI chip and the MCU microprocessor receive the upgrading restart instruction are larger than the restart threshold value, restarting the AI chip and the MCU microprocessor from the old firmware partition to perform version synchronous backspacing starting, and simultaneously performing synchronous backspacing starting by the SOC main controller;
and if the times of the AI chip and the MCU microprocessor receiving the upgrading restart instruction are less than or equal to a restart threshold value, the AI chip and the MCU microprocessor are started from the established new firmware subarea and perform version synchronous upgrading treatment, and the SOC master controller performs synchronous upgrading treatment according to local firmware.
The invention has the beneficial effects that: the OTA firmware is downloaded through the SOC main controller, the firmware content in the OTA firmware is respectively distributed to the AI chip, the MCU microprocessor and the SOC main controller, when the AI chip and the MCU microprocessor finish receiving the AI firmware and the MCU firmware, the SOC main controller establishes a new firmware partition, the AI chip and the MCU microprocessor synchronously upgrade from the new firmware partition, when the AI chip and/or the MCU microprocessor do not finish receiving the AI firmware and the MCU firmware, the AI chip and the MCU microprocessor synchronously start from the old firmware partition, the consistency of system versions is kept when the versions are upgraded, and the effect that the system keeps normal operation is realized.
Drawings
FIG. 1 is a schematic flow chart embodying the present invention;
fig. 2 is a schematic flowchart showing version synchronization upgrade.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. In which like parts are designated by like reference numerals. It should be noted that the terms "front," "back," "left," "right," "upper" and "lower" used in the following description refer to directions in the drawings, and the terms "bottom" and "top," "inner" and "outer" refer to directions toward and away from, respectively, the geometric center of a particular component.
Referring to fig. 1 and 2, in order to provide a specific embodiment of the OTA upgrade failure rollback version method of the present invention, an SOC main controller, an AI chip, and an MCU microprocessor are provided, and the SOC main controller is in communication connection with the AI chip and the MCU microprocessor; the system comprises an SOC main controller, wherein the SOC main controller comprises a firmware verification module, the firmware verification module is used for verifying OTA firmware, a timing module is further arranged in the SOC main controller, the timing module comprises a timing unit and a delay unit, a timing strategy, a receiving threshold and a delay threshold are arranged in the timing module, and the method comprises the following specific steps:
s1: the SOC master controller downloads the OTA firmware package to the local through a network transmission channel and caches the OTA firmware package;
s2: the SOC master controller decompresses the OTA firmware package, the decompressed OTA firmware package comprises AI firmware, MCU firmware and local firmware, and the SOC master controller creates a firmware distribution task;
s3: the SOC main controller respectively transmits AI firmware and MCU firmware to the AI chip and the MCU according to the firmware distribution tasks, local firmware is stored in the SOC main controller, the AI chip and the MCU microprocessor respectively receive the AI firmware and the MCU firmware, and the AI chip and the MCU microprocessor generate a partition instruction when starting to receive the AI firmware and the MCU firmware and send the partition instruction to the SOC main controller;
s4: the SOC master controller generates a partition switching command when receiving a partition instruction, and the AI chip and the MCU microprocessor generate a partition switching identifier;
s5: if the AI chip and the MCU microprocessor complete the reception of the AI firmware and the MCU firmware, the AI chip and the MCU microprocessor respectively generate a receiving completion instruction and send the receiving completion instruction to the SOC main controller, the SOC main controller sends a partition switching command to the AI chip and the MCU microprocessor, the AI chip and the MCU microprocessor send a partition switching identifier to the SOC main controller, and a new firmware partition is established according to the partition switching identifier;
s6: if the AI chip does not finish receiving the AI firmware and/or the MCU microprocessor does not finish receiving the MCU firmware, the SOC master controller generates an update canceling instruction, the SOC master controller does not send a partition switching command and respectively sends the update canceling instruction to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor cancel a partition switching identifier and keep an old firmware partition when receiving the update canceling instruction;
s7: when the SOC master controller receives the partition switching identifier or generates an update cancelling command, the SOC master controller generates a restart command and sends the restart command to the AI chip and the MCU microprocessor;
s8: if the SOC master controller receives the switching partition identification and then sends a restart command to the AI chip and the MCU microprocessor, the AI chip and the MCU microprocessor are started from the established new firmware partition and perform version synchronous upgrading treatment, and meanwhile, the SOC master controller performs synchronous upgrading treatment according to local firmware, so that the synchronous upgrading of systems in the SOC master controller, the AI chip and the MCU microprocessor is realized, and the consistency of the upgraded versions is kept;
s9: if the SOC master controller generates an upgrade canceling command and then sends a restart command to the AI chip and the MCU microprocessor, the AI chip and the MCU microprocessor are restarted from the old firmware partition to synchronously back up and start the versions, and meanwhile, the SOC master controller synchronously backs up and starts up, so that the SOC master controller, the AI chip and the MCU microprocessor fail to upgrade and back up to the old versions and keep the versions consistent.
Wherein the step of S1 further includes:
s101: the firmware verification module analyzes and verifies the OTA firmware;
s102: if the OTA firmware is verified by the firmware verification module and does not meet the upgrading requirement, the OTA firmware is deleted by the firmware verification module;
s103: the SOC master controller reestablishes a downloading channel to download the OTA firmware again, and a network of the downloading channel downloads the OTA firmware by using a 4G or 5G network;
s104: and if the firmware verification module verifies the OTA firmware, the OTA firmware meets the upgrading requirement, and the OTA firmware is cached in the SOC main controller.
Creating the firmware distribution task in step S2 includes:
s201: the SOC master controller generates a firmware sending instruction and sends the firmware sending instruction to the AI chip and the MCU microprocessor;
s202: the AI chip and the MCU microprocessor generate a firmware confirmation instruction after receiving the firmware sending instruction and send the firmware confirmation instruction back to the SOC main controller;
s203: the SOC main controller establishes a transmission link after receiving the firmware confirmation instruction, the AI firmware and the MCU firmware are respectively transmitted to the AI chip and the MCU microprocessor through the transmission link, and the transmission link is established as a TCP transmission control protocol channel, so that the transmission rate of the AI firmware and the MCU firmware is improved, and the file is not easy to lose during transmission.
The timing strategy specifically comprises:
the timing unit starts timing when the SOC main controller transmits AI firmware and MCU firmware, the timing unit generates a delay signal and transmits the delay signal to the delay unit when the AI chip and the MCU microprocessor do not transmit a receiving completion instruction within the receiving threshold time, the delay unit receives the delay signal to perform timing, and the SOC main controller generates an upgrading cancellation instruction when the AI chip and the MCU processor do not transmit the receiving completion instruction within the delay threshold time;
if the SOC master controller receives the command of finishing receiving within the receiving threshold and/or the delay threshold, the SOC master controller sends a partition switching command to the AI chip and the MCU microprocessor;
a receiving algorithm used for calculating a receiving threshold value is arranged in the timing unit, and the receiving algorithm specifically comprises the following steps:
Figure BDA0003124338870000071
wherein: t represents a time value of the reception threshold; m represents the OTA firmware size; g represents the download speed; a represents the weight value of the receiving threshold, and the value range of A is 1-2; b represents the weight value of the downloading speed, and the value range of B is 0.5-1; for example: when the size of the OTA firmware is 1000M, the downloading speed is 3M/s, A is 1.5, B is 0.5, and the receiving threshold time T is 1000 s.
A delay algorithm for calculating a delay threshold is arranged in the delay unit, and the delay algorithm specifically comprises the following steps:
H=CT
wherein: h represents the time value of the delay threshold, C represents the weight value of the delay threshold, the value range of C is 0.1-0.5, C is 0.2, namely when T is 1000S, the delay threshold H is 200S.
Step S8 specifically includes:
s801: the SOC master controller generates a version synchronization command and sends the version synchronization command to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor send a confirmation synchronization command to the SOC master controller after receiving the version synchronization command;
s802: if the AI chip or the MCU microprocessor is restarted from the old firmware partition, the SOC master controller generates a version rollback command and sends the version rollback command to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor perform version rollback processing when receiving the version rollback command, generate a rollback confirmation instruction when rollback is completed and send the rollback confirmation instruction to the SOC master controller;
s803: when the SOC master controller receives the back-off confirmation instruction, the SOC master controller generates an upgrading restart instruction and sends the upgrading restart instruction to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor restart the system after receiving the upgrading restart instruction and synchronously upgrade the system from a new firmware partition;
the SOC master controller is also provided with a counting module, a restarting threshold value is preset in the counting module, the restarting threshold value is used for judging the times of receiving the upgrading restarting instruction by the AI chip and the MCU microprocessor in the S803, and the times of restarting the threshold value in the embodiment are selected to be 3 times;
if the times that the AI chip and the MCU microprocessor receive the upgrading restart instruction are larger than the restart threshold value, restarting the AI chip and the MCU microprocessor from the old firmware partition to perform version synchronous backspacing starting, and simultaneously performing synchronous backspacing starting by the SOC main controller;
if the times that the AI chip and the MCU microprocessor receive the upgrading restart instruction are less than or equal to the restart threshold, the AI chip and the MCU microprocessor are started from the established new firmware subarea and perform version synchronous upgrading treatment, and the SOC master controller performs synchronous upgrading treatment according to local firmware;
therefore, when synchronous upgrading is carried out, if the AI chip or the MCU microprocessor does not synchronously pass through the synchronous upgrading in the new firmware partition, the upgrading is carried out again after rollback, the upgraded version is maintained after the upgrading is successful within the preset restarting threshold value, and if the upgrading is not successful after exceeding the preset restarting threshold value, the synchronous rollback is carried out to keep the versions consistent.
The working principle and the effect are as follows:
the OTA firmware is downloaded through the SOC main controller, the firmware content in the OTA firmware is respectively distributed to the AI chip, the MCU microprocessor and the SOC main controller, when the AI chip and the MCU microprocessor finish receiving the AI firmware and the MCU firmware, the SOC main controller establishes a new firmware partition, the AI chip and the MCU microprocessor synchronously upgrade from the new firmware partition, when the AI chip and/or the MCU microprocessor do not finish receiving the AI firmware and the MCU firmware, the AI chip and the MCU microprocessor synchronously start from the old firmware partition, the consistency of system versions is kept when the versions are upgraded, and the effect that the system keeps normal operation is realized.
The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments, and all technical solutions belonging to the idea of the present invention belong to the protection scope of the present invention. It should be noted that modifications and embellishments within the scope of the invention may occur to those skilled in the art without departing from the principle of the invention, and are considered to be within the scope of the invention.

Claims (8)

1. A method for rolling back edition of OTA upgrade failure is characterized in that: providing an SOC main controller, an AI chip and an MCU microprocessor, wherein the SOC main controller is in communication connection with the AI chip and the MCU microprocessor; the method comprises the following specific steps:
s1: the SOC master controller downloads the OTA firmware package to the local through a network transmission channel and caches the OTA firmware package;
s2: the SOC master controller decompresses the OTA firmware package, the decompressed OTA firmware package comprises AI firmware, MCU firmware and local firmware, and the SOC master controller creates a firmware distribution task;
s3: the SOC main controller respectively transmits AI firmware and MCU firmware to an AI chip and an MCU microprocessor according to firmware distribution tasks, the local firmware is stored in the SOC main controller, the AI chip and the MCU microprocessor respectively receive the AI firmware and the MCU firmware, and the AI chip and the MCU microprocessor generate a partition instruction when starting to receive the AI firmware and the MCU firmware and send the partition instruction to the SOC main controller;
s4: the SOC master controller generates a partition switching command when receiving a partition instruction, and the AI chip and the MCU microprocessor generate a partition switching identifier;
s5: if the AI chip and the MCU microprocessor complete the reception of the AI firmware and the MCU firmware, the AI chip and the MCU microprocessor respectively generate a receiving completion instruction and send the receiving completion instruction to the SOC main controller, the SOC main controller sends a partition switching command to the AI chip and the MCU microprocessor, the AI chip and the MCU microprocessor send a partition switching identifier to the SOC main controller, and a new firmware partition is established according to the partition switching identifier;
s6: if the AI chip does not finish receiving AI firmware and/or the MCU microprocessor does not finish receiving MCU firmware, the SOC master controller generates an update canceling instruction, the SOC master controller does not send a partition switching command and respectively sends the update canceling instruction to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor cancel a partition switching identifier and keep an old firmware partition when receiving the update canceling instruction;
s7: when the SOC master controller receives the partition switching identifier or generates an update cancelling command, the SOC master controller generates a restart command and sends the restart command to the AI chip and the MCU microprocessor;
s8: if the SOC master controller sends a restart command to the AI chip and the MCU microprocessor after receiving the switching partition identification, the AI chip and the MCU microprocessor are started from the established new firmware partition and perform version synchronous upgrading treatment, and the SOC master controller performs synchronous upgrading treatment according to local firmware;
s9: and if the SOC master controller generates a cancel upgrading command and then sends a restart command to the AI chip and the MCU microprocessor, restarting the AI chip and the MCU microprocessor from the old firmware partition to perform version synchronous rollback starting, and simultaneously performing synchronous rollback starting by the SOC master controller.
2. The OTA upgrade failure rollback version method of claim 1, wherein: the SOC master includes a firmware verification module therein, and step S1 includes:
s101: the firmware verification module analyzes and verifies the OTA firmware;
s102: if the OTA firmware does not meet the upgrading requirement after the firmware verification module verifies the OTA firmware, the firmware verification module deletes the OTA firmware;
s103: the SOC master controller reestablishes a downloading channel to download the OTA firmware again;
s104: and if the firmware verification module verifies the OTA firmware, the OTA firmware meets the upgrading requirement, and the OTA firmware is cached in the SOC main controller.
3. The OTA upgrade failure rollback version method of claim 1, wherein: the creating of the firmware distribution task in step S2 includes:
s201: the SOC master controller generates a firmware sending instruction and sends the firmware sending instruction to the AI chip and the MCU microprocessor;
s202: the AI chip and the MCU microprocessor generate a firmware confirmation instruction after receiving the firmware sending instruction and send the firmware confirmation instruction back to the SOC main controller;
s203: and the SOC master controller establishes a transmission link after receiving a firmware confirmation instruction, and the AI firmware and the MCU firmware are respectively transmitted to the AI chip and the MCU through the transmission link.
4. The OTA upgrade failure rollback version method of claim 1, wherein: the SOC master controller is also provided with a timing module, the timing module comprises a timing unit and a delay unit, a timing strategy, a receiving threshold and a delay threshold are arranged in the timing module, and the timing strategy specifically comprises the following steps:
the timing unit starts timing when the SOC main controller transmits AI firmware and MCU firmware, the timing unit generates a delay signal and transmits the delay signal to the delay unit if the AI chip and the MCU microprocessor do not transmit a receiving completion instruction within the receiving threshold time, the delay unit receives the delay signal to perform timing, and the SOC main controller generates an upgrading cancellation instruction if the AI chip and the MCU microprocessor do not transmit the receiving completion instruction within the delay threshold time;
and if the SOC master controller receives the command of finishing receiving within the receiving threshold and/or the delay threshold, the SOC master controller sends a partition switching command to the AI chip and the MCU microprocessor.
5. The OTA upgrade failure rollback version method of claim 4, wherein: a receiving algorithm for calculating a receiving threshold is arranged in the timing unit, and the receiving algorithm specifically comprises the following steps:
Figure FDA0003124338860000031
wherein: t represents a time value of the reception threshold; m represents the OTA firmware size; g represents the download speed; a represents a weight value of the reception threshold; b represents a weight value of the download speed.
6. The OTA upgrade failure rollback version method of claim 4, wherein: a delay algorithm for calculating a delay threshold is arranged in the delay unit, and the delay algorithm specifically comprises the following steps:
H=CT
wherein: h represents a time value of the delay threshold, and C represents a weight value of the delay threshold.
7. The OTA upgrade failure rollback version method of claim 1, wherein: the step S8 specifically includes:
s801: the SOC master controller generates a version synchronization command and sends the version synchronization command to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor send a confirmation synchronization command to the SOC master controller after receiving the version synchronization command;
s802: if the AI chip or the MCU microprocessor is restarted from the old firmware partition, the SOC master controller generates a version rollback command and sends the version rollback command to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor perform version rollback processing when receiving the version rollback command and generate a confirmation rollback instruction and send the confirmation rollback instruction to the SOC master controller when rollback is completed;
s803: and when the SOC master controller receives the back-off confirmation instruction, the SOC master controller generates an upgrading restart instruction and sends the upgrading restart instruction to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor restart the system after receiving the upgrading restart instruction and synchronously upgrade the system from a new firmware partition.
8. The OTA upgrade failure rollback version method of claim 7, wherein: the SOC master controller is also provided with a counting module, a restarting threshold value is preset in the counting module, and the restarting threshold value is used for judging the times that the AI chip and the MCU microprocessor in S803 receive the upgrading restarting instruction;
if the times that the AI chip and the MCU microprocessor receive the upgrading restart instruction are larger than the restart threshold value, restarting the AI chip and the MCU microprocessor from the old firmware partition to perform version synchronous backspacing starting, and simultaneously performing synchronous backspacing starting by the SOC main controller;
and if the times of the AI chip and the MCU microprocessor receiving the upgrading restart instruction are less than or equal to a restart threshold value, the AI chip and the MCU microprocessor are started from the established new firmware subarea and perform version synchronous upgrading treatment, and the SOC master controller performs synchronous upgrading treatment according to local firmware.
CN202110685240.XA 2021-06-21 2021-06-21 Method for rollback version in failure of OTA upgrading Active CN113407377B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110685240.XA CN113407377B (en) 2021-06-21 2021-06-21 Method for rollback version in failure of OTA upgrading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110685240.XA CN113407377B (en) 2021-06-21 2021-06-21 Method for rollback version in failure of OTA upgrading

Publications (2)

Publication Number Publication Date
CN113407377A true CN113407377A (en) 2021-09-17
CN113407377B CN113407377B (en) 2023-09-08

Family

ID=77681860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110685240.XA Active CN113407377B (en) 2021-06-21 2021-06-21 Method for rollback version in failure of OTA upgrading

Country Status (1)

Country Link
CN (1) CN113407377B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140372799A1 (en) * 2012-01-29 2014-12-18 Huawei Device Co., Ltd. System Differential Upgrade Method, Apparatus, and Mobile Terminal
CN109358882A (en) * 2018-11-02 2019-02-19 青岛海信电器股份有限公司 A kind of television terminal carries out the method and device of firmware upgrade
CN110659049A (en) * 2019-09-24 2020-01-07 北京智行者科技有限公司 OTA (over the air) upgrading method and terminal equipment for automatic driving vehicle
CN110730104A (en) * 2019-10-29 2020-01-24 乐鑫信息科技(上海)股份有限公司 Method for upgrading multi-device batch firmware of mesh network device
CN112905221A (en) * 2021-02-20 2021-06-04 百度在线网络技术(北京)有限公司 Version rollback method and device, electronic equipment and storage medium
CN112988204A (en) * 2021-05-19 2021-06-18 西安羚控电子科技有限公司 Method for remotely upgrading and rolling back software of unmanned aerial vehicle

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140372799A1 (en) * 2012-01-29 2014-12-18 Huawei Device Co., Ltd. System Differential Upgrade Method, Apparatus, and Mobile Terminal
CN109358882A (en) * 2018-11-02 2019-02-19 青岛海信电器股份有限公司 A kind of television terminal carries out the method and device of firmware upgrade
CN110659049A (en) * 2019-09-24 2020-01-07 北京智行者科技有限公司 OTA (over the air) upgrading method and terminal equipment for automatic driving vehicle
CN110730104A (en) * 2019-10-29 2020-01-24 乐鑫信息科技(上海)股份有限公司 Method for upgrading multi-device batch firmware of mesh network device
CN112905221A (en) * 2021-02-20 2021-06-04 百度在线网络技术(北京)有限公司 Version rollback method and device, electronic equipment and storage medium
CN112988204A (en) * 2021-05-19 2021-06-18 西安羚控电子科技有限公司 Method for remotely upgrading and rolling back software of unmanned aerial vehicle

Also Published As

Publication number Publication date
CN113407377B (en) 2023-09-08

Similar Documents

Publication Publication Date Title
US5699275A (en) System and method for remote patching of operating code located in a mobile unit
AU768774B2 (en) Method for processing messages in a cellular base station system
CN107809324A (en) A kind of OBD equipment and its upgrade method
CN108874437B (en) Online cloud updating method for android application program
US20120243585A1 (en) Communication system and communication apparatus
CN111901142A (en) Firmware silent upgrading method and device for embedded equipment cluster
CN105812176A (en) Client-initiative and concurrent upgrade-supporting remote upgrade method
US20220365772A1 (en) Master device, data distribution system, and non-transitory computer readable storage medium
CN109408082A (en) Upgrade method, device, equipment and readable storage medium storing program for executing based on third-party platform
CN113434170B (en) Finished automobile OTA data downloading and deploying method and device
CN113407377A (en) OTA upgrade failure rollback version method
WO2018040923A1 (en) Pos terminal application package download method and apparatus, and communication method
WO2023241458A1 (en) Software upgrade method and apparatus for vehicle-mounted controller, and device and storage medium
CN114035831B (en) CPLD upgrading method, system and computer readable storage medium
CN107809323B (en) Resource control method, device and system
CN112596764B (en) Internet of things monitoring method and device based on NB-IoT remote upgrade
CN116048595A (en) Intelligent terminal noninductive upgrading method and system and electric forklift
CN115208761A (en) OTA upgrading system
CN114780114A (en) Firmware upgrading method, system, vehicle and storage medium
WO2019010769A1 (en) Upgrade method and apparatus for vehicle-mounted communication device, and vehicle-mounted communication device
CN106708549B (en) OTA (over the air) upgrading method of handheld terminal
CN117806682A (en) OTA rollback control method and device for vehicle-mounted controller
CN109725922B (en) Small system upgrading method, system and related device
US20240086175A1 (en) Update control system, update control method, non-transitory storage medium, and in-vehicle control device
CN116909596A (en) Version management and updating method and system based on micro-service

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