Method and device for determining flashing sequence of electronic control unit

By automatically arranging the flash sequence of the electronic control unit, and using upper-level domain and node attribute grouping and constraints, it solves the tedious problem of manually arranging the flash sequence, improves the flash efficiency and time, and satisfies the need for parallel flash in complex scenarios. need.

CN118550563APending Publication Date: 2024-08-27JINGWEI HIRAIN (TIANJIN) RES&DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410675438.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In complex vehicle electronic control unit (ECU) parallel flash scenarios, manually arranging the flash sequence is cumbersome and error-prone, resulting in long flash times and low efficiency.

Method used

By obtaining the upper-level domain attributes and node attributes of the ECU, it automatically arranges the flashing sequence, builds a key-value pair data structure, groups and determines the flashing group, determines the flashing order according to the flashing constraints, and optimizes the flashing process.

Benefits of technology

It improves the flashing efficiency, shortens the flashing time, ensures the smooth progress of parallel flashing tasks in complex scenarios, and meets the growing business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550563A
    Figure CN118550563A
Patent Text Reader

Abstract

The invention discloses an electronic control unit flashing sequence determination method and device, and the method comprises the steps: screening out a first electronic control unit of which the node attribute is a main node and a second electronic control unit of which the node attribute is a non-main node from a to-be-flashed electronic control unit sequence, and obtaining a main node sequence and a non-main node sequence; constructing a key value pair data structure set according to the non-master node sequence; determining a key object set according to the key value pair data structure set; obtaining a first flashing group according to the key object set; taking the first flashing group as a current group; circularly executing the following operations until all the second electronic control units belong to the corresponding flashing groups: traversing key value pair data structures corresponding to the electronic control units in the first flashing group, and adding value objects of the electronic control units in the first flashing group into the next flashing group; updating the next flashing group as the current group; and according to the flashing constraint condition of the electronic control unit, the flashing sequence of each flashing group is determined, so that the flashing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electronic control unit flashing, and in particular, relates to a method and device for determining a flashing sequence of an electronic control unit. Background Art

[0002] As business scenarios and user needs continue to grow, the participation of ECUs (Electronic Control Units) in parallel flashing scenarios has become increasingly complex. A flashing operation may require the participation of multiple different ECUs, each with its own unique attributes, such as the parent domain, whether it is a domain controller, whether it is a master node, etc. These attributes determine the multiple restrictions that must be met during the flashing process, such as some ECUs cannot be flashed at the same time, and some ECUs must be placed at the end of the flashing order.

[0003] In the current field of flashing electronic control units in vehicles, parallel flashing processes are usually managed through manual planning or simple sequential execution. However, with the increase in ECU attributes and the complexity of business scenarios, manually arranging the flashing sequence has become very cumbersome and error-prone, resulting in long flashing times and low efficiency. Summary of the invention

[0004] The embodiments of the present invention provide a method and device for determining the flashing order of electronic control units, which can automatically arrange the flashing order according to the attribute information of all electronic control units involved in the flashing, so as to optimize the flashing process, improve the flashing efficiency, and meet the needs of complex business scenarios.

[0005] The technical solution of this application is as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for determining a flashing order of an electronic control unit, the method comprising:

[0007] Obtaining the parent domain attributes and node attributes of each electronic control unit in the sequence of electronic control units to be flashed;

[0008] According to the node attributes, a first electronic control unit whose node attribute is a master node and a second electronic control unit whose node attribute is a non-master node are selected from the sequence of electronic control units to be flashed, so as to obtain a master node sequence and a non-master node sequence;

[0009] For each second electronic control unit, respectively perform: traverse the upper domain attributes of the second electronic control unit, take the upper domain of the second electronic control unit as the key object, and other second electronic control units whose upper domains are the second electronic control units as the value objects, construct a key-value pair data structure, and obtain a key-value pair data structure set;

[0010] Determine a key object set according to the key objects in the key-value pair data structure set;

[0011] Searching the key objects that do not belong to the non-primary node sequence and the electronic control unit whose key objects are preset key objects from the key object set to obtain a first flashing group;

[0012] The first flash group is used as the current group;

[0013] The following operations are performed in a loop until all second electronic control units are assigned to corresponding flashing groups: the key-value pair data structure corresponding to the electronic control units in the first flashing group is traversed, and the value objects of the electronic control units in the first flashing group are added to the next flashing group; and the next flashing group is updated as the current group;

[0014] A flashing group is generated separately according to each first electronic control unit in the master node sequence;

[0015] According to the flashing constraint conditions of the electronic control unit, the flashing order of each flashing group is determined.

[0016] In a second aspect, a device for determining a flashing order of an electronic control unit is provided, the device comprising:

[0017] An acquisition module, used for acquiring the upper domain attributes and node attributes of each electronic control unit in the sequence of electronic control units to be flashed;

[0018] A screening module is used to screen out, from the sequence of electronic control units to be flashed, a first electronic control unit whose node attribute is a master node and a second electronic control unit whose node attribute is a non-master node according to the node attribute, to obtain a master node sequence and a non-master node sequence;

[0019] The first execution module is used to execute, for each second electronic control unit, respectively: traverse the upper domain attributes of the second electronic control unit, take the upper domain of the second electronic control unit as a key object, and other second electronic control units whose upper domains are second electronic control units as value objects, construct a key-value pair data structure, and obtain a key-value pair data structure set;

[0020] A first determining module, used to determine a key object set according to the key objects in the key-value pair data structure set;

[0021] A search module, used to search the key objects that do not belong to the non-primary node sequence and the electronic control unit whose key objects are preset key objects from the key object set to obtain a first flashing group;

[0022] The second execution module is used to take the first flashing group as the current group; loop the following operations until all second electronic control units belong to the corresponding flashing group: traverse the key-value pair data structure corresponding to the electronic control units in the first flashing group, add the value objects of the electronic control units in the first flashing group to the next flashing group; and update the next flashing group as the current group;

[0023] A generating module, used for generating a flashing group separately according to each first electronic control unit in the master node sequence;

[0024] The second determining module is used to determine the flashing sequence of each flashing group according to the flashing constraint condition of the electronic control unit.

