Electronic control unit flashing method and system

By using a mixed integer linear planning model and dynamic resource adjustment model in the electronic control unit flash writing system, the allocation plan of flash writing tasks is optimized, and the problems of unreasonable allocation and high cost in traditional technologies are solved, achieving more efficient and economical task allocation.

CN119645446APending Publication Date: 2025-03-18CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411462057.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The traditional electronic control unit flash writing system adopts a static strategy in task allocation, resulting in unreasonable allocation and high cost.

Method used

The mixed integer linear programming model is adopted, combined with the time window model and the allocation cost model, and the allocation plan of the electronic control unit brushing task is optimized. This model determines the optimal flash task allocation scheme by pre-constructing objective functions and constraints, and optimizes it in real time through dynamic resource adjustment models.

Benefits of technology

The reasonable allocation of brushing tasks of electronic control units is realized, the allocation cost is reduced, the task allocation efficiency and system stability are improved, and the cost-effectiveness of resource use is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645446A_ABST
    Figure CN119645446A_ABST
Patent Text Reader

Abstract

The invention relates to an electronic control unit flashing method and system. The method comprises the following steps: determining an optimal flashing task allocation scheme corresponding to a plurality of electronic control unit flashing tasks according to a mixed integer linear programming model; a target function of the mixed integer linear programming model comprises a cost distribution model corresponding to a plurality of electronic control unit flashing tasks and a time window model corresponding to each electronic control unit flashing task, and the cost distribution model comprises network transmission cost data; the constraint conditions of the mixed integer linear programming model comprise the constraint conditions of the time window model, including the earliest execution time and the latest execution time of the flash task of each electronic control unit; and according to the optimal flashing task allocation scheme, issuing the flashing tasks of the electronic control units to the corresponding slave electronic control units, so that the slave electronic control units execute the corresponding flashing tasks of the electronic control units. By adopting the method, the brushing task of the electronic control unit can be reasonably allocated, and the brushing task allocation cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a flashing method and system for an electronic control unit. Background Art

[0002] Electronic Control Unit (ECU) flashing refers to the process of upgrading or modifying the software of a vehicle's ECU. The ECU is the core electronic component in a car, responsible for controlling the operation of multiple systems such as the engine, transmission, and brake system. Flashing the ECU can optimize or modify certain performance and behaviors of the car.

[0003] In the technical field of efficient collaborative flashing systems for multiple electronic control units, traditional technologies mainly adopt a static strategy for flashing task allocation, that is, the flashing task allocation is determined before the flashing process begins, which may lead to unreasonable flashing task allocation and high flashing task allocation costs. Summary of the invention

[0004] Based on this, it is necessary to provide an electronic control unit flashing method and system that can reasonably allocate electronic control unit flashing tasks and reduce the cost of flashing task allocation in order to address the above technical problems.

[0005] In a first aspect, the present application provides a method for flashing an electronic control unit, comprising:

[0006] According to a pre-constructed mixed integer linear programming model, an optimal flashing task allocation scheme corresponding to multiple electronic control unit flashing tasks is determined; wherein the objective function of the mixed integer linear programming model includes an allocation cost model corresponding to multiple electronic control unit flashing tasks and a time window model corresponding to each electronic control unit flashing task, and the allocation cost model includes network transmission cost data; the constraints of the mixed integer linear programming model include the constraints of the time window model, and the constraints of the time window model include the earliest execution time and the latest execution time of each electronic control unit flashing task;

[0007] According to the optimal flashing task allocation scheme, each electronic control unit flashing task is sent to the corresponding slave electronic control unit, so that each slave electronic control unit performs the corresponding electronic control unit flashing task.

[0008] In one embodiment, before determining the optimal flashing task allocation scheme corresponding to the flashing tasks of the plurality of electronic control units according to the pre-built mixed integer linear programming model, the method further comprises:

[0009] Determine the earliest execution time and the latest execution time of each electronic control unit flashing task according to the attribute data and current load of each slave electronic control unit;

[0010] Determine the time window model corresponding to each electronic control unit flashing task according to the decision variables and execution duration of each electronic control unit flashing task, as well as the earliest execution time and the latest execution time of each electronic control unit flashing task;

[0011] The time window model is as follows:

[0012]

[0013] Wherein, n represents the nth slave electronic control unit; N represents the number of slave electronic control units; m represents the number of electronic control unit flashing tasks; is a binary decision variable, representing the electronic control unit flashing task Is it assigned to the nth slave electronic control unit? t represents the execution time of the electronic control unit flashing task t; C n Indicates the processing capability of the nth slave electronic control unit; L n Indicates the current load of the nth slave electronic control unit; E t and L t They respectively represent the earliest execution time and the latest execution time of the electronic control unit flashing task t.

[0014] In one embodiment, before determining the optimal flashing task allocation scheme corresponding to the flashing tasks of the plurality of electronic control units according to the pre-built mixed integer linear programming model, the method further comprises:

[0015] Obtain network transmission cost data and decision variables for each electronic control unit flashing task;

[0016] Determine a distribution cost model corresponding to the multiple electronic control unit flashing tasks according to the network transmission cost data and decision variables of the multiple electronic control unit flashing tasks;

[0017] The allocation cost model is as follows:

[0018]

[0019] in, represents the allocation cost model; Indicates the task allocation scheme; B t Represents the network transmission cost data of the electronic control unit flashing task t, is a binary decision variable, representing the electronic control unit flashing task Whether to assign to the nth slave ECU.

[0020] In one embodiment, before determining the optimal flashing task allocation scheme corresponding to the flashing tasks of the plurality of electronic control units according to the pre-built mixed integer linear programming model, the method further comprises:

[0021] Determine the total task execution time corresponding to the multiple electronic control unit flashing tasks according to the time window model corresponding to each electronic control unit flashing task and the number of the multiple electronic control unit flashing tasks;

[0022] According to the total task execution time and the allocation cost model, the objective function of the mixed integer linear programming model is determined.

[0023] In one embodiment, determining an optimal flashing task allocation scheme corresponding to a plurality of electronic control unit flashing tasks according to a pre-built mixed integer linear programming model includes:

[0024] Input multiple electronic control unit flashing tasks into a pre-built mixed integer linear programming model;

[0025] The mixed integer linear programming model is solved by branch and bound method to obtain the optimal flushing task allocation scheme with the minimum total task execution time and task allocation cost.

[0026] In one embodiment, sending the flashing task of each electronic control unit to the corresponding slave electronic control unit according to the optimal flashing task allocation scheme includes:

[0027] Generate task instructions corresponding to each slave electronic control unit according to the optimal flashing task allocation scheme; the task instructions include the electronic control unit flashing tasks corresponding to each slave electronic control unit, and the earliest execution time and the latest execution time of the electronic control unit flashing tasks corresponding to each slave electronic control unit;

[0028] Encapsulating the task instructions corresponding to each slave electronic control unit to obtain a plurality of encapsulated task instructions, and respectively sending the plurality of encapsulated task instructions to the corresponding slave electronic control units;

[0029] When a task confirmation signal sent by each slave electronic control unit is received and the task confirmation signal is a preset value, it is determined that each slave electronic control unit has received a corresponding task instruction.

[0030] In one embodiment, the method further comprises:

[0031] monitoring task execution status data of a plurality of slave electronic control units;

[0032] Dynamically adjust the optimal flushing task allocation plan according to the task execution status data to obtain an adjusted task allocation plan;

[0033] The adjusted task allocation plan is updated to the optimal flashing task allocation plan, and the step of sending each flashing task to the corresponding slave electronic control unit according to the optimal flashing task allocation plan is returned until the flashing tasks of multiple electronic control units are completed.

[0034] In one embodiment, the optimal flushing task allocation scheme is dynamically adjusted according to the task execution status data to obtain an adjusted task allocation scheme, including:

[0035] The task execution status data is input into a pre-built dynamic resource adjustment model, and the optimal flushing task allocation plan is dynamically adjusted according to solving the dynamic resource adjustment model through a genetic algorithm to obtain an adjusted task allocation plan;

[0036] Among them, the objective function of the dynamic resource adjustment model includes the total execution time of multiple electronic control unit flashing tasks on their respective assigned slave electronic control units, the total network transmission cost of multiple electronic control unit flashing tasks, and the task execution time balance data among multiple slave electronic control units; the constraints of the dynamic resource adjustment model include task allocation constraints, load constraints of slave electronic control units and time window constraints.

[0037] In one embodiment, a dynamic resource adjustment model is solved by a genetic algorithm to dynamically adjust the optimal flushing task allocation scheme to obtain an adjusted task allocation scheme, including:

[0038] Acquire multiple initialization task allocation schemes corresponding to multiple electronic control unit flashing tasks, encode each initialization task allocation scheme into a chromosome, and obtain an initialization population;

[0039] According to the objective function of the dynamic resource adjustment model, the fitness function value of each chromosome is determined;

[0040] The genetic evolution operation is iteratively performed according to the fitness function values ​​of multiple chromosomes until the iteration stop condition is met, and the target chromosome is obtained, and the target chromosome is determined as the adjusted task allocation scheme.

[0041] In a second aspect, the present application also provides an electronic control unit flashing system, comprising:

[0042] A main electronic control unit is used to obtain multiple electronic control unit flashing tasks and send the multiple electronic control unit flashing tasks to a task allocation module;

[0043] A task allocation module is used to determine the optimal flashing task allocation scheme corresponding to multiple electronic control unit flashing tasks according to a pre-constructed mixed integer linear programming model; wherein the objective function of the mixed integer linear programming model includes an allocation cost model corresponding to multiple electronic control unit flashing tasks and a time window model corresponding to each electronic control unit flashing task, and the allocation cost model includes network transmission cost data; the constraints of the mixed integer linear programming model include the constraints of the time window model, and the constraints of the time window model include the earliest execution time and the latest execution time of each electronic control unit flashing task;

[0044] The main electronic control unit is further used to receive the optimal flashing task allocation plan sent by the task allocation module, and send the optimal flashing task allocation plan to the task issuing module;

[0045] A task issuing module is used to assign the flashing task of each electronic control unit to the corresponding slave electronic control unit according to the optimal flashing task allocation scheme;

[0046] The slave electronic control unit is used to execute the corresponding electronic control unit flashing task.

[0047] The above-mentioned electronic control unit flashing method and system, by introducing a time window model, can ensure that tasks are executed within a specific time window, effectively avoid resource competition conflicts between multiple slave electronic control units, ensure stable operation of the system, and improve task allocation efficiency. At the same time, by introducing an allocation cost model, the economic efficiency of the task allocation strategy is achieved, ensuring the cost-effectiveness of resource use. By combining the time window model and the allocation cost model to create a mixed integer linear programming model, it is possible to simultaneously optimize the task execution time and the allocation cost, and obtain a flashing task allocation scheme that minimizes the task execution time and the allocation cost, thereby achieving a reasonable allocation of tasks, so that task allocation takes into account both efficiency and cost, thereby improving the collaborative flashing efficiency and system stability of multiple slave electronic control units, and reducing the flashing cost of electronic control units. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 A schematic diagram of a process of flashing an electronic control unit in one embodiment;

[0050] Figure 2A schematic diagram of a process for constructing a time window model in one embodiment;

[0051] Figure 3 A schematic diagram of a process for constructing an allocation cost model in one embodiment;

[0052] Figure 4 A schematic diagram of a flow chart of determining an objective function of a mixed integer linear programming model in one embodiment;

[0053] Figure 5 It is a flowchart of sending the flashing tasks of each electronic control unit to the corresponding slave electronic control unit according to the optimal flashing task allocation scheme in one embodiment;

[0054] Figure 6 A schematic diagram of a process for dynamically adjusting an optimal flushing task allocation scheme in one embodiment;

[0055] Figure 7 A schematic diagram of a process of solving a dynamic resource adjustment model by a genetic algorithm in an embodiment to dynamically adjust an optimal flushing task allocation scheme to obtain an adjusted task allocation scheme;

[0056] Figure 8 A structural block diagram of an electronic control unit flashing system in one embodiment;

[0057] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0059] In an exemplary embodiment, Figure 1 As shown, a method for flashing an electronic control unit is provided, and the method is applied to a main electronic control unit as an example for description, and includes the following steps 102 to 104. Among them:

[0060] Step 102, based on a pre-constructed mixed integer linear programming model, determine the optimal flashing task allocation scheme corresponding to multiple electronic control unit flashing tasks; wherein the objective function of the mixed integer linear programming model includes an allocation cost model corresponding to multiple electronic control unit flashing tasks and a time window model corresponding to each electronic control unit flashing task, and the allocation cost model includes network transmission cost data; the constraints of the mixed integer linear programming model include the constraints of the time window model, and the constraints of the time window model include the earliest execution time and the latest execution time of each electronic control unit flashing task.

