Software upgrade methods, devices, control devices, and vehicles for electronic control units

By splitting and cross-sorting the flashing sequence of the ECU software upgrade package, the problem of low ECU software upgrade efficiency is solved, the efficient utilization of bus resources and fault recovery are realized, and the overall upgrade efficiency and reliability are improved.

CN123067907APending Publication Date: 2026-11-10CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611560332.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-10
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

In existing technologies, the software upgrade efficiency of vehicle electronic control units (ECUs) is low, especially in central gateway architectures and distributed architectures. The upgrade process is limited to a serial mode per ECU, resulting in wasted bus resources and a linear increase in upgrade time.

Method used

By splitting and cross-sorting the ECU software upgrade package, a staggered flashing sequence is formed. Parallel flashing is performed during bus idle time, ensuring that the message to the second target ECU is sent while the first target ECU is performing its internal flashing operation, thereby improving bus utilization. The ECU upgrade is confirmed to be successful after receiving multiple successful flashing feedback messages.

Benefits of technology

It significantly improves the efficiency of ECU software upgrades, shortens the overall flashing time, increases bus utilization, reduces the risk caused by flashing interruptions, and enables fine-grained failure recovery in case of faults, thereby improving the reliability and success rate of parallel flashing of multiple ECUs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123067907A_ABST
    Figure CN123067907A_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, control device, and vehicle for software upgrades of electronic control units (ECUs), relating to the field of vehicle technology. The method includes: determining a flashing sequence based on software upgrade packages of at least two ECUs; a third message from a second target ECU is spaced between a first message and a second message from a first target ECU in the flashing sequence; the first and second messages are two messages from a plurality of messages split from the software upgrade package of the first target ECU; the first target ECU is one of at least two ECUs; the second target ECU is the remaining ECUs excluding the first target ECU; flashing messages on at least two ECUs based on the flashing sequence, while simultaneously flashing the third message and waiting for successful flashing feedback from the first target ECU regarding the first message; and determining that the software upgrade of the first target ECU is successful upon receiving successful flashing feedback from multiple messages, which significantly improves the efficiency of ECU software upgrades.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of vehicle technology, specifically to vehicle firmware online upgrade technology, and more particularly to software upgrade methods, apparatus, control devices, and vehicles for electronic control units. Background Technology

[0002] With the rapid development of new energy vehicles and intelligent connected technologies, the complexity of vehicle software has surged, making Firmware Over-The-Air (FOTA) upgrade technology a core means of functional iteration. In the current mainstream solution, upgrade packages are pushed from the cloud to the vehicle unit and then distributed and scheduled to each Electronic Control Unit (ECU) via a gateway or domain controller.

[0003] The upgrade efficiency under the relevant technologies has significant bottlenecks: In the central gateway architecture, multiple ECUs in the same network segment are strictly serially flashed. The next ECU can only be started after the current ECU has completed the entire process. Bus resources are largely idle, and the total time increases linearly with the number of ECUs. In the distributed architecture without a central gateway, each ECU is directly connected to the bus. There is a lack of unified coordination. The master controller needs to establish a diagnostic session one by one to complete the flashing. It cannot be parallelized and there is no mechanism for interruption resumption and fault recovery. A single ECU failure can easily cause the whole system to be interrupted.

[0004] In summary, both architectures are limited by the serial ECU-to-ECU mode, resulting in low upgrade efficiency. Summary of the Invention

[0005] This disclosure provides a method, apparatus, control device, and vehicle for upgrading the software of an electronic control unit (ECU), which can improve the efficiency of ECU software upgrades.

[0006] In a first aspect, this application provides a software upgrade method for an electronic control unit (ECU), comprising: determining a flashing sequence based on software upgrade packages of at least two ECUs; a third message from a second target ECU being spaced between a first message and a second message from a first target ECU in the flashing sequence; the first message and the second message being two messages from a plurality of messages split from the software upgrade package of the first target ECU; the first target ECU being one of at least two ECUs; the second target ECU being the remaining ECUs excluding the first target ECU; flashing messages on at least two ECUs based on the flashing sequence, while simultaneously flashing the third message and waiting for successful flashing feedback from the first target ECU regarding the first message; and determining that the software upgrade of the first target ECU is successful upon receiving successful flashing feedback from multiple messages.

[0007] The software upgrade method for electronic control units provided in this application can split and cross-sort the software upgrade packages of at least two ECUs to form a time-staggered flashing sequence. Furthermore, the flashing sequence is used to flash at least two ECUs sequentially. When the first target ECU performs an internal flashing operation, a message is sent to the second target ECU to eliminate bus waiting time. When multiple flashing success feedback messages are received, it is determined that the software upgrade of the first target ECU is successful, which significantly improves the upgrade efficiency of the ECU.

[0008] In some possible implementations, when there are multiple second target ECUs, the third message includes multiple inserted messages; each of the multiple inserted messages corresponds one-to-one with a multiple second target ECU; the target message in the multiple inserted messages is one of multiple messages split from the software upgrade package of the target ECU among the multiple second target ECUs; when there is a single second target ECU, the third message is one of multiple messages split from the software upgrade package of the second target ECU.

[0009] Based on this implementation, when there are multiple second target ECUs, the individual messages of each second target ECU are alternately arranged as insertion messages with the messages of the first target ECU. When there is only one second target ECU, the individual messages of the second target ECU are inserted between the messages of the first target ECU. This ensures that during the waiting period when any ECU has received a message and entered the internal Flash programming, the bus can be effectively occupied by the message transmission of the other ECUs, thereby avoiding the idle waiting of the bus during ECU programming and significantly improving the bus utilization rate.

[0010] In some possible implementations, the order in which multiple messages corresponding to the first target ECU appear in the flashing sequence is consistent with the theoretical flashing priority order of multiple messages corresponding to the first target ECU.

[0011] Based on this implementation method, by ensuring that the order of occurrence of multiple messages corresponding to the first target ECU in the flashing sequence is consistent with its theoretical flashing priority order, it is ensured that the key data with higher priority is flashed first, reducing the risk of the ECU falling into an unrecoverable state due to flashing interruption, and improving the reliability and robustness of the multi-ECU parallel flashing process.

[0012] In some possible implementations, the last message in the flashing sequence is the shortest flashing message among the end messages of at least two ECUs; the end message of the first target ECU is the last message in sequence among the multiple messages corresponding to the first target ECU.

[0013] Based on this implementation, by setting the last message in the flashing sequence as the end message with the shortest flashing time among the end messages of at least two ECUs, the Flash write waiting time of the last ECU is minimized after the bus completes all data transmission. This optimizes the overall flashing completion time from the maximum flashing time among all ECUs to the minimum flashing time, further shortening the overall completion time of the multi-ECU flashing task without increasing the total bus transmission time.