[0025] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the method for determining the flashing order of an electronic control unit of any embodiment of the present application are implemented.

[0026] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method for determining the flashing order of an electronic control unit of any embodiment of the present application are implemented.

[0027] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:

[0028] The electronic control unit flashing order determination method provided in the embodiment of the present application determines the flashing order of the electronic control units in the sequence of electronic control units to be flashed automatically by the upper domain attributes and node attributes of the electronic control units. Specifically, for each first electronic control unit whose attribute is a master node, a flashing group is established separately; for the second electronic control unit whose attribute is a non-master node, a key-value pair data structure is constructed, and the first flashing group is determined by the key set of multiple key-value pair data structures. After that, with the first flashing group as the current group, each electronic control unit in the first flashing group is processed to obtain the next flashing group, and it is updated to the current flashing group, and the processing is continued until all the second electronic control units are attributed to the corresponding flashing group, and then the flashing order is determined according to the flashing constraints of the electronic control unit. Through the upper domain attributes, node attributes and flashing constraints of each electronic control unit in the sequence of electronic control units to be flashed, the flashing order of each flashing group can be automatically determined, which effectively improves the problem that the manual arrangement of the flashing order becomes very cumbersome and error-prone, resulting in long flashing time and low efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0030] Figure 1 A schematic diagram of a process for determining a flashing order of an electronic control unit provided by an embodiment of the present application is shown;

[0031] Figure 2 is an information schematic diagram of an electronic control unit provided by an embodiment of the present application;

[0032] Figure 3 A schematic diagram of a process for constructing a key-value pair data structure set provided by an embodiment of the present application is shown;

[0033] Figure 4 A flowchart of a method for constructing a key-value pair data structure set when the judgment result is negative is shown in another embodiment of the present application;

[0034] Figure 5 yes Figure 2 Schematic diagram of the relationship between the corresponding electronic control unit and its parent domain;

[0035] Figure 6 A schematic diagram showing a method for obtaining a first flashing group provided by an embodiment of the present application is shown;

[0036] Figure 7 is a flowchart of a method for grouping multiple second electronic control units provided by an embodiment of the present application;

[0037] Figure 8 It is a flowchart of a method for determining a flashing order for a flashing group of multiple second electronic control units provided by an embodiment of the present application;

[0038] Fig. 9 All electronic control units in a sequence of electronic control units to be flashed in an implementation scenario are shown;

[0039] Fig.10 Based on Fig. 9 A key-value pair data structure set of a sequence of electronic control units to be flashed;

[0040] Fig.11 Based on Fig. 9 and a schematic diagram of a flashing sequence finally determined by the method for determining a flashing sequence of an electronic control unit;

[0041] Fig.12 A structural block diagram of a device for determining a flashing order of an electronic control unit provided by an embodiment of the present application is shown;

[0042] Fig.13 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0043] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0044] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0045] With the widespread application of in-vehicle Ethernet bus technology inside vehicles, the vehicle network architecture has evolved from a traditional distributed architecture to a more advanced domain / regional controller architecture. One of the main reasons for this development is the substantial increase in backbone network communication bandwidth, which provides a solid foundation for the implementation of new software update methods. In this evolving automotive industry, the trend of vehicle intelligence and personalization is more obvious, which leads to frequent software iterations. Specifically, the development of smart cockpits, autonomous driving technology, and vehicle domain control has driven the rapid increase in the number and complexity of electronic control units (ECUs) on vehicles. Along with this is the rapid increase in the amount of ECU flash data. Parallel flash technology came into being. Its core idea is to flash multiple ECUs at the same time, thereby improving the utilization of bus bandwidth and effectively shortening the flash time. The emergence of this technology is crucial to meeting the growing flash demand and keeping vehicle systems updated.

[0046] Among them, flashing is a common process used to ensure that the vehicle's electronic control system remains consistent with the latest technology and performance standards. This can include updating the operating system, application or configuration file to adapt to new functions, improve performance or meet new regulatory requirements. With the continuous enrichment of business scenarios and user needs, parallel flashing scenarios in the automotive industry are becoming more and more complex. In a flashing task, multiple different ECUs are involved, and each ECU has its own attributes, such as the parent domain, whether it is a domain controller, whether it is a master node, etc. These attributes determine a series of restrictions that the flashing process must meet. For example, some ECUs may not be flashed at the same time, while others must be placed at the end of the flashing order. Faced with such a complex scenario, manually arranging the flashing order becomes very cumbersome and error-prone, resulting in long flashing time and inefficiency.

[0047] In order to solve the problems in the prior art, the embodiment of the present application provides a method and device for determining the flashing order of an electronic control unit. The method for determining the flashing order of an electronic control unit provided in the embodiment of the present application is first introduced below.

[0048] Figure 1 FIG. 1 is a flow chart of a method 100 for determining a flashing order of an electronic control unit provided by an embodiment of the present application. Figure 1 As shown, the method for determining the flashing order of the electronic control unit may include the following steps: S101-S109.

[0049] S101, obtaining the upper domain attributes and node attributes of each electronic control unit in the sequence of electronic control units to be flashed;

[0050] S102, according to the node attributes, selecting a first electronic control unit whose node attribute is a master node and a second electronic control unit whose node attribute is a non-master node from the sequence of electronic control units to be flashed, to obtain a master node sequence and a non-master node sequence;

[0051] S103, for each second electronic control unit, respectively perform: traverse the upper domain attributes of the second electronic control unit, take the upper domain of the second electronic control unit as a key object, and other second electronic control units whose upper domains are second electronic control units as value objects, construct a key-value pair data structure, and obtain a key-value pair data structure set;

[0052] S104, determining a key object set according to the key objects in the key-value pair data structure set;

[0053] S105, searching the key objects that do not belong to the non-primary node sequence and the electronic control units whose key objects are preset key objects from the key object set to obtain a first flashing group;

[0054] S106, taking the first flashing group as the current group;

[0055] S107, looping and performing the following operations until all second electronic control units are assigned to corresponding flashing groups: traversing the key-value pair data structure corresponding to the electronic control units in the first flashing group, adding the value objects of the electronic control units in the first flashing group to the next flashing group; updating the next flashing group to the current group;