[0061] Among them, the master electronic control unit is used to control multiple slave electronic control units for collaborative flashing. The Mixed Integer Linear Programming (MILP) model refers to a model that introduces the allocation cost model and the time window model on the basis of the traditional MILP model, which is an improved MILP model. The allocation cost model refers to a model constructed according to the cost required for task allocation. The time window model refers to a model constructed according to the time window corresponding to each task, that is, the task execution time range.

[0062] Optionally, the master electronic control unit obtains multiple electronic control unit flashing tasks, inputs the multiple electronic control unit flashing tasks into a pre-built mixed integer linear programming model, and obtains the optimal flashing task allocation scheme corresponding to the multiple electronic control unit flashing tasks by solving the mixed integer linear programming model. Among them, the pre-built mixed integer linear programming model includes an objective function and constraints, and the objective function includes an allocation cost model corresponding to the multiple electronic control unit flashing tasks and a time window model corresponding to each electronic control unit flashing task. The constraints include constraints of the time window model, and the constraints of the time window model include the time window corresponding to each electronic control unit flashing task, that is, the earliest execution time and the latest execution time. The earliest execution time and the latest execution time both refer to the start execution time of the task. The time window of the electronic control unit flashing task can be specifically set according to the actual execution requirements of the multiple electronic control unit flashing tasks, as long as it can avoid the execution of multiple electronic control unit flashing tasks at the same time to avoid conflicts between multiple slave electronic control unit resources. Therefore, the constraints of the time window model limit the execution time range of each electronic control unit flashing task, and can ensure that each electronic control unit flashing task is executed within a specific time range. Since the objective function of the pre-built mixed integer linear programming model includes a time window model and an allocation cost model, it is possible to comprehensively consider the total task completion time and the task allocation cost, with the goal of minimizing the total task completion time and the task allocation cost. Under the constraints of the time window model, the optimal flushing task allocation plan with the minimum total task completion time and task allocation cost is obtained.

[0063] Step 104 : sending each electronic control unit flashing task to the corresponding slave electronic control unit according to the optimal flashing task allocation scheme, so that each slave electronic control unit executes the corresponding electronic control unit flashing task.

[0064] Specifically, there may be multiple slave electronic control units, and multiple slave electronic control units collaborate to flash the electronic control unit. After the master electronic control unit generates the optimal flashing task allocation plan, the task distribution module distributes multiple electronic control unit flashing tasks to the corresponding slave electronic control units according to the optimal flashing task allocation plan. After receiving the electronic control unit flashing tasks, the slave electronic control units execute the electronic control unit flashing tasks.

[0065] Traditional technologies do not consider time window constraints and additional cost factors when allocating tasks, which may cause conflicts in task execution time and lead to resource competition conflicts between electronic control units, affecting system stability and flashing efficiency.

[0066] In the above-mentioned electronic control unit flashing method, by introducing the time window model, it is possible to ensure that the task is executed within a specific time window, effectively avoid resource competition conflicts between multiple slave electronic control units, ensure stable operation of the system, and improve the efficiency of task allocation. At the same time, by introducing the allocation cost model, the economic efficiency of the task allocation strategy is achieved, ensuring the cost-effectiveness of resource use. By combining the time window model and the allocation cost model to create a mixed integer linear programming model, it is possible to simultaneously optimize the task execution time and the allocation cost, and obtain a flashing task allocation scheme that minimizes the task execution time and the allocation cost, thereby achieving a reasonable allocation of tasks, so that the task allocation takes into account both efficiency and cost, thereby improving the collaborative flashing efficiency and system stability of multiple slave electronic control units, and reducing the flashing cost of electronic control units.

[0067] In an exemplary embodiment, Figure 2 As shown, before determining the optimal flashing task allocation scheme corresponding to the flashing tasks of multiple electronic control units according to the pre-built mixed integer linear programming model, the above method also includes: a time window model construction step, which includes:

[0068] Step 202 : determining the earliest execution time and the latest execution time of the flashing task of each electronic control unit according to the attribute data and the current load of each slave electronic control unit.

[0069] Step 204 , determining the time window model corresponding to each electronic control unit flashing task according to the decision variables and execution duration of each electronic control unit flashing task, as well as the earliest execution time and the latest execution time of each electronic control unit flashing task.

[0070] Optionally, according to the attribute data and current load of each slave electronic control unit, the earliest execution time and the latest execution time of each electronic control unit flashing task are determined, and the earliest execution time and the latest execution time are used as the time window corresponding to each electronic control unit flashing task. By setting the time window, it can be ensured that the task is executed within a specific time range to avoid resource conflicts or system interruptions caused by inappropriate task execution time. Obtain the decision variables and execution duration of each electronic control unit flashing task, the attribute data and the current load of multiple slave electronic control units. Among them, the decision variable refers to the binary decision variable of each electronic control unit flashing task, indicating whether each electronic control unit flashing task is assigned to each slave electronic control unit. The attribute data refers to the processing capacity of the slave electronic control unit.

[0071] According to the decision variables and execution time of each electronic control unit flashing task, as well as the earliest execution time and the latest execution time of each electronic control unit flashing task, the time window model corresponding to each electronic control unit flashing task is determined. The time window model is as follows:

[0072] For each electronic control unit flashing task t, define the earliest execution time E t and the latest execution time L t , ensure that each electronic control unit flashing task is executed within the time window:

[0073]

[0074] Where n represents the nth slave electronic control unit, i.e., ECU(n); N represents the number of slave electronic control units; and m represents the number of electronic control unit flashing tasks. ; represents a binary decision variable (if the electronic control unit flash task t is assigned to ECU(n), then Equal to 1, otherwise =0); T t represents the execution time of the electronic control unit flashing task t; C n Indicates the processing capability of ECU(n); L n Indicates the current load of ECU(n); the earliest execution time E t and the latest execution time L t are the constraints of the time window model.

[0075] In this embodiment, by defining the earliest execution time and the latest execution time of the task, it is possible to ensure that the task is executed within a specific time range, avoid resource conflicts or system interruptions caused by inappropriate task execution time, and improve system stability and the orderliness of task execution. By constructing a time function model through the decision variables and execution duration of each electronic control unit flashing task, the attribute data of multiple slave electronic control units, and the current load, a time window model can be created according to the actual processing situation of the task and the actual processing capacity of the slave electronic control unit.

[0076] In an exemplary embodiment, Figure 3 As shown, before determining the optimal flashing task allocation scheme corresponding to the flashing tasks of multiple electronic control units according to the pre-built mixed integer linear programming model, the above method also includes: a step of constructing an allocation cost model, which includes:

[0077] Step 302: Obtain network transmission cost data and decision variables for each electronic control unit flashing task.

[0078] Step 304 : determining allocation cost models corresponding to the plurality of electronic control unit flashing tasks according to the network transmission cost data and decision variables of the plurality of electronic control unit flashing tasks.

[0079] Optionally, network transmission cost data and decision variables of each electronic control unit flashing task are obtained. The network transmission cost data may include but is not limited to network bandwidth consumption, energy consumption and maintenance cost. Based on the network transmission cost data and decision variables of each electronic control unit flashing task, a distribution cost model corresponding to multiple electronic control unit flashing tasks is constructed as shown below:

[0080]

[0081] in, represents the allocation cost model; Indicates the task allocation scheme; B t The network transmission cost data for the electronic control unit flash task t, is a binary decision variable, indicating whether the electronic control unit flashing task t is assigned to ECU(n).

[0082] In this embodiment, the allocation cost model takes into account additional expenses such as network transmission, energy consumption and maintenance costs, ensuring that task allocation not only pursues efficiency but also takes economy into consideration, thereby achieving economical and efficient task allocation and maximization of resource utilization.

[0083] In an exemplary embodiment, Figure 4As shown, before determining the optimal flashing task allocation scheme corresponding to the flashing tasks of multiple electronic control units according to the pre-constructed mixed integer linear programming model, the method further includes: a step of determining the objective function of the mixed integer linear programming model, which step includes:

[0084] Step 402 : determining the total task execution duration corresponding to the multiple electronic control unit flashing tasks according to the time window model corresponding to each electronic control unit flashing task and the number of the multiple electronic control unit flashing tasks.

[0085] Step 404 , determining the objective function of the mixed integer linear programming model according to the total task execution time and the allocation cost model.

[0086] Optionally, in this embodiment, an improved mixed integer linear programming model is constructed in combination with the time window model and the cost function model to obtain the optimal flushing task allocation scheme with the minimum total task execution time and allocation cost. Specifically, according to the time window model corresponding to each electronic control unit flushing task and the number of multiple electronic control unit flushing tasks, the sum of the execution time of each slave electronic control unit to complete the corresponding electronic control unit flushing task is determined, that is, the total task execution time corresponding to multiple electronic control unit flushing tasks, and the sum of the total task execution time and the allocation cost model is determined as the objective function of the mixed integer linear programming model. According to the time window of the time window model, the range of the electronic control unit flushing tasks, the range of the slave electronic control units, and the values ​​of the decision variables of each electronic control unit flushing task, the constraints of the mixed integer linear programming model are determined. The mixed integer linear programming model is shown as follows:

[0087]

[0088] The mixed integer linear programming model satisfies the following constraints:

[0089]

[0090] Where z represents the objective function of the mixed integer linear programming model; Indicates the total task execution time corresponding to multiple electronic control unit flashing tasks.

[0091] In this embodiment, the time window model and the allocation cost model are combined to determine the objective function of the mixed integer linear programming model, which can minimize the total task execution time and the allocation cost, so that task allocation not only pursues efficiency, but also takes into account economy, and maximizes the cost-effectiveness of resource utilization, so as to obtain the optimal task allocation plan and ensure the high efficiency of multi-ECU collaborative flashing and the optimal configuration of resources.

[0092] In an exemplary embodiment, based on a pre-constructed mixed integer linear programming model, an optimal flashing task allocation scheme corresponding to multiple electronic control unit flashing tasks is determined, including: inputting multiple electronic control unit flashing tasks into the pre-constructed mixed integer linear programming model; solving the mixed integer linear programming model by branch and bound method to obtain the optimal flashing task allocation scheme corresponding to the multiple electronic control unit flashing tasks.

[0093] Optionally, the problem of the mixed integer linear programming model is solved by the branch and bound method, and the global optimal solution is found by gradually decomposing the problem and exploring the solution space. The global optimal solution is the optimal flashing task allocation plan with the minimum total task execution time and allocation cost corresponding to the flashing tasks of multiple electronic control units.

[0094] Optionally, the mixed integer linear programming model can also be solved by using cutting plane method, heuristic algorithm and other algorithms.

[0095] In this embodiment, the mixed integer linear programming model is solved by the branch and bound method, which can systematically search the solution space and avoid missing the optimal solution. Pruning technology can also be used to reduce unnecessary searches and improve search efficiency. At the same time, intelligent decision-making is achieved, and the accuracy and efficiency of task allocation are improved.

[0096] In an exemplary embodiment, Figure 5 As shown, according to the optimal flashing task allocation scheme, each electronic control unit flashing task is sent to the corresponding slave electronic control unit, including:

[0097] Step 502, generating task instructions corresponding to each slave electronic control unit according to the optimal flashing task allocation scheme; the task instructions include the electronic control unit flashing tasks corresponding to each slave electronic control unit, and the earliest execution time and the latest execution time of the electronic control unit flashing tasks corresponding to each slave electronic control unit.

[0098] Step 504 , encapsulate the task instructions corresponding to each slave electronic control unit to obtain a plurality of encapsulated task instructions, and respectively send the plurality of encapsulated task instructions to the corresponding slave electronic control units.

[0099] Step 506 : when a task confirmation signal sent by each slave electronic control unit is received and the task confirmation signal is a preset value, it is determined that each slave electronic control unit has received a corresponding task instruction.

[0100] Optionally, after generating the optimal flashing task allocation plan, the master electronic control unit sends the optimal flashing task allocation plan to the task issuing module, and the optimal flashing task allocation plan is accurately conveyed to each slave electronic control unit through the task issuing module. After receiving the optimal task allocation plan from the task allocation module, the task issuing module generates task instructions corresponding to each slave electronic control unit, and sends the task instructions to the corresponding slave electronic control unit, ensuring that each slave electronic control unit can execute the electronic control unit flashing task assigned to it according to the predetermined time window and sequence.

[0101] For each slave electronic control unit, the task instruction generated by the task issuing module can be expressed as:

[0102]

[0103] Among them, E t and L t They respectively represent the earliest execution time and the latest execution time of the electronic control unit flashing task t, that is, the time window.

[0104] Optionally, the task instruction may also include the execution order of the electronic control unit flashing task.

[0105] The task issuing module may also encapsulate the task instructions corresponding to each slave electronic control unit to obtain a plurality of encapsulated task instructions, and issue the plurality of encapsulated task instructions to the corresponding slave electronic control units respectively.

