ECU flashing method, electronic equipment, storage medium and program product

By generating and verifying the direct interaction between the upper computer and the terminal after the ECU firmware package is generated and verified, the problems of low efficiency and poor security of traditional ECU firmware upgrades are solved, and an efficient and secure ECU flashing process is achieved.

CN120523482APending Publication Date: 2025-08-22WEICHAI POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510411760.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

Traditional ECU firmware upgrade methods require a lot of manpower, are inefficient and cannot guarantee timeliness and security. Especially when there are many ECUs, transmission efficiency and security will be affected.

Method used

By generating the firmware package to be flashed and performing integrity verification, only sending a flash command after the verification is passed, directly interacting between the upper computer and the terminal, avoiding intermediate devices, ensuring the integrity of the firmware package and improving the flashing success rate.

Benefits of technology

It improves the success rate and efficiency of ECU flash writing, reduces the transmission link, ensures data security, and achieves efficient and secure ECU firmware upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120523482A_ABST
    Figure CN120523482A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an ECU flashing method, electronic equipment, a storage medium and a program product, and relates to the technical field of Internet, the ECU flashing method comprises the following steps: generating a firmware package to be flashed, and sending the firmware package to a terminal; the firmware package comprises a data file and a flashing process file corresponding to the data file; receiving an integrity verification result of the firmware package fed back by the terminal; under the condition that the integrity checking result is that checking is passed, a flashing instruction is sent to the terminal; the flashing instruction is used for indicating the terminal to flash the ECU based on the firmware package. Through interaction between the upper computer and the terminal, ECU flashing is carried out under the condition that the integrity verification of the firmware package is passed, and the success rate and efficiency of ECU flashing can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to an ECU flashing method, electronic device, storage medium, and program product. Background Art

[0002] In the automotive industry, electrification, intelligence, connectivity, and sharing are emerging as new directions and trends in automotive development. As a result, the functionality of vehicle ECUs (Electronic Control Units) is becoming increasingly powerful. ECU firmware upgrades and iterations have become a core requirement in the automotive industry.

[0003] Traditionally, ECU firmware upgrades can only be performed offline, requiring significant manpower and time. This significantly increases the cost of ECU firmware upgrades and cannot guarantee timely updates. Especially with a large number of ECUs, if firmware upgrades for each ECU rely on manual labor, this significantly reduces the efficiency of ECU firmware upgrades. To address this issue, ECUs can be connected to repeaters and configured to flash them. However, this method increases the transmission link, which not only reduces transmission efficiency during the ECU flashing process but also makes it impossible to ensure the security of the ECU flashing process. Summary of the Invention

[0004] The embodiments of the present application provide an ECU flashing method, electronic device, storage medium and program product to alleviate or solve one or more technical problems existing in the prior art.

[0005] In a first aspect, an embodiment of the present application provides an ECU flashing method, comprising:

[0006] Generate a firmware package to be flashed, and send the firmware package to the terminal; the firmware package includes a data file and a flashing process file corresponding to the data file;

[0007] receiving an integrity check result of the firmware package fed back by the terminal;

[0008] If the integrity check result is passed, a flashing instruction is sent to the terminal; the flashing instruction is used to instruct the terminal to flash the ECU based on the firmware package.

[0009] In a second aspect, an embodiment of the present application provides an ECU flashing method, comprising:

[0010] Obtain a firmware package to be flashed sent by a host computer; the firmware package includes a data file and a flashing process file corresponding to the data file;

[0011] Performing integrity check on the firmware package and feeding back the integrity check result to the host computer;

[0012] In response to receiving a flashing instruction sent by the host computer, the ECU is flashed based on the firmware package; the flashing instruction is generated by the host computer when the integrity check result is passed.

[0013] In a third aspect, an embodiment of the present application provides an ECU flashing device, comprising:

[0014] A first sending module is configured to generate a firmware package to be flashed and send the firmware package to a terminal; the firmware package includes a data file and a flashing process file corresponding to the data file;

[0015] A receiving module, configured to receive an integrity check result of the firmware package fed back by the terminal;

[0016] The second sending module is used to send a flashing instruction to the terminal if the integrity check result is passed; the flashing instruction is used to instruct the terminal to flash the ECU based on the firmware package.