[0056] S108, generating a flashing group separately according to each first electronic control unit in the master node sequence;

[0057] S109, determining the flashing order of each flashing group according to the flashing constraint condition of the electronic control unit.

[0058] The method for determining the flashing order of electronic control units provided in the embodiment of the present application determines the flashing order of electronic control units in the sequence of electronic control units to be flashed automatically by the upper domain attributes and node attributes of the electronic control units. Specifically, all the electronic control units to be flashed are first divided into each first electronic control unit with the attribute of the main node and the second electronic control unit with the attribute of the non-main node according to the node attribute. Then, each first electronic control unit is separately established as a flashing group to meet the flashing requirements of the main node, and a key-value pair data structure is constructed for the second electronic control unit with the attribute of the non-main node, and the first flashing group is determined by the key set of multiple key-value pair data structures. After that, with the first flashing group as the current group, each electronic control unit in the first flashing group is processed to obtain the next flashing group, and it is updated as the current flashing group, and the processing is continued until all the second electronic control units are attributed to the corresponding flashing group, and then the flashing order is determined according to the flashing constraints of the electronic control units.

[0059] Through the upper-level domain attributes, node attributes and writing constraints of each electronic control unit in the sequence of electronic control units to be flashed, the writing order of each writing group can be automatically determined. It is crucial to effectively optimize the writing process, shorten the writing time, and improve the utilization of bus bandwidth. Especially when dealing with complex parallel writing tasks, it can improve the efficiency of parallel writing tasks in complex scenarios and ensure the smooth progress of the writing process, thereby better meeting the growing business needs and user expectations.

[0060] Next, the specific implementation of each step in the above method 100 will be described in detail.

[0061] In some embodiments, at S101, the sequence of electronic control units to be flashed includes multiple electronic control units to be flashed. In one implementation scenario, the multiple electronic control units to be flashed refer to various electronic control units in a vehicle, which may include but are not limited to an engine control unit, a brake control unit, an entertainment system control unit, etc. These electronic control units may need to be flashed to update their software parts to the latest version or apply new configuration parameters.

[0062] In some embodiments, before S101, the method also includes: adding upper-level domain attributes and node attributes to each electronic control unit in the electronic control unit sequence to be flashed, the upper-level domain attributes include the upper-level electronic control unit of the electronic control unit in the vehicle network topology, and the node attributes include whether the electronic control unit is a main node in the vehicle network topology.

[0063] As an implementation method, a data structure can be updated to store the parent domain attributes and node attributes of each electronic control unit. Specifically, the data structure can be a table or database containing fields such as the electronic control unit name, parent domain, and whether it is a main node.

[0064] In an implementation scenario, for example, in a vehicle's electronic control system, different electronic control units may have a hierarchical relationship, and the upper-level electronic control unit may have some influence on the flashing of the lower-level electronic control unit. The upper-level domain attribute is an attribute related to the upper-level information of the electronic control unit, which is used to identify the position relationship of each electronic control unit in the vehicle network topology. By scanning and identifying the connection relationship in the vehicle network, the upper-level domain attribute of each electronic control unit can be determined, and the information can be used to reasonably arrange the flashing order to meet the requirements and restrictions in the flashing process.

[0065] In addition, node attributes can also be determined by scanning the location of the electronic control unit in the vehicle network. Among them, the master node usually has a special status, so it may require special processing and flashing sequence arrangement. By obtaining the node attributes of the electronic control unit, the flashing of the master node can be specially processed to meet the requirements of network communication.

[0066] Figure 2 It is an information diagram of an electronic control unit provided by an embodiment of the present application.

[0067] In some embodiments, Figure 2 As shown, this application uses the string "ecu" plus a digital number as the ECU part number identification involved in flashing. Figure 2As shown, ecu1 is the part number identification information of the electronic control unit, and ecu2 is the parent domain attribute of ecu1, that is, ecu2 is the parent electronic control unit of ecu in the vehicle network topology, and ecu1 is a non-master node.

[0068] In some embodiments, at S102, as an example, the sequence of electronic control units to be flashed can be traversed to find the first electronic control unit whose node attribute is a master node and the second electronic control unit whose node attribute is a non-master node, and all the first electronic control units found are added to the master node sequence, and all the second electronic control units found are added to the non-master node sequence, so that the master node sequence contains all the first electronic control units with the master node attribute and the non-master node sequence contains all the second electronic control units with the non-master node attribute, so that the subsequent flashing order can be determined using the master node sequence and the non-master node sequence, which helps to manage the master nodes with special characteristics.

[0069] In some embodiments, at S103, for the flashing of the second electronic control unit of the non-master node, it is necessary to satisfy that the domain controller and the second electronic control unit under the domain controller cannot be flashed at the same time, that is, each second electronic control unit and the second electronic control unit of its upper domain cannot be flashed at the same time. Therefore, according to this flashing rule, all second electronic control units can be grouped so that the second electronic control units of each group include electronic control units that can be flashed in parallel. As for the second electronic control units, each second electronic control unit has one and only one upper domain, and the second electronic control unit as the upper domain can have multiple subordinate electronic control units.

[0070] Based on this, it is necessary to separate the second electronic control unit and its superior electronic control unit into two groups respectively. To achieve this goal, it can be solved through a key-value pair data structure. Specifically, the key object is used as the superior domain of the second electronic control unit, and the value object is used as the second electronic control unit. The key-value pair data structure is constructed by the principle of matching the key object and the value object. By allocating all second electronic control units to the corresponding key-value pair data structure, a key-value pair data structure set can be obtained, that is, multiple key-value pair data structures, and the key object and value object in each key-value pair data structure cannot be located in the same flash group for flashing.

[0071] In some embodiments, at S104, the key-value pair data structure set includes multiple key-value pair data structures, and each key-value pair data structure has and only has one key object. For each key-value pair data structure, the key object therein is searched and added to the key object set. After completing the search for all key-value pair data structures in the key-value pair data structure set, the key object set is determined. Then, at S105, the upper domains of all second electronic control units are obtained in the key object set, where the upper domains of some second electronic control units may not belong to the non-main node sequence, then there is no upper electronic control unit in the non-main node sequence that will affect its flashing, so one of the flashing groups, namely the first flashing group, can be determined, and then other flashing groups are determined based on the first flashing group.

