CN117591147A - Vehicle control unit upgrading method and system, electronic equipment and automobile - Google Patents

Vehicle control unit upgrading method and system, electronic equipment and automobile Download PDF

Info

Publication number
CN117591147A
CN117591147A CN202311520326.2A CN202311520326A CN117591147A CN 117591147 A CN117591147 A CN 117591147A CN 202311520326 A CN202311520326 A CN 202311520326A CN 117591147 A CN117591147 A CN 117591147A
Authority
CN
China
Prior art keywords
upgrade
control unit
instruction
appointed
execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311520326.2A
Other languages
Chinese (zh)
Inventor
吴勇波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Kafrog Technology Co ltd
Original Assignee
Chengdu Kafrog 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 Chengdu Kafrog Technology Co ltd filed Critical Chengdu Kafrog Technology Co ltd
Priority to CN202311520326.2A priority Critical patent/CN117591147A/en
Publication of CN117591147A publication Critical patent/CN117591147A/en
Pending legal-status Critical Current

Links

Classifications

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

Abstract

The application provides a vehicle control unit upgrading method, which is characterized by comprising the following steps: analyzing the upgrade script to obtain an upgrade instruction; adding the upgrade instruction into a task queue, and sequentially executing corresponding upgrade instructions to a designated control unit module according to the task queue; and rolling back the appointed control unit module according to the upgrade script. According to the method and the device, the execution instruction and the execution parameter are designed in the upgrade script, so that the control unit can flexibly realize serial-parallel upgrade according to the appointed sequence, and when the control unit to be upgraded is increased, reduced or changed or the appointed control unit upgrade sequence is changed, only the upgrade script file is required to be modified without adjusting codes, so that the stability and maintainability of the codes are improved; when the method is applied to actual production, the same whole vehicle upgrade control code can be adopted to realize upgrade of control units of different vehicle types, and upgrade requirements of customers are met rapidly.

Description

