ECU flashing method and device, electronic equipment and storage medium

By integrating the flashing file processing module and protocol module into the flashing system as dynamic link libraries, modularity and decoupling are achieved, solving the problem of high ECU flashing failure rate, improving flashing efficiency and system stability, and facilitating expansion and maintenance.

CN120994208APending Publication Date: 2025-11-21ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510992640.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing ECU flashing solutions result in high failure rates, lengthy and time-consuming processes, leading to a waste of time and manpower.

Method used

The file processing module and the flashing protocol module are integrated into the flashing system as dynamic link libraries to achieve modularity and decoupling. This allows each module to operate independently and autonomously. In case of failure, only the failed module is restarted, while other modules are unaffected. File processing and protocol processing can be performed in parallel or asynchronously.

Benefits of technology

It improves ECU flashing efficiency, reduces the time required for re-flashing after failure, enhances software flashing and testing efficiency, and facilitates function expansion and maintenance upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994208A_ABST
    Figure CN120994208A_ABST
Patent Text Reader

Abstract

The invention provides an ECU flashing method and device, electronic equipment and a storage medium, and relates to the technical field of automobiles. The ECU flashing method comprises the following steps: calling a flashing file processing module to extract a to-be-flashed file according to a configuration file; calling a flashing protocol module to flash the ECU to be flashed according to the file to be flashed; wherein the flashing file processing module and the flashing protocol module are integrated in the flashing system in the form of a dynamic link library, and the flashing system performs unified calling and management based on the graphical desktop client. According to the invention, modularization and decoupling of system functions are realized, each module is independent and autonomous, and the time required for re-flashing a program after flashing failure is effectively reduced. And file processing and protocol processing in the flash task can be executed in parallel or asynchronously by each independent module, so that the software flash and detection efficiency can be improved, and later function extension and maintenance upgrading are facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of automobiles, in particular to an ECU flashing method and device, an electronic device and a storage medium. BACKGROUND

[0002] With the rapid development of the new energy vehicle industry, the electronic and electrical architecture of the whole vehicle tends to be complex, and the number of vehicle-mounted electronic control units (ECUs) has significantly increased. In particular, under the trend of electrification and intelligentization, the ECU system of the whole vehicle covers multiple functional domains such as the power system, the battery management system, the body control system, the intelligent cockpit and the automatic driving assistance system, and the number of ECUs required to be flashed for each vehicle has greatly increased.

[0003] The current ECU flashing solution adopted by mainstream vehicle manufacturers is usually "whole vehicle centralized flashing", that is, a set of detection equipment is used to sequentially perform unified flashing operation on all ECUs of the whole vehicle. The failure rate of flashing is high, and after failure, the whole process needs to be restarted, resulting in a long overall flashing process and a long average time consumption, causing serious waste of time and manpower. SUMMARY

[0004] The problem solved by the present application is how to improve the ECU flashing efficiency.

[0005] To solve the above problems, the present application provides an ECU flashing method, device, electronic device and storage medium.

[0006] In a first aspect, the present application provides an ECU flashing method, comprising: calling a flashing file processing module to extract a to-be-flashed file according to a configuration file; calling a flashing protocol module to flash a to-be-flashed ECU according to the to-be-flashed file; wherein the flashing file processing module and the flashing protocol module are integrated in the flashing system in the form of a dynamic link library.

[0007] Optionally, the calling of the flashing file processing module to extract the to-be-flashed file according to the configuration file comprises: loading and reading the configuration file, and verifying the configuration file; when the configuration file passes the verification, finding all associated to-be-flashed files from a database according to the ECU name in the configuration file; calling the flashing file processing module to extract the found to-be-flashed files from the database by deserialization.

[0008] Optionally, the verification of the configuration file comprises: deserializing the configuration file to a configuration object; Check the key fields of the configuration file.

[0009] Optionally, the extracting the found to-be-flashed file from the database by deserialization comprises: Reading slice data from the database by specified byte block in a piece-by-piece reading manner; For each piece of slice data, converting to the value of an object by deserialization to form the to-be-flashed file.

[0010] Optionally, the flashing protocol module comprises a first protocol submodule for CAN protocol and a second protocol submodule for DoIP protocol; and the calling the flashing protocol module to flash the to-be-flashed ECU according to the to-be-flashed file comprises: Cutting the to-be-flashed file into multiple segments; According to the specified protocol in the configuration file, calling the first protocol submodule and / or the second protocol submodule to write the data of the multiple segments into the to-be-flashed ECU.