[0017] In a fourth aspect, an embodiment of the present application provides an ECU flashing device, comprising:

[0018] An acquisition module is used to acquire a firmware package to be flashed sent by a host computer; the firmware package includes a data file and a flashing process file corresponding to the data file;

[0019] A verification module is used to perform integrity verification on the firmware package and feed back the integrity verification result to the host computer;

[0020] A flashing module is used to flash the ECU based on the firmware package in response to receiving a flashing instruction sent by the host computer; the flashing instruction is generated by the host computer when the integrity check result is passed.

[0021] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor implements any method of the embodiment of the present application when executing the computer program.

[0022] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of any one of the embodiments of the present application is implemented.

[0023] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements any method of the embodiments of the present application when executed by a processor.

[0024] The technical solution of the embodiment of the present application is adopted. By generating a firmware package to be flashed and sending the firmware package to the terminal, the firmware package includes a data file and a flashing process file corresponding to the data file; the integrity check result of the firmware package fed back by the receiving terminal is sent to the terminal when the integrity check result is passed. The flashing instruction is used to instruct the terminal to flash the ECU based on the firmware package. The integrity check and the flashing process of the firmware package are performed separately, that is, the integrity check is performed before flashing, and the flashing is performed only after the integrity check is passed, thereby ensuring the integrity of the firmware package and improving the success rate of ECU flashing. In addition, the ECU flashing is realized by direct interaction between the host computer and the terminal, without the introduction of intermediate equipment, reducing the transmission link, not only improving the efficiency of ECU flashing, but also avoiding the problem of reduced data security when there are too many links.

[0025] The above description is only an overview of the technical solution of this application. In order to more clearly understand the technical means of this application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of this application more obvious and easy to understand, the specific implementation methods of this application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In the accompanying drawings, unless otherwise specified, identical reference numerals throughout the multiple drawings represent identical or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments of the present application and should not be construed as limiting the scope of the present application. Those skilled in the art will be able to derive other drawings based on these drawings without inventive effort.

[0027] Figure 1 is a schematic flow chart of an ECU flashing method according to some embodiments of the present application;

[0028] Figure 2 is a schematic flow chart of an ECU flashing method according to some embodiments of the present application;

[0029] Figure 3 is a schematic swim lane diagram of an ECU flashing method according to some embodiments of the present application;

[0030] Figure 4 is a schematic block diagram of an ECU flashing device according to some embodiments of the present application;

[0031] Figure 5 is a schematic block diagram of an ECU flashing device according to some embodiments of the present application;

[0032] Figure 6 is a schematic block diagram of an electronic device according to some embodiments of the present application. DETAILED DESCRIPTION

[0033] Hereinafter, only certain exemplary embodiments are briefly described. As will be appreciated by those skilled in the art, the described embodiments may be modified in various ways without departing from the spirit or scope of the present application. Therefore, the drawings and description are to be regarded as illustrative in nature and not restrictive.

[0034] To facilitate understanding of the technical solutions of the embodiments of the present application, the following describes the related technologies of the embodiments of the present application. The following related technologies can be combined with the technical solutions of the embodiments of the present application as optional solutions, and all of them fall within the scope of protection of the embodiments of the present application.

[0035] The following describes in detail the technical solution of this application and how it solves the aforementioned technical problems using specific embodiments. The several specific embodiments listed can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The following describes the embodiments of this application in detail with reference to the accompanying drawings.

[0036] Figure 1 This is a schematic flow chart of an ECU flashing method according to some embodiments of the present application. In this embodiment, the ECU flashing method can be applied to a host computer. Figure 1 As shown, the method may include the following steps S102 to S106:

[0037] Step S102 : Generate a firmware package to be flashed, and send the firmware package to the terminal. The firmware package includes a data file and a flashing process file corresponding to the data file.

[0038] The flashing process file includes the flashing process of the firmware package, and the flashing process refers to the process of writing data files into the ECU.

[0039] Step S104: receiving the integrity check result of the firmware package fed back by the terminal.

[0040] After receiving the firmware package, the terminal first verifies the package's integrity, obtains a verification result, and then transmits this result back to the host computer. The integrity check ensures the integrity of the firmware package and prevents data loss or tampering. The integrity check result can be either passed or failed.