Vehicle control unit upgrading method and system, electronic equipment and automobile
Technical Field
The application belongs to the technical field of computers, and particularly relates to a vehicle control unit upgrading method, a system, electronic equipment and an automobile.
Background
The current whole car upgrade is the main stream of the automobile OTA industry, as the most important link in OTA is to control the upgrade order of all control units, the traditional whole car upgrade control is to fix the upgrade order of the control units in codes according to the existing control units to be upgraded and the serial-parallel upgrade strategy planned in advance, for example, upgrade TBOX, HUT, ADAS, etc. The control sequence of the serial-parallel upgrade of the control unit is generally determined according to the upgrade mode of the control unit, whether the control unit is an AB partition, and the voltage mode required for upgrading the control unit, and the upgrade sequence of the control unit is changed once the AB partition is changed into a non-AB partition due to the change of the vehicle body network architecture or the change of the control unit supplier. The types and the number of the control units to be upgraded are different for different vehicle types, and the vehicle body network architecture is also different, so that the number and the order of the control units to be upgraded are changed. If according to conventional solutions, it is necessary to adapt a specific upgrade code module for each vehicle model, which brings about instability of the code and deterioration of maintainability. The upgrade order adjustment in the code is potentially inefficient and error prone.
Disclosure of Invention
Aiming at the technical problems, the application discloses a vehicle control unit upgrading method, a system, electronic equipment and an automobile.
Specifically, the application discloses a vehicle control unit upgrading method, which comprises the following steps:
s1: analyzing the upgrade script to obtain an upgrade instruction; the upgrade instruction comprises an execution instruction and an execution parameter, and an execution interface corresponding to the upgrade instruction is transmitted from outside;
s2: adding the upgrade instruction into a task queue, and sequentially executing corresponding upgrade instructions to a designated control unit module according to the task queue;
s3: when the upgrade fails, rolling back the appointed control unit module according to the upgrade script; otherwise, the upgrading of the vehicle is finished.
The appointed control unit module is executed according to the appointed sequence in the script through the upgrade instruction in the upgrade script, and the execution interface corresponding to the upgrade instruction is externally transmitted, so that the serial-parallel upgrade sequence of the control unit module can be flexibly changed according to specific requirements, when the control unit module needing to be upgraded is increased, reduced or changed, the code does not need to be modified and adjusted, only the upgrade script file needs to be modified, and the efficiency is improved.
Wherein the executing instructions comprise:
the brushing instruction is used for brushing the appointed control unit module according to the appointed sequence; the flushing operation comprises writing an upgrade package into a target partition of the control unit;
the activating instruction is used for restarting the appointed control unit module according to the appointed sequence after the execution of the brushing instruction is finished;
the verification instruction is used for verifying whether the appointed control unit module is upgraded to the target version according to the appointed sequence after the execution of the activation instruction is finished;
and a high-low voltage switching instruction for switching the power mode to a high voltage or a low voltage.
The upgrade of the appointed control unit module is realized through the four instructions, wherein the appointed control unit module comprises a certain number of different control units, and the updating package can be written into the target partition of the control units according to the appointed sequence through the updating instruction; verifying whether the specified control unit module has been upgraded to the target version according to the specified order can be achieved by the activation instruction; the power mode may be switched to high or low voltage by a high-low voltage switching command.
Wherein, before the step S2, the method further comprises:
step S2 is executed only when the specified control unit module state satisfies the condition for executing the corresponding instruction and the dependent module upgrade of the specified control unit module is successful.
If the step S2 is executed under the condition that the dependent module of the designated control unit module is not updated successfully, the designated control unit module fails to be updated, and the whole system may be crashed seriously, so that the health of the whole system is affected. It is therefore necessary to start execution of step S2 when the specified control unit module state satisfies the condition for executing the corresponding instruction and the dependent module of the specified control unit module is successfully upgraded.
The step of sequentially executing the corresponding upgrade instructions according to the task queue pair appointed control unit module comprises the following steps:
and executing the brushing instruction, activating the instruction and verifying the instruction on the appointed control unit module, designating a serial execution sequence through the execution instruction and the execution parameter, and designating a parallel execution sequence through the execution parameter.
By combining the execution instruction and the execution parameter, the serial-parallel upgrading sequence of the appointed control unit module can be flexibly realized.
The condition for executing the corresponding instruction specifically includes:
the condition for executing the brushing instruction is that the upgrade package is successfully downloaded;
the condition for executing the activating instruction is that the control unit module is successfully written;
the condition for executing the verification instruction is that the control unit module is successfully activated;
and the condition for executing the high-low voltage switching instruction is that no control unit is in an upgrading state currently.
When the method provided by the application is practically applied to the whole vehicle upgrade, the condition of executing the instruction needs to be considered, for example, if the upgrade package is not downloaded successfully, the writing instruction of writing the upgrade package cannot be executed; for another example, if the control unit module fails to write successfully, the activate instruction cannot be executed. Each instruction needs to be executed if certain conditions are met.
Wherein, before the step S3, the method further comprises:
and judging whether the dependent module of the appointed control unit module fails to upgrade, and if so, executing the step S3.
If the dependent module of the designated control unit module fails to upgrade, the control unit module that needs to be upgraded must fail to upgrade.
Specifically, the application also discloses a vehicle upgrading system, which comprises:
the upgrade script is used for storing the upgrade instruction; the upgrade instruction comprises an execution instruction and an execution parameter;
the analysis module is used for analyzing the upgrade script to obtain an upgrade instruction;
the upgrading module adds the upgrading instruction into a task queue, and sequentially executes the corresponding upgrading instruction to the appointed control unit module according to the task queue;
and the rollback module rolls back the appointed control unit module according to the upgrade script.
Wherein, the vehicle upgrade system further comprises:
and the judging module is used for judging whether the state of the appointed control unit module meets the condition of executing the corresponding instruction and whether the dependent module of the appointed control unit module is successfully upgraded.
The application also discloses an electronic device, which comprises a processor and a memory, wherein the memory is used for storing a computer program, and the computer program is executed by the processor to realize the vehicle control unit upgrading method.
Specifically, the application also discloses an automobile, and the automobile comprises the automobile upgrading system.
Compared with the prior art, the application has the following beneficial effects:
according to the method and the device, the execution instructions and the execution parameters are designed in the upgrade script, so that the control unit can flexibly realize serial-parallel upgrade according to the appointed sequence, and when the control unit to be upgraded is increased, reduced or changed or the appointed control unit upgrade sequence is changed, only the upgrade script file is required to be modified, and the upgrade sequence in the code is not required to be modified like a traditional upgrade method. Compared with the traditional upgrading method, the design improves the stability and maintainability of codes; when the method is applied to actual production, the same whole vehicle upgrade control code can be adopted to realize upgrade of control units of different vehicle types, and upgrade requirements of customers are met rapidly.
Drawings
Fig. 1 is a flow chart illustrating a method for upgrading a vehicle control unit according to an embodiment of the present application.
FIG. 2 is a timing diagram illustrating a vehicle upgrade process according to another embodiment of the present application.
Fig. 3 is a timing diagram of a rollback procedure according to another embodiment of the present application.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Embodiment one:
referring to fig. 1, a flow chart of a method for upgrading a vehicle control unit according to an embodiment of the present application is shown.
S1: analyzing the upgrade script to obtain an upgrade instruction; the upgrade instruction comprises an execution instruction and an execution parameter, and an execution interface corresponding to the upgrade instruction is transmitted from outside;
s2: adding the upgrade instruction into a task queue, and sequentially executing corresponding upgrade instructions to a designated control unit module according to the task queue;
s3: when the upgrade fails, rolling back the appointed control unit module according to the upgrade script; otherwise, the upgrading of the vehicle is finished.
Preferably, the control unit is typically a vehicle ECU (Electronic Control Unit) and the ECU may include MCU (Microcontroller Unit) for performing specific functions.
Further, the upgrade script may employ different coding schemes, including, but not limited to json format and bin format.
Furthermore, the generation method of the upgrade script can be dynamically generated through a server and then issued to the vehicle end when the vehicle is required to be upgraded each time, or can be directly preset with an optimal scheme script file of the maximum number of control units to the vehicle end.
Furthermore, the execution interface is externally input, so that specific upgrade instructions can be customized according to actual requirements.
Furthermore, the upgrading instruction is added into the task queue, so that a plurality of upgrading tasks can be ensured to be executed orderly, and conflicts and anomalies caused by concurrent access are avoided. And sequentially executing corresponding upgrading instructions on the appointed control unit modules to ensure the sequency and traceability of upgrading tasks.
Furthermore, failure may occur in the upgrading process, rollback needs to be performed according to a mode defined by an upgrading script, so that the system is ensured to be capable of returning to a state before upgrading, and potential safety hazards caused by operation errors are avoided.
Further, the rollback refers to an operation of recovering the system or the software to a state before upgrading if an unexpected problem occurs during the process of upgrading, updating or repairing the software, so that the system or the software cannot operate normally. The rollback operation aims to ensure the stability and the safety of a system or software, avoid the problems caused by operation errors or other abnormal conditions, and further ensure the reliability and the high availability of the system. In rollback operation, it is generally required to quickly restore the original state of the backup file, and meanwhile, it is required to record the operation record of each upgrade and rollback in detail, so as to trace back the cause and history of the problem.
The appointed control unit module is executed according to the appointed sequence in the script through the upgrade instruction in the upgrade script, and the execution interface corresponding to the upgrade instruction is externally transmitted, so that the serial-parallel upgrade sequence of the control unit module can be flexibly changed according to specific requirements, when the control unit module needing to be upgraded is increased, reduced or changed, the code does not need to be modified and adjusted, only the upgrade script file needs to be modified, and the efficiency is improved.
Referring to fig. 2, a timing diagram of a vehicle upgrade process according to another embodiment of the present application is shown.
1) Analyzing the upgrade script; at this time, if the upgrade script is successfully parsed, an execution instruction and an execution parameter are obtained, wherein the execution instruction comprises: a swiping instruction, an activating instruction, a verifying instruction and a high-low voltage switching instruction.
2) And when the script analysis fails, finishing the whole vehicle upgrading task.
Execution of the execution instruction begins.
3) And executing the ECU brushing task according to the brushing instruction.
4) And executing the ECU activation task according to the activation instruction.
5) And executing the ECU version verification task according to the verification instruction.
6) And executing the high-low voltage switching task according to the high-low voltage switching instruction.
Further, it is possible to classify all the ECU into several modules, and the operations in 3) 4) 5) 6) are performed for each module in turn. When all instruction execution is complete, go 7).
7) Judging whether all ECUs are successfully upgraded
8) If all ECUs are successfully upgraded, finishing the whole vehicle upgrading task;
9) If all ECUs are not updated successfully, a rollback task is entered, and a rollback process is started.
Referring to fig. 3, a rollback process timing diagram is shown in another embodiment of the present application.
1) And when the instruction queue of the upgrade script is empty, analyzing the upgrade script. And if the upgrade script is successfully analyzed, a refreshing instruction, an activation instruction, a verification instruction and a high-low voltage switching instruction are obtained.
2) And when the script analysis fails, ending the rollback task.
When all execution instructions are executed, the following steps:
3) And executing the ECU rollback task according to the brushing instruction.
4) And executing the ECU activation task according to the activation instruction.
5) And executing the ECU version verification task according to the verification instruction.
6) And executing the high-low voltage switching task according to the high-low voltage switching instruction.
Wherein the executing instructions comprise:
the brushing instruction is used for brushing the appointed control unit module according to the appointed sequence; the flushing operation comprises writing an upgrade package into a target partition of the control unit;
the activating instruction is used for restarting the appointed control unit module according to the appointed sequence after the execution of the brushing instruction is finished;
the verification instruction is used for verifying whether the appointed control unit module is upgraded to the target version according to the appointed sequence after the execution of the activation instruction is finished;
and a high-low voltage switching instruction for switching the power mode to a high voltage or a low voltage.
Further, the following specifically explains the four instructions included in the execution instruction in combination with a specific reference instruction:
1) A brushing instruction: and performing a brushing operation on a module of the control unit, and writing the upgrade package into a target partition of the control unit.
For example: upgrade: (101,102), (103)
The instruction means that three ECUs are divided into two groups, one group containing ECUs with ECU IDs 101,102 and the other group containing ECU with ECU ID 103. The two sets of ECUs will be flushed in parallel while the first set of ECUs is executed in the order of flushing 101 before flushing 102. In general, when executing a flush instruction, control units included in the same bracket are flushed serially in the order from left to right, and control units included in different brackets are flushed in parallel.
2) Activating instructions: after the module of the control unit performs the flush completion operation, the system restarts the operation of executing the new flush partition.
For example: activate: (101,102), (103)
The instruction means that three ECUs are divided into two groups, one group containing ECUs with ECU IDs 101,102 and the other group containing ECU with ECU ID 103. The two sets of ECU's will be activated in parallel while the first set of ECU's is executed in the order of activation 101 followed by activation 102. Generally, when executing an activation instruction, control units included in the same bracket are activated serially in a left-to-right order, and control units included in different brackets are activated in parallel.
3) Verification instructions: after the control unit is restarted, the control unit upgrading module is verified, and whether the module is finally upgraded to the target version or not is verified.
For example: verify: (101,102,103)
The instruction means that parallel verification operations are performed on the ECUs corresponding to the ECU IDs 101,102, 103. Generally, when executing the verification instruction, the control units included in the same bracket are verified serially in the order from left to right, and the control units included in different brackets are verified in parallel.
4) High-low voltage switching instruction: for safety reasons, some control units need to be upgraded in a specific power mode (high or low voltage), and executing the instruction switches the vehicle to high or low voltage, so that upgrade actions, such as flashing, activating, etc., can be performed on some control units.
Such as: switch:1
The instruction means to switch the vehicle power mode to high voltage.
For another example: switch:0
The instruction means to switch the vehicle power mode to low voltage.
The ECU ID (Electronic Control Unit Identification) refers to an identification identifier of the electronic control unit, and is used for uniquely identifying and distinguishing different ECUs. Each ECU has a unique ID for identification and communication in the vehicle electronics system.
The upgrade of the appointed control unit module is realized through the four instructions, wherein the appointed control unit module comprises a certain number of different control units, and the updating package can be written into the target partition of the control units according to the appointed sequence through the updating instruction; verifying whether the specified control unit module has been upgraded to the target version according to the specified order can be achieved by the activation instruction; the power mode may be switched to high or low voltage by a high-low voltage switching command.
In a preferred embodiment, the script file is as follows:
upgrade:(101,102),(103)
activate:(101,102),(103)
switch:1
upgrade:(104)
activate:(104)
verify:(101),(102),(103),(104)
this script file represents the following execution steps:
parallel brushing is carried out on the ECUs corresponding to (101, 102) and (103), and meanwhile, the ECU corresponding to (101, 102) is firstly brushed and written with the ECU corresponding to (101) and then the ECU corresponding to (102);
then, the ECUs corresponding to (101, 102) and (103) are activated in parallel, and simultaneously, the ECUs corresponding to (101, 102) are activated firstly and then the ECUs corresponding to (102) are activated;
then switching the vehicle power mode to high voltage;
brushing the ECU corresponding to 104;
activating the ECU corresponding to 104;
and carrying out parallel verification on the ECUs corresponding to 101,102,103 and 104.
Wherein, before the step S2, the method further comprises:
step S2 is executed only when the specified control unit module state satisfies the condition for executing the corresponding instruction and the dependent module upgrade of the specified control unit module is successful.
If the step S2 is executed under the condition that the dependent module of the designated control unit module is not updated successfully, the designated control unit module fails to be updated, and the whole system may be crashed seriously, so that the health of the whole system is affected. It is therefore necessary to start execution of step S2 when the specified control unit module state satisfies the condition for executing the corresponding instruction and the dependent module of the specified control unit module is successfully upgraded.
The step of sequentially executing the corresponding upgrade instructions according to the task queue pair appointed control unit module comprises the following steps:
and executing the brushing instruction, activating the instruction and verifying the instruction on the appointed control unit module, designating a serial execution sequence through the execution instruction and the execution parameter, and designating a parallel execution sequence through the execution parameter.
By combining the execution instruction and the execution parameter, the serial-parallel upgrading sequence of the appointed control unit module can be flexibly realized.
The condition for executing the corresponding instruction specifically includes:
the condition for executing the brushing instruction is that the upgrade package is successfully downloaded;
the condition for executing the activating instruction is that the control unit module is successfully written;
the condition for executing the verification instruction is that the control unit module is successfully activated;
and the condition for executing the high-low voltage switching instruction is that no control unit is in an upgrading state currently.
Further, in some embodiments, the code module with the judging function judges whether the corresponding instruction meets the execution condition, and when the corresponding condition is met, the corresponding instruction is executed.
When the method provided by the application is practically applied to the whole vehicle upgrade, the condition of executing the instruction needs to be considered, for example, if the upgrade package is not downloaded successfully, the writing instruction of writing the upgrade package cannot be executed; for another example, if the control unit module fails to write successfully, the activate instruction cannot be executed. Each instruction needs to be executed if certain conditions are met.
Wherein, before the step S3, the method further comprises:
and judging whether the dependent module of the appointed control unit module fails to upgrade, and if so, executing the step S3.
If the dependent module of the designated control unit module fails to upgrade, the control unit module that needs to be upgraded must fail to upgrade.
Specifically, the application also discloses a vehicle upgrading system, which comprises:
the upgrade script is used for storing the upgrade instruction; the upgrade instruction comprises an execution instruction and an execution parameter;
the analysis module is used for analyzing the upgrade script to obtain an upgrade instruction;
the upgrading module adds the upgrading instruction into a task queue, and sequentially executes the corresponding upgrading instruction to the appointed control unit module according to the task queue;
and the rollback module rolls back the appointed control unit module according to the upgrade script.
Further, the upgrade script may employ different coding schemes, including, but not limited to json format and bin format.
Furthermore, the generation method of the upgrade script can be dynamically generated through a server and then issued to the vehicle end when the vehicle is required to be upgraded each time, or can be directly preset with an optimal scheme script file of the maximum number of control units to the vehicle end.
Furthermore, the execution interface is externally input, so that specific upgrade instructions can be customized according to actual requirements.
Furthermore, the upgrading instruction is added into the task queue, so that a plurality of upgrading tasks can be ensured to be executed orderly, and conflicts and anomalies caused by concurrent access are avoided. And sequentially executing corresponding upgrading instructions on the appointed control unit modules to ensure the sequency and traceability of upgrading tasks.
Furthermore, failure may occur in the upgrading process, rollback needs to be performed according to a mode defined by an upgrading script, so that the system is ensured to be capable of returning to a state before upgrading, and potential safety hazards caused by operation errors are avoided.
Further, the rollback refers to an operation of recovering the system or the software to a state before upgrading if an unexpected problem occurs during the process of upgrading, updating or repairing the software, so that the system or the software cannot operate normally. The rollback operation aims to ensure the stability and the safety of a system or software, avoid the problems caused by operation errors or other abnormal conditions, and further ensure the reliability and the high availability of the system. In rollback operation, it is generally required to quickly restore the original state of the backup file, and meanwhile, it is required to record the operation record of each upgrade and rollback in detail, so as to trace back the cause and history of the problem.
Wherein, the vehicle upgrade system further comprises:
and the judging module is used for judging whether the state of the appointed control unit module meets the condition of executing the corresponding instruction and whether the dependent module of the appointed control unit module is successfully upgraded.
Further, determining whether the state of the specified control unit module satisfies a condition for executing the corresponding instruction includes: judging whether the upgrade package is successfully downloaded when the brushing instruction is executed; judging whether the control unit module is successfully written when the activation instruction is executed; judging whether the control unit module is successfully activated when the verification instruction is executed; and when executing the high-low voltage switching instruction, whether any control unit is in an upgrading state currently exists.
Embodiment III:
referring to fig. 4, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown.
The application also discloses an electronic device, which comprises a processor and a memory, wherein the memory is used for storing a computer program, and the computer program is executed by the processor to realize the vehicle control unit upgrading method.
As shown in fig. 4, the electronic apparatus 4 of this embodiment includes: at least one processor 40 (only one is shown in fig. 4), a memory 41 and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, the processor 40 implementing the steps in any of the method embodiments described above when executing the computer program 42.
The electronic device 4 is typically a vehicle-mounted infotainment system, and may be a basic entertainment system, a multimedia entertainment system, a navigation entertainment integrated machine, a rear seat entertainment system, a vehicle-mounted interconnection entertainment system, or the like. The computer device may include, but is not limited to, a processor 40, a memory 41. It will be appreciated by those skilled in the art that fig. 4 is merely an example of the electronic device 4 and is not meant to be limiting of the electronic device 4, and may include more or fewer components than shown, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The processor 40 may be a central processing unit (Central Processing Unit, CPU), the processor 40 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may in some embodiments be an internal storage unit of the electronic device 4, such as a hard disk or a memory of the electronic device 4. The memory 41 may in other embodiments also be an external storage device of the electronic device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the electronic device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 41 is used for storing an operating system, application programs, boot loader (BootLoader), data, other programs, etc., such as program codes of the computer program. The memory 41 may also be used for temporarily storing data that has been output or is to be output.
Embodiment four:
specifically, the application also discloses an automobile, and the automobile comprises the automobile upgrading system.
In summary, the present application proposes a vehicle control unit upgrade method, which is characterized by comprising: analyzing the upgrade script to obtain an upgrade instruction; adding the upgrade instruction into a task queue, and sequentially executing corresponding upgrade instructions to a designated control unit module according to the task queue; and rolling back the appointed control unit module according to the upgrade script. According to the method and the device, the execution instruction and the execution parameter are designed in the upgrade script, so that the control unit can flexibly realize serial-parallel upgrade according to the appointed sequence, and when the control unit to be upgraded is increased, reduced or changed or the appointed control unit upgrade sequence is changed, only the upgrade script file is required to be modified without adjusting codes, so that the stability and maintainability of the codes are improved; when the method is applied to actual production, the same whole vehicle upgrade control code can be adopted to realize upgrade of control units of different vehicle types, and upgrade requirements of customers are met rapidly.
Although the illustrative embodiments have been described herein with reference to the accompanying drawings, it is to be understood that the above illustrative embodiments are merely exemplary and are not intended to limit the scope of the present application thereto. Various changes and modifications may be made therein by one of ordinary skill in the art without departing from the scope and spirit of the present application. All such changes and modifications are intended to be included within the scope of the present application as set forth in the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, e.g., the division of the elements is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another device, or some features may be omitted or not performed.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
Various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functions of some of the modules according to embodiments of the present application may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). The present application may also be embodied as device programs (e.g., computer programs and computer program products) for performing part or all of the methods described herein. Such a program embodying the present application may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
While the present application has been described in conjunction with the specific embodiments above, it is evident that many alternatives, modifications and variations will be apparent to those skilled in the art in light of the foregoing description. Accordingly, all such alternatives, modifications, and variations are included within the spirit and scope of the following claims.