[0072] In some embodiments, after the first flash group is determined at S106, the first flash group is used as the current group, and then, at S107, the key-value pair data structure corresponding to each second electronic control unit of the first flash group is searched to find the second electronic control unit with the second electronic control unit as the upper domain, that is, the value object corresponding to the second electronic control unit. Because the value object and the key object cannot be flashed at the same time, the corresponding value object is added to the next flash group to complete the determination of the electronic control unit of the second flash group. Then, the second flash group is updated to the current group, and the value object of the electronic control unit in the current group is searched until there is no unassigned second electronic control unit, and the current loop ends.

[0073] In some embodiments, at S108, each first electronic control unit in the master node sequence cannot be flashed at the same time as other electronic control units, so a flashing group is generated separately for each first electronic control unit. After multiple second electronic control units and first electronic control units are determined to have multiple flashing groups, at S109, the flashing order of each flashing group can be determined according to the flashing constraints of the electronic control units.

[0074] In some embodiments, the flashing constraints of the electronic control unit include:

[0075] The flashing group where the second electronic control unit is located is in the front, and the flashing group where the first electronic control unit is located is in the back;

[0076] The order of flashing different groups where the second electronic control unit is located is randomly determined, but they cannot be flashed at the same time;

[0077] The order of flashing different groups where the first electronic control unit is located is randomly determined, but they cannot be flashed at the same time.

[0078] Based on the flashing constraints of the electronic control units, the flashing order of the multiple flashing groups where the second electronic control units are located is sorted first, and then the flashing order of the multiple flashing groups where the multiple first electronic control units are located is sorted on this basis.

[0079] Figure 3 A flowchart of a method 300 for constructing a key-value pair data structure set provided in one embodiment of the present application is shown.

[0080] like Figure 3 As shown, the aforementioned S103 may include the following steps: S301 to S303.

[0081] S301, when traversing to the first target electronic control unit, determine whether there is an upper domain of the first target electronic control unit in the current key-value pair data structure set, and obtain a determination result that the first target electronic control unit includes any one of the second electronic control units;

[0082] S302, if the judgment result is yes, adding the first target electronic control unit as a value object to the key-value pair data structure where the upper domain is located;

[0083] S303, when the judgment result is no, create a new empty key-value pair data structure, add the upper domain of the first target electronic control unit as a key object and the first target electronic control unit as a value object into the new empty key-value pair data structure.

[0084] In some embodiments, each first target electronic control unit at S301 has one and only one key object, but a key object may have multiple value objects, so each key-value pair data structure will have a key object and at least one corresponding value object. By obtaining the parent domain attribute of the first target electronic control unit, the parent electronic control unit of the first target electronic control unit can be known. If the parent electronic control unit has previously constructed a key-value pair data structure, the first target electronic control unit is directly added to the value object row in the corresponding key-value pair data structure. If the parent electronic control unit has not previously constructed a key-value pair data structure, a new key-value pair data structure is created to accommodate this parent electronic control unit and the corresponding value object. According to this method, all second electronic control units are added to the corresponding key-value pair data structure, and the primary grouping work of the flash write order arrangement is completed, and a collection containing multiple key-value pair data structures is obtained.

[0085] Figure 4 A flowchart of a method 400 for constructing a key-value pair data structure set when the judgment result is negative is shown in another embodiment of the present application.

[0086] like Figure 4As shown, in one embodiment, in the above S303, if the judgment result is no, a new empty key-value pair data structure is created, and then the above method further includes the following steps:

[0087] S401, determining whether the first target electronic control unit is a domain controller without an upper domain;

[0088] The domain controller is used to manage and coordinate different subsystems and components to ensure that they work together and achieve the expected performance and functions of the vehicle. Specifically, it can include the engine control unit, brake control unit, etc. Therefore, the domain controller does not have an upper domain.

[0089] S402: When it is determined that the first target electronic control unit is a domain controller, a preset key object is used as a key object of a key-value pair data structure, and the first target electronic control unit is added as a value object to a new empty key-value pair data structure.

[0090] In some embodiments, for a domain controller that does not have an upper-level domain, in order to add the domain controller to the key-value pair data structure, the upper-level domain of the domain controller can be set as a preset key object, and when the first target electronic control unit is the domain controller, the domain controller is used as a value object and the preset key object is used as a key object and added to a new empty key-value pair data structure to construct a key-value pair data structure, so as to effectively ensure that all second electronic control units are included in the key-value pair data structure set, thereby improving the accuracy and stability of the grouping of electronic control units.

[0091] Figure 5 yes Figure 2 Schematic diagram of the relationship between the corresponding electronic control unit and its parent domain.

[0092] like Figure 5 As shown, the upper domain of ecu2 is null, which means that ecu2 is a domain controller without an upper domain, and null is the preset key object corresponding to ecu2.

[0093] Figure 6 A schematic diagram of a method 600 for obtaining a first flashing group provided in one embodiment of the present application is shown.

[0094] like Figure 6 As shown, the aforementioned S105 may also include the following steps: S601-S602.

[0095] S601, for a target key object, determine whether the target key object belongs to a preset key object or does not belong to a non-primary node sequence, and obtain a determination result that the target key object is any one of the key object set;

[0096] S602: If the judgment result is yes, add the corresponding value object in the key object data structure where the target key object is located to the first flush group.

[0097] In some embodiments, when determining the first flash group, the key objects in the key object set are first judged, and the key objects belonging to the preset key objects or not belonging to the non-main node sequence are screened and placed in the first flash group, thereby realizing the screening of the higher-level electronic control units in the network topology, and then based on these electronic control units, it is easier to manage the grouping of the remaining electronic control units.

[0098] Figure 7 It is a flowchart of a method 700 for grouping multiple second electronic control units provided by an embodiment of the present application.

[0099] like Figure 7 As shown, the aforementioned S107 may also include the following steps: S701 to S703.

[0100] S701, for each second target electronic control unit, searching for a value object of the second target electronic control unit in a corresponding key-value pair data structure, and adding the value object to a next flashing group, where the second target electronic control unit includes any electronic control unit in the first flashing group;

