ECU (Electronic Control Unit) upgrading method, device, equipment, medium and vehicle
By setting up two independent application partitions in the ECU and using the boot loader to copy and boot load the data, the problem of the APP function not being able to operate normally during the ECU upgrade process in the prior art is solved, and the user experience and upgrade convenience are improved.
Patent Information
- Application Number
- CN202311527572.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2025-05-16
AI Technical Summary
The upgrade method of existing ECU cannot keep the original APP functions running normally during the upgrade process, affecting the user's user experience.
By setting up two independent application partitions in the ECU, one is used to store application upgrade data and the other is used to run application upgrade data. When the ECU is restarted, the boot loader is used to copy the data from the partition that stores the application upgrade data to the run partition, and the application is booted from the run partition.
During the application upgrade process, the application partition in the running state will not be affected, thereby avoiding the problem of not being able to maintain the normal operation of the original APP functions during the upgrade process, and improving the user experience and convenience of ECU upgrades.
Smart Images

Figure CN120010873A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of vehicle upgrade, and in particular, relates to an ECU upgrade method, device, equipment, medium and vehicle. Background Art
[0002] With the continuous development of the new energy vehicle field, the number of ECUs (Electronic Control Units) in cars is increasing, and the demand for OTA (Over-the-Air Technology) functions is also increasing. Therefore, the BOOT (Bootloader) function of ECU to achieve self-upgrade of software has become an essential function for vehicles.
[0003] Usually, the storage area in a single ECU is divided into a boot loader partition and an application partition. The boot loader partition stores the boot loader BOOT, and the application partition stores the application APP. As a boot loader, BOOT can implement OTA of APP.
[0004] However, the ECU upgrade method in the related technology has certain defects. For example, the original APP functions cannot be kept running normally during the upgrade process, affecting the user experience. Summary of the invention
[0005] The embodiments of the present application provide an ECU upgrade method, device, equipment, medium and vehicle, which can improve the problem that the existing ECU upgrade method has certain defects.
[0006] In a first aspect, an embodiment of the present application provides an ECU upgrade method, the ECU upgrade method comprising:
[0007] In response to the upgrade instruction, obtaining application upgrade data;
[0008] Writing application upgrade data to a first application partition of the two application partitions; wherein the application upgrade data is update data of the application program, the first application partition of the two application partitions is used to store the application upgrade data, and the second application partition is used to run the application upgrade data;
[0009] When the ECU is restarted, the application upgrade data is copied from the first application partition to the second application partition using the boot loader, and the application program is boot loaded from the second application partition.
[0010] In some embodiments, writing application upgrade data to a first application partition of two application partitions includes:
[0011] Identify a first application partition from the two application partitions, and write application upgrade data into the first application partition;
[0012] A first startup parameter is set based on the application upgrade mode; wherein the first startup parameter is used to indicate that the application partition storing the application upgrade data in the two application partitions is the first application partition.
[0013] In some embodiments, when the ECU is restarted, using a boot loader to copy application upgrade data from the first application partition to the second application partition, and boot loading the application from the second application partition, includes:
[0014] Determining a first application partition from the two application partitions based on the first startup parameter;
[0015] Copying application upgrade data from the first application partition to the second application partition;
[0016] The application is bootloaded from the second application partition.
[0017] In some embodiments, using a boot loader to copy application upgrade data from the first application partition to the second application partition, and boot loading the application from the second application partition, further comprising:
[0018] When the boot loader is used to boot load the application, the abnormality monitoring program is started and the first boot times of the application are counted; the abnormality monitoring program is used to restart the ECU in case of boot loading failure.
[0019] In some embodiments, when the application upgrade mode is the first mode, the first application partition of the two application partitions is a program data loading partition, and the second application partition is a program data cache partition, and the device parameters of the first memory corresponding to the first application partition and the second memory corresponding to the second application partition are inconsistent.
[0020] In some embodiments, the first memory and the second memory differ in at least one of function, capacity, read / write speed, setting location, and access method.
[0021] In a second aspect, an embodiment of the present application further provides an ECU upgrade device, the ECU upgrade device comprising:
[0022] An acquisition module, used for acquiring application upgrade data in response to an upgrade instruction;
[0023] A writing module, used to write application upgrade data to a first application partition of the two application partitions; wherein the application upgrade data is update data of the application program, the first application partition of the two application partitions is used to store the application upgrade data, and the second application partition is used to run the application upgrade data;
[0024] The boot module is used to copy the application upgrade data from the first application partition to the second application partition using the boot loader when the ECU is restarted, and to boot load the application program from the second application partition.
[0025] In a third aspect, an embodiment of the present application further provides an ECU upgrade device, the ECU upgrade device comprising: a processor and a memory storing computer program instructions;
[0026] When the processor executes the computer program instructions, the ECU upgrade method of the first aspect is implemented.
[0027] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the ECU upgrade method of the first aspect is implemented.
[0028] In a fifth aspect, an embodiment of the present application further provides a vehicle, the vehicle comprising at least one of the ECU upgrade device of the second aspect, the ECU upgrade equipment of the third aspect, or the computer-readable storage medium of the fourth aspect.
[0029] The ECU upgrade method, device, equipment, medium and vehicle provided in the embodiments of the present application can write the application upgrade data to the partition in the non-running state in the two application partitions by responding to the upgrade instruction when the application is running. After the ECU is restarted and the boot loader is running, the application can be booted and loaded from the second application partition to achieve the upgrade of the application. In addition, the application partition in the running state will not be affected during the upgrade process, thereby avoiding the problem of not being able to maintain the normal operation of the original APP function during the upgrade process, and improving the user experience and convenience of ECU upgrade. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0031] Figure 1 It is a flowchart of an ECU upgrade method provided by an embodiment of the present application;
[0032] Figure 2 is a flowchart of an ECU upgrade method provided by another embodiment of the present application;
[0033] Figure 3 It is a flowchart of an ECU upgrade method provided by another embodiment of the present application;
[0034] Figure 4 A schematic diagram of the structure of an ECU upgrade device provided in one embodiment of the present application;
[0035] Figure 5 A schematic diagram of the structure of an ECU upgrade device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0037] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0038] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0039] With the continuous development of the new energy vehicle field, the number of ECUs (Electronic Control Units) in cars is increasing, and the demand for OTA (Over-the-Air Technology) functions is also increasing. Therefore, the BOOT (Bootloader) function of ECU to achieve self-upgrade of software has become an essential function for vehicles.
[0040] Usually, the storage area in a single ECU is divided into a boot loader partition and an application partition. The boot loader partition stores the boot loader BOOT, and the application partition stores the application APP. As a boot loader, BOOT can implement OTA of APP.
[0041] However, the ECU upgrade method in the related technology has certain defects. For example, the original APP functions cannot be kept running normally during the upgrade process, affecting the user experience.
[0042] In order to solve the above technical problems, the embodiments of the present application provide an ECU upgrade method, device, equipment, medium and vehicle. The ECU upgrade method provided by the embodiments of the present application is described in detail below through some embodiments and their application scenarios in conjunction with the accompanying drawings.
[0043] Figure 1 The following is a flow chart of an ECU upgrade method provided by an embodiment of the present application. The ECU upgrade method includes:
[0044] S110, in response to the upgrade instruction, obtaining application upgrade data;
[0045] S120, writing the application upgrade data to the first application partition of the two application partitions; wherein the application upgrade data is update data of the application program, the first application partition of the two application partitions is used to store the application upgrade data, and the second application partition is used to run the application upgrade data;
[0046] S130, when the ECU is restarted, using the boot loader to copy the application upgrade data from the first application partition to the second application partition, and boot-load the application program from the second application partition.
[0047] The ECU upgrade method provided in the embodiment of the present application is applied to an ECU upgrade device. The ECU upgrade device can realize the upgrade of the application APP in the ECU, and does not affect the normal operation of the original APP function during the upgrade process. When an abnormality occurs during the upgrade process, the ECU function failure can be avoided to ensure the user experience. The following is an example of the ECU in the car.
[0048] In this embodiment, the device can write the application upgrade data to the partition in the non-running state in the two application partitions by responding to the upgrade instruction while the application is running. After the ECU is restarted and the boot loader is running, the application can be booted and loaded from the second application partition to achieve the upgrade of the application. The upgrade process will not affect the application partition in the running state, thereby avoiding the problem of not being able to maintain the normal operation of the original APP function during the upgrade process, and improving the user experience and convenience of ECU upgrade.
[0049] In S110, the device may upgrade the application in response to the upgrade instruction. The upgrade instruction may be triggered by a user, for example, by a user inside a vehicle, or by a user through a mobile device or other smart device that has a communication function with the vehicle, or by a car manufacturer through communication with the vehicle for directional triggering or range triggering. The user inside the vehicle may trigger the upgrade instruction by pressing an upgrade button inside the vehicle, by clicking on a related control on the display screen inside the vehicle, or by voice triggering inside the vehicle, and there is no limitation here.
[0050] After receiving the upgrade instruction, the device can communicate with the server and obtain application upgrade data, which is the update data of the application program.
[0051] In S120, after acquiring the application upgrade data, the device may determine the first application partition from the two application partitions.
[0052] The above two application partitions can be two independent storage partitions in the storage module of the ECU. Both application partitions can store relevant data of the boot loader. The first application partition of the two application partitions is only used to store application upgrade data, and the second application partition is used to run application upgrade data. That is, when the ECU starts, the second application partition can be selected from the two application partitions, and the program data in the second application partition can be boot-loaded to run the corresponding application. The first application partition is only used to store application upgrade data. When the application needs to be upgraded, the application upgrade data can be first stored in the first application partition, and then the application upgrade data in the first application partition can be copied to the second application partition, and then the application upgrade data can be boot-loaded from the second application partition to run the upgraded application.
[0053] Please refer to Figure 2 As an optional embodiment, the above S120 may include:
[0054] S210, identifying a first application partition from the two application partitions, and writing application upgrade data into the first application partition;
[0055] S220, setting a first startup parameter based on the application upgrade mode; wherein the first startup parameter is used to indicate that the application partition storing the application upgrade data in the two application partitions is the first application partition.
[0056] In this embodiment, the application program can obtain application upgrade data, and after identifying the first application partition from the two application partitions, write the application upgrade data into the first application partition. In the process of writing data, the data stored in the other application partition will not be affected, that is, the normal operation of the original APP function will not be affected.
[0057] In S210 , the device may identify a first application partition from two application partitions based on the running application program.
[0058] In another embodiment, the device may also identify the two application partitions through running status identifiers. For example, if there is a difference between the running status identifiers of the running application partition and the first application partition, the first application partition may be determined by identifying the running status identifiers.
[0059] After the first application partition is determined, the acquired application upgrade data may be written into the first application partition.
[0060] In S220, the device may set a first startup parameter based on a preset application upgrade mode.
[0061] After determining the application upgrade mode, the device can set a first startup parameter based on the application upgrade mode. The first startup parameter can indicate that the application partition storing the application upgrade data in the two application partitions is the first application partition. That is, when the ECU is restarted, the device can determine the first application partition according to the first startup parameter, and the first application partition is the application partition storing the application upgrade data in the two application partitions.
[0062] In S130, after the device writes the application upgrade data into the first application partition, the ECU may be restarted and the restarted ECU may run the boot loader.
[0063] When an application needs to be upgraded, the ECU will not directly run the application after restarting, but will run the boot loader. The boot loader can determine the first application partition and the second application partition, copy the application upgrade data in the first application partition to the second application partition, and then boot load the application from the second application partition. For example, before the ECU restarts, the ECU runs the original application. After the ECU restarts, the boot loader can copy the application upgrade data in the first application partition to the second application partition, and then boot load the application from the second application partition to run the upgraded application.
[0064] In the related art, after the application upgrade data is written into the application partition, the original program data of the application partition is overwritten by the application upgrade data. Since the original program data has been erased, the ECU cannot maintain the normal operation of the original APP function, which will affect the user experience. In the embodiment of the present application, since two independent application partitions are provided in the storage module of the ECU, when one of the application partitions is used as the partition where the application actually runs, the application upgrade program can be written into the other application partition, so that the normal operation of the original APP function is not affected during the download of the application upgrade data. Moreover, before the boot loader copies the application upgrade data in the first application partition to the second application partition, the original application data in the second application partition will not be overwritten. Therefore, if a fault such as ECU power failure occurs before the application upgrade data is copied, the original application data in the second application partition will not be affected, thereby realizing the power-off protection function before the copy node during the ECU upgrade process.
[0065] Please refer to Figure 3 As an optional embodiment, the above S130 may include:
[0066] S310, determining a first application partition from two application partitions based on a first startup parameter;
[0067] S320, copying the application upgrade data from the first application partition to the second application partition;
[0068] S330, boot-loading the application from the second application partition;
[0069] In this embodiment, the device can determine the first application partition from the two application partitions, and use the boot loader to copy the application upgrade data to the second application partition. After the copying is completed, the boot loader can boot and load the application from the second application partition, so that the ECU always uses the second application partition as the partition where the application actually runs.
[0070] In S310 , when the ECU is restarted, it may obtain a preset application upgrade mode.
[0071] The above application upgrade mode may include a first mode and a second mode. Take two application partitions, AppA partition and AppB partition, as an example. In the first mode, AppA partition is the partition where the application actually runs, and AppB partition is only used as a cache area for temporarily storing application upgrade data. That is, of the two application partitions, AppA partition is the application partition in running state, and AppB partition is the first application partition.
[0072] In the second mode, both the AppA partition and the AppB partition can be used as the partitions where the application actually runs. That is, when the device chooses to run the application in the AppA partition, the AppA partition is the application partition in the running state, and the AppB partition is the first application partition; when the device chooses to run the application in the AppB partition, the AppB partition is the application partition in the running state, and the AppA partition is the first application partition.
[0073] When the application upgrade mode is the first mode, the device can determine the first application partition from the two application partitions based on the first startup parameter, and the first application partition is the application partition for storing application upgrade data. Before the ECU is restarted, the first application partition is the first application partition.
[0074] After determining the first application partition, the device can copy the application upgrade data from the first application partition to the second application partition by running the boot loader. After the copying is completed, the boot loader can boot load the application from the second application partition.
[0075] When the application upgrade mode is the second mode, the device can determine the first application partition from the two application partitions based on the first startup parameter, and the first application partition is the application partition for storing application upgrade data. Before the ECU is restarted, the first application partition is the first application partition.
[0076] Since both application partitions can be used as partitions for actually running the application program in the second mode, the device can boot-load the application program directly from the first application partition by running the boot loader. At this time, the application program is boot-loaded and running.
[0077] In S320, in the first mode, the device may run a boot loader to copy application upgrade data from the first application partition to the second application partition.
[0078] In S330, after the copying is completed, the boot loader can boot load the application from the second application partition. At this time, the application that is boot loaded is the upgraded application.
[0079] As an optional embodiment, the above S130 may further include:
[0080] S410, when the application is boot-loaded by the boot loader, an abnormality monitoring program is started and the first boot times of the application are counted; the abnormality monitoring program is used to restart the ECU when the boot loader fails.
[0081] In this embodiment, the device can start an abnormality monitoring program to restart the ECU when an abnormality or failure occurs in the boot loading each time the application upgrade data is boot loaded, so as to re-boot load. When the number of boot loading reaches the preset requirement, the upgrade process can be stopped. If the application upgrade mode is the second mode, the data in the second application partition is not overwritten at this time, and the boot loader can boot load the application from the second application partition, so that when the upgrade application fails, the original application can continue to run.
[0082] In S410, when the device boots and loads the second application partition by running the boot loader, it can also start an abnormal monitoring program, such as a watchdog or other monitoring control, and count the first boot times of the application. The initial value of the first boot times is 0. Each time the ECU is restarted and the application is booted and loaded by the boot loader, the first boot times can be increased by 1 to count the boot times.
[0083] The above-mentioned abnormality monitoring program can perform abnormality monitoring during the process of boot-loading the application program, and restart the ECU when an abnormality occurs during the boot-loading process or the boot-loading process fails.
[0084] After the restart, the ECU can re-acquire the application upgrade mode, and re-boot and load the application program using the boot loader based on the application upgrade mode.
[0085] When using the boot loader to boot load the application, if an exception occurs in the boot loading process, the ECU can be restarted through the exception monitoring program and the boot loading process can be restarted. The rebooting process can solve some abnormal problems, but when there is an abnormality in the application upgrade data itself, the boot loading cannot be completed even if repeated many times. Therefore, the device can obtain a pre-set first boot threshold. When the boot loading process is continuously restarted, if the first boot number reaches or exceeds the first boot threshold, it means that restarting the boot loading process can no longer solve the abnormal problem, and the application upgrade process can be terminated at this time.
[0086] In an optional embodiment, the first boot threshold may be 3, and the device may be configured to terminate the boot loading process when the first boot number exceeds the first boot threshold. That is, when an exception occurs during the boot loading process of the application and the ECU is repeatedly restarted for the fourth time, the boot loading process may be terminated.
[0087] After the application upgrade process is completed, if the application upgrade mode is the second mode, then of the two application partitions, the first application partition stores application upgrade data, i.e., update data of the application, while the second application partition stores the original application. Since the application upgrade data cannot be normally booted and loaded during multiple boot loading processes, the device can use the application to boot load the original application from the second application partition. That is, when an abnormality occurs in the upgraded application, the original application can be re-booted and loaded, so that the ECU can maintain the original function even when the application upgrade fails.
[0088] As an optional embodiment, when the application upgrade mode is the first mode, of the two application partitions, the first application partition can be fixedly set as the program data loading partition, and the second application partition can be fixedly set as the program data cache partition. That is, when the ECU is restarted, the boot loader only boots and loads the application in the first application partition, and the application upgrade data stored in the second application partition is only used as a data cache before being copied to the first application partition.
[0089] It is understandable that when two application partitions are two independent storage partitions of the same memory, if the storage spaces of the two application partitions are consistent, both application partitions should be able to be used as program data loading partitions. Compared with the fixed setting of the first application partition as the program data loading partition and the second application partition as the program data cache partition, the original application can be retained during the application upgrade process, so that the original application can be re-booted and loaded when the upgrade fails, without affecting the normal operation of the original APP function of the ECU.
[0090] Therefore, the above fixed setting of the first application partition as the program data loading partition and the second application partition as the program data cache partition can be the application upgrade mode selected when there are differences in device parameters between the first memory corresponding to the first application partition and the second memory corresponding to the second application partition.
[0091] When two application partitions belong to two different memories and there are differences in device parameters between the two memories, it may result in that both application partitions cannot be used as program data loading partitions. In this case, according to the device parameters of the two memories, a memory suitable for being a program data loading partition can be selected from the two memories, and the application partition corresponding to the memory is set as the program data loading partition, and the application partition corresponding to the other memory is set as the program data cache partition.
[0092] It is understandable that the cost of memories with different device parameters is different. When the application upgrade mode is selected as the first mode, the first memory and the second memory can be selected according to the actual needs of the ECU, so that one of the two memories can meet the requirements of being a program data loading partition, and the application partition in the memory can realize the boot loading of the application program. The other memory only needs to meet the requirements of being a program data buffer, which can effectively reduce the device cost of the memory, thereby reducing the overall cost of the ECU.
[0093] As an optional implementation, the first memory and the second memory may be different in at least one of function, capacity, read / write speed, setting location, and access method.
[0094] The parameter difference between the first memory and the second memory can be reflected in various aspects. For example, one of the first memory and the second memory can be a RAM (random access memory), and the other can be a flash memory. When the functions and types of the two memories are different, the memory that is more suitable as a program data loading partition can be selected as the first memory, and the other can be selected as the second memory.
[0095] Similarly, when there is a difference in the capacity of the two memories, the memory with a larger capacity can be used as the first memory; when there is a difference in the read and write speed of the two memories, the memory with a faster read and write speed can be used as the first memory. When the two memories are a main memory and an auxiliary memory, since the auxiliary memory is usually an external memory that can be installed on the ECU, the main memory is usually used as the first memory and the auxiliary memory is usually used as the second memory.
[0096] It should be noted that, in the above embodiment, the storage module of the ECU can be divided into three independent storage partitions, namely a boot loading partition and two application partitions. It can be understood that when the two application partitions belong to two memories, the first memory can be divided into independent boot loading partitions and one application partition, and the second memory includes another application partition.
[0097] As an optional implementation, based on the above embodiment, a pre-boot partition independent of the boot loader partition and the application partition can be divided in the storage module. The pre-boot partition can store a pre-boot program, and the boot loader program can be upgraded using the pre-boot program.
[0098] The method of upgrading the boot loader using the pre-boot program can be that when the upgrade instruction of the boot loader is received, the boot upgrade data is obtained by the running boot loader. The boot upgrade data is the update data of the boot loader. The boot loader can write the boot upgrade data to the first application partition of the two application partitions, which will not affect the application partition in the running state, and thus will not affect the normal operation of the original APP function of the ECU.
[0099] When the ECU is restarted, the pre-boot program can copy the boot upgrade data from the application partition storing the boot upgrade data to the boot loading partition to overwrite the original boot loading program. Before copying the data, the pre-boot program can erase the original program data in the boot loading partition.
[0100] After the boot upgrade data is copied to the boot loading partition, the pre-boot program can boot load the boot loader in the boot loading partition, thereby running the upgraded boot loader.
[0101] Based on the upgraded boot loader, the ECU upgrade method in the above embodiment can be executed to continue to upgrade the application program.
[0102] The present application also provides an ECU upgrade device, such as Figure 4 As shown, the ECU upgrade device includes:
[0103] The acquisition module 401 is used to acquire application upgrade data in response to the upgrade instruction;
[0104] The writing module 402 is used to write the application upgrade data to the first application partition of the two application partitions; wherein the application upgrade data is the update data of the application program, the first application partition of the two application partitions is used to store the application upgrade data, and the second application partition is used to run the application upgrade data;
[0105] The boot module 403 is used to copy the application upgrade data from the first application partition to the second application partition using the boot loader when the ECU is restarted, and to boot load the application program from the second application partition.
[0106] It should be noted that the ECU upgrade device is a device corresponding to the above-mentioned ECU upgrade method. All implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device and can achieve the same technical effect.
[0107] Figure 5 A schematic diagram of the hardware structure of the ECU upgrade device provided in an embodiment of the present application is shown.
[0108] The ECU upgrade device may include a processor 501 and a memory 502 storing computer program instructions.
[0109] Specifically, the processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0110] The memory 502 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 502 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 502 may be inside or outside the ECU upgrade device. In a particular embodiment, the memory 502 is a non-volatile solid-state memory.
[0111] In certain embodiments, the memory 502 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0112] The processor 501 implements any one of the ECU upgrading methods in the above embodiments by reading and executing the computer program instructions stored in the memory 502 .
[0113] In one example, the ECU upgrade device may further include a communication interface 503 and a bus 510. Figure 5 As shown, the processor 501, the memory 502, and the communication interface 503 are connected via a bus 510 and communicate with each other.
[0114] The communication interface 503 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0115] Bus 510 includes hardware, software or both, and couples the components of the ECU upgrade device to each other. For example, but not limitation, the bus may include an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-end bus (FSB), a hypertransport (HT) interconnect, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable bus or a combination of two or more of these. Where appropriate, bus 510 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnect.
[0116] In addition, in combination with the ECU upgrade method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the ECU upgrade methods in the above embodiment is implemented.
[0117] An embodiment of the present application also provides a vehicle, which may include at least one of the above-mentioned ECU upgrade device, ECU upgrade equipment or computer-readable storage medium.
[0118] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0119] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0120] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0121] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0122] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. An ECU upgrade method, characterized in that: The ECU upgrade method comprises: In response to the upgrade instruction, obtaining application upgrade data; Writing the application upgrade data to a first application partition of the two application partitions; wherein the application upgrade data is update data of an application program, the first application partition of the two application partitions is used to store the application upgrade data, and the second application partition is used to run the application upgrade data; When the ECU is restarted, the application upgrade data is copied from the first application partition to the second application partition using a boot loader, and the application is boot loaded from the second application partition.
2. The ECU upgrade method according to claim 1, characterized in that: Writing the application upgrade data to the first application partition of the two application partitions includes: Identify a first application partition from the two application partitions, and write the application upgrade data into the first application partition; A first startup parameter is set based on the application upgrade mode; wherein the first startup parameter is used to indicate that the application partition storing the application upgrade data in the two application partitions is the first application partition.
3. The ECU upgrade method according to claim 2, characterized in that: The method of copying the application upgrade data from the first application partition to the second application partition by using a boot loader when the ECU is restarted, and boot loading the application from the second application partition, comprises: Determining the first application partition from the two application partitions based on the first startup parameter; Copying the application upgrade data from the first application partition to the second application partition; The application is boot-loaded from the second application partition.
4. The ECU upgrade method according to claim 3, characterized in that: The method of using a boot loader to copy the application upgrade data from the first application partition to the second application partition, and boot loading the application from the second application partition, further includes: When the boot loader is used to boot load the application, an abnormality monitoring program is started and the first boot times of the application are counted; the abnormality monitoring program is used to restart the ECU when the boot loading fails.
5. The ECU upgrade method according to claim 3, characterized in that: The first application partition of the two application partitions is a program data loading partition, and the second application partition is a program data cache partition. Device parameters of a first memory corresponding to the first application partition and a second memory corresponding to the second application partition are inconsistent.
6. The ECU upgrade method according to claim 5, characterized in that: The first memory and the second memory are different in at least one of function, capacity, read / write speed, setting location, and access method.
7. An ECU upgrade device, characterized in that: The ECU upgrading device comprises: An acquisition module, used for acquiring application upgrade data in response to an upgrade instruction; A writing module, used to write the application upgrade data to a first application partition of the two application partitions; wherein the application upgrade data is update data of the application program, the first application partition of the two application partitions is used to store the application upgrade data, and the second application partition is used to run the application upgrade data; The boot module is used to copy the application upgrade data from the first application partition to the second application partition using a boot loader when the ECU is restarted, and to boot load the application from the second application partition.
8. An ECU upgrade device, characterized in that: The ECU upgrade device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the ECU upgrading method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the ECU upgrading method according to any one of claims 1 to 6 is implemented.
10. A vehicle, characterized in that: The vehicle comprises at least one of the following: The ECU upgrading device as claimed in claim 7; The ECU upgrade device as claimed in claim 8; The computer readable storage medium of claim 9.