[0014] In some possible implementations, the method further includes: updating the flashing sequence if the first message flashing fails; flashing at least two ECUs using the updated flashing sequence to upgrade the software of at least two ECUs; wherein the update operation includes: shifting and replacing messages that appear after the first message in the multiple messages corresponding to the first target ECU to make room for the second message to fill the first message, and adding the end message of the first target ECU at the end of the flashing sequence; shifting and replacing means that for two messages that appear in adjacent order in the multiple messages corresponding to the first target ECU, the earlier message replaces the later message.

[0015] Based on this implementation, in the event of a failure to flash the first message, the message that appears after the first message in the sequence of multiple messages corresponding to the first target ECU is shifted and replaced, and the failed message is refilled into the empty position. A terminal message is added to the end of the sequence, so that the failed message can be retransmitted without restarting the entire ECU flashing process. At the same time, the transmission of other messages is not affected, thereby achieving fine-grained failure recovery. This significantly improves the fault tolerance and flashing success rate of the multi-ECU parallel flashing process and avoids the problem of the entire flashing task being interrupted or restarted due to the failure of a single message.

[0016] In some possible implementations, the process of determining that the first message flashing failed includes: receiving feedback from the first target ECU that the first message has failed to flash while the third message is being flashed, or determining that the first message has failed to flash if no feedback of successful or failed flashing is received when the third message is being flashed.

[0017] Based on this implementation method, by monitoring the flashing feedback of the first target ECU to the first message while flashing the third message, and determining that the first message flashing failed when receiving flashing failure feedback or when no feedback is received when the third message flashing is completed, the time window for failure detection overlaps with the transmission process of the third message. Flashing anomalies can be detected in a timely manner without additional waiting. Thus, flashing failure is quickly identified and responded to without introducing additional bus idle time, improving the reliability and real-time performance of the multi-ECU parallel flashing process.

[0018] In some possible implementations, at least two ECUs are ECUs in the target batch of ECUs; the target batch of ECUs is any batch of ECUs obtained by dividing the multiple ECUs to be upgraded into batches based on the theoretical transmission time and theoretical flashing time of the multiple ECUs to be upgraded.

[0019] Based on this implementation method, multiple ECUs to be upgraded are divided into batches based on the theoretical transmission time and theoretical flashing time of multiple ECUs to be upgraded, and each batch is used as the target batch of ECUs for parallel flashing. This makes the ECUs in each batch match each other in terms of time consumption characteristics. This can not only improve efficiency through pipelined parallel flashing, but also avoid the waiting time of a single ECU exceeding the timeout threshold due to too many ECUs or too large differences in time consumption. Thus, it balances flashing efficiency and reliability in large-scale OTA upgrade scenarios.

[0020] Secondly, this application provides a software upgrade apparatus for an electronic control unit, comprising: a determining module and a flashing module; the determining module is configured to determine a flashing sequence based on software upgrade packages of at least two electronic control units (ECUs); a third message of a second target ECU is spaced between a first message and a second message of a first target ECU in the flashing sequence; the first message and the second message are two messages from a plurality of messages split from the software upgrade package of the first target ECU; the first target ECU is one of at least two electronic control units; the second target ECU is the remaining ECUs excluding the first target ECU; the flashing module is configured to flash messages of at least two ECUs based on the flashing sequence, while waiting for successful flashing feedback from the first target ECU for the first message while flashing the third message; the determining module is further configured to determine that the software upgrade of the first target ECU is successful upon receiving successful flashing feedback from multiple messages.

[0021] In some possible implementations, when there are multiple second target ECUs, the third message includes multiple inserted messages; each of the multiple inserted messages corresponds one-to-one with a multiple second target ECU; the target message in the multiple inserted messages is one of multiple messages split from the software upgrade package of the target ECU among the multiple second target ECUs; when there is a single second target ECU, the third message is one of multiple messages split from the software upgrade package of the second target ECU.

[0022] In some possible implementations, the order in which multiple messages corresponding to the first target ECU appear in the flashing sequence is consistent with the theoretical flashing priority order of multiple messages corresponding to the first target ECU.

[0023] In some possible implementations, the last message in the flashing sequence is the shortest flashing message among the end messages of at least two ECUs; the end message of the first target ECU is the last message in sequence among the multiple messages corresponding to the first target ECU.

[0024] In some possible implementations, the flashing module is also used to update the flashing sequence if the first message flashing fails; and to flash at least two ECUs using the updated flashing sequence to upgrade the software of at least two ECUs; wherein the update operation includes: shifting and replacing messages that appear after the first message in the multiple messages corresponding to the first target ECU to make room for the second message to fill the first message, and supplementing the end message of the first target ECU at the end of the flashing sequence; shifting and replacing means that for two messages that appear in adjacent order in the multiple messages corresponding to the first target ECU, the earlier message replaces the later message.

[0025] In some possible implementations, the process of determining that the first message flashing failed includes: receiving feedback from the first target ECU that the first message has failed to flash while the third message is being flashed, or determining that the first message has failed to flash if no feedback of successful or failed flashing is received when the third message is being flashed.

[0026] In some possible implementations, at least two ECUs are ECUs in the target batch of ECUs; the target batch of ECUs is any batch of ECUs obtained by dividing the multiple ECUs to be upgraded into batches based on the theoretical transmission time and theoretical flashing time of the multiple ECUs to be upgraded.

[0027] Thirdly, this application provides a control device, including: a memory and a processor; the memory and the processor are coupled; the memory is used to store a computer program; and the processor executes the computer program to implement a software upgrade method for an electronic control unit that implements any of the above embodiments.

[0028] Fourthly, this application provides a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the software upgrade method of the electronic control unit of any of the above embodiments.

[0029] Fifthly, this application provides a computer program product including computer program instructions that, when executed by a processor, implement the software upgrade method for the electronic control unit of any of the above embodiments.

[0030] Sixthly, this application provides a vehicle including the control device of any of the preceding embodiments; or the computer-readable storage medium of any of the preceding embodiments; or the computer program product of any of the preceding embodiments. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in this disclosure, the accompanying drawings used in some embodiments of this disclosure will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings.

[0032] Figure 1 A schematic diagram of the architecture of a software upgrade system for an electronic control unit provided in this disclosure embodiment; Figure 2 One of the flowcharts for a software upgrade method for an electronic control unit provided in this disclosure embodiment; Figure 3 This is a diagram illustrating the flashing process of an electronic control unit in a related technology. Figure 4 This is a diagram illustrating the flashing process of an electronic control unit according to an embodiment of the present disclosure. Figure 5 A diagram illustrating the serial flashing process of an electronic control unit provided in this embodiment of the disclosure; Figure 6 A diagram illustrating the parallel writing process of an electronic control unit provided in this embodiment of the present disclosure; Figure 7 A second flowchart illustrating a software upgrade method for an electronic control unit provided in this embodiment of the present disclosure; Figure 8 A schematic diagram illustrating a conventional process for software upgrades of an electronic control unit, provided for related technologies. Figure 9 An innovative process diagram illustrating a software upgrade method for an electronic control unit provided in this disclosure embodiment; Figure 10 A schematic diagram of the structure of a software upgrade device for an electronic control unit provided in an embodiment of this disclosure; Figure 11 This is a schematic diagram of the structure of a control device provided in an embodiment of the present disclosure. Detailed Implementation

