Control unit parallel flashing method and system and storage medium

By grouping multiple target control units and generating multicast request instructions, the problem of low flashing efficiency in traditional UDS protocol is solved, and efficient and reliable control unit data flashing is achieved, device incompatibility and communication conflicts are avoided, and system stability and security are improved.

CN120469697APending Publication Date: 2025-08-12CHENGDU DESAY SV KAWA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510352918.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The traditional UDS protocol can only establish communication connections with each ECU in sequence for flashing, and cannot send flashing instructions to multiple ECUs at the same time, resulting in low flashing efficiency and delayed or lost data transmission, affecting the accuracy and stability of data flashing.

Method used

By allocating multiple target control units into multiple target control unit groups and generating multicast request instructions, data flushing is performed to multiple target control unit groups at the same time using multicast request instructions, and combining time synchronization processing and abnormality detection mechanisms, the accuracy and reliability of data flushing is ensured.

Benefits of technology

It significantly reduces the brushing time of the target control unit, improves the brushing efficiency and scalability, ensures the accuracy and reliability of data brushing, reduces the risk of communication conflicts, and improves the stability and security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120469697A_ABST
    Figure CN120469697A_ABST
Patent Text Reader

Abstract

The invention provides a control unit parallel flashing method and system and a storage medium. The method comprises the steps that an upgrade package of a control unit is acquired and analyzed to acquire a target control unit ID and to-be-flashed data; matching each control unit based on the target control unit ID to obtain a plurality of target control units; allocating the plurality of target control units based on a preset allocation algorithm to obtain a plurality of target control unit groups; generating a multicast request instruction based on a unicast request instruction sent by the diagnostic apparatus; and transmitting the data to be flashed and written and the multicast request instruction to each target control unit group so as to perform data flashing and writing on each target control unit. The technical problems that a traditional unified diagnosis service protocol cannot carry out data flashing on a plurality of control units at the same time, and the flashing efficiency of the control units is low are solved. According to the method and the device, parallel data flashing on a plurality of control units is effectively realized, and the flashing efficiency of the control units is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of automotive electronics technology, and specifically relates to a control unit parallel flashing method, system and storage medium. Background Art

[0002] The traditional Unified Diagnostic Services (UDS) protocol uses unicast mode, which allows it to establish a communication connection with each ECU sequentially for flashing. It cannot send flash commands to multiple ECUs simultaneously, significantly limiting flashing efficiency. Some solutions achieve parallel operation by adding physical channels (such as multiple CAN transceivers), but this is costly and lacks scalability. When flashing data to multiple ECUs simultaneously on the bus, the varying data volumes and transmission requirements of each ECU can easily lead to excessive bus load during certain periods, resulting in data conflicts, data transmission delays, or even loss, compromising the accuracy and stability of data flashing. Summary of the Invention

[0003] In order to solve the above technical problems, the present application proposes a control unit parallel flashing method, system and storage medium, aiming to realize data flashing of multiple control units at the same time to improve the efficiency of control unit data flashing.

[0004] Specifically, the present application proposes a control unit parallel flashing method, comprising:

[0005] Obtain the control unit upgrade package and parse it to obtain the target control unit ID and the data to be flashed.

[0006] Each control unit is matched based on the target control unit ID to obtain multiple target control units.

[0007] The plurality of target control units are allocated based on a preset allocation algorithm to obtain a plurality of target control unit groups.

[0008] A multicast request instruction is generated based on the unicast request instruction issued by the diagnostic instrument.

[0009] Furthermore, the data to be written and the multicast request instruction are transmitted to each target control unit group, so as to write data to each target control unit.

[0010] In the above technical solution, by allocating multiple target control units into multiple target control unit groups and flashing multiple target control units at the same time, the target control unit flashing time is significantly reduced and the target control unit flashing efficiency is improved. By allocating multiple target control units, the device incompatibility problem caused by the traditional modification of the UDS protocol or physical bus of the control unit is avoided, and the scalability and compatibility of the target control unit flashing are improved. By transmitting multicast request instructions to the target control unit group to flash data to each target control unit, the accuracy and reliability of the target control unit data flashing are ensured.

[0011] As an embodiment, the acquiring of multiple target control units includes:

[0012] The plurality of target control units are acquired by reading the identifier of each control unit and matching the identifier with the target control unit ID based on the identifier.

[0013] By matching the identifier with the target control unit ID, accurate, efficient and safe target control unit screening is achieved, and the accuracy and security of target control unit flashing are improved.