[0101] S702, until the traversal of the second target electronic control unit in the first flashing group is completed;

[0102] S703, updating the obtained next flash group as the current group.

[0103] In some embodiments, at S701, based on the principle that the second electronic control unit with the attribute of being a non-master node cannot be flashed at the same time as its upper-level domain, multiple electronic control units that can be flashed in parallel are flashed, which can effectively improve the flashing efficiency. By screening out the subordinate electronic control units of all second electronic control units in the first flashing group and placing them in the next flashing group, the electronic control units in the upper-lower relationship are in different flashing groups. Then, at S702, loop through in sequence until the value object allocation of multiple second electronic control units in the first flashing group is completed. Then, at S703, the next flashing group obtained is updated to the current group, and the aforementioned S701 and S702 are continued to implement the assignment of the value objects of the electronic control units in the next flashing group obtained to the flashing group.

[0104] After completing the grouping of all second electronic control units and obtaining multiple flashing groups, it is necessary to determine the flashing order of the multiple flashing groups. There are multiple methods for determining the flashing order. One method is to assign a priority to each flashing group according to the position of the electronic control unit in the topological structure, and then perform the flashing according to the priority order. In addition, you can also choose to collect historical flashing data and determine the best flashing order based on the historical flashing data.

[0105] In one embodiment, a method of assigning priorities can be selected when determining the flashing order of the flashing group. Specifically, the priority can be determined when the electronic control units are grouped, that is, a flashing sequence number is assigned to each flashing group. In this way, after completing the grouping of multiple flashing groups, the flashing order of the multiple flashing groups is also determined, which effectively simplifies the entire flashing process, reduces additional sorting steps, and reduces the complexity of the operation. In addition, by directly determining the flashing order when grouping, the risk of human error can also be effectively reduced.

[0106] Figure 8 It is a flowchart of a method 800 for determining a flashing order for a flashing group of multiple second electronic control units provided by an embodiment of the present application.

[0107] like Figure 8 As shown, after the aforementioned S105, the aforementioned method further includes: S801 to S802.

[0108] S801, creating a key-value pair data structure of an empty flush order;

[0109] S802, taking the electronic control units of the first flashing group as value objects, adding the flashing sequence number as a key object, and constructing a key-value pair data structure of the flashing sequence, wherein the flashing sequence number represents the order in which the electronic control units are flashed.

[0110] In some embodiments, at steps S801 and S802, the key-value pair data structure of the flashing sequence has a key object and at least one value object corresponding to the key object. A key-value pair data structure represents a flashing group, wherein the key object is the flashing sequence number, which is used to identify the position of the flashing group in the sequence of electronic control units to be flashed, so as to help determine which flashing group should be flashed first and which flashing groups should be flashed in subsequent steps. By using the key object, it can be ensured that the flashing process is carried out in a predetermined order, thereby reducing the risk of errors and improving the reliability of the system.

[0111] After the flashing sequence numbers of all the flashing groups to which the second electronic control unit belongs are determined, the flashing sequence number of the first electronic control unit belonging to the master node also needs to be determined to ensure that the first electronic control unit can also be performed in a predetermined order.

[0112] In one embodiment, the aforementioned S108 may also include creating a key-value pair data structure of an empty flash order for each third target electronic control unit, taking the third target electronic control unit as a value object, adding a flash sequence number as a key object, and constructing a key-value pair data structure of the flash order, wherein the third target electronic control unit includes any electronic control unit in the master node sequence, and the flash sequence number represents the order in which the electronic control units are flashed.

[0113] Among them, in order to meet the writing constraints of the electronic control units, the writing sequence number of each electronic control unit in the main node sequence should be placed after the writing group of the second electronic control unit determined above, so as to ensure that the writing of the first electronic control unit with the node attribute of the main node and the second electronic control unit with the node attribute of the non-main node is orderly and meets the writing constraints of the electronic control units.

[0114] It is worth noting that the flash sequence numbers can be added to the flash process one by one in an ascending order or a chronological order. This means that each flash sequence number will be sequentially placed after the previous sequence number to ensure that the flash operations are performed in a predetermined order. This sequential addition helps to ensure that the flashing of the ECUs is orderly and each ECU is flashed in the specified order. Adding the flash sequence numbers one by one in sequence is an effective way to manage and control the flashing process of the ECUs, ensuring that the flashing is orderly and controllable.

[0115] In a preferred embodiment, the flash serial numbers are arranged and added in ascending order, and the ascending order means that the flash serial numbers are added in ascending order, starting from 1 and increasing step by step.

[0116] In order to understand the method for determining the flash writing order of an electronic control unit provided in an embodiment of the present application in more detail, the method for determining the flash writing order of an electronic control unit provided in an embodiment of the present application will be described in detail below in combination with specific application scenarios.

[0117] Fig. 9 All electronic control units in a sequence of electronic control units to be flashed in an implementation scenario are shown;

[0118] Fig.10 Based on Fig. 9 A key-value pair data structure set of a sequence of electronic control units to be flashed;

[0119] Fig.11 Based on Fig. 9 And a schematic diagram of the flashing sequence finally determined by the method for determining the flashing sequence of the electronic control unit.

[0120] like Fig. 9 As shown, according to Fig. 9 From the parent domain attributes and node attributes of each electronic control unit shown in , we can know that ecu5 belongs to the master node and is classified into the master node sequence. The node attributes of ecu1, ecu11, ecu4, ecu15, ecu7, ecu9, ecu10, ecu18, ecu2, ecu12, and ecu3 are all non-master nodes, and are all second electronic control units.

[0121] For ecu1, the parent domain of ecu1 is ecu2, and ecu2 is the key object, then ecu1 is the value object of ecu2, and the first key-value pair data structure is constructed, and the first key-value pair data structure is added to the key-value pair data structure collection.

[0122] For ecu11, the parent domain of ecu11 is ecu12, and ecu12 is the key object, so ecu11 is the value object of ecu12. At this time, there is no key-value pair data structure with the key object being ecu12 in the key-value pair data structure set, so a second key-value pair data structure is constructed and added to the key-value pair data structure set.