[0033] The technical solutions of this disclosure will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0034] It should be noted that, in this disclosure, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this disclosure should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0035] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0036] In the description of this disclosure, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "more than one" means two or more.

[0037] As mentioned in the background section, in current vehicle over-the-air (FOTA) upgrade practices, due to cost constraints, some electronic control units (ECUs) in the vehicle's CAN, LIN, or CANFD networks generally use microcontrollers (MCUs) with limited performance. These MCUs have relatively insufficient computing power and memory resources, resulting in slow parsing, verification, and response speeds for single-frame messages when processing messages in the flashing sequence based on the UDS diagnostic protocol, leading to a significant increase in single-node processing latency. Meanwhile, although the CANFD backbone network has a high physical transmission rate, the uneven processing capabilities of each ECU node result in a consistently low effective utilization rate (duty cycle) of the communication channel during the flashing process. A large amount of bus bandwidth remains idle while waiting for responses from low-speed nodes, causing a waste of network resources. This problem is particularly prominent in network segments containing multiple low-speed ECUs, further exacerbating the overall latency of the upgrade process and hindering the improvement of FOTA efficiency.

[0038] To address the aforementioned technical problems, this disclosure provides a software upgrade method for an electronic control unit (ECU). The method involves splitting and cross-sorting the software upgrade packages of at least two ECUs to form a staggered flashing sequence. Further, the flashing sequence is used to sequentially flash at least two ECUs. This allows the sending of a message to the second target ECU while the first target ECU is performing its internal flashing operation, eliminating bus waiting time. Upon receiving multiple successful flashing feedback messages, the software upgrade of the first target ECU is determined to be successful, significantly improving ECU upgrade efficiency.

[0039] The software upgrade system for the electronic control unit provided in the embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0040] See Figure 1 This is a schematic diagram of the architecture of a software upgrade system for an electronic control unit provided in an embodiment of this disclosure. Figure 1 As shown, the software upgrade system 100 of the electronic control unit includes: an over-the-air (OTA) system 110 and at least two electronic control units 120.

[0041] In an exemplary embodiment, the OTA110 and at least two electronic control units 120 can be connected to the central gateway (or domain controller) via the vehicle Ethernet (DoIP) or CAN / CANFD backbone, and then the central gateway (or domain controller) forwards the data to the electronic control unit 120 via a physical bus (such as CAN, CANFD, LIN, etc.).

[0042] In another exemplary embodiment, the OTA110 is directly connected to the electronic control unit 120 via a multiplexed vehicle bus (such as the CANFD backbone).

[0043] As a feasible implementation method, OAT110 is used to determine the flashing sequence based on software upgrade packages of at least two electronic control units (ECUs); based on the flashing sequence, at least two ECUs are flashed with messages, while waiting for the first target ECU to provide a successful flashing feedback for the first message while flashing the third message; if multiple successful flashing feedback messages are received, it is determined that the software upgrade of the first target ECU is successful.

[0044] In the flashing sequence, the first message of the first target ECU and the second message of the second target ECU are separated by the third message of the second target ECU.

[0045] The first message and the second message are two messages from a set of multiple messages split from the software upgrade package of the first target ECU.

[0046] The first target ECU is one of at least two electronic control units.

[0047] The second target ECU is any of the other ECUs besides the first target ECU.

[0048] As a feasible implementation method, the ECU is used to perform message flashing based on the flashing sequence sent by the OTA when it receives the flashing sequence. If the flashing is successful, it returns a flashing success feedback to the OTA.

[0049] It is understood that the application scenarios of the embodiments of this disclosure are not limited. The system architecture and business scenarios described in the embodiments of this disclosure are for the purpose of more clearly illustrating the technical solutions of the embodiments of this disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of this disclosure. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of this disclosure are also applicable to similar technical problems.

[0050] The software upgrade method for the electronic control unit provided in this disclosure will be described in detail below.

[0051] This disclosure provides a software upgrade method for an electronic control unit, such as... Figure 2 As shown, the method includes the following steps: S201. Determine the flashing sequence based on software upgrade packages for at least two electronic control units (ECUs).

[0052] As a feasible implementation method, the data in the software upgrade package mainly refers to the firmware data packet transmitted through UDS service 0x36 during the main programming stage of the ECU's UDS flashing process.

[0053] The ECU UDS flashing process includes: pre-programming stage, main programming stage, and post-programming stage.

[0054] The pre-programming phase includes: switching to the programming session, unlocking secure access, stopping regular communication, checking the preconditions for flashing, and erasing the target memory area.

[0055] The main programming phase includes: requesting download, transmitting data, requesting to exit transmission, triggering integrity verification, and reading the verification result.

[0056] The post-programming phase includes: writing firmware fingerprint information, performing ECU hard reset, restoring default session, re-enabling communication, clearing historical fault codes, and performing function self-test.

[0057] Since the data transmission volume in the pre-programming and post-programming stages is small and the ECU processing time is extremely short (the transmission time is negligible compared to the internal execution time of the ECU), for these two stages, corresponding control messages can be generated according to the number of ECUs and sent serially in sequence, without the need to introduce a complex parallel scheduling mechanism.

[0058] Optionally, erasing the target memory region during the pre-programming stage can be time-consuming. To address this, a parallel sending strategy can be employed: erase commands can be sent sequentially to each ECU without waiting for individual ECU responses. Once all ECUs have responded, the process proceeds to the next stage, initiating the main programming flow. This approach effectively masks the waiting time of the erase operation, improving overall flashing efficiency.

[0059] In an exemplary embodiment, data transmission during the main programming phase involves UDS service codes 0x34 (download data request), 0x36 (transfer data), and 0x37 (end of data transfer).

[0060] Among them, services 0x34 and 0x37 mainly carry control commands and verification information, with a very small data volume and fast processing speed.

[0061] Service 0x36 is used to carry the actual firmware upgrade data, which is huge (up to 4095 bytes per frame). After receiving the complete data, the ECU needs to perform a time-consuming Flash write operation, which will significantly occupy the bus idle time and become the main bottleneck of the overall upgrade time.

[0062] In view of the above characteristics, this application focuses on the large amount of data transmitted and the long Flash writing time of the 0x36 service, and proposes the following optimization strategy: The 0x36 service message is reasonably split, and based on the differences in transmission time and internal processing time of each ECU, the split messages are cross-sorted to construct a staggered and overlapping flash writing sequence. This scheme aims to maximize bus bandwidth utilization while effectively masking the internal processing delay of the ECU, thereby shortening the overall flash writing time.