[0041] Step S106: If the integrity check result is passed, a flashing instruction is sent to the terminal, where the flashing instruction is used to instruct the terminal to flash the ECU based on the firmware package.

[0042] After receiving the flashing instruction, the terminal writes the data file into the ECU according to the flashing process based on the flashing process file in the firmware package.

[0043] The technical solution of the embodiment of the present application is adopted. By generating a firmware package to be flashed and sending the firmware package to the terminal, the firmware package includes a data file and a flashing process file corresponding to the data file; the integrity check result of the firmware package fed back by the receiving terminal is sent to the terminal when the integrity check result is passed. The flashing instruction is used to instruct the terminal to flash the ECU based on the firmware package. The integrity check and the flashing process of the firmware package are performed separately, that is, the integrity check is performed before flashing, and the flashing is performed only after the integrity check is passed, thereby ensuring the integrity of the firmware package and improving the success rate of ECU flashing. In addition, the ECU flashing is realized by direct interaction between the host computer and the terminal, without the introduction of intermediate equipment, reducing the transmission link, not only improving the efficiency of ECU flashing, but also avoiding the problem of reduced data security when there are too many links.

[0044] In some embodiments, before sending a flashing instruction to a terminal, an ECU mode switching instruction may be sent to the terminal. The ECU mode switching instruction is used to instruct the terminal to switch the ECU mode to a specific mode, where the specific mode is used to flash the ECU. After sending the ECU mode switching instruction, a mode switching result is fed back by the terminal. The mode switching result is used to indicate that the terminal has completed the ECU mode switch.

[0045] After receiving the ECU mode switching instruction, the terminal switches the current mode of the ECU to a specific mode, which may be an editing mode or a flashing mode.

[0046] Because in the default mode of the ECU (such as normal operating mode), the ECU may prohibit the modification of internal programs and needs to process sensor data and control actuators in real time, which will occupy more CPU, memory and other resources. In the edit mode or flash mode, the ECU will stop non-essential control logic and release resources for flashing operations. Therefore, by switching the current mode of the ECU to a specific mode and flashing the ECU in the specific mode, it can ensure that the ECU flashing proceeds smoothly and ensures the stability and efficiency of the ECU flashing.

[0047] In some embodiments, after receiving the mode switching result fed back by the terminal, a security detection instruction is sent to the terminal, and the security detection instruction is used to instruct the terminal to perform a security detection of the ECU flashing. Optionally, the firmware package also includes signature information for security authentication. The signature information can be a security verification code (such as Seed & Key), a key, a digital certificate, etc. generated randomly or according to a pre-configured signature generation algorithm. The security detection of the ECU flashing may include detecting whether the signature information is correct and complete. After the terminal performs the security detection, the security detection result is sent to the host computer. After the host computer receives the security detection result as passed, it sends a flashing instruction to the terminal to start the flashing.

[0048] By performing security checks before ECU flashing, it can be ensured that the current ECU flashing is performed by the authorized party, preventing external devices from maliciously flashing the ECU, thereby ensuring the security of ECU flashing.

[0049] In some embodiments, after sending a flashing instruction to a terminal, a response message from the ECU during the flashing process is obtained; and based on the response message, the flashing status information of the ECU is determined. The flashing status information includes at least one of the following: the flashing progress and the content of the data currently being flashed.

[0050] During the ECU flashing process, the terminal sends a response message to the terminal, which transparently transmits the ECU's response message to the host computer. The response message is the ECU's response message during the flashing process and may include identification information about the data currently being flashed by the ECU. After receiving the response message from the ECU, the host computer can determine the ECU's flashing progress and the digital content currently being flashed, thereby enabling the host computer to monitor the ECU's flashing status and promptly obtain information about the flashing progress and any abnormalities that may occur during the flashing process.

[0051] In some embodiments, after sending a flash instruction to a terminal, the terminal receives feedback on an ECU flash result, which includes at least one of the following: whether the flash is complete, the flash progress, and the flash process that has been executed. After receiving the ECU flash result, the ECU flash result is verified according to a locally stored flash process file.