[0106] Optionally, multiple packaged task instructions can be sent to corresponding slave electronic control units respectively through protocols such as TLS (Transport Layer Security) and SFTP (File Transfer Protocol).

[0107] After receiving the task instruction from the electronic control unit, a task confirmation signal is sent To the master electronic control unit, when the task issuing module receives the task confirmation signal sent by each slave electronic control unit, and the task confirmation signal is a preset value, it is determined that each slave electronic control unit has received the corresponding task instruction. For example, the preset value is 1. The task confirmation signal can be expressed as:

[0108]

[0109] If the master electronic control unit does not receive the task confirmation signal from the slave electronic control unit, or the task confirmation signal is zero, the task issuing module needs to resend the task instruction to the slave electronic control unit until the task confirmation signal is 1.

[0110] After the slave ECU has completed all the ECU flashing tasks assigned to it, it will send execution result feedback to the master ECU, including the execution status, completion time, problems encountered, etc. of each ECU flashing task. The execution result feedback can be expressed as:

[0111]

[0112] Among them, S t Indicates the execution status (success or failure) of the electronic control unit flash task t, T t ' represents the actual completion time of the electronic control unit flashing task t, P t Indicates the problems encountered during the execution of the electronic control unit flashing task t.

[0113] In this embodiment, by implementing a rigorous task instruction encapsulation and confirmation mechanism for the task instructions corresponding to each slave electronic control unit, the correct transmission and reception feedback of the task instructions are guaranteed, a closed-loop control is formed, and the reliability and controllability of the flashing process are enhanced. At the same time, after the slave electronic control unit has executed all the electronic control unit flashing tasks assigned to it, it sends the execution result feedback to the master electronic control unit, and the master electronic control unit can receive and respond to the flashing abnormality in a timely manner, which solves the problem in the traditional technology that when an abnormality occurs during the flashing process, such as a communication failure or an ECU failure, the existing system may not be able to detect and respond in time, resulting in a flashing failure or system shutdown.

[0114] In an exemplary embodiment, Figure 6 As shown, the above method also includes: a step of dynamically adjusting the optimal flushing task allocation scheme, which includes:

[0115] Step 602 : monitoring task execution status data of a plurality of slave electronic control units.

[0116] Step 604: dynamically adjust the optimal flushing task allocation plan according to the task execution status data to obtain an adjusted task allocation plan.

[0117] Step 606, updating the adjusted task allocation scheme to the optimal flashing task allocation scheme, and returning to the step of sending each flashing task to the corresponding slave electronic control unit according to the optimal flashing task allocation scheme, until the flashing tasks of multiple electronic control units are completed.

[0118] The task execution status data includes the current load and processing capacity of the electronic control unit.

[0119] Optionally, the master electronic control unit can call a dynamic resource scheduling module, and dynamically adjust the optimal flashing task allocation plan according to the task execution status data through the dynamic resource scheduling module to obtain an adjusted task allocation plan to optimize the task allocation between the slave electronic control units in real time. The adjusted task allocation plan is updated to the optimal flashing task allocation plan, and the step of sending each flashing task to the corresponding slave electronic control unit according to the optimal flashing task allocation plan is returned to continue sending tasks until the flashing tasks of multiple electronic control units are completed.

[0120] In an optional manner of the above embodiment, step 604, dynamically adjusting the optimal flushing task allocation scheme according to the task execution status data to obtain the adjusted task allocation scheme, includes: inputting the task execution status data into a pre-built dynamic resource adjustment model, and dynamically adjusting the optimal flushing task allocation scheme according to solving the dynamic resource adjustment model through a genetic algorithm to obtain the adjusted task allocation scheme. Among them, the objective function of the dynamic resource adjustment model includes the total execution time of multiple electronic control unit flushing tasks on their respective assigned slave electronic control units, the total network transmission cost of multiple electronic control unit flushing tasks, and the task execution time balance data between multiple slave electronic control units; the constraints of the dynamic resource adjustment model include task allocation constraints, load constraints of slave electronic control units, and time window constraints.

[0121] The total execution time of multiple electronic control unit flashing tasks on their assigned slave electronic control units refers to the total task execution time. Task execution time balancing data refers to ensuring that all tasks are completed as simultaneously as possible or within a reasonable time frame through dynamic resource scheduling. The purpose of balancing is to reduce the task completion time of the entire system (also known as smoothing or minimizing the maximum completion time), thereby improving resource utilization and the overall efficiency of the system.

[0122] Optionally, the dynamic resource scheduling module can optimize the task allocation among the slave electronic control units in real time to minimize the total task completion time, that is, minimize the total task execution time, ensure system stability, and balance the load among the slave electronic control units. Taking into account factors such as the task execution status data of the slave electronic control unit, the execution time of the task, and the network transmission cost data, the goal is to minimize the total task completion time and the total network transmission cost. At the same time, the time window and the current load of the slave electronic control unit are considered to obtain a dynamic resource adjustment model.

[0123] The objective function of the dynamic resource adjustment model can be expressed as:

[0124]

[0125] in, Indicates the total execution time of multiple electronic control unit flashing tasks on their respective assigned slave electronic control units; Represents the total network transmission cost of multiple electronic control unit flashing tasks; represents the task execution time balance data between multiple slave electronic control units; λ and γ are regularization coefficients, which control the importance of the total network transmission cost and the task execution time balance data respectively. Indicates the expected average task execution time.

[0126] The objective function satisfies the following constraints:

[0127] Task allocation constraints: Each task can only be assigned to one slave ECU, and each slave ECU can take on multiple tasks:

[0128]

[0129] ECU load limit constraint: used to ensure that the tasks assigned to the slave ECU do not exceed its processing capabilities, taking into account the current load:

[0130]

[0131] Time window constraints:

[0132]

[0133] The task execution status data is input into a pre-built dynamic resource adjustment model, and the optimal flushing task allocation plan is dynamically adjusted according to the solution of the dynamic resource adjustment model through a genetic algorithm to obtain an adjusted task allocation plan.