[0011] Optionally, the flashing system further comprises a security key module, and the calling the flashing protocol module to flash the to-be-flashed ECU according to the to-be-flashed file further comprises: Calling the security key module to generate a security key required by the flashing process, wherein the security key module performs key calculation by using a bit operator.

[0012] Optionally, the flashing system is uniformly called and managed based on a graphical desktop client, and the ECU flashing method further comprises displaying a flashing progress by the graphical desktop client.

[0013] In a second aspect, the present application provides an ECU flashing device, comprising: A first module configured to call a flashing file processing module to extract a to-be-flashed file according to a configuration file; A second module configured to call a flashing protocol module to flash a to-be-flashed ECU according to the to-be-flashed file; Wherein, the flashing file processing module and the flashing protocol module are integrated in a flashing system in the form of a dynamic link library.

[0014] In a third aspect, the present application provides an electronic device comprising a memory and a processor; The memory is configured to store a computer program; The processor is configured to implement the ECU flashing method of the first aspect when executing the computer program.

[0015] In a fourth aspect, the present application provides a computer readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the ECU flashing method of the first aspect is implemented.

[0016] The ECU flashing method of the present application has the following advantages: by integrating the flashing file processing module and the flashing protocol module in the flashing system in the form of a dynamic link library, the modularity and decoupling of system functions are achieved, each module is independent and autonomous, the flashing system can dynamically load the required modules at runtime, when the flashing process of a module fails, it will not affect the flashing process of other modules, and only the failed module needs to be restarted, without the need to perform the entire flashing process from the beginning, effectively reducing the time required for re-flashing after flashing failure. Moreover, the file processing and protocol processing in the flashing task can be performed in parallel or asynchronously by independent modules, which not only helps to improve the software flashing and detection efficiency, but also facilitates later function expansion and maintenance and upgrading. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 A flowchart of the ECU flashing method of the embodiment of the present application; Figure 2 A flowchart of extracting the files to be flashed of the embodiment of the present application; Figure 3 A flowchart of verifying the configuration file of the embodiment of the present application; Figure 4 A flowchart of extracting the files to be flashed of the embodiment of the present application; Figure 5 A flowchart of flashing the ECU to be flashed of the embodiment of the present application; Figure 6 A schematic diagram of the principle of streaming slice reading of the embodiment of the present application; Figure 7 An interface diagram of deserialization of the embodiment of the present application; Figure 8 An ECU partial insertion interface diagram of the embodiment of the present application; Figure 9 An ECU flashing interface diagram of the embodiment of the present application; Figure 10 An ECU flashing success interface diagram of the embodiment of the present application; Figure 11 A system architecture diagram of the ECU flashing device of the embodiment of the present application; Figure 12 A system architecture diagram of the electronic device of the embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to make the above objectives, characteristics and advantages of the present application more apparent, concrete embodiments of the present application will be described in detail below with reference to the drawings. Although some embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms, and should not be interpreted as being limited to the embodiments set forth herein, but rather, these embodiments are provided in order to more thoroughly and completely understand the present application. It should be understood that the drawings and embodiments of the present application are merely for illustrative purposes, and are not intended to limit the scope of the present application.

[0019] It should be understood that each of the steps recited in the method embodiments of the present application can be performed in different orders, and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.

[0020] The term "comprising" and variations thereof as used herein are open-ended, that is "including, but not limited to"; the term "based on" is "based, at least in part, on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optional" means "optional in at least some embodiments". Related definitions are given throughout the detailed description. It should be noted that the concepts mentioned in the present application are merely for distinguishing different apparatuses, modules or units, and are not intended to limit the functions of these apparatuses, modules or units.

[0021] It should be noted that the modification of "one" or "more" mentioned in the present application is illustrative rather than limiting, and those skilled in the art should understand that, unless otherwise explicitly indicated in the context, it should be understood as "one or more".

[0022] The names of the messages or information exchanged between the plurality of apparatuses in the embodiments of the present application are merely for illustrative purposes, and are not intended to limit the scope of the messages or information.

[0023] As shown in Figure 1 An ECU flashing method provided by an embodiment of the present application includes: S100: calling a flashing file processing module to extract a to-be-flashed file according to a configuration file.