[0063] As a feasible implementation method, the third message of the second target ECU is spaced between the first message and the second message of the first target ECU in the flashing sequence.

[0064] The first message and the second message are two messages from a set of multiple messages split from the software upgrade package of the first target ECU.

[0065] The third message is the message corresponding to the second target ECU, which is one of at least two ECUs other than the first target ECU.

[0066] It should be understood that, according to the USD specification, a single 0x36 service message frame supports a maximum of 4095 bytes, while CAN FD supports a maximum of only 64 bytes per frame. Therefore, in actual transmission, the sending end needs to enable a multi-frame transmission mechanism (such as ISO-TP) for packet unpacking, and the receiving end needs to perform packet repackaging, significantly increasing the overall transmission time. In this context, by interleaving messages between different ECUs, the bus bandwidth can be effectively utilized, masking the internal processing delays of the ECUs.

[0067] In an exemplary embodiment, the process of determining the flashing sequence includes: splitting the software upgrade package of each ECU in at least two ECUs into multiple messages based on the UDS multi-frame transmission mechanism (such as the ISO-TP protocol), sorting the multiple messages of each ECU according to a preset interleaving strategy, and extracting individual messages from each ECU and interleaving them in sequence to form a flashing sequence.

[0068] As a feasible implementation method, when there are multiple second target ECUs, the third message includes multiple insert messages.

[0069] Multiple inserted messages correspond one-to-one with multiple secondary target ECUs.

[0070] The target message in the multiple inserted messages is one of multiple messages split from the software upgrade package of the target ECU in multiple second target ECUs.

[0071] As another feasible implementation, when the second target ECU is a single unit, the third message is one of multiple messages split from the software upgrade package of the second target ECU.

[0072] The first target ECU is one of at least two electronic control units.

[0073] The second target ECU is any of the other ECUs besides the first target ECU.

[0074] For example, using the message sequence of the first target ECU as the main skeleton, one message from each of the second target ECUs is inserted sequentially after each message from the first target ECU to form a flashing sequence.

[0075] It should be understood that by reasonably interleaving the split messages between each ECU, when one ECU is in the Flash write waiting period, the bus can be effectively occupied by the transmission messages of other ECUs, thereby improving bus utilization and shortening the overall flash write time.

[0076] S202. Based on the flashing sequence, flash messages to at least two ECUs, so as to wait for the first target ECU to successfully flash the first message while flashing the third message.

[0077] As a feasible implementation method, the message writing process includes: after sending the first message to the first target ECU, without waiting for the first target ECU to provide feedback on the successful writing of the message, immediately start sending the third message to the second target ECU. While performing the Flash writing operation inside the first target ECU, the transmission of the third message is completed using the bus idle window, so that the bus always maintains a high load rate and maximizes the load capacity of the backbone CAN FD channel.

[0078] In the exemplary embodiment, the OTA creates a queue according to the multi-part parallel strategy, puts the parts (i.e. ECUs) that need to be flashed in the batch into the flashing sequence, and sends the messages in the UDS 0x36 flashing sequence of each part in turn.

[0079] Specifically, the OTA first transmits a complete 36-byte data packet to component A (i.e., the first target ECU). After the data transmission is complete, component A enters the internal Flash programming stage. The OTA does not wait for feedback from component A to complete programming and directly transmits the corresponding message for the next component B (i.e., the second target ECU) in the programming sequence, and so on. In this scheme, since the first 36-byte message needs to be sent to all components in the programming sequence before sending the second, third, and so on, the overall polling interval is longer than the traditional scheme of programming each component individually. Therefore, the OTA needs to ensure that the overall programming process of each component does not exceed the preset timeout threshold due to queuing. To this end, the OTA starts an independent timer when each component begins to receive data. When the total time taken for any component from the start of programming to completion approaches the timeout threshold, the OTA prioritizes scheduling the subsequent messages of that component, thereby achieving a balance between the efficiency of parallel programming and the risk of timeout.

[0080] In another exemplary embodiment, the OTA simultaneously sends DoIP messages (i.e., messages in the UDS 0x36 flashing sequence) for all components to the gateway according to a multi-component parallel strategy. Upon receiving the messages, the gateway first determines the physical network segment to which each component (ECU) belongs: when multiple components belong to different network segments, the segments do not interfere with each other, and the gateway forwards the components from different segments in parallel without queuing; when multiple components are mounted on the same network segment, the gateway queues the components within that segment. In a single-segment, multi-component scenario, the gateway first transmits a 36-bit data packet to component A (i.e., the first target ECU). After the data transmission is complete, component A enters the internal Flash programming stage. The gateway does not wait for feedback from component A's programming completion and directly transmits the corresponding message for the next component B (i.e., the second target ECU) in the flashing sequence, and so on.

[0081] During this process, to ensure that each component does not time out due to queuing, when any component begins receiving data, the gateway sends a message to the OTA (Over-The-Air) device (OTA) indicating that it is waiting for the write to complete. This notifies the OTA to start an independent timeout for that component. The OTA monitors the process based on a preset timeout threshold. If the overall write time for a component exceeds the limit, the corresponding processing mechanism is triggered. Through this scheduling, pipelined parallel write upgrades for multiple components on a single network segment can be achieved.

[0082] It should be understood that OTA (Over-The-Air) switches directly to the next ECU without waiting for write completion feedback between message transmissions between ECUs. This allows the bus to be effectively occupied by the transmission messages of other ECUs while one ECU is in a Flash write waiting cycle, thus significantly shortening the overall completion time of multi-ECU flashing tasks. OTA directly manages the flashing sequence of all components, with centralized scheduling logic and simple implementation. Furthermore, OTA pushes the underlying forwarding and queuing logic down to the gateway, leveraging the gateway's network segment awareness to achieve finer-grained parallel optimization. OTA only needs to be responsible for timeout monitoring and anomaly handling, making it suitable for multi-component flashing scenarios in complex network topologies.

[0083] For example, such as Figure 3 In the related technologies shown, OTA requires ECU A to complete the full data packet flashing (transmission + programming) before it can start transmitting and flashing data to ECU B (transmission + programming). This results in the bus being idle during the Flash writing process within ECU A, leading to a longer overall flashing time. However, this application... Figure 4 As shown, after OTA transmits a single-frame data packet to ECU A, it does not need to wait for ECU A to complete the burning of the data packet. It immediately starts transmitting the corresponding single-frame data packet to ECU B, so that the burning of ECU A and the transmission of ECU B, as well as the burning of ECU B and the transmission of ECU A, can be carried out in parallel on the time axis until all messages of all ECUs are sent.