[0134] In this embodiment, the dynamic resource scheduling module dynamically adjusts the task allocation by real-time monitoring the task execution status data and network conditions of the slave electronic control unit, that is, the network transmission cost, to optimize the performance of the entire system, ensure the minimization of the total execution time, the total network transmission cost and the load balance between the slave electronic control units, and achieve efficient and stable completion of the flashing task. By considering the load balance between the slave electronic control units, the optimal allocation of resources is achieved, resource waste is avoided, the utilization rate of the slave electronic control units is improved, the overall cost is reduced, and the phenomenon that some slave electronic control units are overloaded while other slave electronic control unit resources are idle is avoided, resulting in overall resource waste. In addition, the introduction of genetic algorithms to solve the dynamic resource adjustment model can continuously optimize the task allocation plan and adapt to the dynamic changes in the network status of the slave electronic control units, showing extremely high adaptability and optimization potential.

[0135] In the above options, if Figure 7As shown, the dynamic resource adjustment model is solved by a genetic algorithm to dynamically adjust the optimal flushing task allocation plan, and the adjusted task allocation plan is obtained, including:

[0136] Step 702, obtaining multiple initialization task allocation schemes corresponding to multiple electronic control unit flashing tasks, encoding each initialization task allocation scheme into a chromosome, and obtaining an initialization population.

[0137] Step 704: Determine the fitness function value of each chromosome according to the objective function of the dynamic resource adjustment model.

[0138] Step 706, iteratively perform the genetic evolution operation according to the fitness function values ​​of the multiple chromosomes until the iteration stop condition is met, obtain the target chromosome, and determine the target chromosome as the adjusted task allocation solution.

[0139] Optionally, the process of solving the dynamic resource adjustment model by genetic algorithm is as follows:

[0140] 1) Initialize the population: Assume that the initial population size is P. Each individual (chromosome) represents an initialization task allocation scheme, which can be expressed as:

[0141]

[0142] Among them, i=1,2,…,P represents the i-th individual, Represents chromosomes, Indicates that the electronic control unit flashing task t is assigned to ECU(n) in the i-th scheme, otherwise .

[0143] 2) Calculate the fitness function value: Fitness function It is used to evaluate the quality of each individual and is directly related to the objective function Z of the dynamic resource adjustment model. The inverse of the objective function Z is taken to ensure that the higher the fitness function value, the smaller the target value. The form is:

[0144]

[0145] Here, ϵ is a very small positive number used to avoid division by zero.

[0146] The genetic evolution operation is iteratively performed according to the fitness function values ​​of the multiple chromosomes until the iteration stop condition is met to obtain the target chromosome, and the target chromosome is determined as the adjusted task allocation scheme. The genetic evolution operation includes the selection operation, crossover operation and mutation operation of the chromosome.

[0147] 3) Selection operation: Roulette selection is used. The probability of an individual being selected is proportional to the value of its fitness function. The probability distribution of the commonly used roulette selection method is for:

[0148]

[0149] in, It represents the sum of the fitness function values ​​of all individuals in the population. Its function is to normalize the probability and ensure that the sum of the probabilities of all individuals being selected is 1.

[0150] Select two individuals through the selection operation and , as parent individuals.

[0151] 4) Crossover Operation

[0152] Parent individuals and To perform crossover, the single-point crossover operation can be expressed as:

[0153]

[0154] in, and Represent two offspring individuals, and Respectively represent the gene loci in the offspring individuals; and Represent the gene loci of the two parent individuals respectively; c is the crossover point randomly selected in the crossover operation to determine and The intersection of the inheritance rules of gene loci, that is, determining which gene loci are inherited from the parent Inheritance, which gene loci are passed down from the parent Inheritance; r is the result of random number generation to determine how a gene locus is passed from one parent to offspring.

[0155] 5) Mutation Operation

[0156] By introducing random changes, we break the limitations of the existing population and randomly select individuals from the current population to participate in the mutation operation, ensuring that a portion of individuals have the opportunity to mutate in each iteration. For each selected mutant individual, we randomly select one or more gene loci for mutation to obtain the mutation loci. The gene loci correspond to the elements in the task allocation matrix, that is, For each selected variant site, invert the corresponding binary decision variable. If the original decision variable =1 (the electronic control unit flashing task t is assigned to ECU(n)), after mutation, it becomes =0 (the electronic control unit flashing task t is not assigned to ECU(n)). This operation randomly changes the allocation status of some tasks, bringing new combination possibilities to the population.

[0157] 6) Update the population: The newly generated offspring individuals and the individuals that have undergone mutation operations together form a new generation of population. Iterate until the iteration stop condition is met, obtain the target chromosome, and determine the target chromosome as the adjusted task allocation plan. The iteration stop condition can be reaching the maximum number of generations or finding an individual that is close enough to the optimal solution.

[0158] In this embodiment, a genetic algorithm is used to solve the dynamic resource scheduling problem. Through the iterative selection, exchange, and change process, natural selection and evolution are simulated, and the optimal task allocation plan is gradually approached to improve the flashing efficiency and resource utilization efficiency. Overall, by comprehensively considering the time window model, the allocation cost model, and the dynamic resource adaptive adjustment, a set of systematic and forward-looking solutions is provided for the collaborative flashing of multiple electronic control units, which effectively solves the problems of unreasonable resource allocation, low efficiency, and system instability in the traditional flashing mode, and promotes the modernization of automotive electronic system maintenance and upgrade technology. In practical applications, it can significantly improve the efficiency and quality of automobile manufacturing and services, reduce costs and time losses, and provide solid technical support for the digital transformation and intelligent upgrade of the automotive industry.

[0159] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0160] Based on the same inventive concept, the embodiment of the present application also provides an electronic control unit flashing system for implementing the electronic control unit flashing method involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more electronic control unit flashing system embodiments provided below can refer to the limitations of the electronic control unit flashing method above, and will not be repeated here.

[0161] In an exemplary embodiment, Figure 8As shown, an electronic control unit flashing system is provided, including: a master electronic control unit 802, a task allocation module 804, a task issuing module 806, a slave electronic control unit 808 and a dynamic resource scheduling module 810, wherein:

[0162] The main electronic control unit 802 is used to obtain multiple electronic control unit flashing tasks and send the multiple electronic control unit flashing tasks to the task allocation module.

[0163] The task allocation module 804 is used to determine the optimal flash task allocation scheme corresponding to multiple electronic control unit flash tasks based on a pre-constructed mixed integer linear programming model; wherein the objective function of the mixed integer linear programming model includes an allocation cost model corresponding to multiple electronic control unit flash tasks and a time window model corresponding to each electronic control unit flash task, and the allocation cost model includes network transmission cost data; the constraints of the mixed integer linear programming model include the constraints of the time window model, and the constraints of the time window model include the earliest execution time and the latest execution time of each electronic control unit flash task.