[0052] Optionally, the upper computer has a local backup of the flash process file. After receiving the ECU flash result, the executed flash process in the ECU flash result is compared with the locally backed-up flash process file to determine whether the ECU flash result is correct, for example, whether the ECU flash process has been fully executed, whether the flash progress is 100%, and so on.

[0053] In some embodiments, the host computer may display the ECU flashing results, flashing status information, etc. received during the ECU flashing process to the user, so that the user can obtain relevant information about the ECU flashing in a timely manner.

[0054] Figure 2 This is a schematic flow chart of an ECU flashing method according to some embodiments of the present application. In this embodiment, the ECU flashing method can be applied to a terminal. Figure 2 As shown, the method may include the following steps S202 to S206:

[0055] Step S202: Obtain the firmware package to be flashed sent by the host computer. The firmware package includes a data file and a flashing process file corresponding to the data file.

[0056] The flashing process file includes the flashing process of the firmware package, and the flashing process refers to the process of writing data files into the ECU.

[0057] Step S204: perform integrity check on the firmware package and feed back the integrity check result to the host computer.

[0058] After receiving the firmware package, the terminal first verifies the package's integrity, obtains a verification result, and then transmits this result back to the host computer. The integrity check ensures the integrity of the firmware package and prevents data loss or tampering. The integrity check result can be either passed or failed.

[0059] Step S206 , in response to receiving the flashing instruction sent by the host computer, flashing the ECU based on the firmware package, the flashing instruction is generated by the host computer when the integrity check result is passed.

[0060] After receiving the flashing instruction, the terminal writes the data file into the ECU according to the flashing process based on the flashing process file in the firmware package.

[0061] Adopting the technical solution of the embodiment of the present application, by obtaining the firmware package to be flashed sent by the host computer, the firmware package includes a data file and a flashing process file corresponding to the data file, performing an integrity check on the firmware package, and feeding back the integrity check result to the host computer. After receiving the flashing instruction sent by the host computer, the ECU is flashed based on the firmware package. The flashing instruction is generated by the host computer when the integrity check result is a pass. It can be seen that the integrity check and the flashing process of the firmware package are executed separately, that is, the integrity check is performed before flashing, and the flashing is performed only when the integrity check is passed, thereby ensuring the integrity of the firmware package and improving the success rate of ECU flashing. In addition, the ECU flashing is realized by direct interaction between the host computer and the terminal, without the introduction of intermediate equipment, reducing the transmission link, not only improving the ECU flashing efficiency, but also avoiding the problem of reduced data security when there are too many links.

[0062] In some embodiments, during the flashing process of the ECU, the terminal obtains a response message from the ECU and transparently transmits the response message to a host computer, so that the host computer can determine the flashing status information of the ECU based on the response message of the ECU. The flashing status information includes at least one of the following: the flashing progress and the content of the data currently being flashed.

[0063] During the flashing process of the ECU, the ECU sends a response message to the terminal. The response message is the response message of the ECU during the flashing process, and the response message may include identification information of the data content currently flashed by the ECU.

[0064] By transparently transmitting the response message to the host computer, the host computer can determine the ECU's flashing progress and the digital content currently being flashed after receiving the ECU's response message, thereby enabling the host computer to monitor the ECU's flashing status and promptly learn about the flashing progress and any abnormal situations that may occur during the flashing process.

[0065] In some embodiments, after the ECU flash is completed, the terminal feeds back the ECU flash result to the host computer. The ECU flash result includes at least one of the following: whether the flash is completed, the flash progress, and the executed flash process.

[0066] Figure 3 This is a schematic swim lane diagram of an ECU flashing method according to some embodiments of the present application. In this embodiment, the host computer and the vehicle terminal (hereinafter referred to as the terminal) are connected wirelessly, and the terminal and the ECU are connected via a wiring harness. Figure 3 As shown, the ECU flashing method includes the following steps S3.1 to S3.12:

[0067] In step S3.1, the host computer generates a firmware package to be flashed and sends the firmware package to the terminal.

[0068] In step S3.2, the terminal downloads the firmware package and performs an integrity check on the firmware package.

[0069] In step S3.3, the terminal sends the integrity check result to the host computer.