Claims (10)

1. A vehicle control unit upgrade method, comprising:
s1: analyzing the upgrade script to obtain an upgrade instruction; the upgrade instruction comprises an execution instruction and an execution parameter, and an execution interface corresponding to the upgrade instruction is transmitted from outside;
s2: adding the upgrade instruction into a task queue, and sequentially executing corresponding upgrade instructions to a designated control unit module according to the task queue;
s3: when the upgrade fails, rolling back the appointed control unit module according to the upgrade script; otherwise, the upgrading of the vehicle is finished.
2. The vehicle control unit upgrade method according to claim 1, wherein the execution instruction includes:
the brushing instruction is used for brushing the appointed control unit module according to the appointed sequence; the flushing operation comprises writing an upgrade package into a target partition of the control unit;
the activating instruction is used for restarting the appointed control unit module according to the appointed sequence after the execution of the brushing instruction is finished;
the verification instruction is used for verifying whether the appointed control unit module is upgraded to the target version according to the appointed sequence after the execution of the activation instruction is finished;
and a high-low voltage switching instruction for switching the power mode to a high voltage or a low voltage.
3. The method for upgrading a vehicle control unit according to claim 2, wherein the step S2 is preceded by the further steps of: step S2 is executed only when the specified control unit module state satisfies the condition for executing the corresponding instruction and the dependent module upgrade of the specified control unit module is successful.
4. A vehicle control unit upgrade method according to claim 3, wherein said sequentially executing corresponding upgrade instructions for specified control unit modules according to the task queue comprises:
and executing the brushing instruction, activating the instruction and verifying the instruction on the appointed control unit module, designating a serial execution sequence through the execution instruction and the execution parameter, and designating a parallel execution sequence through the execution parameter.
5. The method for upgrading a vehicle control unit according to claim 4, wherein the condition for executing the corresponding instruction is specifically:
the condition for executing the brushing instruction is that the upgrade package is successfully downloaded;
the condition for executing the activating instruction is that the control unit module is successfully written;
the condition for executing the verification instruction is that the control unit module is successfully activated;
and the condition for executing the high-low voltage switching instruction is that no control unit is in an upgrading state currently.
6. The method for upgrading a vehicle control unit according to claim 5, wherein the step S3 is preceded by: and judging whether the dependent module of the appointed control unit module fails to upgrade, and if so, executing the step S3.
7. A system of the vehicle control unit upgrade method according to any one of claims 1-6, comprising:
the upgrade script is used for storing the upgrade instruction; the upgrade instruction comprises an execution instruction and an execution parameter;
the analysis module is used for analyzing the upgrade script to obtain an upgrade instruction;
the upgrading module adds the upgrading instruction into a task queue, and sequentially executes the corresponding upgrading instruction to the appointed control unit module according to the task queue;
and the rollback module rolls back the appointed control unit module according to the upgrade script.
8. The vehicle upgrade system of claim 7, further comprising:
and the judging module is used for judging whether the state of the appointed control unit module meets the condition of executing the corresponding instruction and whether the dependent module of the appointed control unit module is successfully upgraded.
9. An electronic device comprising a processor and a memory for storing a computer program which when executed by the processor implements a vehicle control unit upgrade method as claimed in any one of claims 1-6.
10. An automobile comprising the vehicle upgrade system according to any one of claims 7-8.
CN202311520326.2A 2023-11-13 2023-11-13 Vehicle control unit upgrading method and system, electronic equipment and automobile Pending CN117591147A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311520326.2A CN117591147A (en) 2023-11-13 2023-11-13 Vehicle control unit upgrading method and system, electronic equipment and automobile

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311520326.2A CN117591147A (en) 2023-11-13 2023-11-13 Vehicle control unit upgrading method and system, electronic equipment and automobile