[0014] Furthermore, allocating the multiple target control units includes:

[0015] Obtain configuration information of the multiple target control units; and obtain a weight of each target control unit based on the configuration information.

[0016] The target control units are sorted based on the weights, and the sorted target control units are allocated based on a preset allocation algorithm to obtain the multiple target control unit groups.

[0017] The weight of each target control unit is calculated using the configuration information, and the weights are sorted accordingly to achieve a reasonable allocation of the target control units. This ensures a balanced debt ratio among target control unit groups and improves the efficiency of parallel flashing of target control units. This avoids resource conflicts caused by flashing multiple target control units and improves the reliability of target control unit flashing.

[0018] Furthermore, the generating of the multicast request instruction based on the unicast request instruction issued by the diagnostic instrument further includes:

[0019] A time slice is sent to the multicast request instruction to perform time synchronization processing on the multicast request instruction.

[0020] By performing time synchronization on multicast request instructions, network congestion caused by multiple target control unit groups responding at the same time is prevented, and instruction conflicts caused by multiple instructions arriving at the target control unit at the same time are avoided.

[0021] Furthermore, the data flashing of each target control unit includes:

[0022] The multicast request instruction and the data to be written after the time synchronization process are transmitted to each target control unit, so that each target control unit responds to the multicast request instruction and verifies the data to be written.

[0023] Data is flashed on each target control unit based on the verified data to be flashed.

[0024] Time-synchronized multicast request instructions ensure that each target control unit receives the instructions at the correct time, avoiding communication conflicts and further improving the efficiency of data flashing for the target control unit. Verification of the flashed data ensures its integrity and security, effectively improving the reliability and stability of data flashing for the target control unit.

[0025] Furthermore, after the data of each target control unit is flashed, the method further includes:

[0026] Each target control unit is activated by sending an activation instruction to each target control unit.

[0027] By sending activation instructions to each target control unit for activation, it is ensured that the target control unit can take effect after the data flash is completed. If one of the target control units is not successfully activated, it can be quickly identified and re-flashed, avoiding system operation problems caused by flash failure and improving system security.

[0028] Furthermore, the step of flashing data on each target control unit further includes:

[0029] The response status of each target control unit is detected in real time. When the number of non-response times of any target control unit reaches a preset threshold, the target control unit is marked as abnormal and recorded in the fault log.

[0030] The abnormal target control unit is removed from the current target control unit group, and data of the abnormal target control unit is flushed by transmitting a unicast request instruction.

[0031] By monitoring the response status of each target control unit in real time, unresponsive target control units can be promptly identified, preventing flash failures caused by communication failures or device anomalies and improving the success rate of target control unit data flashing. Abnormal target control units are recorded in the fault log to facilitate subsequent troubleshooting and repair, while also preventing abnormal target control units from affecting the data flashing of other normal target control units. Removing abnormal target control units from the current target control unit group can reallocate resources to other normal target control units, reducing wasted time and resources.

[0032] Furthermore, after the data of the abnormal target control unit is flushed, the method further includes:

[0033] Record the location of the abnormal target control unit and the data to be written; and continue to write data to other target control units in the target control unit group based on the location and the data to be written.

[0034] By continuing to flash data for other target control units in the target control unit group based on the position and the data to be flashed, time and resources are maximized, the overall time for flashing data for the target control unit is reduced, and it is ensured that exception handling will not interrupt the data flashing of other target control units, thereby ensuring the continuity of the flashing process of the target control unit and the stability of the system.

[0035] Based on the same inventive concept, the present application also proposes a system for controlling a parallel flashing method of a control unit, the system comprising:

[0036] The data acquisition module is used to obtain the upgrade package of the control unit and parse it to obtain the target control unit ID and the data to be flashed.

[0037] The target matching module is used to match each control unit based on the target control unit ID to obtain multiple target control units.

[0038] The target allocation module is configured to allocate the plurality of target control units based on a preset allocation algorithm to obtain a plurality of target control unit groups.

[0039] The instruction conversion module is used to generate a multicast request instruction based on the unicast request instruction issued by the diagnostic instrument.

[0040] And, a data writing module is used to transmit the data to be written and the multicast request instruction to each target control unit group, so as to write data to each target control unit.

[0041] Based on the same inventive concept, the present application also proposes a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions can be read by a control processor and execute the control unit parallel flashing method.

[0042] Compared with the prior art, this application has at least the following beneficial effects:

[0043] This application significantly reduces the target control unit flashing time and improves the target control unit flashing efficiency by allocating multiple target control units into multiple target control unit groups and flashing multiple target control units at the same time. By allocating multiple target control units, the device incompatibility problem caused by the traditional modification of the UDS protocol or physical bus of the control unit is avoided, and the scalability and compatibility of the target control unit flashing are improved. By transmitting a multicast request instruction to the target control unit group to flash data to each target control unit, the accuracy and reliability of the target control unit data flashing are ensured. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 This is a flowchart of a control unit parallel flashing method shown in an embodiment of the present application.

[0045] Figure 2 This is a schematic diagram of a control unit parallel flashing system shown in an embodiment of the present application. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0047] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0048] Example 1:

[0049] Please refer to Figure 1 The control unit parallel flashing method mainly includes steps S1 to S5.

[0050] Wherein, step S1 includes: obtaining the upgrade package of the control unit and parsing it to obtain the target control unit ID and the data to be written. The control unit can be at least an ECU, but is not limited to this. The upgrade package can be obtained through a host computer, wherein the host computer can be a diagnostic instrument or the cloud. The format of the upgrade package can mainly be the ASAM MCD-2D (ODX) standard (Open Diagnostic Data Exchange). The upgrade package can mainly include the control unit ID, software version number, data to be written, and data signature that need to be written. For example, the upgrade package can include a target control unit ID of 0xF189, a software version number of V2.1.3, data to be written can be 512 bytes per block, CRC32 check data, and the data signature can be RSA-2048.

[0051] Step S2 includes matching each control unit based on the target control unit ID to obtain multiple target control units. The upgrade package can be sent to a gateway via a host computer. The gateway reads the identifier of each control unit and matches it with the control unit ID in the upgrade package to generate multiple target control units. For example, the target control unit ID is matched with the control unit identifier via UDS service 0X22 F189, and the generated target control units are 0x10, 0x20, and 0x30.

[0052] Step S3 includes: allocating the multiple target control units based on a preset allocation algorithm to obtain multiple target control unit groups. The preset allocation algorithm can mainly be an allocation method based on a greedy algorithm, which can mainly calculate the weight of each target control unit through the priority, data volume and debt ratio of the target control unit, sort and allocate each target control unit based on the weight, and obtain the final multiple target control unit groups. The multiple target control units are allocated mainly by dividing the physical bus, such as CAN FD or Ethernet, into logical virtual channels, and by allocating different target control unit groups to different logical virtual channels, and by flexibly allocating bus resources, improving bus utilization and avoiding resource competition. For example, a target control unit group with a larger data volume and a higher priority is allocated a virtual channel with a larger bandwidth to ensure the rapid transmission of its flush data.

[0053] Step S4 includes: generating a multicast request instruction based on the unicast request instruction issued by the diagnostic instrument. This can be done mainly by converting the unicast request issued by the diagnostic instrument into a multicast request instruction, with the target address being a preset multicast group, such as 0x7FD+Group ID. The multicast group identifier can be embedded in the UDS protocol to achieve instruction broadcasting and response aggregation. The write instruction can be sent to multiple target control units at the same time through the multicast group, and each target control unit responds to the instruction and returns response data. The gateway aggregates the response data in the same group according to the time window and returns it to the diagnostic instrument to reduce communication overhead and improve data write efficiency.

[0054] Furthermore, step S5 includes: transmitting the data to be flashed and the multicast request instruction to each target control unit group to flash the data to each target control unit. This mainly includes each target control unit responding to the multicast request instruction, the gateway aggregating the response data and returning it to the diagnostic instrument, each target control unit verifying the data to be flashed, and starting the data flash after the verification passes. After the flash is completed, the gateway activates the target control unit by sending an activation instruction to each target control unit.

[0055] For example, when flashing data to multiple ECUs via the UDS protocol, the ECU upgrade package can be sent to the gateway via the diagnostic instrument. After receiving the ECU upgrade package, the gateway parses it to obtain the target ECU's ID and the data to be flashed. The gateway reads the identifier of each ECU and matches it with the target ECU's ID obtained in the upgrade package, thereby obtaining multiple compatible ECUs. By calculating the weight of each ECU, the weights are sorted and combined using a greedy algorithm to obtain multiple ECU combinations, which are then assigned to different logical virtual channels. The unicast request instructions issued by the diagnostic instrument are converted into multicast instructions, and the data to be flashed and the multicast request instructions are transmitted to each ECU combination. After each ECU combination responds to the multicast request instruction, it begins data flashing based on the data to be flashed.

[0056] In some embodiments, acquiring multiple target control units includes:

[0057] The plurality of target control units are acquired by reading the identifier of each control unit and matching the identifier with the target control unit ID based on the identifier.

[0058] The main method is to read the identifier of each control unit, for example, by using the UDS service 0x22 F189, matching it with the target control unit ID in the upgrade package to obtain multiple target control units, for example, obtaining a list of target control units that allow data flashing: 0x10, 0x20, 0x30. This also includes extracting the vehicle's VIN (Vehicle Identification Number) as input data, generating a 16-byte random seed through a TRNG (True Random Number Generator), and generating a temporary session key through the AES-256 algorithm (Advanced Encryption Standard with 256-bit key) to ensure the security of the communication link between the gateway and each target control unit and the integrity of the data.

[0059] Optionally, allocating the multiple target control units includes:

[0060] Obtaining configuration information of the plurality of target control units; obtaining a weight of each target control unit based on the configuration information;

[0061] The target control units are sorted based on the weights, and the sorted target control units are allocated based on a preset allocation algorithm to obtain the multiple target control unit groups.

[0062] The configuration information of each target control unit may include at least the priority of the target control unit, the amount of data to be written, and the real-time load rate of the bus. The weight calculation can be mainly performed by the following weight calculation formula:

[0063] W = αP + β(1 / S) + γ(1 / L);

[0064] Where α, β, and γ are adjustable coefficients, P represents the priority of the target control unit (for example, the power domain has priority P=3, the body domain has priority P=2, and the infotainment domain has priority P=1), and L represents the real-time bus load of the target control units (for example, the real-time load of CAN FD channel 1 is 45%). After sorting by calculated weights, virtual channels are assigned to each target control unit group based on a greedy algorithm. Virtual channels primarily partition the physical bus into logical virtual channels using a gateway. For example, CAN FD channel 1 is divided into virtual channels 1-4. Virtual channels are allocated to each target control unit group based on the rule that each virtual channel's maximum bandwidth occupancy is less than or equal to 80% and that high-weighted target control units prioritize low-latency channels. The target control units primarily include the power domain, body domain, and infotainment domain priorities. Based on the target control unit weights, target control units in the power domain are assigned to the highest-priority virtual channel 1, while target control units in the body domain are assigned to virtual channel 2.

[0065] Optionally, the generating of a multicast request instruction based on a unicast request instruction issued by the diagnostic instrument further includes:

[0066] A time slice is sent to the multicast request instruction to perform time synchronization processing on the multicast request instruction.

[0067] Among them, by receiving the unicast request instruction sent by the diagnostic instrument, it is mainly possible to generate a multicast request instruction based on the multicast group ID and the unicast request instruction by inserting the multicast group ID. For example, the unicast request instruction is: 0x1003, the inserted multicast group ID is 0x7FD+Group ID, and the generated multicast request instruction is 0x1003[Group ID]. Time synchronization processing is performed for the multicast request instruction by sending a time slice for each group of multicast request instructions. For example, the multicast request instruction for controlling Group 1 is sent at t=0ms, and the multicast request instruction for controlling Group 2 is sent at t=2ms. Among them, the time slice interval is determined by the virtual bus type, for example, the CAN FD bus is 1ms, and the time interval of the Ethernet bus is 0.1ms.

[0068] Optionally, the flashing of data on each target control unit includes:

[0069] The multicast request instruction and the data to be written after the time synchronization process are transmitted to each target control unit, so that each target control unit responds to the multicast request instruction and verifies the data to be written.

[0070] Data is flashed on each target control unit based on the verified data to be flashed.

[0071] For example, the multicast request instruction sent is 0x34[Group ID]. After the target control unit responds to the multicast request instruction, it verifies the data to be flashed. The gateway collects the response data of each target control unit and flashes the data of each target control unit based on the verified data to be flashed.

[0072] Optionally, after flashing data to each target control unit, the method further includes:

[0073] Each target control unit is activated by sending an activation instruction to each target control unit.

[0074] For example, the target control unit is activated by sending the 0x1101 instruction.

[0075] Optionally, the step of flashing data on each target control unit further includes:

[0076] The response status of each target control unit is detected in real time. When the number of non-response times of any target control unit reaches a preset threshold, the target control unit is marked as abnormal and recorded in the fault log.

[0077] The abnormal target control unit is removed from the current target control unit group, and data of the abnormal target control unit is flushed by transmitting a unicast request instruction.