[0123] For ecu4, the parent domain of ecu4 is ecu2, so ecu4 is the value object of ecu2. At this time, there is a key-value pair data structure with the key object being ecu2 in the key-value pair data structure set, so ecu4 is added to the first key-value pair data structure. For ecu15, the parent domain of ecu14 is ecu12, so ecu5 is the value object of ecu12. There is a key-value pair data structure with the key object being ecu12 in the key-value pair data structure set, so ecu15 is added to the second key-value pair data structure.

[0124] In particular, for ecu2, the parent domain of ecu2 is null, indicating that ecu2 does not have a parent domain as a domain controller, so null is set as the key object of ecu2, and ecu2 is used as the value object of null to construct a new key-value pair data structure and add it to the key-value pair data set.

[0125] According to the same method as above, ecu7, ecu9, ecu10, ecu18, ecu12, and ecu3 are assigned in turn until each electronic control unit is added to the corresponding key-value pair data structure, so as to realize the assignment of all electronic control units in the electronic control unit sequence to be flashed, and obtain the following: Fig.10 The key-value pair data structure shown is a collection.

[0126] according to Fig.10From the key-value pair data structure set shown, it can be concluded that the key object set includes ecu2, ecu12, ecu1, ecu9, null, ecu20, and ecu11. It can be seen that ecu20 does not belong to the electronic control unit in the non-master node sequence, and null is a preset key object, so the value object corresponding to the key-value pair data structure corresponding to ecu20 and the value object corresponding to the key-value pair data structure corresponding to null are determined as the first flashing group, that is, ecu12 and ecu2 are determined as the first parallel flashing group that can be flashed at the same time, and their flashing sequence number is determined to be 1.

[0127] according to Fig.10 The key-value pair data structure set shown is used to find the subordinate electronic control units of ecu12 and ecu2, namely ecu1, ecu4, ecu9, ecu11, and ecu15. According to the flashing constraints of the electronic control units, the domain controller and the electronic control units under the domain controller cannot be flashed at the same time. It can be understood that ecu12 cannot be flashed at the same time as ecu11 and ecu12; and ecu2 cannot be flashed at the same time as ecu1, ecu4, and ecu9, but ecu1, ecu4, ecu9, ecu11, and ecu15 can be flashed in a parallel flashing group, which is determined as the second parallel flashing group, and its flashing sequence number is determined to be 2.

[0128] According to Fig.10 The key-value pair data structure set shown screens the subordinate control units of the second parallel flashing group, namely, ecu1, ecu4, ecu9, ecu11, and ecu15, and obtains ecu7, ecu10, ecu18, and ecu3. At this time, ecu7, ecu10, ecu18, and ecu3 are determined to be the third parallel flashing group, and their flashing sequence number is determined to be 3. At this time, the flashing group allocation of all second electronic control units is completed.

[0129] Assign the flashing group to ecu5 in the master node sequence, so that ecu5 is in a flashing group alone, and determine ecu5 as the fourth flashing group, and determine its flashing sequence number as 4. So far, we get Fig.11 The finalized flashing sequence diagram is shown.

[0130] Based on the electronic control unit flashing sequence determination method provided in the above embodiment, accordingly, the present application also provides a specific implementation of the electronic control unit flashing sequence determination device. Please refer to the following embodiment.

[0131] Fig.12 FIG. 1 is a block diagram of a device 1200 for determining the flashing order of an electronic control unit provided in one embodiment of the present application. Fig.12The electronic control unit flashing sequence determination device 1200 provided in the embodiment of the present application may include:

[0132] The acquisition module 1201 is used to acquire the upper domain attributes and node attributes of each electronic control unit in the sequence of electronic control units to be flashed;

[0133] A screening module 1202 is used to screen out a first electronic control unit whose node attribute is a master node and a second electronic control unit whose node attribute is a non-master node from the sequence of electronic control units to be flashed according to the node attribute, so as to obtain a master node sequence and a non-master node sequence;

[0134] The first execution module 1203 is used to execute, for each second electronic control unit, respectively: traverse the upper domain attributes of the second electronic control unit, take the upper domain of the second electronic control unit as a key object, and other second electronic control units whose upper domains are the second electronic control units as value objects, construct a key-value pair data structure, and obtain a key-value pair data structure set;

[0135] A first determining module 1204 is used to determine a key object set according to the key objects in the key-value pair data structure set;

[0136] A search module 1205 is used to search the key objects that do not belong to the non-primary node sequence and the electronic control unit whose key objects are preset key objects from the key object set to obtain a first flashing group;

[0137] The second execution module 1206 is used to use the first flashing group as the current group; loop the following operations until all second electronic control units are assigned to the corresponding flashing group: traverse the key-value pair data structure corresponding to the electronic control units in the first flashing group, add the value objects of the electronic control units in the first flashing group to the next flashing group; update the next flashing group as the current group;

[0138] A generating module 1207, configured to generate a flashing group according to each first electronic control unit in the master node sequence;

[0139] The second determining module 1208 is used to determine the flashing order of each flashing group according to the flashing constraint condition of the electronic control unit.

[0140] The electronic control unit flashing order determination device provided in the embodiment of the present application obtains the upper domain attributes and node attributes of the electronic control unit through the acquisition module 1201, and divides all the electronic control units to be flashed into each first electronic control unit with the attribute of the main node and the second electronic control unit with the attribute of the non-main node through the screening module 1202. Through the first execution module 1203, the second electronic control unit with the attribute of the non-main node is constructed with a key-value pair data structure, and the key set of multiple key-value pair data structures is determined through the first determination module 1204, and then the first flashing group is determined through the search module 1205. After that, all the second electronic control units are attributed to the corresponding flashing group through the second execution module 1206, and then each first electronic control unit is separately established as a flashing group through the generation module 1207 to meet the flashing requirements of the main node. Finally, the second determination module 1208 can determine the flashing order according to the flashing constraints of the electronic control unit.

[0141] The electronic control unit flashing order determination device of the embodiment of the present application can automatically determine the flashing order of each flashing group through the upper domain attributes, node attributes and flashing constraints of each electronic control unit in the sequence of electronic control units to be flashed. It is crucial to effectively optimize the flashing process, shorten the flashing time, and improve the utilization rate of the bus bandwidth. Especially when processing complex parallel flashing tasks, it can improve the efficiency of parallel flashing tasks in complex scenarios and ensure the smooth progress of the flashing process, thereby better meeting the growing business needs and user expectations.