[0070] Optionally, after the terminal performs an integrity check on the firmware package, if the integrity check result is a failure, the terminal may re-download the firmware package and perform an integrity check on the re-downloaded firmware package. If the number of repeated downloads of the firmware package reaches a preset number, the firmware package download is stopped and the integrity check failure result is reported to the host computer. The host computer may then re-send the firmware package to the terminal.

[0071] Step S3.4: If the integrity check result is passed, the host computer sends an ECU mode switching instruction and a safety detection instruction to the terminal.

[0072] Among them, the ECU mode switching instruction is used to instruct the terminal to switch the ECU mode to the programming mode, and the safety detection instruction is used to instruct the terminal to perform a safety detection of the ECU flashing.

[0073] In step S3.5, the terminal switches the ECU programming mode to programming mode and performs a safety test for ECU flashing.

[0074] The firmware package also includes signature information for security authentication. This signature information can be a security verification code (such as Seed & Key), a key, a digital certificate, etc., generated randomly or according to a pre-configured signature generation algorithm. ECU flash security testing can include checking whether the signature information is correct and complete.

[0075] In step S3.6, the terminal feeds back the mode switching result and the safety detection result to the host computer.

[0076] Step S3.7: If the mode switch is successful and the security detection result is passed, the host computer sends a flashing instruction to the terminal.

[0077] Step S3.8: After receiving the flashing instruction, the terminal flashes the ECU according to the firmware package.

[0078] Step S3.9: During the ECU flashing process, the ECU sends a response message to the terminal.

[0079] The response message is the response message of the ECU during the flashing process, and the response message may include identification information of the data content currently being flashed by the ECU.

[0080] In step S3.10, the terminal sends the response message of the ECU to the host computer.

[0081] In step S3.11, the host computer determines the flashing status information of the ECU based on the response message from the ECU.

[0082] The flashing status information includes at least one of the following: flashing progress and the content of the data currently being flashed.

[0083] Step S3.12: After the ECU flashing is completed, the terminal feeds back the ECU flashing result to the host computer.

[0084] It can be seen that the technical solution of the embodiment of the present application is adopted. Before the ECU is flashed, the integrity check of the firmware package is first performed, and only when the integrity check result is verified to be passed, the host computer will send a flashing instruction to the terminal to start the flashing of the ECU, so that the integrity check of the firmware package and the flashing process are performed separately, ensuring the integrity of the firmware package and improving the success rate of the ECU flashing. In addition, the ECU flashing is achieved by direct interaction between the host computer and the terminal, without the need to introduce intermediate equipment, reducing the transmission link, not only improving the ECU flashing efficiency, but also avoiding the problem of reduced data security caused by too many links. In addition, during the ECU flashing process, the host computer and the terminal directly exchange ECU response messages, so that the host computer can understand the ECU flashing progress, the current flashing data content and other information in real time, thereby realizing the host computer's monitoring of the ECU flashing status and timely knowing the flashing progress and abnormal situations that may occur during the flashing process.

[0085] In summary, specific embodiments of the present subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing may be advantageous.

[0086] Corresponding to the application scenario and method of the ECU flashing method provided in the embodiment of the present application, the embodiment of the present application also provides an ECU flashing device.

[0087] Figure 4 is a schematic block diagram of an ECU flashing device according to some embodiments of the present application, such as Figure 4 As shown, the device includes:

[0088] The first sending module 41 is used to generate a firmware package to be flashed and send the firmware package to the terminal; the firmware package includes a data file and a flashing process file corresponding to the data file;

[0089] A receiving module 42 is configured to receive an integrity check result of the firmware package fed back by the terminal;

[0090] The second sending module 43 is configured to send a flashing instruction to the terminal if the integrity check result is passed; the flashing instruction is configured to instruct the terminal to flash the ECU based on the firmware package.

[0091] In some embodiments, the apparatus further comprises:

[0092] A third sending module is configured to send an ECU mode switching instruction to the terminal before sending the flashing instruction to the terminal; the ECU mode switching instruction is used to instruct the terminal to switch the ECU mode to a specific mode; the specific mode is a mode for flashing the ECU;

[0093] The second receiving module is configured to receive the mode switching result fed back by the terminal.

[0094] In some embodiments, the apparatus further comprises:

[0095] A second acquisition module is configured to acquire a response message from the ECU during the flashing process after sending the flashing instruction to the terminal;