[0078] Among them, the preset threshold can mainly be 3, that is, when the number of unresponsive times of any target control unit reaches 3 times, the abnormal flag is triggered, the target control unit is marked as abnormal and recorded in the fault log. Those skilled in the art can set thresholds of other values according to actual conditions, and are not limited to this. The fault information of the abnormal target control unit, such as the fault code, is stored in a non-volatile memory to support subsequent abnormality analysis. The abnormal target control unit is removed from the current target control unit group. For example, ECU0x10 is removed from Group1. Data is flushed to the abnormal target control unit by transmitting a unicast request instruction. For example, data is flushed to the abnormal target control unit through 0x1001. After the abnormal target control unit is removed from the target control unit group, the bandwidth resources occupied by the abnormal control unit are released by updating the virtual channel allocation.

[0079] Optionally, after flashing the data of the abnormal target control unit, the method further includes:

[0080] Record the location of the abnormal target control unit and the data to be written; and continue to write data to other target control units in the target control unit group based on the location and the data to be written.

[0081] When the target control unit is abnormally interrupted, the position of the abnormal target control unit and the number of the data to be written, such as Block 0x0056, are recorded, and data writing is continued based on the position and the number of the data to be written.

[0082] The parallel flashing of the control units in this application can effectively improve the data flashing efficiency of the control units. For example, the parallel flashing time of 32 ECUs can be reduced from 120 minutes to 25 minutes, which effectively reduces the load rate of the communication bus. For example, the debt ratio of the CAN FD bus can be reduced from a peak of 95% to 55%. The control unit supports the ISO14229-12020 standard and is compatible with mainstream ECUs such as Bosch and Continental. After isolating abnormal control units, the overall success rate of control unit data flashing has increased from 88% to 99.6%.

[0083] Example 2:

[0084] Please refer to Figure 2 The present application also proposes a system that adopts the control unit parallel flashing method described in Example 1, which mainly includes: a data acquisition module, a target matching module, a target allocation module, an instruction conversion module and a data flashing module.

[0085] Wherein, the data acquisition module is used to obtain the upgrade package of the control unit and parse it to obtain the target control unit ID and the data to be written. The upgrade package of the control unit can mainly be sent from the host computer to the gateway. The gateway device can mainly adopt the NXP S32G274A processor, integrated with 4 core ARM Cortex-A53, support CAN FD (5Mbps), Ethernet (1000BASE-T1) and hardware security module (HSM). The format of the upgrade package can mainly be the ASAM MCD-2D (ODX) standard, but is not limited to this. By parsing the upgrade package, at least the ID of the target control unit can be obtained, such as 0xF189, the data to be written, such as 512 bytes per block, CRC32 check, and the digital signature of the control unit, such as RSA-2048.

[0086] The target matching module is used to match each control unit based on the target control unit ID to obtain multiple target control units. Among them, each control unit can be mainly an ECU, which can mainly include 32 ECUs, including 8 power domain control units, 15 body domain control units, and 9 infotainment domain control units. Those skilled in the art can choose other control units according to actual conditions, but are not limited to this. When matching each control unit, it is also possible to extract the vehicle VIN code as input, generate a 16-byte random number seed through TRNG, and use the AES-256 algorithm based on the vehicle VIN code and the random number seed to generate a temporary session key to ensure the integrity and security of the data to be flashed to the control unit.

[0087] A target allocation module is configured to allocate the multiple target control units based on a preset allocation algorithm to obtain multiple target control unit groups. The module calculates a weight for each target control unit and sorts the weights to allocate the obtained multiple target control unit groups to multiple virtual channels. A virtual channel primarily divides a physical bus into multiple logical virtual channels, such as dividing CAN FD channel 1 into virtual channels 1-4. When allocating virtual channels to each target control unit, the module ensures that the maximum bandwidth occupancy of each virtual channel is less than or equal to 80%.

[0088] A command conversion module is used to generate a multicast request command based on a unicast request command issued by the diagnostic instrument. The diagnostic instrument can primarily use a Vector VN1640 interface card, supporting the DoIP (Diagnostics over IP) protocol and communicating with the gateway via Ethernet. Those skilled in the art may select other diagnostic instruments based on actual circumstances, and are not limited to these.

[0089] Furthermore, a data flash module is configured to transmit the data to be flashed and the multicast request instruction to each target control unit group, so as to flash the data to each target control unit. During the data flash process, if a target control unit fails to respond for more than a preset number of times, the target control unit is marked as an abnormal control unit. After the abnormal control unit is removed from the current target control unit, the data flash interruption location is recorded, and the data flash is restarted from the first undetermined block after the interruption.