[0142] As an implementation of the present application, in order to ensure the accuracy and reliability of the flashing of the electronic control unit, the flashing constraint conditions in the second determination module 1208 may also include:

[0143] The flashing group where the second electronic control unit is located is in the front, and the flashing group where the first electronic control unit is located is in the back;

[0144] The order of flashing different groups where the second electronic control unit is located is randomly determined, but they cannot be flashed at the same time;

[0145] The order of flashing different groups where the first electronic control unit is located is randomly determined, but they cannot be flashed at the same time.

[0146] As an implementation of the present application, the aforementioned first execution module 1203 may further include:

[0147] A first judgment submodule is used to judge whether there is an upper domain of the first target electronic control unit in the current key-value pair data structure set when traversing to the first target electronic control unit, and obtain a judgment result that the first target electronic control unit includes any one of the second electronic control units;

[0148] A first adding submodule is used to add the first target electronic control unit as a value object to the key-value pair data structure where the upper domain is located when the judgment result is yes;

[0149] The second adding submodule is used to create a new empty key-value pair data structure when the judgment result is no, and add the upper domain of the first target electronic control unit as the key object and the first target electronic control unit as the value object into the new empty key-value pair data structure.

[0150] As an implementation of the present application, the aforementioned first execution module 1203 may further include:

[0151] A second judgment submodule is used to judge whether the first target electronic control unit is a domain controller without an upper domain;

[0152] The third adding submodule is used to use the preset key object as the key object of the key-value pair data structure when it is determined that the first target electronic control unit is a domain controller, and add the first target electronic control unit as a value object to the new empty key-value pair data structure.

[0153] As an implementation of the present application, the aforementioned search module 1205 may include:

[0154] The third judgment submodule is used to judge whether the target key object belongs to a preset key object or does not belong to a non-primary node sequence, and obtain a judgment result that the target key object is any one of the key object set;

[0155] The fourth adding submodule is used to add the corresponding value object in the key object data structure where the target key object is located to the first flushing group when the judgment result is yes.

[0156] As an implementation of the present application, the aforementioned second execution module 1206 may include:

[0157] A search submodule, for searching, for each second target electronic control unit, a value object of the second target electronic control unit in a corresponding key-value pair data structure, and adding the value object to a next flashing group, wherein the second target electronic control unit includes any electronic control unit in the first flashing group;

[0158] The determination submodule is used to complete the traversal of the second target electronic control units in the first flashing group; and then update the next flashing group obtained as the current group.

[0159] As an implementation of the present application, the aforementioned method further includes:

[0160] A first creation module is used to search the key objects that do not belong to the sequence of electronic control units to be flashed and the electronic control units whose key objects are preset key objects from the key object set, and after obtaining the first flashing group, create a key-value pair data structure of an empty flashing sequence;

[0161] The first construction module is used to take the electronic control units of the first flashing group as value objects, add the flashing sequence number as a key object, and construct a key-value pair data structure of the flashing order, wherein the flashing sequence number represents the order in which the electronic control units are flashed.

[0162] As an implementation of the present application, the aforementioned generating module 1207 may include:

[0163] A submodule is created to create a key-value pair data structure of an empty flash order for each third target electronic control unit. The third target electronic control unit is taken as a value object, and a flash sequence number is added as a key object to construct a key-value pair data structure of the flash order. The third target electronic control unit includes any electronic control unit in the main node sequence, and the flash sequence number represents the order in which the electronic control units are flashed.

[0164] As an implementation of the present application, the aforementioned method may further include:

[0165] An adding module is used to add upper domain attributes and node attributes to each electronic control unit in the electronic control unit sequence to be flashed. The upper domain attributes include the upper electronic control unit of the electronic control unit in the vehicle network topology, and the node attributes include whether the electronic control unit is a main node in the vehicle network topology.

[0166] Based on the same inventive concept, an embodiment of the present application also provides an electronic device.

[0167] Fig.13 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0168] like Fig.13 As shown, the electronic device may include a processor 1301 and a memory 1302 storing computer program instructions.

[0169] Specifically, the processor 1301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0170] The memory 1302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 1302 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 1302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1302 is a non-volatile solid-state memory.

[0171] The memory may include a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure. The processor 1301 implements any of the electronic control unit flashing order determination methods in the above-mentioned embodiments by reading and executing the computer program instructions stored in the memory 1302.

[0172] In one example, the electronic device may further include a communication interface 1303 and a bus 1310. Figure 3 As shown, the processor 1301, the memory 1302, and the communication interface 1303 are connected via a bus 1310 and communicate with each other.

[0173] The communication interface 1303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0174] Bus 1310 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 1310 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0175] The electronic device can execute the method for determining the flashing order of the electronic control unit in the embodiment of the present application, thereby achieving Figure 1 A method for determining the flashing order of an electronic control unit is described.

[0176] In addition, in combination with the electronic control unit flash writing order determination method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the electronic control unit flash writing order determination methods in the above embodiment is implemented.

[0177] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0178] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0179] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0180] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0181] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for determining the flashing order of an electronic control unit, characterized in that: include: Obtaining the parent domain attributes and node attributes of each electronic control unit in the sequence of electronic control units to be flashed; According to the node attributes, a first electronic control unit whose node attribute is a master node and a second electronic control unit whose node attribute is a non-master node are selected from the sequence of electronic control units to be flashed, to obtain a master node sequence and a non-master node sequence; For each second electronic control unit, respectively perform: traversing the upper domain attributes of the second electronic control unit, taking the upper domain of the second electronic control unit as a key object, and other second electronic control units whose upper domains are the second electronic control unit as value objects, constructing a key-value pair data structure, and obtaining a key-value pair data structure set; Determine a key object set according to the key objects in the key-value pair data structure set; Searching the key objects that do not belong to the non-primary node sequence and the electronic control units whose key objects are preset key objects from the key object set to obtain a first flashing group; Taking the first flashing group as the current group; Looping and performing the following operations until all the second electronic control units are assigned to the corresponding flashing group: traversing the key-value pair data structure corresponding to the electronic control units in the first flashing group, adding the value objects of the electronic control units in the first flashing group to the next flashing group; updating the next flashing group to the current group; Generate a flashing group separately according to each first electronic control unit in the master node sequence; According to the flashing constraint conditions of the electronic control unit, the flashing order of each flashing group is determined.