[0024] Specifically, the flashing file processing module (Flasher.Files) is used to read the to-be-flashed file in the hard disk and deserialize it into the memory of a specified object, and the to-be-flashed file is extracted according to the configuration file by calling the flashing file processing module.

[0025] S200: calling a flashing protocol module to flash the ECU to be flashed according to the file to be flashed; The flashing file processing module and the flashing protocol module are integrated in the flashing system in the form of dynamic link libraries.

[0026] Specifically, the flashing protocol module (compatible with multiple flashing protocols) is called to flash the ECU to be flashed according to the file to be flashed. The flashing system (Flasher.Gui.Desktop, for example, a graphical desktop client) integrates the flashing file processing module and the flashing protocol module (in the form of dynamic link libraries) to realize unified calling and management. The flashing file processing module and the flashing protocol module are isolated from each other and can be independently optimized and tested. When a new protocol is added, only the related module needs to be extended, without the need to change other modules.

[0027] The flashing system can be developed using WPF (Windows Presentation Foundation). The WPF framework provides all the functions required to create a graphical user interface, including layout, controls, data binding, animation effects, etc. It can uniformly process multiple types of media applications such as text, images, and sound, and supports advanced features such as vector graphics, 3D rendering, and streaming media.

[0028] In this embodiment, the flashing file processing module and the flashing protocol module are integrated in the flashing system in the form of dynamic link libraries, realizing the modularization and decoupling of system functions. Each module is independent and autonomous. The flashing system can dynamically load the required modules at runtime. When the flashing process of a module fails, it will not affect the flashing process of other modules. Only the failed module needs to be restarted, without the need to perform the entire flashing process from the beginning, effectively reducing the time required for re-flashing after a flashing failure. Moreover, the file processing and protocol processing in the flashing task can be performed in parallel or asynchronously by independent modules, which not only improves the efficiency of software flashing and detection, but also facilitates future function expansion and maintenance and upgrading.

[0029] Optionally, the calling of the flashing file processing module to extract the file to be flashed according to the configuration file comprises: S110: loading and reading the configuration file, and verifying the configuration file.

[0030] Specifically, as shown in Figure 2 The configuration file includes the software name (i.e., the ECU name), I / O configuration (such as slot to bit signal configuration, button input signal configuration, lamp output signal configuration, and power-on output configuration), and slot configuration (slot protocol and ECU to be flashed configuration). Then the configuration file is verified, for example, whether the key fields are empty or not, etc. If the verification fails, the configuration is reconfigured.

[0031] S120: When the configuration file is verified, all associated to-be-flashed files are found from the database according to the ECU name in the configuration file.

[0032] Specifically, as shown in Figure 2 When the configuration file is verified, all associated to-be-flashed files are found from the database according to the ECU name in the configuration file, and it is checked whether all to-be-flashed files exist under the root folder, and if not, the local files are updated.

[0033] In the embodiment, SQLite can be used as the local database, and the functions include: storing the flashing-related configuration, storing the intermediate state of flashing, storing the result and error information of flashing, and implementing the fuzzy query of the result.

[0034] S130: The flashing file processing module is called to extract the to-be-flashed files found from the database by deserialization.

[0035] Specifically, as shown in Figure 2 The flashing file processing module is called to extract the to-be-flashed files found from the database by deserialization, and the files are quickly read and deserialized into the memory with low occupation.

[0036] In the embodiment, as shown in Figure 7 In the deserialization process, the initialization in the flashing software has the error-proof function, all operation functions of the current interface are temporarily disabled, and the system interface presents a "spinning" dynamic prompt to prevent misoperation.

[0037] In the optional embodiment, the configuration file is loaded and verified, and the related flashing files are accurately extracted from the database according to the ECU name, which can effectively guarantee the correctness and consistency of the flashing data; the flashing files are extracted from the database by deserialization, which further improves the structured degree and parsing efficiency of data processing, and is beneficial to the automation and standardization of the flashing process.

[0038] Optionally, the verifying the configuration file comprises: S111: The configuration file is deserialized to a configuration object.

[0039] Specifically, as shown in Figure 3 The JSON serialization library is used to deserialize the JSON-based configuration file to the configuration object.

[0040] S112: The key fields of the configuration file are verified.

[0041] Specifically, as shown in Figure 3As shown, first check if the key field is empty, and then check the accuracy of the key field content, such as checking the protocol (must be in "can", "canfd" and "doip"), checking the legality of the IP address (using regular expressions).

