ECU (Electronic Control Unit) set parallel flashing method and related equipment
By querying the ECU's flashing reception capability and performing cross-flashing, the problem of low ECU flashing efficiency was solved, enabling parallel flashing of an ECU set and improving the overall flashing speed.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-03-10
AI Technical Summary
The current ECU flashing efficiency is low, especially due to the hardware limitations of the CAN transceiver, which prevents the overall vehicle ECU flashing speed from being effectively improved.
By querying the flashing reception capability of each ECU to be flashed by the flashing master node, the minimum time interval between consecutive frames is obtained. Based on this information, the ECU set is organized and cross-flashed, so as to realize the parallel flashing of the ECUs to be flashed in the ECU set.
It significantly improves ECU flashing efficiency and shortens flashing time by maximizing the use of bus bandwidth.
Smart Images

Figure CN121635933A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method and related equipment for parallel flashing of an ECU collection. Background Technology
[0002] The ECU (Electronic Control Unit) flashing function is used in the vehicle research and development, prototyping, production, and after-sales stages, and is the only way to upgrade the ECU after it is installed in the vehicle. Among them, the ECU upgrade process based on CAN bus widely follows the flash process specified in ISO-14229 standard, and the network layer follows the 15765-2 protocol.
[0003] The flashing protocol only standardizes the ECU flashing request and response format, multi-frame processing method, and request command sequence order. The main factors affecting flashing speed are the CAN bus communication bandwidth and the ECU's receiving and processing capabilities. CAN communication bandwidth is limited by the CAN transceiver hardware. Using a CAN-FD transceiver can improve bandwidth by 2-10 times, but currently, 50% of vehicle ECUs still use mature CAN transceiver communication. Therefore, the flashing efficiency of existing ECUs still needs improvement. Summary of the Invention
[0004] The main objective of this invention is to propose a method and related equipment for parallel flashing of ECUs, in order to solve at least one problem in the prior art.
[0005] To achieve the above objectives, one aspect of this invention proposes a method for parallel flashing of an ECU collection, the method comprising the following steps: By sequentially querying the flashing reception capability of the ECUs to be flashed through the flashing master node, the minimum time interval between consecutive frames for each ECU to be flashed is obtained. The minimum consecutive frame interval of all ECUs to be flashed is determined, and the ECU set is obtained based on the determination results; Based on the minimum time interval between consecutive frames, the ECUs to be flashed in the ECU set are cross-written to achieve parallel writing of the ECUs to be flashed in the ECU set.
[0006] In some embodiments, the flashing receiving capability of the ECU to be flashed is queried sequentially by the flashing master node, including the following steps: Based on the physical address of each ECU to be flashed, the flashing master node sequentially queries the flashing reception capability of each ECU via the CAN bus.
[0007] In some embodiments, the flashing master node sequentially queries the flashing reception capability of each ECU to be flashed via the CAN bus, including the following steps: By using the request-response service based on the unified diagnostic service on the master control node, a request signal is sent sequentially to each ECU to be flashed via the CAN bus to obtain response data from each ECU regarding its flashing and receiving capabilities.
[0008] In some embodiments, a request signal is sequentially sent to each ECU to be flashed via the CAN bus to obtain response data regarding the flashing and writing capability returned by each ECU, including the following steps: The CAN bus is used to send request signals to each ECU to be brushed in sequence; the request signal includes a target data identifier with the minimum time interval between related consecutive frames. The ECU to be flashed responds to the target data identifier and calls the corresponding minimum continuous frame interval to send the data back to the flashing master node via the CAN bus.
[0009] In some embodiments, the minimum consecutive frame interval time of all ECUs to be flashed is determined, and an ECU set is obtained based on the determination result, including the following steps: The ECU to be refreshed with the minimum time interval between consecutive frames being less than the target time threshold is marked as the first ECU, and the other ECUs to be refreshed are marked as the second ECU; The range exceeding the target time threshold is divided into multiple time intervals; each time interval is marked with a maximum number of writes, and the larger the time value corresponding to the time interval, the larger the maximum number of writes. The second ECU is associated with the corresponding time interval based on the minimum time interval between consecutive frames, thereby determining the number of associated ECUs in each time interval; When the number of associated ECUs exceeds the maximum number of flashable ECUs marked for the corresponding time interval, the second ECUs associated with the time interval are grouped to obtain ECU groups; wherein, the number of second ECUs contained in each ECU group is less than or equal to the maximum number of flashable ECUs. When the number of associated ECUs is less than or equal to the maximum number of writes marked in the corresponding time interval, the second ECU associated with the time interval is grouped as an ECU group. The ECU set is obtained by grouping and organizing all ECUs corresponding to each time interval.
[0010] In some embodiments, the method further includes the following steps: Each first ECU is flashed individually in sequence.
[0011] In some embodiments, the ECU set includes at least one ECU group, and the ECUs to be flashed in the ECU set are cross-flashed based on the minimum consecutive frame interval, including the following steps: The first ECU group in the ECU set is used as the target ECU group; Select the ECUs to be flashed from the target ECU group as the ECUs to be flashed; Based on the minimum consecutive frame interval time corresponding to each flashing ECU in the target ECU group, the flashing ECUs in the target ECU group are sorted by flashing order to obtain the flashing order. Based on the flashing order, the flashing ECUs in the target ECU group are cross-flashed, so that when one flashing ECU is processing the flashing data, other flashing ECUs can call the idle CAN bus to receive the flashing data. Once all ECUs in the target ECU group have been flashed, the next ECU group in the ECU set is taken as the target ECU group, and the process returns to the previous step of taking the ECUs to be flashed in the target ECU group as the flashing ECUs until all ECUs to be flashed in the ECU set have been flashed.
[0012] To achieve the above objectives, another aspect of the present invention provides an ECU aggregate parallel flashing device, comprising: The data query module is used to query the flashing reception capability of the ECU to be flashed sequentially through the flashing master control node, and obtain the minimum time of consecutive frame interval for each ECU to be flashed. The collection and organization module is used to determine the minimum consecutive frame interval of all ECUs to be flashed, and to organize the ECUs into a collection based on the determination results; The cross-writing module is used to perform cross-writing on the ECUs to be written in the ECU set based on the minimum time interval between consecutive frames, so as to realize the parallel writing of the ECUs to be written in the ECU set.
[0013] In some embodiments, the device further includes a separate writing module for performing the following operations: Each first ECU is flashed individually in sequence.
[0014] To achieve the above objectives, another aspect of the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described parallel flashing method for an ECU set.
[0015] To achieve the above objectives, another aspect of the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the above-described parallel flashing method for an ECU set.
[0016] This invention embodiment sequentially queries the flashing reception capability of the ECUs to be flashed by the flashing master node to obtain the minimum consecutive frame interval time for each ECU; it then determines the minimum consecutive frame interval time for all ECUs to be flashed, and organizes the results to obtain an ECU set; based on the minimum consecutive frame interval time, it performs cross-flashing on the ECUs to be flashed in the ECU set to achieve parallel flashing of the ECUs to be flashed in the ECU set. This invention embodiment can determine the request and response processing interval of each ECU based on the minimum consecutive frame interval time, and then through cross-flashing, it can realize the data transmission of other ECUs within the request and response processing interval of a single ECU, effectively improving bus bandwidth utilization and significantly improving flashing efficiency. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of an implementation environment for parallel flashing of an ECU collection provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating a parallel flashing method for an ECU collection provided in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating an application scenario of the parallel flashing method for an ECU collection provided in this embodiment of the invention. Figure 4 A schematic diagram illustrating a single request and response process of an ECU according to an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the principle and logic example of parallel flashing of an ECU set provided in an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0019] It should be noted that although functional modules are divided in the system diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100," "second / S200," etc., in the specification, claims, and the aforementioned figures are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0020] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0021] It is understood that the ECU cluster parallel flashing method provided in this embodiment of the invention can be applied to any computer device with data processing and computing capabilities (such as an in-vehicle terminal device or a vehicle-related control system), and this computer device can be various types of terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some embodiments, the terminal is a smartphone, tablet computer, laptop computer, or desktop computer, but it is not limited to these.
[0022] like Figure 1 The diagram shown is a schematic representation of an implementation environment provided by an embodiment of the invention. (Refer to...) Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.
[0023] Server 101 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0024] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.
[0025] Terminal 102 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc. It can also be a vehicle-mounted terminal of the various device types described above, but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment of the invention does not impose any limitations.
[0026] Exemplary based on Figure 1 The implementation environment shown in this embodiment of the invention provides a method for parallel flashing of an ECU collection. The following description uses the application of this method in server 101 as an example. It can be understood that this method can also be applied in terminal 102.
[0027] Reference Figure 2 , Figure 2 This is a flowchart illustrating a parallel flashing method for an ECU collection applied to a server, provided in an embodiment of the present invention. The execution entity of this parallel flashing method can be any of the aforementioned computer devices (including servers or terminals). (Refer to...) Figure 2 The method may include the following steps: S100: By sequentially querying the flashing reception capability of the ECU to be flashed through the flashing master control node, the minimum time interval between consecutive frames of each ECU to be flashed is obtained. It should be noted that in some embodiments, the process of sequentially querying the flashing reception capability of the ECU to be flashed by the flashing master node may include the following steps: based on the physical address of each ECU to be flashed, the flashing master node sequentially queries the flashing reception capability of each ECU to be flashed via the CAN bus.
[0028] For example, in some implementations, the flashing master node actively queries sequentially, employing a "master-slave" architecture. Throughout the flashing process, the flashing master node acts as the "commander," responsible for initiating and controlling all actions. It needs to query each target ECU in the network sequentially. Because the bus is a broadcast medium, but responses are specific to a particular ECU, querying one by one avoids response conflicts and makes the process clear and orderly. Physical addressing: The address broadcast to all ECUs. When flashing a specific ECU, physical addressing must be used to ensure that instructions are accurately sent to the target ECU, while other ECUs in the network ignore the message. This guarantees the accuracy and security of the operation, preventing accidental operation of other controllers.
[0029] It should be noted that in some embodiments, the process of querying the flashing reception capability of each ECU to be flashed sequentially via the CAN bus by the flashing master node may include the following steps: the flashing master node uses the request-response service based on the unified diagnostic service to send request signals to each ECU to be flashed sequentially via the CAN bus to obtain the response data about the flashing reception capability returned by each ECU to be flashed.
[0030] For example, in some implementations, diagnostic services are provided: this is standard practice following the UDS (Unified Diagnostic Services) protocol. UDS is a common "language" used for diagnostics and flashing in the automotive electronics field. For example, a service 22 can be used: ReadDataByIdentifier, which is a request-response service where the master node issues a request, and the ECU returns data corresponding to a specific identifier.
[0031] It should be noted that in some embodiments, the process of sending request signals to each ECU to be flashed sequentially via the CAN bus to obtain response data regarding the flashing and writing reception capability returned by each ECU to be flashed may include the following steps: sending request signals to each ECU to be flashed sequentially via the CAN bus; wherein, the request signal includes a target data identifier with a minimum consecutive frame interval associated with it; and the ECU to be flashed responding to the target data identifier by calling the corresponding minimum consecutive frame interval to be flashed back to the flashing master node via the CAN bus.
[0032] For example, in some implementations, DID (Data Identifier) is a number used in the 22 service to specify "what data you want to read". For example, F187 might represent "reading the vehicle VIN code", and F190 might represent "reading the system voltage", etc. The parameters related to "flash reception capability" (such as STmin) here are not standard DIDs mandated by UDS. Therefore, automakers or ECU suppliers will define a specific DID number, which is defined in their systems as "used to read the ECU's flow control parameters during a flash session". Logic: By using a custom DID, a "secret code" is established between the master node and the ECU. When the master node sends the 22 service's DID number as a request, the target ECU knows: "This is a request for flash data transmission capability", and then it prepares the corresponding data (STmin) and replies.
[0033] Specifically, the logic principle of the ECU feedback response STmin is as follows: STmin: Separation Time minimum. This is a key flow control parameter defined in ISO 15765-2 (CAN-based UDS transport layer protocol).
[0034] Meaning: It tells the sender (master node): "After sending one consecutive frame, you must wait at least STmin milliseconds before sending the next consecutive frame." Processing capability differences: A high-performance gateway ECU may be able to process a frame of data instantly, with its STmin possibly being 0ms. However, a small ECU with limited resources and complex software (such as a window controller) may need more time to write the received data to Flash, and its STmin may be set to 10ms or higher.
[0035] Dynamic adaptation: Once the master node obtains this STmin value, it will strictly adhere to this time interval when transmitting and writing data (e.g., using service 31 RequestDownload and service 36 TransferData). If the ECU says "please wait at least 5ms before sending the next frame", the master node will set the sending interval to 5ms or longer, and will never send data wildly at 1ms intervals.
[0036] Preventing overflow: This is like adjusting your speed (data transmission rate) based on the traffic conditions ahead (ECU processing capacity) to ensure that a "rear-end collision" (buffer overflow) does not occur.
[0037] S200: Determine the minimum consecutive frame interval for all ECUs to be flashed, and organize the ECU set based on the determination results; It should be noted that in some embodiments, determining the minimum consecutive frame interval of all ECUs to be flashed and organizing the ECU set based on the determination result may include the following steps: marking ECUs to be flashed whose minimum consecutive frame interval is less than a target time threshold as first ECUs, and marking the other ECUs to be flashed as second ECUs; dividing the range greater than the target time threshold into multiple time intervals; wherein each time interval is marked with a flashing limit quantity, the larger the corresponding time value of the time interval, the larger the flashing limit quantity; associating the second ECUs with the corresponding time interval based on the minimum consecutive frame interval, thereby determining the number of associated ECUs in each time interval; when the number of associated ECUs is greater than the flashing limit quantity marked for the corresponding time interval, grouping the second ECUs associated with the time interval to obtain ECU groups; wherein the number of second ECUs contained in each ECU group is less than or equal to the flashing limit quantity; when the number of associated ECUs is less than or equal to the flashing limit quantity marked for the corresponding time interval, grouping the second ECUs associated with the time interval as one ECU group; and organizing all ECU groups corresponding to each time interval to obtain an ECU set.
[0038] For example, in some specific implementations, the flashing master node determines the flashing order and the number of ECUs to be flashed based on the STmin time fed back by the ECU and the number of ECUs to be flashed, with the premise that the maximum number of ECUs to be flashed is set to 4. If the STmin of an ECU is less than 0.28ms, then this ECU will not be flashed. First, the maximum value of the fed-back STmin is confirmed, and then the total number of ECUs to be flashed is determined.
[0039] The total number of ECUs to be cross-flashed = total number of ECUs - number of individual ECUs (STmin < 0.28ms). For example, by referring to Table 1 below, if the total number of ECUs to be cross-flashed is less than the corresponding value of the upper limit of cross-flashed ECUs, then the total number of ECUs to be cross-flashed is determined as the total number of ECUs to be cross-flashed. Otherwise, the ECUs are grouped until the total number of ECUs in the group is less than the upper limit value of the table.
[0040] Table 1
[0041] It should be noted that in some embodiments, the method may also include the following step: performing separate sequential flashing on each first ECU.
[0042] For example, in some specific implementations, such ECUs with small STmin (e.g., <0.28ms) have extremely fast processing speeds and require very short frame intervals (almost 0). If they are added to the cross-flash group, the master node needs to serve them at near-limit speeds, which would disrupt the entire scheduling rhythm and may actually reduce overall efficiency. Therefore, these "fast cars" can be allowed to have their own lanes (flashed sequentially) and they can run at their maximum speed on their own.
[0043] S300: Based on the minimum time interval between consecutive frames, cross-write the ECUs to be written in the ECU set to achieve parallel writing of the ECUs to be written in the ECU set. It should be noted that the ECU set includes at least one ECU group. In some embodiments, cross-writing of the ECUs to be written in the ECU set based on the minimum consecutive frame interval may include the following steps: taking the first ECU group in the ECU set as the target ECU group; taking the ECUs to be written in the target ECU group as the writing ECUs; sorting the writing ECUs in the target ECU group according to the minimum consecutive frame interval corresponding to each writing ECU in the target ECU group to obtain the writing order; cross-writing the writing ECUs in the target ECU group according to the writing order, so that when one writing ECU is processing writing data, other writing ECUs call the idle CAN bus to receive writing data; when all writing ECUs in the target ECU group have completed writing, taking the next ECU group in the ECU set as the target ECU group, and returning to the step of taking the ECUs to be written in the target ECU group as the writing ECUs until all ECUs to be written in the ECU set have completed writing.
[0044] For example, in some specific implementations, ECUs within a group are cross-written, and a data frame is sent to each ECU in the group. When sending the next data frame to an ECU, it must be ensured that the STmin time specified by the ECU itself has elapsed. Through this cycle and waiting, it is ensured that each ECU can stably receive data at a rate that it can withstand, while allowing the bus to serve other ECUs in the intervals of waiting for one ECU.
[0045] Specifically, the core idea of this invention is to utilize the time difference between when a single ECU1 receives a request message (flash data) at time 1 and when it responds to the request message at time 2 (during which the ECU needs to write the received valid data to the flash), during which the bus is idle. The host computer can use this idle time to send flash data to ECU2. Similarly, ECU2 also has a request and response processing time (bus idle period), during which the host computer can use this idle time to send messages to ECU1. This maximizes the utilization of bus bandwidth.
[0046] To explain in detail the principle of the technical solution of the present invention, the overall process of the present invention will be described below with reference to some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and should not be regarded as a limitation of the present invention.
[0047] First, it should be noted that with the improvement of ECU chip processing performance, 95% of vehicle ECUs now support continuous frame flashing with a 0ms (theoretical) frame interval. Based on the above application background, and to improve the overall upgrade speed of multiple ECUs on the same CAN bus, especially reducing user waiting time in OTA upgrade scenarios, this invention proposes an optimization scheme, such as... Figure 3 The diagram shown illustrates an application scenario of the present invention, wherein the ECUs to be flashed include, but are not limited to, the body controller, air conditioning controller, seat controller, and door controller. Specifically, the parallel flashing of the ECU set in this embodiment of the present invention can be achieved as follows: Step 1: The master control node actively queries the flashing reception capability of the ECU to be flashed. It uses the physically addressed diagnostic service 22, with a custom DID, and the ECU responds with STmin (the minimum time interval between consecutive frames). Here, CAN-H corresponds to a high level, and CAN-L corresponds to a low level; these are the core physical lines in the CAN bus used for differential signal transmission.
[0048] 1. Actively query the master control node sequentially: Logic: A master-slave architecture is used. Throughout the flashing process, the master flashing node acts as the "commander," responsible for initiating and controlling all actions. It needs to query each target ECU in the network sequentially. Because the bus is a broadcast medium, but the response is specific to a particular ECU, querying one by one avoids response conflicts and makes the process clear and orderly.
[0049] 2. Diagnostic service 22 using physical addressing: Diagnostic services: This is standard practice following the UDS (Unified Diagnostic Services) protocol. UDS is the universal "language" used for diagnostics and flashing in the automotive electronics field.
[0050] Service 22: ReadDataByIdentifier (Reads data by data identifier). This is a request-response service; the master node sends a request, and the ECU returns data corresponding to a specific identifier.
[0051] Physical addressing: The address broadcast to all ECUs. Physical addressing must be used when flashing a specific ECU to ensure that commands are accurately sent to the target ECU, while other ECUs in the network ignore the message. This guarantees the accuracy and safety of the operation, preventing accidental operation of other controllers.
[0052] 3. Custom DID: DID: Data Identifier, is a number used in Service 22 to specify "what data you want to read". For example, F187 might represent "read vehicle VIN code", and F190 might represent "read system voltage", etc.
[0053] Custom: The parameters related to "flash reception capability" (such as STmin) here are not the standard DIDs mandated by UDS. Therefore, car manufacturers or ECU suppliers will define a specific DID number, which is defined in their systems as "used to read the flow control parameters of the ECU during the flash session".
[0054] Logic: A "secret code" is established between the master node and the ECU through a custom DID. When the master node sends the DID number of service 22 as a request, the target ECU knows: "This is a request to flash data transmission capability," and then it will prepare the corresponding data (STmin) and reply.
[0055] 4. ECU feedback response STmin: STmin: Separation Time minimum. This is a key flow control parameter defined in ISO 15765-2 (CAN-based UDS transport layer protocol).
[0056] Meaning: It tells the sender (master node): "After sending one consecutive frame, you must wait at least STmin milliseconds before sending the next consecutive frame." Logical principle: Processing capability differences: A high-performance gateway ECU may be able to process a frame of data instantly, with its STmin possibly being 0ms. However, a small ECU with limited resources and complex software (such as a window controller) may need more time to write the received data to Flash, and its STmin may be set to 10ms or higher.
[0057] Dynamic adaptation: Once the master node obtains this STmin value, it will strictly adhere to this time interval during subsequent data transmission and writing (using service 31 RequestDownload and service 36 TransferData). If the ECU says "please wait at least 5ms before sending the next frame", the master node will set the sending interval to 5ms or longer, and will never send data wildly at 1ms intervals.
[0058] Preventing overflow: This is like adjusting your speed (data transmission rate) based on the traffic conditions ahead (ECU processing capacity) to ensure that a "rear-end collision" (buffer overflow) does not occur.
[0059] Step 2: The master control node determines the flashing order and the number of ECUs to be flashed based on the STmin time reported by the ECUs and the number of ECUs to be flashed. The maximum number of ECUs to be flashed in a cross-flashing operation is set to 4. ECUs with STmin < 0.28ms are not cross-flashed. These ECUs have extremely high processing speeds and require very short frame intervals (almost zero). If they are added to the cross-flashing group, the master control node would need to serve them at near-maximum speeds, which would disrupt the entire scheduling rhythm and potentially reduce overall efficiency. Therefore, these "fast" ECUs can be allowed to have their own lane (flashed sequentially) and reach their maximum speed on their own. First, confirm the maximum value of the reported STmin, then determine the total number of ECUs to be cross-flashed.
[0060] The total number of ECUs to be cross-flashed = total number of ECUs - number of ECUs (STmin < 0.28ms). Referring to Table 1 above, if the total number of ECUs to be cross-flashed is less than the corresponding upper limit for cross-flashing ECUs, then the total number of ECUs to be cross-flashed is determined as the final cross-flashing total. Otherwise, the ECUs are grouped until the total number of ECUs in each group is less than the upper limit value in the table. Then, cross-flashing is performed on the ECUs within each group, sending one frame of data to each ECU in the group. When sending the next frame of data to an ECU, it must be ensured that the STmin time specified by that ECU has elapsed. Through this cycle and waiting, it is ensured that each ECU can stably receive data at its acceptable rate, while allowing the bus to serve other ECUs while waiting for one ECU.
[0061] Therefore, the above method fails when the stmin value of the controller to be written is 0. This invention aims to shorten the writing time under this condition.
[0062] like Figure 4As shown, the core idea of this invention is to utilize the time difference between when a single ECU1 receives a request message (flash data) at time 1 (T1) and when it responds to the request message at time 2 (T2). During this time period, the ECU needs to write the received valid data to the flash, and the bus is in an idle state. The host computer can use this idle time to send flash data to ECU2. Similarly, ECU2 also has a request and response processing time (bus idle period), which the host computer can use to send messages to ECU1. This maximizes the utilization of bus bandwidth.
[0063] For example, such as Figure 5 As shown in the figure (labeled as: A-body request frame, B-door request frame, C-body response frame, D-door response frame), from time T1 to T2, door requests are continuously sent using the body controller request and response interval, and from time T3 to T4, body requests are continuously sent using the door controller request and response interval.
[0064] In summary, the parallel flashing method of the present invention can send frames in a non-fixed order. Specifically, the parallel flashing method of the present invention is effective for controller sets where STmin is 0, while also being compatible with cases where STmin is not 0. In particular, the flashing method of the present invention utilizes the request and response processing interval of a single ECU to perform data transmission of other ECUs on the same ECU, effectively improving the bus bandwidth utilization.
[0065] This invention also provides an ECU cluster parallel flashing device, comprising: The data query module is used to query the flashing reception capability of the ECU to be flashed sequentially through the flashing master control node, and obtain the minimum time of consecutive frame interval for each ECU to be flashed. The collection and organization module is used to determine the minimum consecutive frame interval of all ECUs to be flashed, and to organize the ECUs into a collection based on the determination results; The cross-writing module is used to perform cross-writing on the ECUs to be written in the ECU set based on the minimum time interval between consecutive frames, so as to realize the parallel writing of the ECUs to be written in the ECU set.
[0066] In some embodiments, the device may further include a separate flashing module for performing the following operations: Each first ECU is flashed individually in sequence.
[0067] It is worth noting that, since the technical solutions implemented by the module functions of the ECU cluster parallel flashing device in this embodiment correspond one-to-one with the process steps of the aforementioned ECU cluster parallel flashing method, the specific implementation methods and technical effects of the ECU cluster parallel flashing device in this embodiment can be referred to the specific implementation methods and technical effects of the ECU cluster parallel flashing method in any of the above embodiments.
[0068] This invention also provides a vehicle control device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the method described in the above embodiments.
[0069] Taking the example of a processor and memory in a vehicle controller being connected via a bus, the memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the control processor, and these remote memories can be connected to the control device via a network.
[0070] The non-transitory software program and instructions required to implement the methods of the above embodiments are stored in memory and executed by the processor to perform the methods of the above embodiments.
[0071] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0072] This invention also provides a vehicle, including the vehicle control device described in the above embodiments.
[0073] The vehicle can be a private car, such as a sedan, SUV, MPV, or pickup truck. It can also be a commercial vehicle, such as a van, bus, small truck, or large semi-trailer. The vehicle must have an electric motor capable of outputting power or acting as a generator to store mechanical energy. When the vehicle is a new energy vehicle, it can be a hybrid or a pure electric vehicle.
[0074] Since the vehicle applies all the technical solutions of the above-mentioned control device or vehicle controller, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.
[0075] Furthermore, one embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions for executing the above-described parallel flashing method for an ECU set.
[0076] It is worth noting that, since the computer-readable storage medium of the present invention is capable of executing the parallel flashing method for ECU sets of any of the above embodiments, the specific implementation methods and technical effects of the computer-readable storage medium of the present invention can be referred to the specific implementation methods and technical effects of the parallel flashing method for ECU sets of any of the above embodiments.
[0077] Furthermore, one embodiment of the present invention also provides a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium and executes the computer program or computer instructions, causing the computer device to perform the above-described parallel flashing method for an ECU set.
[0078] It is worth noting that, since the computer program product of this embodiment can execute the ECU set parallel flashing method of any of the above embodiments, the specific implementation method and technical effect of the computer program product of this embodiment can refer to the specific implementation method and technical effect of the ECU set parallel flashing method of any of the above embodiments.
[0079] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0080] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
Claims
1. An ECU set parallel flashing method, characterized by, The method includes the following steps: By sequentially querying the flashing reception capability of the ECU to be flashed by the flashing master node, the minimum continuous frame interval time of each ECU to be flashed is obtained. The minimum time interval between consecutive frames for all the ECUs to be flashed is determined, and an ECU set is obtained based on the determination results. Based on the minimum time interval between consecutive frames, the ECUs to be flashed in the ECU set are cross-flashed to achieve parallel flashing of the ECUs to be flashed in the ECU set.
2. The ECU mass-erasing and parallel-writing method according to claim 1, characterized by, The process of sequentially querying the flashing reception capability of the ECU to be flashed through the flashing master control node includes the following steps: Based on the physical address of each ECU to be flashed, the flashing master node sequentially queries the flashing reception capability of each ECU via the CAN bus.
3. The ECU mass-erasing and parallel-writing method according to claim 2, characterized by, The step of sequentially querying the flashing reception capability of each ECU to be flashed via the flashing master node based on the CAN bus includes the following steps: The flashing master node uses a request-response service based on unified diagnostic services to send request signals to each of the ECUs to be flashed sequentially via the CAN bus, in order to obtain response data from each of the ECUs regarding the flashing reception capability.
4. The ECU mass erase and flash method of claim 3, wherein, The step of using the CAN bus to sequentially send request signals to each of the ECUs to be flashed in order to obtain response data from each ECU regarding the flashing and writing capability includes the following steps: The request signal is sent sequentially to each of the ECUs to be flashed using the CAN bus; wherein the request signal includes a target data identifier associated with the minimum time of the consecutive frame interval; The ECU to be flashed responds to the target data identifier and calls the corresponding minimum continuous frame interval time to send back to the flashing master node via the CAN bus.
5. The ECU mass-erasing and parallel-writing method according to claim 1, wherein The process of determining the minimum consecutive frame interval for all the ECUs to be flashed, and then organizing the ECU set based on the determination results, includes the following steps: The ECUs to be flashed whose minimum consecutive frame interval is less than the target time threshold are marked as the first ECUs, and the other ECUs to be flashed are marked as the second ECUs; The range exceeding the target time threshold is divided into multiple time intervals; each time interval is marked with a maximum number of writes, and the larger the time value corresponding to the time interval, the larger the maximum number of writes. The second ECU is associated with the corresponding time interval based on the minimum time of the consecutive frame interval, thereby determining the number of associated ECUs in each time interval; When the number of associated ECUs is greater than the maximum number of writes for the corresponding time interval, the second ECUs associated with the time interval are grouped to obtain ECU groups; wherein, the number of second ECUs in each ECU group is less than or equal to the maximum number of writes. When the number of associated ECUs is less than or equal to the maximum number of writes for the corresponding time interval, the second ECU associated with the time interval is grouped as one ECU group; The ECU set is obtained by grouping all the ECU groups corresponding to each time interval.
6. The ECU mass-erasing and parallel-writing method according to claim 5, wherein The method further comprises the following steps: Each of the first ECUs is sequentially flashed individually.
7. The ECU mass-erasing and parallel-writing method according to claim 1, wherein The ECU set comprises at least one ECU group, and the method comprises the following steps of cross-flashing the ECU to be flashed in the ECU set based on the minimum time interval of continuous frames: Taking the first ECU group in the ECU set as a target ECU group; Taking the ECU to be flashed in the target ECU group as a flashing ECU; Based on the minimum time interval of continuous frames corresponding to each flashing ECU in the target ECU group, the flashing ECUs in the target ECU group are sorted to obtain a flashing order; Based on the flashing order, the flashing ECUs in the target ECU group are cross-flashed so that one of the flashing ECUs receives flashing data on an idle CAN bus during a time period when other flashing ECUs are processing flashing data; When all the flashing ECUs in the target ECU group complete flashing, the next ECU group in the ECU set is taken as the target ECU group, and the step of taking the ECU to be flashed in the target ECU group as a flashing ECU is executed until all the ECUs to be flashed in the ECU set complete flashing.
8. An ECU set parallel flashing device, characterized by, It comprises: A data query module for sequentially querying the flashing receiving capability of the ECUs to be flashed through a flashing master node to obtain the minimum time interval of continuous frames of each ECU to be flashed; A set grouping module for determining the minimum time interval of continuous frames of all the ECUs to be flashed and grouping an ECU set based on the determination result; A cross-flashing module for cross-flashing the ECUs to be flashed in the ECU set based on the minimum time interval of continuous frames to realize parallel flashing of the ECUs to be flashed in the ECU set.
9. A vehicle characterized by comprising: The computer program is executed by the processor to realize the ECU set parallel flashing method of any one of claims 1 to 7.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the ECU set parallel flashing method of any one of claims 1 to 7.