CN113407377B - Method for rollback version in failure of OTA upgrading - Google Patents

Method for rollback version in failure of OTA upgrading Download PDF

Info

Publication number
CN113407377B
CN113407377B CN202110685240.XA CN202110685240A CN113407377B CN 113407377 B CN113407377 B CN 113407377B CN 202110685240 A CN202110685240 A CN 202110685240A CN 113407377 B CN113407377 B CN 113407377B
Authority
CN
China
Prior art keywords
firmware
chip
soc
mcu microprocessor
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.)
Active
Application number
CN202110685240.XA
Other languages
Chinese (zh)
Other versions
CN113407377A (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

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

Abstract

The invention discloses a method for returning version of failure in OTA upgrading, which has the technical scheme that the method comprises the steps of providing an SOC main controller, an AI chip and an MCU microprocessor which are in communication connection with the SOC main controller, downloading OTA firmware through the SOC main controller, distributing the content in the OTA firmware to the AI chip, the MCU microprocessor and the SOC main controller, establishing a new firmware partition by the SOC main controller when the AI chip and the MCU microprocessor receive the AI firmware and the MCU firmware, synchronously upgrading the AI chip and the MCU microprocessor from the new firmware partition, and synchronously returning the AI chip and the MCU microprocessor from the old firmware partition when the AI chip and/or the MCU microprocessor do not receive the AI firmware and the MCU firmware. When the version is updated, the version of the system is kept consistent, and the effect of keeping the system in normal operation is achieved.

Description

Method for rollback version in failure of OTA upgrading
Technical Field
The invention relates to the technical field of automobile software upgrading, in particular to a method for rollback version of OTA upgrading failure.
Background
Along with the rapid development of artificial intelligence, the automobile field is coming into the intelligent era, the intelligent driving technology is gradually developed and applied, the chip cannot be used for control in the intelligent control process, the single chip is insufficient for meeting the processing of an automobile intelligent scheme at present, particularly, a plurality of artificial intelligent chips are adopted for processing in automatic driving together with a main control chip, and an integral control system also needs upgrading processing in intelligent control, so that intelligent control processing can be better carried out, the firmware package is downloaded by an over-the-air technology (OTA) in the current upgrading method and is transmitted to the main control chip, and the main control chip controls the upgrading of the artificial intelligent chip and other chips according to configuration files in the firmware package.
At present, the integral OTA upgrade not only relates to a main control chip, but also relates to an artificial intelligent chip and other chips, the chip upgrade is successful in the upgrade process due to the complexity of the system and the interference of the environment, and the situation that the version is inconsistent is caused due to the failure of the chip upgrade, and the system can not work normally due to the inconsistent version, so that the normal use of the integral system is affected.
Disclosure of Invention
Aiming at the defects existing in the prior art, the invention aims to provide an OTA upgrade failure rollback version method which has the effects of keeping the system version consistent and realizing the normal operation of the system when the version is upgraded.
In order to achieve the above purpose, the present invention provides the following technical solutions:
an OTA upgrades the failure and rolls back the version method, offer SOC master controller, AI chip and MCU microprocessor, said SOC master controller and AI chip and MCU microprocessor communication connection; the method comprises the following specific steps:
s1: the SOC master controller downloads OTA firmware packets to the local area through a network transmission channel and caches the OTA firmware packets;
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 the AI firmware and the MCU firmware to the AI chip and the MCU microprocessor according to the firmware distribution task, 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 finish receiving the AI firmware and the MCU firmware, the AI chip and the MCU microprocessor respectively generate a finishing receiving instruction and send the finishing receiving instruction to the SOC main controller, the SOC main controller sends a partition switching command to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor send a partition switching identification to the SOC main controller and establish a new firmware partition according to the partition switching identification;
s6: if the AI chip does not complete the reception of the AI firmware and/or the MCU microprocessor does not complete the reception of the MCU firmware, the SOC main controller generates a cancel upgrade command, the SOC main controller does not send a switch partition command and respectively sends the cancel upgrade command to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor cancel the switch partition identification and keep the old firmware partition when receiving the cancel upgrade command;
s7: when the SOC master controller receives the switching partition identification or generates a cancel upgrade command, the SOC master controller generates a restart command and sends the restart command to an AI chip and an MCU microprocessor;
s8: if the SOC master controller receives the identification of the switching partition and then sends a restarting command to the AI chip and the MCU microprocessor, the AI chip and the MCU microprocessor start from the established new firmware partition and perform version synchronous upgrading processing, and meanwhile, the SOC master controller performs synchronous upgrading processing according to local firmware;
s9: and if the SOC master controller generates the cancel upgrading command and then sends a restarting command to the AI chip and the MCU microprocessor, the AI chip and the MCU microprocessor restart from the old firmware partition to perform version synchronous rollback starting, and meanwhile, the SOC master controller performs synchronous rollback starting.
As a further improvement of the present invention, the SOC master includes a firmware verification module, and the step S1 includes:
s101: the firmware verification module analyzes and verifies the OTA firmware;
s102: if the firmware verification module verifies the OTA firmware, the OTA firmware does not meet the upgrading requirement, and the firmware verification module deletes the OTA firmware;
s103: the SOC master controller re-establishes a downloading channel to re-download the OTA firmware;
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 master controller.
As a further improvement of the present invention, creating a firmware distribution task in the step S2 includes:
s201: the SOC master controller generates a firmware sending instruction and sends the firmware sending instruction to an AI chip and an 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 after receiving the firmware confirmation instruction, the SOC main controller establishes a transmission link, and the AI firmware and the MCU firmware are respectively transmitted to the AI chip and the MCU microprocessor through the transmission link.
As a further improvement of the invention, the SOC master controller is further provided with a timing module, the timing module comprises a timing unit and a delay unit, and a timing strategy, a receiving threshold value and a delay threshold value are arranged in the timing module, and the timing strategy is specifically as follows:
the timing unit starts timing when the SOC master controller transmits the AI firmware and the MCU firmware, the timing unit generates a delay signal and sends the delay signal to the delay unit when the AI chip and the MCU microprocessor do not send a receiving completion instruction within the receiving threshold time, the delay unit receives the delay signal to perform timing, and the SOC master controller generates a cancel upgrading instruction when the AI chip and the MCU processor do not send the receiving completion instruction within the delay threshold time;
and if the SOC master controller receives the receiving completion instruction 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:
wherein: t represents a time value of the reception threshold; m represents an OTA firmware size; g represents the download speed; a represents a weight value of a reception threshold; b represents a weight value of the download speed.
As a further improvement of the invention, a delay algorithm for calculating a delay threshold is arranged in the delay unit, and the delay algorithm specifically comprises:
H=CT
wherein: h represents the time value of the delay threshold and C represents the 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 synchronous command and sends the version synchronous command to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor send a confirmation synchronous command to the SOC master controller after receiving the version synchronous command;
s802: if the AI chip or the MCU microprocessor restarts from the old firmware partition, the SOC main 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 carry out version rollback processing when receiving the version rollback command, generate a confirmation rollback command when rollback is completed and send the confirmation rollback command to the SOC main controller;
s803: and when the SOC main controller receives the confirmation rollback instruction, the SOC main controller generates an upgrade restarting instruction and sends the upgrade restarting instruction to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor restart after receiving the upgrade restarting instruction and synchronously upgrade the new firmware partition.
As a further improvement of the invention, the SOC main controller is further provided with a counting module, and 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 upgrade restarting instruction;
if the number of times that the AI chip and the MCU microprocessor receive the upgrade restarting instruction is larger than a restarting threshold, the AI chip and the MCU microprocessor restart from the old firmware partition to carry out version synchronous rollback starting, and simultaneously, the SOC main controller carries out synchronous rollback starting;
and if the number of times that the AI chip and the MCU microprocessor receive the upgrading restarting instruction is smaller than or equal to a restarting threshold value, starting the AI chip and the MCU microprocessor from the established new firmware partition and performing version synchronous upgrading processing, and simultaneously, performing synchronous upgrading processing by the SOC main controller according to the local firmware.
The invention has the beneficial effects that: the method comprises the steps that OTA firmware is downloaded through an SOC main controller, firmware content in the OTA firmware is distributed to an AI chip, an MCU microprocessor and the SOC main controller respectively, when the AI chip and the MCU microprocessor receive 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, and when the AI chip and/or the MCU microprocessor do not receive the AI firmware and the MCU firmware completely, the AI chip and the MCU microprocessor synchronously rollback and start from the old firmware partition, so that the system version is kept consistent when the version is upgraded, and the effect that the system keeps normal operation is achieved.
Drawings
FIG. 1 is a schematic flow chart embodying the present invention;
fig. 2 is a flow diagram illustrating a version sync upgrade.
Detailed Description
The invention will now be described in further detail with reference to the drawings and examples. Wherein like parts are designated by like reference numerals. It should be noted that the words "front", "back", "left", "right", "upper" and "lower" used in the following description refer to directions in the drawings, and the words "bottom" and "top", "inner" and "outer" refer to directions toward or away from, respectively, the geometric center of a particular component.
Referring to fig. 1 and fig. 2, in order to provide a specific implementation manner of an OTA upgrade failure rollback version method of the present invention, an SOC main controller, an AI chip and an MCU microprocessor are provided, where the SOC main controller is in communication connection with the AI chip and the MCU microprocessor; the SOC master controller comprises a firmware verification module, wherein the firmware verification module is used for verifying OTA firmware, a timing module is further arranged in the SOC master controller and comprises a timing unit and a delay unit, a timing strategy, a receiving threshold value and a delay threshold value are arranged in the timing module, and the method specifically comprises the following steps:
s1: the SOC master controller downloads the OTA firmware packet to the local area through a network transmission channel and caches the OTA firmware packet;
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 the AI firmware and the MCU firmware to the AI chip and the MCU microprocessor according to the firmware distribution task, 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, a partition instruction is generated when the AI chip and the MCU microprocessor start to receive the AI firmware and the MCU firmware, and the partition instruction is sent to the SOC main controller;
s4: the method comprises the steps that when an SOC main controller receives a partition instruction, a partition switching command is generated, and an AI chip and an MCU microprocessor generate a partition switching identifier;
s5: if the AI chip and the MCU microprocessor finish receiving the AI firmware and the MCU firmware, the AI chip and the MCU microprocessor respectively generate a finishing receiving instruction and send the finishing receiving 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 identification to the SOC main controller, and a new firmware partition is established according to the partition switching identification;
s6: if the AI chip does not complete the receiving of the AI firmware and/or the MCU microprocessor does not complete the receiving of the MCU firmware, the SOC main controller generates a cancel upgrade command, the SOC main controller does not send a switch partition command, and sends the cancel upgrade command to the AI chip and the MCU microprocessor respectively, and the AI chip and the MCU microprocessor cancel the switch partition identification when receiving the cancel upgrade command and keep the old firmware partition;
s7: when the SOC master controller receives the switching partition identification or generates a cancel upgrade 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 identification of the switching partition and then sends a restarting command to the AI chip and the MCU microprocessor, the AI chip and the MCU microprocessor start from the established new firmware partition and perform version synchronous upgrading processing, and meanwhile, the SOC master controller performs synchronous upgrading processing according to the local firmware, so that synchronous upgrading of systems in the SOC master controller, the AI chip and the MCU microprocessor is realized, and consistency after version upgrading is kept;
s9: if the SOC master controller generates a cancel upgrading command and then sends a restarting command to the AI chip and the MCU microprocessor, the AI chip and the MCU microprocessor restart from the old firmware partition to perform version synchronous rollback starting, and meanwhile, the SOC master controller performs synchronous rollback starting to realize that the SOC master controller, the AI chip and the MCU microprocessor are failed to upgrade, rollback to the old version and keep the version consistent.
Wherein in step S1, further comprises:
s101: the firmware verification module analyzes and verifies the OTA firmware;
s102: if the firmware verification module verifies the OTA firmware, the OTA firmware does not meet the upgrading requirement, and the firmware verification module deletes the OTA firmware;
s103: the SOC master controller re-establishes a downloading channel to re-download the OTA firmware, and a network of the downloading channel uses a 4G or 5G network to download;
s104: 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 master controller.
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: after receiving the firmware confirmation instruction, the SOC main controller establishes a transmission link, and the AI firmware and the MCU firmware are respectively transmitted to the AI chip and the MCU microprocessor through the transmission link, wherein 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 is specifically as follows:
the timing unit starts timing when the SOC main controller transmits the AI firmware and the MCU firmware, the timing unit generates a delay signal and sends the delay signal to the delay unit when the AI chip and the MCU microprocessor do not send the completion receiving instruction within the receiving threshold time, the delay unit receives the delay signal to perform timing, and the SOC main controller generates a cancel upgrading instruction when the AI chip and the MCU processor do not send the completion receiving instruction within the delay threshold time;
if the SOC master controller receives the receiving completion instruction within the receiving threshold value and/or the delay threshold value, the SOC master controller sends a partition switching command to the AI chip and the MCU microprocessor;
the timing unit is internally provided with a receiving algorithm for calculating a receiving threshold value, and the receiving algorithm is specifically as follows:
wherein: t represents a time value of the reception threshold; m represents an OTA firmware size; g represents the download speed; a represents the weight value of the receiving threshold value, 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 OTA firmware size is 1000M, the downloading speed is 3M/s, A is 1.5, B is 0.5, and the receiving threshold time T is 1000s.
The delay unit is internally provided with a delay algorithm for calculating a delay threshold, and the delay algorithm is specifically as follows:
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.
The step S8 specifically comprises the following steps:
s801: the SOC master controller generates a version synchronous command and sends the version synchronous command to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor send a confirmation synchronous command to the SOC master controller after receiving the version synchronous command;
s802: if the AI chip or the MCU microprocessor restarts from the old firmware partition, the SOC main 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 carry out version rollback processing when receiving the version rollback command and generate a confirmation rollback command and send the confirmation rollback command to the SOC main controller when rollback is completed;
s803: when the SOC main controller receives the confirmation rollback instruction, the SOC main controller generates an upgrade restarting instruction and sends the upgrade restarting instruction to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor restart after receiving the upgrade restarting instruction and synchronously upgrade the new firmware partition;
the SOC main controller is further provided with a counting module, a restarting threshold is preset in the counting module, and the restarting threshold is used for judging the times that the AI chip and the MCU microprocessor in S803 receive the upgrade restarting instruction, and the number of times of restarting threshold is 3 in the embodiment;
if the number of times that the AI chip and the MCU microprocessor receive the upgrade restarting instruction is larger than the restarting threshold, the AI chip and the MCU microprocessor restart from the old firmware partition to carry out version synchronous rollback starting, and meanwhile, the SOC main controller carries out synchronous rollback starting;
if the number of times that the AI chip and the MCU microprocessor receive the upgrade restarting instruction is smaller than or equal to a restarting threshold value, the AI chip and the MCU microprocessor start from the established new firmware partition and carry out version synchronous upgrade processing, and simultaneously the SOC main controller carries out synchronous upgrade processing according to local firmware;
therefore, when the synchronous upgrading processing is realized, if the AI chip or the MCU microprocessor does not synchronously pass through the synchronous upgrading in the new firmware partition, the process is restarted and the upgrading is carried out again, after the upgrading is successful within a preset restarting threshold, the upgraded version is kept, and if the upgrading is not successful after the preset restarting threshold is exceeded, the process is carried out for synchronously backing the version to be consistent.
Working principle and effect:
the method comprises the steps that OTA firmware is downloaded through an SOC main controller, firmware content in the OTA firmware is distributed to an AI chip, an MCU microprocessor and the SOC main controller respectively, when the AI chip and the MCU microprocessor receive 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, and when the AI chip and/or the MCU microprocessor do not receive the AI firmware and the MCU firmware completely, the AI chip and the MCU microprocessor synchronously rollback and start from the old firmware partition, so that the system version is kept consistent when the version is upgraded, and the effect that the system keeps normal operation is achieved.
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 examples, and all technical solutions belonging to the concept of the present invention belong to the protection scope of the present invention. It should be noted that modifications and adaptations to the present invention may occur to one skilled in the art without departing from the principles of the present invention and are intended to be within the scope of the present invention.

Claims (8)

1. An OTA upgrade failure rollback version method 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 OTA firmware packets to the local area through a network transmission channel and caches the OTA firmware packets;
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 the AI firmware and the MCU firmware to the AI chip and the MCU microprocessor according to the firmware distribution task, 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 finish receiving the AI firmware and the MCU firmware, the AI chip and the MCU microprocessor respectively generate a finishing receiving instruction and send the finishing receiving instruction to the SOC main controller, the SOC main controller sends a partition switching command to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor send a partition switching identification to the SOC main controller and establish a new firmware partition according to the partition switching identification;
s6: if the AI chip does not complete the reception of the AI firmware and/or the MCU microprocessor does not complete the reception of the MCU firmware, the SOC main controller generates a cancel upgrade command, the SOC main controller does not send a switch partition command and respectively sends the cancel upgrade command to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor cancel the switch partition identification and keep the old firmware partition when receiving the cancel upgrade command;
s7: when the SOC master controller receives the switching partition identification or generates a cancel upgrade command, the SOC master controller generates a restart command and sends the restart command to an AI chip and an MCU microprocessor;
s8: if the SOC master controller receives the identification of the switching partition and then sends a restarting command to the AI chip and the MCU microprocessor, the AI chip and the MCU microprocessor start from the established new firmware partition and perform version synchronous upgrading processing, and meanwhile, the SOC master controller performs synchronous upgrading processing according to local firmware;
s9: and if the SOC master controller generates the cancel upgrading command and then sends a restarting command to the AI chip and the MCU microprocessor, the AI chip and the MCU microprocessor restart from the old firmware partition to perform version synchronous rollback starting, and meanwhile, the SOC master controller performs synchronous rollback starting.
2. The method for rollback version in failure of OTA upgrade of claim 1, wherein: the SOC master controller includes a firmware verification module, and the step S1 includes:
s101: the firmware verification module analyzes and verifies the OTA firmware;
s102: if the firmware verification module verifies the OTA firmware, the OTA firmware does not meet the upgrading requirement, and the firmware verification module deletes the OTA firmware;
s103: the SOC master controller re-establishes a downloading channel to re-download the OTA firmware;
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 master controller.
3. The method for rollback version in failure of OTA upgrade of claim 1, wherein: the creating a firmware distribution task in step S2 includes:
s201: the SOC master controller generates a firmware sending instruction and sends the firmware sending instruction to an AI chip and an 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 after receiving the firmware confirmation instruction, the SOC main controller establishes a transmission link, and the AI firmware and the MCU firmware are respectively transmitted to the AI chip and the MCU microprocessor through the transmission link.
4. The method for rollback version in failure of OTA upgrade of claim 1, wherein: the SOC master controller is characterized in that a timing module is further arranged in the SOC master controller, the timing module comprises a timing unit and a delay unit, a timing strategy, a receiving threshold value and a delay threshold value are arranged in the timing module, and the timing strategy is specifically as follows:
the timing unit starts timing when the SOC master controller transmits the AI firmware and the MCU firmware, the timing unit generates a delay signal and sends the delay signal to the delay unit when the AI chip and the MCU microprocessor do not send a receiving completion instruction within the receiving threshold time, the delay unit receives the delay signal to perform timing, and the SOC master controller generates a cancel upgrading instruction when the AI chip and the MCU processor do not send the receiving completion instruction within the delay threshold time;
and if the SOC master controller receives the receiving completion instruction 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 method for fallback version in OTA upgrade failure of claim 4, wherein: a receiving algorithm for calculating a receiving threshold value is arranged in the timing unit, and the receiving algorithm specifically comprises:
wherein: t represents a time value of the reception threshold; m represents an OTA firmware size; g represents the download speed; a represents a weight value of a reception threshold; b represents a weight value of the download speed.
6. The method for fallback version in OTA upgrade failure of claim 4, wherein: a delay algorithm for calculating a delay threshold value is arranged in the delay unit, and the delay algorithm specifically comprises:
H=CT
wherein: h represents the time value of the delay threshold and C represents the weight value of the delay threshold.
7. The method for rollback version in failure of OTA upgrade of claim 1, wherein: the step S8 specifically includes:
s801: the SOC master controller generates a version synchronous command and sends the version synchronous command to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor send a confirmation synchronous command to the SOC master controller after receiving the version synchronous command;
s802: if the AI chip or the MCU microprocessor restarts from the old firmware partition, the SOC main 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 carry out version rollback processing when receiving the version rollback command, generate a confirmation rollback command when rollback is completed and send the confirmation rollback command to the SOC main controller;
s803: and when the SOC main controller receives the confirmation rollback instruction, the SOC main controller generates an upgrade restarting instruction and sends the upgrade restarting instruction to the AI chip and the MCU microprocessor, and the AI chip and the MCU microprocessor restart after receiving the upgrade restarting instruction and synchronously upgrade the new firmware partition.
8. The method for fallback version in OTA upgrade failure 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 number of times that the AI chip and the MCU microprocessor receive the upgrade restarting instruction is larger than a restarting threshold, the AI chip and the MCU microprocessor restart from the old firmware partition to carry out version synchronous rollback starting, and simultaneously, the SOC main controller carries out synchronous rollback starting;
and if the number of times that the AI chip and the MCU microprocessor receive the upgrading restarting instruction is smaller than or equal to a restarting threshold value, starting the AI chip and the MCU microprocessor from the established new firmware partition and performing version synchronous upgrading processing, and simultaneously, performing synchronous upgrading processing by the SOC main controller according to the 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 CN113407377A (en) 2021-09-17
CN113407377B true 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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609328B (en) * 2012-01-29 2015-04-15 华为终端有限公司 System difference upgrade method and device and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN113407377A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
EP3200072B1 (en) Method for updating terminal system, terminal and system
AU768774B2 (en) Method for processing messages in a cellular base station system
CN109039779B (en) Equipment upgrading method, data transmission unit, controller local area network equipment and network
CN105824659A (en) Application program updating method and terminal equipment
CN110096294A (en) It is a kind of can break-point radio upgrade MCU application program method
CN108984195B (en) Software upgrading method and device
CN110262820A (en) Method, apparatus, system and storage medium based on MQTT protocol realization OTA upgrading
CN100466857C (en) Network reprogramming method of wireless sensor network based on priority cluster
CN112130875A (en) Vehicle ECU software upgrading method, device and system
CN105812176A (en) Client-initiative and concurrent upgrade-supporting remote upgrade method
CN113407377B (en) Method for rollback version in failure of OTA upgrading
WO2018040923A1 (en) Pos terminal application package download method and apparatus, and communication method
JP2002532784A5 (en)
WO2023241458A1 (en) Software upgrade method and apparatus for vehicle-mounted controller, and device and storage medium
CN116048595A (en) Intelligent terminal noninductive upgrading method and system and electric forklift
CN107809323B (en) Resource control method, device and system
CN115208761A (en) OTA upgrading system
JP2021056998A (en) Transfer method based on container port
JP2023503288A (en) Methods for Updating Digital Systems
CN110012535B (en) Tracking area update period determination method, user equipment and network side equipment
CN106708549B (en) OTA (over the air) upgrading method of handheld terminal
JP2972742B1 (en) Control program update method
CN110727445B (en) Method and system for upgrading tower hanging equipment based on OTA
CN114666217B (en) One-key upgrading method and system based on easy mesh
CN112867026B (en) Networking processing method and device

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