[0042] In this optional embodiment, by deserializing the configuration file into an object form and checking its key field, the parsing accuracy and error identification capability of the configuration parameters can be significantly improved, preventing configuration errors from causing flashing failure or abnormality, thereby improving the overall stability and security of the flashing task.

[0043] Optionally, the extracting the found to-be-flashed file from the database by deserialization includes: S131: Read slice data from the database in a specified byte block by using a piece-by-piece reading method.

[0044] Specifically, as shown in Figure 4 and Figure 6 For reading of a large-volume flashing file (e.g., a file larger than 1G), due to the large memory occupation and slow deserialization in the deserialization process, the slice data is read in a specified byte block by using a piece-by-piece reading method, avoiding the memory peak pressure caused by one-time loading.

[0045] Wherein, after finding all the associated to-be-flashed files from the database, an "ECU-file path" mapping can be established through a configuration file or a database, wherein all the associated to-be-flashed files can be stored in the form of slice data after data slicing, for example, each to-be-flashed file is stored as a slice data, and each slice data is stored separately. When extracting the to-be-flashed file, the slice data in the corresponding storage location in the database is read by specifying a byte block, and the slice data in each storage location can be read by multiple specified byte blocks.

[0046] S132: For each piece of slice data, convert it into an object value by deserialization to form the to-be-flashed file.

[0047] Specifically, as shown in Figure 4 each piece of data is read, i.e., local deserialization (JSON or custom format) is performed, and each deserialized object represents a piece of functional block or logic unit for flashing. The slice data is converted into an object value by deserialization, thereby forming the to-be-flashed file.

[0048] In the optional embodiment, the data in the database is extracted in a piece-by-piece reading manner, and each piece of data is deserialized to generate a to-be-flashed object, which not only reduces the memory pressure during loading of a large file, but also improves the processing efficiency of the flashed file and the stability of the system, and is especially suitable for resource-limited terminal devices or multi-task parallel flashing scenarios.

[0049] Optionally, the flashing protocol module includes a first protocol submodule for a CAN protocol and a second protocol submodule for a DoIP protocol; and the calling of the flashing protocol module to flash the to-be-flashed ECU according to the to-be-flashed file includes: S210: cutting the to-be-flashed file into multiple segments.

[0050] Specifically, in combination with Figure 5 As shown in the figure, the to-be-flashed file is cut into multiple small segments (data packets) from the deserialized memory object according to a fixed size (for example, 4KB, 8KB), and the slicing process can be dynamically adjusted according to the ECU characteristics or the communication protocol (such as the CAN frame length limit).

[0051] The flashing protocol module includes a UDS protocol stack module (Uds), a CAN-based UDS protocol module (UdsOnCan, that is, a first protocol submodule for implementation of Uds + Can / Canfd protocol), and a DoIP (diagnostic protocol based on Ethernet)-based UDS protocol module (UdsOverDoip, that is, a second protocol submodule for implementation of Uds + DoIP protocol), and the first protocol submodule and the second protocol submodule can integrate the UDS protocol stack module (Uds).

[0052] Before flashing, Modbus technology can also be used to communicate with a remote IO to perform virtual insertion detection and wait for an ECU in-place signal to ensure that the insertion is in place. In combination with Figure 8 As shown in the figure, once the insertion is detected to be in place, the red icon of the insertion state automatically changes to a green "connection state" and the main icon changes to a blue ball, for example, in Figure 8 In the figure, Slot01 to Slot10 can correspond to one ECU respectively, Slot01 to Slot04 are in an ECU insertion state, the main icon is a ball, the icon indicating the connection state is in a connected state (usually the color changes to green), and Slot05 to Slot10 are in an ECU non-insertion state, the main icon is a slot, and the icon indicating the connection state is in a disconnected state (usually the color changes to red); wherein, the ECU name and protocol and the like are also included in each Slot.

[0053] During the flashing process, the setting page entry is disabled to prevent unexpected situations caused by simultaneous flashing and configuration modification.

[0054] S220: calling the first protocol submodule and / or the second protocol submodule according to the specified protocol in the configuration file to write data of a plurality of the segments into the ECU to be flashed.