[0084] For example, compared to Figure 5 After the upgrade begins, ECU A, ECU B, ECU C, ECU D, ECU E, and ECU F are processed sequentially in series, as follows: Figure 6 As shown, in this application, after the upgrade begins, ECU A, ECU B, ECU C, ECU D, ECU E, and ECU F can be processed in parallel.

[0085] S203. Upon receiving multiple successful flashing feedback messages, confirm that the first target ECU software upgrade was successful.

[0086] In the exemplary embodiment, during the flashing process, each time the OTA receives a successful flashing feedback (i.e., a positive response with a 0x36 message) from an ECU, it removes the corresponding message entry from the flashing sequence. As the flashing process progresses, message entries in the flashing sequence are removed one by one. When the flashing sequence is empty, it indicates that all 0x36 messages from all ECUs have been sent and all have received successful flashing feedback. At this point, the OTA determines that the software upgrade of all target ECUs is successful and sends a 0x37 message (request to exit transmission) to each ECU in sequence, ending the main programming phase.

[0087] The software upgrade method for electronic control units provided in this application can split and cross-sort the software upgrade packages of at least two ECUs to form a time-staggered flashing sequence. Furthermore, the flashing sequence is used to flash at least two ECUs sequentially. When the first target ECU performs an internal flashing operation, a message is sent to the second target ECU to eliminate bus waiting time. When multiple flashing success feedback messages are received, it is determined that the software upgrade of the first target ECU is successful, which significantly improves the upgrade efficiency of the ECU.

[0088] As a feasible implementation method, the order in which multiple messages corresponding to the first target ECU appear in the flashing sequence is consistent with the theoretical flashing priority order of multiple messages corresponding to the first target ECU.

[0089] In the exemplary embodiment, the software upgrade package of the first target ECU is split into multiple 0x36 messages, each message carrying different segments of firmware data. Depending on the Flash write characteristics, different data segments (such as bootloader, application body, checksum area, etc.) may have different write priorities.

[0090] For example, some critical data needs to be written early in the flashing process to ensure that subsequent messages can be correctly parsed, while some data can be written later.

[0091] Therefore, when generating the flush sequence, each message is sorted from high to low according to its theoretical flush priority, so that messages with higher priority (such as boot area data) appear first in the flush sequence, and messages with lower priority (such as application layer data) appear later.

[0092] It should be understood that when the flashing process is interrupted due to abnormal conditions (such as bus errors, ECU resets, timeouts, etc.), higher-priority critical data (such as boot code, firmware header information, etc.) has already been flashed first, thereby reducing the risk of the ECU falling into an unrecoverable state due to incomplete flashing. Furthermore, in scenarios where multiple ECUs are flashed in parallel, even if the low-priority messages of a certain ECU have not yet been completed, but its high-priority messages have been successfully flashed, that ECU can still remain usable to a certain extent, improving the robustness and security of the overall flashing process.

[0093] As a feasible implementation method, the last message in the flashing sequence is the end message with the shortest flashing time among the end messages of at least two ECUs.

[0094] The final message of the first target ECU is the last message that appears in sequence among the multiple messages corresponding to the first target ECU.

[0095] In the exemplary embodiment, it is assumed that there are N ECUs on a single network segment, and the transmission time for flashing component i is... The flashing time is The total time required for serial flashing in the current mainstream solution can be abstracted into the following formula: ; in, The total time required for all 0x36 messages of ECU i to be transmitted via the bus; This represents the total time required for ECU i to complete Flash writing after receiving all data. This scheme sequentially completes all data transmission and Flash writing for each ECU. The bus remains idle during the internal flashing process within the ECU. The total time is the sum of the transmission time and flashing time for each ECU.

[0096] As a feasible implementation method, if a multi-ECU polling alternating flashing strategy is adopted (i.e., the messages of each ECU are transmitted interleaved on the timeline), the total time consumption can be approximately expressed as: ; in, This is the sum of the transmission times of all ECUs (i.e., the total time required for the bus to complete all data transmission). The Flash write time for the last ECU to be flashed. This represents the maximum flashing time among all ECUs. The formula means that, under ideal pipeline scheduling, the bus continuously transmits data from all ECUs, and the flashing time of the last ECU determines the overall completion time.

[0097] As another feasible implementation method, to further optimize the total time, the last message in the flashing sequence can be set as the last message with the shortest flashing time among the last messages of each ECU, that is: ; in, This is the sum of the transmission times for all ECUs. This strategy minimizes the Flash write time across all ECUs. It places the last frame of the ECU with the shortest write time at the end of the sequence, minimizing the write wait time for the last ECU and thus minimizing the overall completion time without increasing the total bus transmission time.

[0098] It should be understood that under parallel pipeline scheduling, the bus transmission time is fixed (all data must be transmitted via the bus), and the final completion time of the overall flashing depends on the moment when the last ECU completes the Flash write. Therefore, placing the final message of the ECU with the shortest flashing time last reduces the overall completion time from... Optimized to This minimizes the total time required for the update process. This strategy is suitable for OTA upgrade scenarios with strict requirements on total flashing time and can significantly improve the user experience without increasing hardware costs.

[0099] As a feasible implementation method, such as Figure 7 As shown, the software upgrade method for the electronic control unit also includes the following steps: S701. If the first message writing fails, the writing sequence will be updated.

[0100] The update operation includes: shifting and replacing messages that appear after the first message in the order of multiple messages corresponding to the first target ECU to make room for the second message to fill the first message, and adding the end message of the first target ECU at the end of the flashing sequence.

[0101] Shift substitution refers to replacing the later message with the earlier message among multiple messages that appear in the order of occurrence in the first target ECU.

[0102] In the exemplary embodiment, when a message from the first target ECU fails to be flashed, it is equivalent to a fault occurring during the message transmission process of that ECU. At this time, the OTA pauses the transmission of subsequent messages from that ECU and instead sends messages from other ECUs. After the message transmissions of the other ECUs are completed, the flashing process resumes from the failed message. Through this method, bus resources can be preferentially allocated to other ECUs when a fault occurs, avoiding the entire bus becoming idle due to the flashing failure of a single ECU, thereby maximizing bus utilization.

[0103] S702. Use the updated flashing sequence to flash messages to at least two ECUs to upgrade the software of at least two ECUs.

[0104] In the exemplary embodiment, after completing the flashing sequence update operation, the OTA restarts scheduling according to the updated flashing sequence. First, it sends messages from other ECUs, then retransmits subsequent messages from that ECU starting with the first failed message, and finally sends supplementary terminal messages. This update mechanism ensures that failed flashing messages are retransmitted in a timely manner without affecting the flashing progress of other ECUs, thereby minimizing the impact of retransmission on overall flashing efficiency while ensuring flashing reliability.

