Vehicle ECU parallel flashing method based on directed acyclic graph

By establishing a directed acyclic graph model and a dynamic scheduling engine, analyzing ECU topology and dependencies, generating priority parallel flashing sequences and resolving conflicts, the problems of low efficiency, resource waste, and bus conflicts in existing ECU flashing schemes are solved, achieving efficient and reliable ECU software updates.

CN121387486APending Publication Date: 2026-01-23ANHUI JIANGHUAI AUTOMOBILE GRP CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511542829.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing ECU flashing solutions suffer from inefficiency, resource waste, high bus load leading to frame drops, and inability to dynamically adjust complex ECU dependencies.

Method used

A DAG model based on a directed acyclic graph is established, and a dynamic scheduling engine is combined to analyze the topology and dependencies of ECUs, generate a priority parallel flashing sequence, and monitor and resolve conflicts in real time during the flashing process.

Benefits of technology

It significantly improves ECU software flashing efficiency, optimizes network resource utilization, enhances the reliability and flexibility of the flashing process, and reduces bus conflicts and frame drops.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121387486A_ABST
    Figure CN121387486A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle ECU (Electronic Control Unit) parallel flashing method based on a directed acyclic graph, which has the main design concept that a multi-dimensional constrained DAG (Directed Acyclic Graph) model is established, ECU parallel flashing tasks are carried out in combination with a real-time dynamic scheduling engine, and abnormal conditions are monitored and solved based on a conflict resolution mechanism in the flashing process. The method specifically comprises the following steps: establishing a directed acyclic graph model of a flash task according to the topology and dependency relationship of the ECU; according to the directed acyclic graph model, dynamically obtaining a flashing priority and executing an inspection process before parallel flashing; in the process of executing ECU parallel flashing, when the abnormal condition of the vehicle end is detected, a conflict resolution mechanism is started. According to the method, the software flashing efficiency of the vehicle ECU is remarkably improved, and the network resources of the flashing task can be optimized while the reliability of the flashing process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of automotive electronics and electrical technology, and in particular to a vehicle ECU parallel flashing method based on a directed acyclic graph. BACKGROUND

[0002] With the increasing degree of electronicization of automobiles, modern vehicles usually contain dozens or even hundreds of ECUs, and the traditional serial flashing method is inefficient, while the parallel flashing technology based on a cloud platform can significantly shorten the vehicle software update time and improve the OTA efficiency. However, if the flashing task is issued on the cloud without fully considering the dependency relationship between the flashing ECUs and the bus load rate during flashing, the flashing failure will occur with a high probability.

[0003] In detail, the following three flashing methods are commonly used in the industry. 1. Serial flashing, which is a method of flashing ECUs one by one in a standard order, usually using an OBD port to connect a diagnostic instrument and performing flashing on each ECU in a predetermined order, and starting the flashing of the next ECU after the flashing of the previous ECU is completed; 2. Simple parallel, which is a method of flashing part of the controllers at a time according to a fixed priority strategy; 3. Differential flashing, which is a method of performing incremental flashing each time and verifying the incremental part.

[0004] Among them, the serial flashing method is inefficient and has no fault tolerance mechanism, and the failure of a single ECU flashing will lead to the failure of the entire flashing process; the simple parallel method lacks an effective resource scheduling mechanism and cannot adapt to dynamic load changes, which easily causes bus conflicts and flashing failures, such as frame loss when the CAN bus load exceeds 70%; the differential flashing method lacks effective dependency management, and the compatibility between different software versions is difficult to control, which increases the risk of system incompatibility.

[0005] In summary, the existing ECU flashing scheme has at least the following problems:

[0006] 1. Low efficiency: too long update time for each ECU;

[0007] 2. Resource waste: insufficient utilization of vehicle network bandwidth, lack of effective resource scheduling mechanism;

[0008] 3. Risk concentration: frame loss may occur when the bus load rate is greater than 70%;

[0009] 4. Poor flexibility: difficult to cope with complex ECU dependency relationships and unable to dynamically adjust. SUMMARY

[0010] In view of the above, the present application aims to provide a vehicle ECU parallel flashing method based on a directed acyclic graph to solve the aforementioned technical problems.

[0011] The technical solutions adopted by the present application are as follows:

[0012] The present application provides a vehicle ECU parallel flashing method based on a directed acyclic graph, which comprises:

[0013] According to the topology and dependency relationship of the ECU, a directed acyclic graph model of the flashing task is established;

[0014] According to the directed acyclic graph model, the flashing priority is dynamically obtained and the checking process before parallel flashing is performed;

[0015] In the process of performing ECU parallel flashing, when an abnormal situation at the vehicle end is detected, a conflict resolution mechanism is started.

[0016] In at least one possible implementation manner, the establishment of the directed acyclic graph model of the flashing task comprises:

[0017] An ECU model of the vehicle is established in advance;

[0018] A preset ECU topology file is loaded to determine a plurality of target ECUs of the present flashing task, and ECU model data of the corresponding target ECUs is exported;

[0019] Based on the ECU model data, the dependency relationship of the target ECUs is analyzed;

[0020] Based on the analysis result of the dependency relationship, a directed acyclic graph is output, which comprises: if the analysis result represents that there is no dependency relationship between the target ECUs, the target ECUs are marked as independent tasks.

[0021] In at least one possible implementation manner, the analysis of the dependency relationship of the target ECUs at least comprises one of the following:

[0022] It is judged whether there is hardware dependency, software dependency, power supply dependency between the target ECUs;

[0023] It is judged whether there is a safety constraint and a flashing order relationship between the target ECUs.

[0024] In at least one possible implementation manner, the dynamic acquisition of the flashing priority and the execution of the checking process before parallel flashing specifically comprise:

[0025] The directed acyclic graph model DAG model is loaded by using a dynamic scheduling engine, and a flashing sequence of the target ECUs is generated based on topological sorting;

[0026] After it is confirmed that the flashing task is ready, a resource availability check is performed;

[0027] If the resource availability check passes, a flashing thread is started.

[0028] In at least one possible implementation manner, the starting the conflict resolution mechanism when detecting the abnormal situation of the vehicle end comprises:

[0029] In the process of ECU parallel flashing, the dynamic scheduling engine detects the state of the vehicle end in real time;

[0030] If a conflict is detected, the dynamic scheduling engine determines the conflict type;

[0031] According to different conflict types, corresponding conflict resolution methods are taken; wherein, the conflict types at least include: resource conflict, dependency conflict, power conflict.

[0032] In at least one possible implementation manner, the taking corresponding conflict resolution methods comprises:

[0033] If a resource conflict is detected, the conflict resolution mechanism comprises: immediately suspending a plurality of flashing tasks at a low priority, and after gradually releasing the bus bandwidth based on a preset gradient, performing a limited number of retries;

[0034] If a dependency conflict is detected, the current directed acyclic graph is updated, and the topological sorting is recalculated to generate a new target ECU flashing sequence;

[0035] If a power conflict is detected, after suspending the flashing task according to a preset power-down sequence, the power mode is converted.

[0036] Compared with the prior art, the main design concept of the present application is to establish a multi-dimensional constraint DAG model, combine a real-time dynamic scheduling engine to carry out ECU parallel flashing tasks, and monitor and solve abnormal situations based on a conflict resolution mechanism during the flashing process. Specifically, according to the topology and dependency relationship of the ECU, a directed acyclic graph model of the flashing task is established; according to the directed acyclic graph model, the flashing priority is dynamically obtained and the pre-flashing checking process is performed; during the execution of the ECU parallel flashing process, when an abnormal situation of the vehicle end is detected, the conflict resolution mechanism is started. The present application significantly improves the software flashing efficiency of the vehicle ECU, and while improving the reliability of the flashing process, can optimize the network resources of the flashing task. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described below in combination with the drawings, wherein:

[0038] Figure 1 A schematic diagram of the vehicle ECU parallel flashing method based on a directed acyclic graph provided for the embodiment of the present application. DETAILED DESCRIPTION

[0039] Embodiments of the present application are described below in detail, examples of which are shown in the accompanying drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary only, for the purpose of explanation, and are not to be construed as limiting the present application.

[0040] An embodiment of a vehicle ECU parallel flashing method based on a directed acyclic graph is proposed, specifically as shown in Figure 1 , which includes:

[0041] Step S1, a directed acyclic graph model of the flashing task is established according to the topology and dependency relationship of the ECU;