[0090] Example 3:

[0091] The present application also provides a computer-readable storage medium, the computer-readable storage medium comprising:

[0092] The computer-readable storage medium stores computer-executable instructions.

[0093] When the computer executable instructions are executed by the control processor, the control unit parallel flashing method described in embodiment 1 is implemented.

[0094] In the computer-readable storage medium, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive SolidState Disk (SSD)).

[0095] In summary, this application significantly reduces the target control unit flashing time and improves the target control unit flashing efficiency by allocating multiple target control units into multiple target control unit groups and flashing multiple target control units at the same time. By allocating multiple target control units, the device incompatibility problem caused by the traditional modification of the UDS protocol or physical bus of the control unit is avoided, and the scalability and compatibility of the target control unit flashing are improved. By transmitting multicast request instructions to the target control unit group to flash data for each target control unit, the accuracy and reliability of the target control unit data flashing are ensured.

[0096] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a part of a module, program segment or code, and the part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which depends on the functions involved.

[0097] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling an electronic device to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0098] The specific embodiments described above further illustrate the objectives, technical solutions, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the scope of protection of this application. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this application by those skilled in the art should be included within the scope of protection of this application.

Claims

1. A control unit parallel flashing method, characterized in that: include: Obtain the control unit upgrade package and parse it to obtain the target control unit ID and the data to be flashed; Matching each control unit based on the target control unit ID to obtain multiple target control units; Allocating the plurality of target control units based on a preset allocation algorithm to obtain a plurality of target control unit groups; generating a multicast request instruction based on the unicast request instruction issued by the diagnostic instrument; Furthermore, the data to be written and the multicast request instruction are transmitted to each target control unit group, so as to write data to each target control unit.

2. The control unit parallel flashing method according to claim 1, characterized in that: The acquiring of multiple target control units includes: The plurality of target control units are acquired by reading the identifier of each control unit and matching the identifier with the target control unit ID based on the identifier.

3. The control unit parallel flashing method according to claim 1, characterized in that: Allocating the plurality of target control units includes: Obtaining configuration information of the multiple target control units; Obtaining a weight of each target control unit based on the configuration information; The target control units are sorted based on the weights, and the sorted target control units are allocated based on a preset allocation algorithm to obtain the multiple target control unit groups.

4. The control unit parallel flashing method according to claim 1, characterized in that: The generating of the multicast request instruction based on the unicast request instruction issued by the diagnostic instrument further includes: A time slice is sent to the multicast request instruction to perform time synchronization processing on the multicast request instruction.

5. The control unit parallel flashing method according to claim 4, characterized in that: The step of flashing data on each target control unit includes: Transmitting the multicast request instruction and the data to be written after the time synchronization process to each target control unit, so that each target control unit responds to the multicast request instruction and verifies the data to be written; Data is flashed on each target control unit based on the verified data to be flashed.

6. The control unit parallel flashing method according to claim 5, characterized in that: After the data of each target control unit is flashed, the method further includes: Each target control unit is activated by sending an activation instruction to each target control unit.

7. The control unit parallel flashing method according to claim 1, characterized in that: The data flashing of each target control unit further includes: Real-time detection of the response status of each target control unit. When the number of unresponsive times of any target control unit reaches a preset threshold, the target control unit is marked as abnormal and recorded in the fault log; The abnormal target control unit is removed from the current target control unit group, and data of the abnormal target control unit is flushed by transmitting a unicast request instruction.

8. The control unit parallel flashing method according to claim 7, characterized in that: After the data of the abnormal target control unit is flushed, the method further includes: Record the location of the abnormal target control unit and the data to be flashed; Based on the position and the data to be written, data is continuously written to other target control units in the target control unit group.

9. A system based on the control unit parallel flashing method according to any one of claims 1 to 8, characterized in that: The system comprises: The data acquisition module is used to obtain the upgrade package of the control unit and parse it to obtain the target control unit ID and the data to be flashed; a target matching module, configured to match each control unit based on the target control unit ID to obtain multiple target control units; a target allocation module, configured to allocate the plurality of target control units based on a preset allocation algorithm to obtain a plurality of target control unit groups; An instruction conversion module, configured to generate a multicast request instruction based on a unicast request instruction issued by the diagnostic instrument; And, a data writing module is used to transmit the data to be written and the multicast request instruction to each target control unit group, so as to write data to each target control unit.

10. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instructions are executed by the control processor, the control unit parallel flashing method according to any one of claims 1 to 8 is implemented.