[0105] It should be understood that when a message flashing process for a particular ECU fails, a shift substitution mechanism (the earlier message replaces the later message) moves the failed message backward, while prioritizing the transmission of messages from other ECUs. The flashing process then resumes from the failed message once the transmission of messages from other ECUs is complete. This method avoids restarting the entire ECU flashing process due to a single message flashing failure, achieving fine-grained failure recovery and significantly improving the fault tolerance and success rate of multi-ECU parallel flashing processes.

[0106] As a feasible implementation method, the process of determining the failure of the first message flashing includes: receiving the first target ECU's feedback on the failure of the first message flashing while flashing the third message, or, if no feedback on the success of the flashing or the failure of the flashing is received when the flashing of the third message is completed, determining that the first message flashing has failed.

[0107] In the exemplary embodiment, after sending the first message to the first target ECU, the OTA immediately begins sending the third message to the second target ECU without waiting for its write feedback. During this period, the OTA continuously monitors the feedback status of the first target ECU. If, during the transmission of the third message, the OTA receives a negative response (i.e., write failure feedback) from the first target ECU, it immediately determines that the first message write has failed; or, if the OTA does not receive any feedback from the first target ECU (neither a success response nor a failure response) until the entire third message has been transmitted, it also determines that the first message write has failed due to timeout. Both of these scenarios trigger an update operation in the write sequence, rescheduling the failed message for retransmission.

[0108] It should be understood that this detection mechanism utilizes the time window of the third message transmission to wait for the write feedback of the first message. By overlapping the feedback waiting time with the transmission time of subsequent messages, it can not only detect write failures in a timely manner, but also avoid introducing additional bus idle time due to waiting for feedback, thereby maintaining high bus utilization while ensuring write reliability.

[0109] As a feasible implementation method, at least two ECUs are ECUs in the target batch of ECUs.

[0110] The target batch of ECUs is any batch of ECUs obtained by dividing multiple ECUs to be upgraded into batches based on the theoretical transmission time and theoretical flashing time of multiple ECUs to be upgraded.

[0111] In an exemplary embodiment, when a vehicle OTA task involves upgrading a large number of ECUs simultaneously, the OTA first calculates the firmware package size of each ECU to be upgraded and, in conjunction with the CAN FD bus rate, calculates the theoretical transmission time for each ECU. Simultaneously, it obtains the Flash write performance parameters of each ECU to determine its theoretical flashing time. Subsequently, the OTA divides the multiple ECUs to be upgraded into several batches according to a preset total flashing time limit, ensuring that the ECUs within each batch meet the target constraint (i.e., the transmission time of the third message is greater than the theoretical flashing time of the first message), thereby ensuring that pipelined parallel flashing can be achieved within each batch. Each batch is a target batch of ECUs, and all ECUs within that batch are scheduled in parallel according to the aforementioned flashing sequence.

[0112] It should be understood that when there are a large number of ECUs to be upgraded, including all ECUs in the same batch may result in excessively long total flashing time or the waiting time for a single ECU exceeding the timeout threshold. By reasonably batching based on transmission and flashing time, ECUs can be grouped according to their time consumption characteristics, ensuring that the number of ECUs in each batch is moderate. This approach achieves efficiency improvements through pipeline parallelism while ensuring that the flashing process for each ECU is completed within the timeout threshold, thus balancing efficiency and reliability in large-scale OTA upgrade scenarios.

[0113] It should be noted that there is no limit to the theoretical transmission time and theoretical write time within the same batch.

[0114] For ease of understanding, the software upgrade methods of the electronic control unit used in related technologies and those used in this application are explained below with examples.

[0115] For example, such as Figure 8 As shown, the software upgrade method for electronic control units in related technologies is as follows: OTA can first flash ECU A frame by frame, continuously looping. While ECU A is not fully flashed, single-frame message sending and burning of ECU A is performed repeatedly until ECU A is fully flashed; after ECU A is flashed, ECU B is flashed; while ECU B is not fully flashed, single-frame message sending and burning of ECU B is performed continuously until ECU B is flashed, and then the next ECU is flashed.

[0116] The single-frame message transmission of ECU A includes: OTA sending a disassembled message to ECU A at a preset rate; if the single-frame message transmission is not completed, the OTA continuously sends the disassembled message at the preset rate until the single-frame message transmission of ECU A is completed.

[0117] The ECU A programming process includes: after receiving the data, ECU A sends a waiting message to the OTA. If ECU A is not finished programming, it continuously sends waiting messages until ECU A completes programming of the unpacked single frame message and returns a receiving completion message to the OTA to proceed with the next frame message.

[0118] The single-frame message transmission of ECU B includes: OTA sending a disassembled message to ECU B at a preset rate; if the single-frame message transmission is not completed, the OTA continuously sends disassembled messages at the preset rate until the single-frame message transmission of ECU B is completed.

[0119] The ECU B programming process includes: after receiving the data, ECU B sends a waiting message to the OTA. If ECU B is not finished programming, it continuously sends waiting messages until ECU B finishes programming the unpacked single frame message and returns a receiving completion message to the OTA to proceed with the next frame message.

[0120] It should be understood that in the aforementioned related technologies, the OTA and ECU adopt a strictly serial interaction mode of "send-wait-burn-confirm": whenever the ECU receives a packet of data, it sends a wait message to the OTA, and the OTA needs to pause sending and wait for the ECU to complete its internal Flash burning; only after the ECU completes burning and returns a message indicating completion of reception can the OTA send the next frame of messages or switch to the next ECU. This method has the following shortcomings: First, during ECU burning, the bus is idle, and the OTA cannot use this time window to transmit data to other ECUs, resulting in low bus utilization; Second, multiple ECUs can only be flashed sequentially, and the overall flashing time is the sum of the transmission time and burning time of each ECU. When the number of ECUs to be flashed is large, the total time increases significantly; Third, each ECU needs to maintain interaction with the OTA through wait messages during burning, which increases the bus load and communication overhead, making it difficult to meet the requirements of vehicle OTA for flashing efficiency.

[0121] For example, such as Figure 9As shown, the software upgrade method for the electronic control unit in this embodiment can be as follows: The OTA sends an ECU A flashing message in the flashing sequence to ECU A, and sends an unpacking message to ECU A according to a preset rate. After receiving the message, ECU A returns a waiting message to the OTA. At the same time, without waiting for ECU A to finish flashing, the OTA sends an ECU B flashing message in the flashing sequence to ECU B, and sends an unpacking message to ECU B according to a preset rate. After receiving the message, ECU B sends a waiting message to the OTA. After receiving the completion message from ECU A and the waiting message from ECU B, the OTA sends the ECU A flashing message in the flashing sequence to ECU A again, sends an unpacking message to ECU A according to a preset rate, and waits to receive the completion message from ECU B. This process continues until both ECUs have finished flashing.