Publications (1)

Publication Number Publication Date
CN117591147A true CN117591147A (en) 2024-02-23

Family

ID=89919297

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311520326.2A Pending CN117591147A (en) 2023-11-13 2023-11-13 Vehicle control unit upgrading method and system, electronic equipment and automobile

Country Status (1)

Country Link
CN (1) CN117591147A (en)

Similar Documents

Publication Publication Date Title
US11223525B2 (en) Gateway device, firmware update method, and recording medium
CN109933348B (en) Method and device for updating Bootloader in electronic control unit
US10725762B2 (en) Gateway device, in-vehicle network system, and firmware update method
US20030051235A1 (en) Method and apparatus for verifying and analyzing computer software installation
CN100570558C (en) A kind of chip firmware updating method
US11842185B2 (en) Gateway device, in-vehicle network system, and firmware update method
US10274919B2 (en) Method, device and computer program product for programming a plurality of control units
CN112650518A (en) DSP program on-line upgrading method
US20130080751A1 (en) Method and device for updating bios program for computer system
CN108984200A (en) A kind of timing updates the method and device of firmware
US8689048B1 (en) Non-logging resumable distributed cluster
US20190286544A1 (en) Method, device and server for checking a defective function
CN115061713A (en) Method and device for upgrading electronic equipment
US20220391192A1 (en) Ota master, center, system, method, non-transitory storage medium, and vehicle
CN117591147A (en) Vehicle control unit upgrading method and system, electronic equipment and automobile
US20090210613A1 (en) Method for Programming a Controller in a Motor Vehicle
CN114115957A (en) FPGA (field programmable Gate array) online updating method with backup and system thereof
CN112732301A (en) Vehicle upgrading method and device
US20220391193A1 (en) Ota master, system, method, non-transitory storage medium, and vehicle
CN112445761B (en) File checking method and device and storage medium
US20230418591A1 (en) Firmware update method of a flash bootloader in a micro controller unit for a vehicle
CN114047715B (en) Control method and storage medium for peripheral device during ECU application layer software update
WO2020166345A1 (en) Verification device and verification method
CN113157283A (en) APK installation method and system
CN111124461B (en) Method and device for upgrading OTA (over the air) of singlechip and singlechip

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