[0055] Specifically, in combination with Figure 5 As shown, each piece of data is sent according to the corresponding flashing protocol module called by the specified protocol in the configuration file, for example, the second protocol submodule uses Ethernet transmission, supporting parallel sending of larger data blocks; after each piece of data is successfully written, the system internal variable records the "total number of bytes flashed", and the system interface synchronously refreshes the progress bar and percentage prompt, until the file to be flashed is completely written into the ECU to be flashed (the configuration file can be modified after flashing is successful), and if flashing is abnormal, the abnormal time and the reason are recorded in the database.

[0056] In this optional embodiment, by integrating a plurality of submodules suitable for CAN protocol and DoIP protocol in the flashing protocol module, and dynamically selecting and calling according to the protocol type in the configuration file, the adaptability of the flashing system to different vehicle communication protocols is effectively improved; at the same time, by cutting the flashing file into a plurality of segments and writing them in segments, the flexibility and fault tolerance of the flashing process can be further improved, ensuring the smooth completion of the flashing task.

[0057] Optionally, the flashing system further comprises a security key module, and the calling the flashing protocol module to flash the ECU to be flashed according to the file to be flashed further comprises: calling the security key module to generate a security key required in the flashing process, wherein the security key module uses a bit operator to calculate the key.

[0058] Specifically, the flashing system further comprises a security key module (Security), which is used to generate the key algorithm of the flashing process, thereby generating the security key required in the flashing process, for example, before sending each piece of flashing data, the data piece is encrypted / signed, key negotiation or unlocking verification is performed with the ECU; wherein the security key module uses a bit operator to calculate the key, which is faster than a string (logical operation instead of complex string operation), occupies less memory (avoiding character array operation and dynamic memory allocation), and has more concise code and higher security (bit-level operation is difficult to reverse).

[0059] The security key module can also decrypt the encrypted fields (such as authorization code, device identification number, etc.) in the configuration file, ensure that the configuration data is not tampered with, and check whether the file to be flashed is a legal authorized version (through signature or HASH), to prevent loading of a fake flashing package.

[0060] In the optional embodiment, by introducing a security key module and using bit operation to calculate the key, the security of the flashing process can be improved while ensuring the speed of key generation, preventing illegal access or data tampering, further ensuring the reliability and credibility of the ECU flashing operation, and meeting the high requirements for the security of key system flashing.

[0061] Optionally, the flashing system is uniformly called and managed based on a graphical desktop client, and the ECU flashing method further comprises: displaying the flashing progress through the graphical desktop client.

[0062] Specifically, as shown in Figure 9 and Figure 10 , the flashing system is uniformly called and managed based on a graphical desktop client, and the flashing progress can be displayed through the graphical desktop client, such as real-time changes in slot state (insertion, flashing, success, failure), dynamic updating of icon color (for example, during the flashing process, the main icon is a blue sphere, the flashing progress is represented by a percentage, when the flashing is successful, the main icon is a green sphere, the flashing progress displays 100%, when the flashing fails, the main icon is a red sphere, and the flashing progress displays 99% or other percentages), thereby real-time monitoring the flashing process, letting the user know the flashing quality, process information, and flashing progress, etc.

[0063] In the optional embodiment, the graphical desktop client is used for unified calling and management, which improves the visualization of the flashing process and the convenience of user operation, thereby significantly improving the ease of use and overall operation efficiency of the flashing system. By integrating the real-time display function of the flashing progress in the graphical desktop client, the user's visual perception of the flashing process is enhanced, the operator can real-time master the flashing progress, the user experience and controllability of the flashing process are improved, and timely response and problem troubleshooting in abnormal situations are facilitated.

[0064] As shown in Figure 11 , the ECU flashing device 1100 provided by the embodiment of the application comprises: A first module 1110 is configured to call a flashing file processing module to extract a to-be-flashed file according to a configuration file. A second module 1120 is configured to call a flashing protocol module to flash a to-be-flashed ECU according to the to-be-flashed file. The flashing file processing module and the flashing protocol module are integrated in the flashing system in the form of a dynamic link library.

[0065] As shown in Figure 12As shown, the electronic device 1200 provided by the embodiment of the present application comprises a memory 1220 and a processor 1210; the memory 1220 is used for storing a computer program; the processor 1210 is used for realizing the ECU flashing method as described above when executing the computer program.