[0042] DAG (Directed Acyclic Graph) is a kind of efficient directed acyclic graph for task management scheduling, and the DAG model is a model for representing the dependency relationship between tasks in a directed acyclic graph. In the directed acyclic graph, each node represents a task or operation, and the directed edge between the nodes represents the dependency relationship between the tasks. This representation method enables the DAG model to clearly show the execution order and dependency hierarchy between tasks, providing strong support for task scheduling and execution.

[0043] The specific way to establish the directed acyclic graph model of the flashing task includes:

[0044] Step S11, an ECU model of the vehicle is established in advance;

[0045] In detail, it includes determining the ECU diagnosis ID, and establishing the ECU model according to the estimated flashing time of the ECU, the preposition dependency list, the resource demand, the total bus bandwidth proportion occupied, and the required power state.

[0046] Step S12, a preset ECU topology file is loaded to determine a plurality of target ECUs of the flashing task, and ECU model data of the corresponding target ECUs is exported;

[0047] Step S13, the dependency relationship of the target ECUs is analyzed based on the ECU model data;

[0048] In detail, the analysis of the dependency relationship of the target ECUs specifically includes at least one of the following:

[0049] It is judged whether there is a hardware dependency between the target ECUs to be flashed this time, for example, whether all the nodes need to be hung;

[0050] It is judged whether there is a software dependency between the target ECUs to be flashed this time, for example, comparing the current version with the target version, and confirming that the BOOTLOADER version number and the APP version number are matched;

[0051] Judge whether there is a power dependency between the target ECUs that need to be flashed this time, such as BMS controller flashing needs to be high voltage;

[0052] Judge whether there is a security constraint between the target ECUs that need to be flashed this time, such as some domain controllers need to be loaded with keys and certificates before flashing;

[0053] Judge whether there is a flashing order relationship between the target ECUs that need to be flashed this time, such as some target ECUs need to be flashed after other target ECUs.

[0054] Step S14, based on the analysis result of the dependency relationship, output a directed acyclic graph, which includes: if the analysis result represents that there is no dependency relationship between the target ECUs, mark it as an independent task.

[0055] Step S2, dynamically obtain the flashing priority according to the directed acyclic graph model and perform the checking process before parallel flashing;

[0056] The flashing priority is obtained according to the directed acyclic graph model and the flashing pre-checking process is performed, specifically including:

[0057] Step S21, load the directed acyclic graph model DAG model by using the dynamic scheduling engine of the cloud, and generate the flashing sequence of the target ECUs based on topological sorting (that is, sort all nodes of the directed acyclic graph).

[0058] Step S22, after confirming that the flashing task is ready, perform resource availability check;

[0059] Additionally, if it is not ready, the task ends and waits for the idle time to reissue the task.

[0060] Step S23, if the resource availability check passes, start the flashing thread.

[0061] Additionally, if the resource availability check fails, recalculate the topological sorting and update the flashing priority.

[0062] Among them, the calculation method of the priority involved in this link can refer to the following:

[0063] α (1 / remain_time)+β dependency_depth-γ current_load+ δ resource_urgency;

[0064] The initial values of the above coefficients can refer to a=0.5, b=0.3, g=0.15, and d=0.05. It can be understood by those skilled in the art that the above coefficients can be dynamically adjusted according to machine learning, and the application does not limit this.

[0065] Step S3, in the process of executing the ECU parallel flashing, when an abnormal situation at the vehicle end is detected, a conflict resolution mechanism is started.

[0066] In detail, in the process of ECU flashing, the dynamic scheduling engine of the cloud end can detect the state of the vehicle end in real time. If a conflict is detected, the dynamic scheduling engine first judges the conflict type, and then takes different conflict resolution methods according to different conflict types. Specifically, the conflict types include at least resource conflict, dependency conflict, and power conflict.

[0067] If a resource conflict (bus load abnormality) is detected, the conflict resolution mechanism includes immediately suspending a number (such as 1-3) of flashing tasks at a low priority, and performing a limited number of retries (the upper limit of the number of retries can be set to 3) after gradually releasing the bus bandwidth based on a preset gradient (such as 10%);

[0068] If a dependency conflict is detected, the current directed acyclic graph is updated, and the topological sorting is recalculated to generate a new target ECU flashing sequence.

[0069] If a power conflict is detected, after suspending the flashing task according to a preset power-down sequence (to protect the ECU), the power mode is converted.