2. The method for determining the flashing order of an electronic control unit according to claim 1, characterized in that: The flashing constraints of the electronic control unit include: The flashing group where the second electronic control unit is located is in front, and the flashing group where the first electronic control unit is located is in the back; The order of flashing different groups where the second electronic control unit is located is randomly determined, but they cannot be flashed at the same time; The order of flashing different groups where the first electronic control units are located is randomly determined, but they cannot be flashed at the same time.

3. The method for determining the flashing order of an electronic control unit according to claim 1, characterized in that: The method of performing, for each second electronic control unit, traversing the upper domain attributes of the second electronic control unit, taking the upper domain of the second electronic control unit as a key object, and other second electronic control units whose upper domains are the second electronic control unit as value objects, constructing a key-value pair data structure, and obtaining a key-value pair data structure set includes: In the case of traversing to the first target electronic control unit, determining whether there is an upper domain of the first target electronic control unit in the current key-value pair data structure set, and obtaining a determination result that the first target electronic control unit includes any one of the second electronic control units; If the judgment result is yes, adding the first target electronic control unit as a value object to the key-value pair data structure where the upper domain is located; If the judgment result is no, a new empty key-value pair data structure is created, and the upper domain of the first target electronic control unit is used as a key object and the first target electronic control unit is used as a value object to add to the new empty key-value pair data structure.

4. The method for determining the flashing order of an electronic control unit according to claim 3, characterized in that: In the case where the judgment result is no, after creating a new empty key-value pair data structure, the method further includes: Determining whether the first target electronic control unit is a domain controller without an upper domain; When it is determined that the first target electronic control unit is a domain controller, a preset key object is used as a key object of the key-value pair data structure, and the first target electronic control unit is added as a value object to the new empty key-value pair data structure.

5. The method for determining the flashing order of an electronic control unit according to claim 1, characterized in that: The step of searching the key objects that do not belong to the non-primary node sequence and the electronic control unit whose key objects are preset key objects from the key object set to obtain a first flashing group includes: For a target key object, determine whether the target key object belongs to a preset key object or does not belong to a non-primary node sequence, and obtain a determination result, wherein the target key object is any one of the key object set; When the judgment result is yes, the corresponding value object in the key object data structure where the target key object is located is added to the first flush group.

6. The method for determining the flashing order of an electronic control unit according to any one of claims 1 to 5, characterized in that: Traversing the key-value pair data structure corresponding to the electronic control units in the first flashing group, and adding the value objects of the electronic control units in the first flashing group to the next flashing group; Updating the next flash group to the current group includes: For each second target electronic control unit, searching for a value object of the second target electronic control unit in a corresponding key-value pair data structure, and adding the value object to a next flashing group, wherein the second target electronic control unit includes any electronic control unit in the first flashing group; until the traversal of the second target electronic control unit in the first flashing group is completed; Update the obtained next flash group as the current group.

7. The method for determining the flashing order of an electronic control unit according to any one of claims 1 to 5, characterized in that: After searching the key objects that do not belong to the non-primary node sequence and the electronic control unit whose key objects are preset key objects from the key object set to obtain the first flashing group, the method further includes: Create a key-value pair data structure with empty flush order; The electronic control units of the first flashing group are taken as value objects, and a flashing sequence number is added as a key object to construct a key-value pair data structure of the flashing sequence. The flashing sequence number represents the order in which the electronic control units are flashed.

8. The method for determining the flashing order of an electronic control unit according to any one of claims 1 to 5, characterized in that: The step of generating a flashing group separately according to each first electronic control unit in the master node sequence comprises: For each third target electronic control unit, create a key-value pair data structure of an empty flash order, take the third target electronic control unit as a value object, add the flash sequence number as a key object, and construct a key-value pair data structure of the flash order. The third target electronic control unit includes any electronic control unit in the master node sequence, and the flash sequence number represents the order in which the electronic control units are flashed.

9. The method for determining the flashing order of an electronic control unit according to any one of claims 1 to 5, characterized in that: Before obtaining the upper domain attribute and the node attribute of each electronic control unit in the sequence of electronic control units to be flashed, the method further includes: For each electronic control unit in the electronic control unit sequence to be flashed, an upper domain attribute and a node attribute are added, wherein the upper domain attribute includes the upper electronic control unit of the electronic control unit in the vehicle network topology, and the node attribute includes whether the electronic control unit is a main node in the vehicle network topology.

10. A device for determining the flashing order of an electronic control unit, characterized in that: The device comprises: An acquisition module, used for acquiring the upper domain attributes and node attributes of each electronic control unit in the sequence of electronic control units to be flashed; A screening module is used to screen out, from the sequence of electronic control units to be flashed, a first electronic control unit whose node attribute is a master node and a second electronic control unit whose node attribute is a non-master node according to the node attribute, to obtain a master node sequence and a non-master node sequence; The first execution module is used to execute, for each second electronic control unit, respectively: traverse the upper domain attributes of the second electronic control unit, take the upper domain of the second electronic control unit as a key object, and other second electronic control units whose upper domains are the second electronic control unit as value objects, construct a key-value pair data structure, and obtain a key-value pair data structure set; A first determining module, configured to determine a key object set according to the key objects in the key-value pair data structure set; A search module, used for searching the key objects that do not belong to the non-primary node sequence and the electronic control unit whose key objects are preset key objects from the key object set to obtain a first flashing group; The second execution module is configured to use the first flashing group as the current group; loop the following operations until all the second electronic control units belong to the corresponding flashing group: traverse the key-value pair data structure corresponding to the electronic control units in the first flashing group, add the value objects of the electronic control units in the first flashing group to the next flashing group; and update the next flashing group as the current group; A generating module, used for generating a flashing group separately according to each first electronic control unit in the master node sequence; The second determining module is used to determine the flashing sequence of each flashing group according to the flashing constraint condition of the electronic control unit.