[0164] The main electronic control unit 802 is further used to receive the optimal flashing task allocation plan sent by the task allocation module, and send the optimal flashing task allocation plan to the task issuing module.

[0165] The task issuing module 806 is used to allocate the flashing task of each electronic control unit to the corresponding slave electronic control unit according to the optimal flashing task allocation plan.

[0166] The slave electronic control unit 808 is used to execute the corresponding electronic control unit flashing task.

[0167] The dynamic resource scheduling module 810 is used to monitor the task execution status data of multiple slave electronic control units; dynamically adjust the optimal flushing task allocation plan according to the task execution status data to obtain an adjusted task allocation plan; update the adjusted task allocation plan to the optimal flushing task allocation plan, and return to the step of sending each flushing task to the corresponding slave electronic control unit according to the optimal flushing task allocation plan until the flushing tasks of multiple electronic control units are completed.

[0168] In an exemplary embodiment, the master electronic control unit 802 is further used to determine the earliest execution time and the latest execution time of each electronic control unit flashing task according to the attribute data and current load of each slave electronic control unit; determine the time window model corresponding to each electronic control unit flashing task according to the decision variables and execution duration of each electronic control unit flashing task, and the earliest execution time and the latest execution time of each electronic control unit flashing task;

[0169] The time window model is as follows:

[0170]

[0171] Wherein, n represents the nth slave electronic control unit; N represents the number of slave electronic control units; m represents the number of electronic control unit flashing tasks; is a binary decision variable, indicating whether the electronic control unit flashing task t is assigned to the nth slave electronic control unit; T t represents the execution time of the electronic control unit flashing task t; C n Indicates the processing capability of the nth slave electronic control unit; L n Indicates the current load of the nth slave electronic control unit; E t and L t They respectively represent the earliest execution time and the latest execution time of the electronic control unit flashing task t.

[0172] In an exemplary embodiment, the main electronic control unit 802 is further used to obtain network transmission cost data and decision variables of each electronic control unit flashing task; determine the allocation cost model corresponding to the multiple electronic control unit flashing tasks according to the network transmission cost data and decision variables of the multiple electronic control unit flashing tasks;

[0173] The allocation cost model is as follows:

[0174]

[0175] in, represents the allocation cost model; Indicates the task allocation scheme; B t Represents the network transmission cost data of the electronic control unit flashing task t, is a binary decision variable, indicating whether the electronic control unit flashing task t is assigned to the nth slave electronic control unit.

[0176] In an exemplary embodiment, the main electronic control unit 802 is also used to determine the total task execution time corresponding to multiple electronic control unit flashing tasks based on the time window model corresponding to each electronic control unit flashing task and the number of multiple electronic control unit flashing tasks; and determine the objective function of the mixed integer linear programming model based on the total task execution time and the allocation cost model.

[0177] In an exemplary embodiment, the task allocation module 804 is also used to input multiple electronic control unit flashing tasks into a pre-built mixed integer linear programming model; the mixed integer linear programming model is solved by a branch and bound method to obtain an optimal flashing task allocation plan with the minimum total task execution time and task allocation cost.

[0178] In an exemplary embodiment, the task issuing module 806 is also used to generate task instructions corresponding to each slave electronic control unit according to the optimal flashing task allocation scheme; the task instructions include the electronic control unit flashing tasks corresponding to each slave electronic control unit, and the earliest execution time and the latest execution time of the electronic control unit flashing tasks corresponding to each slave electronic control unit; the task instructions corresponding to each slave electronic control unit are packaged to obtain a plurality of packaged task instructions, and the plurality of packaged task instructions are respectively issued to the corresponding slave electronic control units; when a task confirmation signal sent by each slave electronic control unit is received, and the task confirmation signal is a preset value, it is determined that each slave electronic control unit has received the corresponding task instruction.

[0179] In an exemplary embodiment, the dynamic resource scheduling module 810 is also used to input the task execution status data into a pre-built dynamic resource adjustment model, and dynamically adjust the optimal flushing task allocation plan according to solving the dynamic resource adjustment model through a genetic algorithm to obtain an adjusted task allocation plan; wherein, the objective function of the dynamic resource adjustment model includes the total execution time of multiple electronic control unit flushing tasks on their respective assigned slave electronic control units, the total network transmission cost of multiple electronic control unit flushing tasks, and the task execution time balance data between multiple slave electronic control units; the constraints of the dynamic resource adjustment model include task allocation constraints, load constraints of slave electronic control units, and time window constraints.

[0180] In an exemplary embodiment, the dynamic resource scheduling module 810 is also used to obtain multiple initialization task allocation schemes corresponding to multiple electronic control unit flashing tasks, encode each initialization task allocation scheme into a chromosome, and obtain an initialization population; determine the fitness function value of each chromosome according to the objective function of the dynamic resource adjustment model; iteratively perform genetic evolution operations according to the fitness function values ​​of multiple chromosomes until the iteration stop condition is met to obtain the target chromosome, and determine the target chromosome as the adjusted task allocation scheme.

[0181] Each module in the above-mentioned electronic control unit flashing system can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0182] In an exemplary embodiment, a computer device is provided, the internal structure of which can be shown as follows: Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as mixed integer linear programming models. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for flashing an electronic control unit is implemented.

[0183] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0184] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0185] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0186] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0187] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0188] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0189] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0190] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A flashing method for an electronic control unit, characterized in that: The method comprises: According to a pre-constructed mixed integer linear programming model, an optimal flashing task allocation scheme corresponding to multiple electronic control unit flashing tasks is determined; wherein the objective function of the mixed integer linear programming model includes an allocation cost model corresponding to multiple electronic control unit flashing tasks and a time window model corresponding to each electronic control unit flashing task, and the allocation cost model includes network transmission cost data; the constraints of the mixed integer linear programming model include the constraints of the time window model, and the constraints of the time window model include the earliest execution time and the latest execution time of each electronic control unit flashing task; The flashing task of each electronic control unit is sent to the corresponding slave electronic control unit according to the optimal flashing task allocation scheme, so that each slave electronic control unit executes the corresponding electronic control unit flashing task.