[0070] In summary, the main design concept of the application is to establish a multi-dimensional constraint DAG model, combine a real-time dynamic scheduling engine to carry out ECU parallel flashing tasks, and monitor and solve abnormal situations based on a conflict resolution mechanism during the flashing process. Specifically, according to the topology and dependency relationship of the ECU, a directed acyclic graph model of the flashing task is established; according to the directed acyclic graph model, the flashing priority is dynamically obtained and the pre-checking process of parallel flashing is performed; in the process of executing the ECU parallel flashing, when an abnormal situation at the vehicle end is detected, a conflict resolution mechanism is started. The application significantly improves the software flashing efficiency of the vehicle ECU, and while improving the reliability of the flashing process, it can optimize the network resources of the flashing task.

[0071] If the expression direction is mentioned in the embodiments of the present application, it is based on the relative concept of the embodiments. In addition, "at least one" means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the cases of A alone, A and B together, and B alone. Wherein A and B can be singular or plural. The character " / " generally represents that the associated objects before and after are in an "or" relationship. "At least one of the following" and the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, wherein a, b, c can be single or multiple.

[0072] The above describes the structure, features and effects of the present application according to the embodiments shown in the drawings, but the above is only the preferred embodiment of the present application. It should be noted that the technical features involved in the above embodiments and preferred modes can be reasonably combined and matched into various equivalent schemes by those skilled in the art without departing from or changing the design idea and technical effects of the present application. Therefore, the present application is not limited by the drawings shown in the drawings. Any change or modification made according to the concept of the present application, or any equivalent embodiment within the scope of the present application, shall be within the scope of the present application.

Claims

1. A directed acyclic graph based vehicle ECU parallel flashing method, characterized in that, The application relates to a method for implementing ECU parallel programming. According to the topology and dependency relationship of the ECU, a directed acyclic graph model of the programming task is established; According to the directed acyclic graph model, the programming priority is dynamically obtained, and a check process before parallel programming is performed; When an abnormal situation at the vehicle end is detected during the ECU parallel programming process, a conflict resolution mechanism is started.

2. The directed acyclic graph-based vehicle ECU parallel flashing method according to claim 1, characterized by, The establishment of the directed acyclic graph model of the programming task comprises: An ECU model of the vehicle is established in advance; A preset ECU topology file is loaded to determine a plurality of target ECUs of the programming task, and ECU model data of the corresponding target ECUs is exported; Based on the ECU model data, the dependency relationship of the target ECUs is analyzed; Based on the analysis result of the dependency relationship, a directed acyclic graph is output, which comprises: if the analysis result represents that there is no dependency relationship between the target ECUs, the target ECUs are marked as independent tasks.

3. The directed acyclic graph-based vehicle ECU parallel flashing method according to claim 2, characterized by, The analysis of the dependency relationship of the target ECUs at least comprises one of the following: It is judged whether there is hardware dependency, software dependency and power supply dependency between the target ECUs; It is judged whether there is a safety constraint and a programming sequence relationship between the target ECUs.

4. The directed acyclic graph-based vehicle ECU parallel flashing method according to claim 1, characterized by, The dynamic acquisition of the programming priority and the execution of the check process before parallel programming specifically comprise: The dynamic scheduling engine loads the directed acyclic graph model DAG model, and generates a programming sequence of the target ECUs based on topological sorting; After confirming that the programming task is ready, resource availability checking is performed; If the resource availability checking is passed, the programming thread is started.

5. The directed acyclic graph-based vehicle ECU parallel flashing method of claim 1, wherein, When an abnormal situation at the vehicle end is detected, the conflict resolution mechanism is started, which comprises: During the ECU parallel programming process, the dynamic scheduling engine dynamically detects the state of the vehicle end; If a conflict is detected, the dynamic scheduling engine judges the conflict type; According to different conflict types, corresponding conflict resolution modes are adopted; wherein the conflict types at least comprise: resource conflict, dependency conflict and power supply conflict.

6. The directed acyclic graph-based vehicle ECU parallel flashing method according to claim 5, characterized by, The corresponding conflict resolution modes comprise: If a resource conflict is detected, the conflict resolution mechanism comprises: a plurality of programming tasks at a low priority are immediately suspended, and after the total bus bandwidth is gradually released based on a preset gradient, a limited number of retries are performed; If a dependency conflict is detected, the current directed acyclic graph is updated, and a new target ECU programming sequence is generated by recalculating the topological sorting; If a power supply conflict is detected, after the programming task is suspended according to a preset power-off sequence, the power supply mode is converted.