[0122] It should be understood that OTA and ECU can also forward data through a gateway. That is, OTA sends the messages in the flashing sequence of each ECU to the gateway, which then routes and forwards them according to the network segment to which each ECU belongs. In a single network segment with multiple ECUs, the gateway queues and polls the messages of each ECU according to the above-mentioned alternating strategy, thereby realizing parallel flashing and upgrading of multiple ECUs.

[0123] The foregoing primarily describes the solutions of the embodiments of this disclosure from a methodological perspective. It is understood that, in order to achieve the aforementioned functions, the software upgrade device for the electronic control unit includes at least one of the hardware structures and software modules corresponding to each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure.

[0124] This disclosure embodiment can divide the software upgrade device of the electronic control unit into functional modules according to the above method embodiment. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one functional module. The integrated module can be implemented in hardware or software. It should be noted that the module division in this disclosure embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. The following description uses the example of dividing each function into a separate functional module.

[0125] Figure 10This is a schematic diagram of a software upgrade device for an electronic control unit provided in an embodiment of this disclosure. This software upgrade device is applied to OTA (Over-The-Air) updates and can execute the software upgrade method for the electronic control unit provided in the above-described method embodiments. Figure 10 As shown, the software upgrade device 1000 for an electronic control unit includes: a determining module 1001 and a flashing module 1002; the determining module 1001 is used to determine a flashing sequence based on software upgrade packages of at least two electronic control units (ECUs); in the flashing sequence, a third message from a second target ECU is spaced between a first message and a second message from a first target ECU; the first message and the second message are two messages from a plurality of messages split from the software upgrade package of the first target ECU; the first target ECU is one of at least two electronic control units; the second target ECU is the remaining ECUs excluding the first target ECU; the flashing module 1002 is used to flash messages on at least two ECUs based on the flashing sequence, so as to wait for the first target ECU to provide feedback on the successful flashing of the first message while flashing the third message; the determining module 1001 is also used to determine that the software upgrade of the first target ECU is successful when receiving feedback on the successful flashing of multiple messages.

[0126] In some possible implementations, when there are multiple second target ECUs, the third message includes multiple inserted messages; each of the multiple inserted messages corresponds one-to-one with a multiple second target ECU; the target message in the multiple inserted messages is one of multiple messages split from the software upgrade package of the target ECU among the multiple second target ECUs; when there is a single second target ECU, the third message is one of multiple messages split from the software upgrade package of the second target ECU.

[0127] In some possible implementations, the order in which multiple messages corresponding to the first target ECU appear in the flashing sequence is consistent with the theoretical flashing priority order of multiple messages corresponding to the first target ECU.

[0128] In some possible implementations, the last message in the flashing sequence is the shortest flashing message among the end messages of at least two ECUs; the end message of the first target ECU is the last message in sequence among the multiple messages corresponding to the first target ECU.

[0129] In some possible implementations, the flashing module 1002 is further configured to update the flashing sequence in the event of a failure to flash the first message; and to flash at least two ECUs using the updated flashing sequence to upgrade the software of at least two ECUs; wherein the update operation includes: shifting and replacing messages that appear after the first message in the multiple messages corresponding to the first target ECU to make room for the second message to fill the first message, and supplementing the end message of the first target ECU at the end of the flashing sequence; shifting and replacing means that for two messages that appear in adjacent order in the multiple messages corresponding to the first target ECU, the earlier message replaces the later message.

[0130] In some possible implementations, the process of determining that the first message flashing failed includes: receiving feedback from the first target ECU that the first message has failed to flash while the third message is being flashed, or determining that the first message has failed to flash if no feedback of successful or failed flashing is received when the third message is being flashed.

[0131] In some possible implementations, at least two ECUs are ECUs in the target batch of ECUs; the target batch of ECUs is any batch of ECUs obtained by dividing the multiple ECUs to be upgraded into batches based on the theoretical transmission time and theoretical flashing time of the multiple ECUs to be upgraded.

[0132] When implementing the functions of the integrated modules described above in hardware, this disclosure provides a possible structure for the control device involved in the above embodiments. For example... Figure 11 As shown, the control device 1100 includes a processor 1102 and a bus 1104. Optionally, the control device may also include a memory 1101; optionally, the control device 1100 may also include a communication interface 1103.

[0133] Processor 1102 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with embodiments of this disclosure. Processor 1102 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with embodiments of this disclosure. Processor 1102 may also be a combination of functions implementing computation, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0134] Communication interface 1103 is used to connect with other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.

[0135] The memory 1101 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.

[0136] In one possible implementation, the memory 1101 can exist independently of the processor 1102. The memory 1101 can be connected to the processor 1102 via a bus 1104 and is used to store instructions or program code. When the processor 1102 calls and executes the instructions or program code stored in the memory 1101, it can implement the software upgrade method of the electronic control unit provided in this embodiment. In another possible implementation, the memory 1101 can also be integrated with the processor 1102.

[0137] Bus 1104 can be an extended industry standard architecture (EISA) bus, etc. Bus 1104 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 11 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0138] Some embodiments of this disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium) storing computer program instructions that, when executed on a processor, cause the processor to perform a software upgrade method for an electronic control unit as described in any of the above embodiments.

[0139] Exemplary examples of computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes), optical discs (e.g., compact disks (CDs), digital versatile disks (DVDs), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memory (EPROMs), cards, sticks, or key drives, etc.). The various computer-readable storage media described in this disclosure may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.

[0140] This disclosure provides a computer program product containing instructions that, when run on a processor, cause the processor to execute the software upgrade method of the electronic control unit in any of the above embodiments.

[0141] This disclosure provides a vehicle including the control device of any of the preceding embodiments; or the computer-readable storage medium of any of the preceding embodiments; or the computer program product of any of the preceding embodiments.

[0142] The vehicle provided in this application may be a passenger vehicle or a freight vehicle, and may also be an electric vehicle or a hybrid vehicle. This application does not limit the specific purpose or power type of the vehicle, and the choice can be made according to actual needs.

[0143] A vehicle consists of a body and wheels. The body is used for passengers and for carrying goods, while the wheels are mounted underneath the body to support it and allow it to roll on the road, thus enabling the vehicle to move.

[0144] In some possible examples, the vehicle is equipped with a control system, which typically adopts a layered distributed architecture. From the bottom layer to the top layer, it can be roughly divided into a perception layer, a control layer, a coordination layer, and an interaction layer. The layers communicate with each other through an in-vehicle network.

[0145] The perception layer mainly consists of various sensors distributed inside and outside the vehicle, including but not limited to external environment cameras, millimeter-wave radar, lidar, ultrasonic sensors, in-vehicle driver monitoring cameras, microphone arrays, and various vehicle status sensors (such as wheel speed sensors, inertial measurement units, temperature sensors, etc.). The perception layer is responsible for collecting multi-dimensional data such as the vehicle's own operating status, driver behavior, and external driving environment in real time.