[0096] The first determining module is used to determine the flashing status information of the ECU according to the response message; the flashing status information includes at least one of the following: flashing progress and data content currently being flashed.

[0097] In some embodiments, the apparatus further comprises:

[0098] A third receiving module is configured to receive an ECU flashing result fed back by the terminal after sending the flashing instruction to the terminal; the ECU flashing result includes at least one of the following: whether the flashing is completed, the flashing progress, and the executed flashing process;

[0099] The second verification module is used to verify the ECU flashing result according to the flashing process file pre-stored locally.

[0100] The device of the embodiment of the present application generates a firmware package to be flashed and sends the firmware package to the terminal. The firmware package includes a data file and a flashing process file corresponding to the data file. The terminal receives the integrity check result of the firmware package, and when the integrity check result is a pass, a flashing instruction is sent to the terminal. The flashing instruction is used to instruct the terminal to flash the ECU based on the firmware package. The integrity check and the flashing process of the firmware package are performed separately, that is, the integrity check is performed before flashing, and the flashing is performed only after the integrity check is passed, thereby ensuring the integrity of the firmware package and improving the success rate of ECU flashing. In addition, the ECU flashing is achieved by direct interaction between the host computer and the terminal, without the introduction of intermediate equipment, reducing the transmission link, not only improving the efficiency of ECU flashing, but also avoiding the problem of reduced data security when there are too many links.

[0101] Those skilled in the art should understand that Figure 4 The ECU flashing device in can be used to implement the ECU flashing method described above. The detailed description should be similar to the description of the method part above. To avoid tediousness, it will not be repeated here.

[0102] Figure 5 is a schematic block diagram of an ECU flashing device according to some embodiments of the present application, such as Figure 5 As shown, the device includes:

[0103] The acquisition module 51 is used to acquire the firmware package to be flashed sent by the host computer; the firmware package includes a data file and a flashing process file corresponding to the data file;

[0104] A verification module 52 is used to perform integrity verification on the firmware package and feed back the integrity verification result to the host computer;

[0105] The flashing module 53 is configured to flash the ECU based on the firmware package in response to receiving a flashing instruction sent by the host computer; the flashing instruction is generated by the host computer when the integrity check result is passed.

[0106] In some embodiments, the apparatus further comprises:

[0107] A third acquisition module is used to obtain a response message from the ECU during the flashing process of the ECU;

[0108] The transparent transmission module is used to transparently transmit the response message to the host computer.

[0109] In some embodiments, the apparatus further comprises:

[0110] The feedback module is used to feed back the ECU flashing result to the host computer; the ECU flashing result includes at least one of the following: whether the flashing is completed, the flashing progress, and the executed flashing process.

[0111] The device of the embodiment of the present application is used to obtain the firmware package to be flashed sent by the host computer, which includes a data file and a flashing process file corresponding to the data file. The firmware package is checked for integrity and the integrity check result is fed back to the host computer. After receiving the flashing instruction sent by the host computer, the ECU is flashed based on the firmware package. The flashing instruction is generated by the host computer when the integrity check result is a passed check. It can be seen that the integrity check and the flashing process of the firmware package are executed separately, that is, the integrity check is performed before flashing, and the flashing is performed only when the integrity check is passed, thereby ensuring the integrity of the firmware package and improving the success rate of ECU flashing. In addition, the ECU flashing is achieved by direct interaction between the host computer and the terminal, without the introduction of intermediate equipment, reducing the transmission link, not only improving the ECU flashing efficiency, but also avoiding the problem of reduced data security when there are too many links.

[0112] Those skilled in the art should understand that Figure 5 The ECU flashing device in can be used to implement the ECU flashing method described above. The detailed description should be similar to the description of the method part above. To avoid tediousness, it will not be repeated here.

[0113] Based on the same idea, an embodiment of the present application further provides an electronic device, Figure 6 FIG. 1 is a block diagram of an electronic device for implementing an embodiment of the present application. Figure 6 As shown, the electronic device includes a memory 601 and a processor 602. The memory 601 stores a computer program executable by the processor 602. When the processor 602 executes the computer program, the method described in the above embodiment is implemented. The number of the memory 601 and the processor 602 can be one or more. In a specific implementation, the electronic device may also include a communication interface 603 for communicating with external devices and exchanging data.