[0066] Alternatively, the electronic device 1200 comprises a memory 1220 and a processor 1210 coupled to the memory 1220; the memory 1220 is configured to store a computer program; the processor 1210 is configured to execute the following operations when executing the computer program: invoke the flashing file processing module to extract the to-be-flashed file according to the configuration file; invoke the flashing protocol module to flash the to-be-flashed ECU according to the to-be-flashed file; The flashing file processing module and the flashing protocol module are integrated in the flashing system in the form of dynamic link library.

[0067] The computer readable storage medium provided by the embodiment of the present application has a computer program stored thereon, and when the computer program is executed by the processor, the ECU flashing method as described above is realized.

[0068] Alternatively, a non-volatile computer readable storage medium has a computer program stored thereon, and when the computer program is executed by the processor, the processor executes the following operations: invoke the flashing file processing module to extract the to-be-flashed file according to the configuration file; invoke the flashing protocol module to flash the to-be-flashed ECU according to the to-be-flashed file; The flashing file processing module and the flashing protocol module are integrated in the flashing system in the form of dynamic link library.

[0069] An electronic device 1200 that can be a server or a client of the present application will now be described, which is an example of a hardware device that can be applied to various aspects of the present application. The electronic device 1200 is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device 1200 can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit implementations of the present application described and / or claimed in this document.

[0070] The electronic device 1200 includes a computing unit that can perform various appropriate actions and processes in accordance with a computer program stored in a read only memory (ROM) or a computer program loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The computing unit, the ROM, and the RAM are connected to each other through a bus. An input / output (I / O) interface is also connected to the bus.

[0071] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. When the program is executed, the processes of the above-mentioned embodiments can be included. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM), a random access memory (RAM), or the like. In this application, the units described as separate components can be or can not be physically separated, and the components shown as units can be or can not be physical units, that is, they can be located in one place or distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments of the present application. In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0072] Although the present application is disclosed as above, the protection scope of the present application is not limited to this. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application, and these changes and modifications will fall within the protection scope of the present application.

Claims

1. An ECU flashing method, characterized in that, include: Call the file flashing module to extract the file to be flashed based on the configuration file; Call the flashing protocol module to flash the ECU to be flashed according to the file to be flashed; The file processing module and the protocol module are integrated into the flashing system as dynamic link libraries.

2. The ECU flashing method according to claim 1, characterized in that, The process of calling the file flashing module to extract the file to be flashed based on the configuration file includes: Load and read the configuration file, and verify the configuration file; Once the configuration file passes verification, all associated files to be flashed are retrieved from the database based on the ECU name in the configuration file. The file processing module is invoked to extract the file to be flashed from the database via deserialization.

3. The ECU flashing method according to claim 2, characterized in that, The verification of the configuration file includes: Deserialize the configuration file into a configuration object; Verify the key fields of the configuration file.

4. The ECU flashing method according to claim 2, characterized in that, The file to be written, retrieved from the database via deserialization, includes: Slice data is read from the database in specified byte blocks using a segment-by-segment reading method; For each slice of data, it is converted into the value of an object through deserialization to form the file to be written.

5. The ECU flashing method according to claim 1, characterized in that, The flashing protocol module includes a first protocol submodule for the CAN protocol and a second protocol submodule for the DoIP protocol; The step of calling the flashing protocol module to flash the ECU to be flashed according to the file to be flashed includes: The file to be flashed is cut into multiple fragments; The first protocol submodule and / or the second protocol submodule are invoked according to the specified protocol in the configuration file to write the data of the multiple fragments into the ECU to be flashed.

6. The ECU flashing method according to claim 5, characterized in that, The flashing system also includes a security key module, and the step of calling the flashing protocol module to flash the ECU to be flashed according to the file to be flashed further includes: The security key module is invoked to generate the security key required for the flashing process, wherein the security key module uses bitwise operators to perform key calculations.

7. The ECU flashing method according to any one of claims 1 to 6, characterized in that, The flashing system is uniformly invoked and managed based on a graphical desktop client, and the ECU flashing method further includes: displaying the flashing progress through the graphical desktop client.

8. An ECU flashing device, characterized in that, include: The first module is used to call the file flashing processing module to extract the file to be flashed based on the configuration file; The second module is used to call the flashing protocol module to flash the ECU to be flashed according to the file to be flashed. The file processing module and the protocol module are integrated into the flashing system as dynamic link libraries.

9. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to implement the ECU flashing method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the ECU flashing method as described in any one of claims 1 to 7.