2. The method according to claim 1, characterized in that Before determining the optimal flashing task allocation scheme corresponding to the flashing tasks of the plurality of electronic control units according to the pre-built mixed integer linear programming model, the method further comprises: Determine the earliest execution time and the latest execution time of each electronic control unit flashing task according to the attribute data and current load of each slave electronic control unit; Determine the time window model corresponding to each electronic control unit flashing task according to the decision variables and execution duration of each electronic control unit flashing task, as well as the earliest execution time and the latest execution time of each electronic control unit flashing task; The time window model is as follows: Wherein, n represents the nth slave electronic control unit; N represents the number of slave electronic control units; m represents the number of electronic control unit flashing tasks; is a binary decision variable, representing the electronic control unit flashing task Is it assigned to the nth slave electronic control unit? t represents the execution time of the electronic control unit flashing task t; C n Indicates the processing capability of the nth slave electronic control unit; L n Indicates the current load of the nth slave electronic control unit; E t and L t They respectively represent the earliest execution time and the latest execution time of the electronic control unit flashing task t.

3. The method according to claim 1, characterized in that Before determining the optimal flashing task allocation scheme corresponding to the flashing tasks of the plurality of electronic control units according to the pre-built mixed integer linear programming model, the method further comprises: Obtain network transmission cost data and decision variables for each electronic control unit flashing task; Determine a distribution cost model corresponding to the multiple electronic control unit flashing tasks according to the network transmission cost data and decision variables of the multiple electronic control unit flashing tasks; The allocation cost model is as follows: in, represents the allocation cost model; Indicates the task allocation scheme; B t Represents the network transmission cost data of the electronic control unit flashing task t, is a binary decision variable, representing the electronic control unit flashing task Whether to assign to the nth slave ECU.

4. The method according to claim 1, characterized in that: Before determining the optimal flashing task allocation scheme corresponding to the flashing tasks of the plurality of electronic control units according to the pre-built mixed integer linear programming model, the method further comprises: Determine the total task execution time corresponding to the multiple electronic control unit flashing tasks according to the time window model corresponding to each electronic control unit flashing task and the number of the multiple electronic control unit flashing tasks; The objective function of the mixed integer linear programming model is determined according to the total task execution time and the allocation cost model.

5. The method according to claim 1, characterized in that The method of determining an optimal flashing task allocation scheme corresponding to a plurality of electronic control unit flashing tasks according to a pre-built mixed integer linear programming model includes: Input multiple electronic control unit flashing tasks into a pre-built mixed integer linear programming model; The mixed integer linear programming model is solved by a branch-and-bound method to obtain an optimal flushing task allocation scheme with the minimum total task execution time and task allocation cost.

6. The method according to claim 1, characterized in that The step of sending the flashing task of each electronic control unit to the corresponding slave electronic control unit according to the optimal flashing task allocation scheme includes: Generate task instructions corresponding to each slave electronic control unit according to the optimal flashing task allocation scheme; the task instructions include the electronic control unit flashing tasks corresponding to each slave electronic control unit, and the earliest execution time and the latest execution time of the electronic control unit flashing tasks corresponding to each slave electronic control unit; Encapsulating the task instructions corresponding to each slave electronic control unit to obtain a plurality of encapsulated task instructions, and respectively sending the plurality of encapsulated task instructions to the corresponding slave electronic control units; When a task confirmation signal sent by each slave electronic control unit is received and the task confirmation signal is a preset value, it is determined that each slave electronic control unit has received a corresponding task instruction.

7. The method according to claim 1, characterized in that The method further comprises: monitoring task execution status data of a plurality of slave electronic control units; Dynamically adjusting the optimal flushing task allocation scheme according to the task execution status data to obtain an adjusted task allocation scheme; The adjusted task allocation scheme is updated to the optimal flashing task allocation scheme, and the step of sending each flashing task to the corresponding slave electronic control unit according to the optimal flashing task allocation scheme is returned to until the flashing tasks of multiple electronic control units are completed.

8. The method according to claim 7, characterized in that The dynamically adjusting the optimal flushing task allocation scheme according to the task execution status data to obtain an adjusted task allocation scheme includes: Inputting the task execution status data into a pre-built dynamic resource adjustment model, and solving the dynamic resource adjustment model through a genetic algorithm to dynamically adjust the optimal flushing task allocation plan to obtain an adjusted task allocation plan; Among them, the objective function of the dynamic resource adjustment model includes the total execution time of multiple electronic control unit flashing tasks on their respective assigned slave electronic control units, the total network transmission cost of multiple electronic control unit flashing tasks, and the task execution time balancing data among multiple slave electronic control units; the constraints of the dynamic resource adjustment model include task allocation constraints, load constraints of slave electronic control units and time window constraints.

9. The method according to claim 8, characterized in that The method of solving the dynamic resource adjustment model by using a genetic algorithm to dynamically adjust the optimal flushing task allocation scheme to obtain an adjusted task allocation scheme includes: Acquire multiple initialization task allocation schemes corresponding to multiple electronic control unit flashing tasks, encode each initialization task allocation scheme into a chromosome, and obtain an initialization population; Determining the fitness function value of each chromosome according to the objective function of the dynamic resource adjustment model; The genetic evolution operation is iteratively performed according to the fitness function values ​​of the plurality of chromosomes until an iteration stop condition is satisfied, thereby obtaining a target chromosome, and determining the target chromosome as the adjusted task allocation scheme.

10. An electronic control unit flashing system, characterized in that: The system comprises: A main electronic control unit is used to obtain multiple electronic control unit flashing tasks and send the multiple electronic control unit flashing tasks to a task allocation module; A task allocation module, used to determine the optimal flashing task allocation scheme corresponding to multiple electronic control unit flashing tasks according to a pre-constructed mixed integer linear programming model; wherein the objective function of the mixed integer linear programming model includes an allocation cost model corresponding to multiple electronic control unit flashing tasks and a time window model corresponding to each electronic control unit flashing task, and the allocation cost model includes network transmission cost data; the constraints of the mixed integer linear programming model include the constraints of the time window model, and the constraints of the time window model include the earliest execution time and the latest execution time of each electronic control unit flashing task; The main electronic control unit is further used to receive the optimal flashing task allocation plan sent by the task allocation module, and send the optimal flashing task allocation plan to the task issuing module; A task issuing module, used for allocating the flashing task of each electronic control unit to the corresponding slave electronic control unit according to the optimal flashing task allocation scheme; The slave electronic control unit is used to execute the corresponding electronic control unit flashing task.

Citation Information

Patent Citations

  • Finite-time parallel task scheduling method and device

    CN110780985A

  • Multi-aircraft task scheduling method based on mixed integer programming

    CN115328638A

  • ECU updating method and device

    CN116527501A

  • Multi-satellite cooperative satellite task scheduling method, system and device based on data driving

    CN116596269A

  • Multiprocessor scheduling policy

    US20140351819A1