[0146] The control layer consists of dozens to hundreds of electronic control units (ECUs), distributed across multiple functional domains including powertrain, chassis, body, intelligent driving, and infotainment. Each ECU embeds real-time control software that performs closed-loop control of the vehicle's actuators based on preset control strategies or upper-level commands, and generates corresponding alarm signals when abnormal conditions are detected. Typical ECUs include the engine control unit, transmission control unit, brake control unit, steering control unit, vehicle stability control unit, airbag control unit, intelligent driving domain controller, and in-vehicle infotainment unit.

[0147] The coordination layer typically exists in the form of a domain controller or a central computing platform, responsible for cross-domain data fusion, global state management, and collaborative decision-making. The coordination layer centrally processes and schedules the sensing data and control commands that were originally scattered across various functional domains, connecting downwards to various electronic control units and supporting human-machine interaction functions upwards.

[0148] The interaction layer mainly includes in-cabin display devices (such as instrument panel, central control screen, head-up display), voice interaction system, haptic feedback device, etc., which are responsible for presenting vehicle status, warning information and driving suggestions to the driver in the form of visual, auditory or tactile, while receiving the driver's touch, voice and other input commands.

[0149] Data transmission and interaction between different layers are achieved through the vehicle bus network. Common vehicle bus protocols include Controller Area Network (CAN), CAN with Flexible Data-Rate (CAN FD), Local Interconnect Network (LIN), FlexRay, and vehicle Ethernet, which supports high-bandwidth data transmission. Among these, CAN and CAN FD buses are widely used for communication in real-time control domains such as powertrain and chassis, while vehicle Ethernet is increasingly being applied to high-bandwidth sensor data transmission in the intelligent driving domain and multimedia interaction scenarios in the cockpit domain.

[0150] In some possible examples, the vehicle software remote upgrade system, as the core of the vehicle computing platform, is equipped with a processor and memory to execute the software upgrade method for the electronic control unit provided in the embodiments of this application.

[0151] For example, the control device of this application is arranged in an on-board software remote upgrade system.

[0152] For example, the vehicle software remote upgrade system has multiple functional modules deployed to perform the various method steps.

[0153] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any changes or substitutions within the technical scope disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. A software upgrade method for an electronic control unit, characterized in that, The method includes: A flashing sequence is determined based on software upgrade packages of at least two Electronic Control Units (ECUs). In the flashing sequence, a third message from a second target ECU is spaced between a first message and a second message from the first target ECU. The first message and the second message are two messages from a plurality of messages split from the software upgrade package of the first target ECU. The first target ECU is one of the at least two electronic control units. The second target ECUs are the remaining ECUs excluding the first target ECU. When there are multiple second target ECUs, the third message includes multiple inserted messages. Each of the multiple inserted messages corresponds one-to-one with a multiple second target ECU. The target message in the multiple inserted messages is one of the multiple messages split from the software upgrade package of the target ECU among the multiple second target ECUs. Based on the flashing sequence, message flashing is performed on at least two ECUs, so as to wait for the first target ECU to successfully flash the first message while flashing the third message; Upon receiving successful flashing feedback from the multiple messages, it is determined that the software upgrade of the first target ECU was successful.

2. The software upgrade method for the electronic control unit according to claim 1, characterized in that, When the second target ECU is a single unit, the third message is one of multiple messages split from the software upgrade package of the second target ECU.

3. The software upgrade method for the electronic control unit according to claim 1 or 2, characterized in that, The order in which the multiple messages corresponding to the first target ECU appear in the flashing sequence is consistent with the theoretical flashing priority order of the multiple messages corresponding to the first target ECU.

4. The software upgrade method for the electronic control unit according to claim 3, characterized in that, The last message in the flashing sequence is the last message with the shortest flashing time among the last messages of each of the at least two ECUs; the last message of the first target ECU is the last message in sequence among the multiple messages corresponding to the first target ECU.

5. The software upgrade method for the electronic control unit according to claim 4, characterized in that, The method further includes: If the first message writing fails, the writing sequence will be updated. The updated flashing sequence is used to flash the message of the at least two ECUs to upgrade the software of the at least two ECUs; The update operation includes: shifting and replacing the message that appears after the first message in the order of the multiple messages corresponding to the first target ECU, so as to free up the position of the second message to fill the first message, and supplementing the end message of the first target ECU at the end of the flashing sequence; The shift substitution refers to replacing the later message with the earlier message among two adjacent messages in the multiple messages corresponding to the first target ECU.

6. The software upgrade method for the electronic control unit according to claim 5, characterized in that, The process for determining the failure of the first message flush includes: If the first target ECU receives a failure feedback on the first message during the flashing of the third message, or if the flashing success feedback or the flashing failure feedback is not received when the flashing of the third message is completed, it is determined that the flashing of the first message has failed.

7. The software upgrade method for the electronic control unit according to claim 1, characterized in that, The at least two ECUs are ECUs in the target batch of ECUs; the target batch of ECUs is any batch of ECUs obtained by dividing the multiple ECUs to be upgraded into batches based on the theoretical transmission time and theoretical flashing time of multiple ECUs to be upgraded.

8. A software upgrade device for an electronic control unit, characterized in that, The device includes: a determination module and a writing module; A determining module is used to determine a flashing sequence based on software upgrade packages of at least two electronic control units (ECUs); in the flashing sequence, a first message and a second message from a first target ECU are separated by a third message from a second target ECU; the first message and the second message are two messages from a plurality of messages split from the software upgrade package of the first target ECU; the first target ECU is one of the at least two electronic control units; the second target ECU is the remaining ECUs excluding the first target ECU; when there are multiple second target ECUs, the third message includes multiple inserted messages; the multiple inserted messages correspond one-to-one with the multiple second target ECUs; the target message in the multiple inserted messages is one of the multiple messages split from the software upgrade package of the target ECU among the multiple second target ECUs; The flashing module is used to flash messages to at least two ECUs based on the flashing sequence, so as to wait for the first target ECU to successfully flash the first message while flashing the third message. The determination module is also used to determine that the first target ECU software upgrade was successful upon receiving successful flashing feedback from the multiple messages.

9. A control device, characterized in that, The control device includes: a memory and a processor; the memory and the processor are coupled; the memory is used to store instructions executable by the processor; when the processor executes the instructions, it performs the software upgrade method of the electronic control unit as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on a processor, cause the processor to perform the software upgrade method of the electronic control unit as described in any one of claims 1 to 7.

11. A computer program product, characterized in that, It includes a computer program; when the computer program is executed, it enables the software upgrade method of the electronic control unit as described in any one of claims 1 to 7.

12. A vehicle, characterized in that, It includes the control device as claimed in claim 9; or the computer-readable storage medium as claimed in claim 10; or the computer program product as claimed in claim 11.