[0114] In a specific implementation, if the memory 601, the processor 602, and the communication interface 603 are implemented independently, the memory 601, the processor 602, and the communication interface 603 can be connected to each other via a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0115] Optionally, in a specific implementation, if the memory 601 , the processor 602 , and the communication interface 603 are integrated on a chip, the memory 601 , the processor 602 , and the communication interface 603 may communicate with each other through an internal interface.

[0116] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the method provided in the embodiment of the present application when the program is executed by a processor.

[0117] An embodiment of the present application provides a computer program product, including a computer program, which implements the method provided in the embodiment of the present application when executed by a processor.

[0118] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided in the embodiment of the present application.

[0119] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory. The input interface, the output interface, the processor and the memory are connected through an internal connection path. The processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.

[0120] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the Advanced RISC Machines (ARM) architecture.

[0121] Furthermore, optionally, the above-mentioned memory may include a read-only memory and a random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct memory bus random access memory (DR RAM).

[0122] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.

[0123] In the description of this specification, the reference terms "one embodiment," "some embodiments," "example," "specific example," or "some examples" mean that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described may be combined in any appropriate manner in any one or more embodiments or examples. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification, as well as features of different embodiments or examples, unless they are mutually inconsistent.

[0124] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the description of this application, "plurality" means two or more, unless otherwise specifically defined.

[0125] Any process or method described in the flowchart or otherwise described herein can be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process. The scope of the preferred embodiments of the present application includes other implementations in which the functions may be performed in a different order than shown or discussed, including performing the functions substantially simultaneously or in reverse order depending on the functions involved.

[0126] The logic and / or steps described in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with such instruction execution systems, apparatuses or devices.

[0127] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0128] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the aforementioned integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a magnetic disk, or an optical disk, etc.

[0129] The above is merely an exemplary embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various modifications or substitutions within the technical scope described in this application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. An ECU flashing method, characterized in that: The method comprises: Generate a firmware package to be flashed, and send the firmware package to the terminal; the firmware package includes a data file and a flashing process file corresponding to the data file; receiving an integrity check result of the firmware package fed back by the terminal; If the integrity check result is passed, a flashing instruction is sent to the terminal; the flashing instruction is used to instruct the terminal to flash the ECU based on the firmware package.

2. The method according to claim 1, characterized in that Before sending the flash instruction to the terminal, the method further includes: Sending an ECU mode switching instruction to the terminal; the ECU mode switching instruction is used to instruct the terminal to switch the ECU mode to a specific mode; the specific mode is a mode for flashing the ECU; Receive the mode switching result fed back by the terminal.

3. The method according to claim 1, characterized in that After sending the flashing instruction to the terminal, the method further includes: Obtaining the response message of the ECU during the flashing process; According to the response message, the flashing status information of the ECU is determined; the flashing status information includes at least one of the following: flashing progress and content of data currently being flashed.

4. The method according to claim 1, wherein After sending the flashing instruction to the terminal, the method further includes: Receive the ECU flashing result fed back by the terminal; the ECU flashing result includes at least one of the following: whether the flashing is completed, the flashing progress, and the executed flashing process; The ECU flashing result is verified according to the flashing process file pre-stored locally.

5. An ECU flashing method, characterized in that: The method comprises: Obtain a firmware package to be flashed sent by a host computer; the firmware package includes a data file and a flashing process file corresponding to the data file; Performing integrity check on the firmware package and feeding back the integrity check result to the host computer; In response to receiving a flashing instruction sent by the host computer, the ECU is flashed based on the firmware package; the flashing instruction is generated by the host computer when the integrity check result is passed.

6. The method according to claim 5, characterized in that The method further comprises: During the flashing process of the ECU, obtaining a response message from the ECU; The response message is transparently transmitted to the host computer.

7. The method according to claim 5, characterized in that The method further comprises: Feedback the ECU flashing result to the host computer; the ECU flashing result includes at least one of the following: whether the flashing is completed, the flashing progress, and the executed flashing process.

8. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer program product, characterized in that A computer program is included which, when executed by a processor, implements the method according to any one of claims 1 to 7.