A method, device, equipment and medium for flashing a vehicle electronic control unit
By querying the vehicle diagnostic data packet in the vehicle electronic control unit flashing method and selecting the target diagnostic file or preset flashing module for flashing, the problem of low flashing error tolerance is solved, and a more efficient and stable flashing process is achieved.
Patent Information
- Application Number
- CN202210339452.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-01
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-04-01
AI Technical Summary
In the prior art, the flashing error tolerance rate of the vehicle electronic control unit brushing method is low, especially when using protocols and JAR packages provided by OEM suppliers, flashing failures are prone to occur, resulting in failures.
Provide a vehicle electronic control unit flashing method. By obtaining vehicle diagnostic data packets from the server, checking whether the target diagnostic file exists. If there is, the target diagnostic file will be flashed. Otherwise, the pre-written preset flashing module will be flashed. It is compatible with two flashing methods to improve the fault tolerance rate.
It improves the efficiency and fault tolerance of brushing, ensures the stability and success rate of brushing, and reduces the risk of brushing failure.
Smart Images

Figure CN114647422B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly to a method, device, equipment and medium for flashing a vehicle electronic control unit. Background Art
[0002] Currently, ODX-OTX (Open Diagnostic data eXchange-Open Test sequence eXchange) is a new technology for vehicle diagnosis. Diagnostic data and diagnostic processes can be obtained by parsing vehicle diagnostic data packets, thereby performing vehicle diagnosis. In existing methods, there are two ways to flash a vehicle. One is to use code to implement flashing according to the protocols and processes provided by OEM (Original Entrusted Manufacture) suppliers. The other is that the manufacturer writes JAR (Java Archive) packages or OTX (-Open Test sequence eXchange) source files, puts them into the vehicle type diagnostic data packets for packaging, and the diagnostic device downloads the vehicle diagnostic data packets through the network, and then uses the vehicle diagnostic data packets for flashing. Among them, flashing with code has a high coupling degree, high after-sales development cost, and is not easy to change. Flashing with JAR packages requires high requirements for developers. However, when using the above two methods for flashing, if a flashing failure occurs, the flashing fails, and the flashing fault tolerance rate is relatively low.
[0003] In summary, how to improve the flashing fault tolerance rate is an urgent problem to be solved currently. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for flashing a vehicle electronic control unit, which can improve the flashing fault tolerance rate. The specific scheme is as follows:
[0005] In the first aspect, the present application discloses a method for flashing a vehicle electronic control unit, which is applied to a diagnostic device and includes:
[0006] Obtaining a vehicle diagnostic data packet corresponding to a vehicle from a server;
[0007] Querying whether a target diagnostic file exists in the vehicle diagnostic data packet;
[0008] If the target diagnostic file exists in the vehicle diagnostic data packet, using the target diagnostic file to flash the vehicle electronic control unit;
[0009] If the target diagnostic file does not exist in the vehicle diagnostic data packet, calling a preset flashing module written in advance with a preset flashing code to flash the vehicle electronic control unit.
[0010] Optionally, the flashing of the vehicle electronic control unit using the target diagnostic file includes:
[0011] Copy the target diagnostic file to a preset directory, and then call the target diagnostic file from the preset directory to flash the vehicle electronic control unit.
[0012] Optionally, the copying the target diagnostic file to a preset directory and then calling the target diagnostic file from the preset directory to flash the vehicle electronic control unit includes:
[0013] Copy the target diagnostic file, the dynamic link library file, the first preset source file constructed based on the target diagnostic process, and the second preset source file constructed based on the target diagnostic data to the preset directory;
[0014] Select the first preset source file from the preset directory and parse the first preset source file to obtain the target diagnostic process, and then select the second preset source file from the preset directory and parse the second preset source file to obtain the target diagnostic data;
[0015] Based on the target diagnostic process and the target diagnostic data, and call the target diagnostic file and the dynamic link library file from the preset directory to flash the vehicle electronic control unit.
[0016] Optionally, the if the target diagnostic file exists in the vehicle diagnostic data packet, then using the target diagnostic file to flash the vehicle electronic control unit includes:
[0017] If the flashing of the vehicle electronic control unit using the target diagnostic file fails, then call the preset flashing module written by the preset flashing code to flash the vehicle electronic control unit.
[0018] Optionally, the obtaining the vehicle diagnostic data packet corresponding to the vehicle from the server includes:
[0019] Obtain the vehicle identification information corresponding to the vehicle, and obtain the vehicle diagnostic data packet corresponding to the vehicle from the server based on the vehicle identification information.
[0020] In a second aspect, the present application discloses a method for flashing a vehicle electronic control unit, which is applied to a development terminal and includes:
[0021] Determine whether a target diagnostic file is required when flashing the vehicle electronic control unit;
[0022] If it is determined that the target diagnostic file needs to be used, save the target diagnostic file to the vehicle diagnostic data packet corresponding to the vehicle and upload the vehicle diagnostic data packet to the server;
[0023] If it is determined that the target diagnostic file does not need to be used, directly save the preset flashing module written by the preset flashing code to the diagnostic device.
[0024] Optionally, the saving the target diagnostic file to the vehicle diagnostic data packet corresponding to the vehicle and uploading the vehicle diagnostic data packet to the server includes:
[0025] Save the target diagnostic file to the vehicle diagnostic data packet corresponding to the vehicle;
[0026] Determine the vehicle identification information corresponding to the vehicle, associate the vehicle identification information with the vehicle diagnostic data packet, and upload the associated vehicle diagnostic data packet to the server, so that the diagnostic device can obtain and save the vehicle diagnostic data packet corresponding to the vehicle from the server based on the vehicle identification information.
[0027] In a third aspect, the present application discloses a vehicle electronic control unit flashing device, which is applied to a diagnostic device and includes:
[0028] A data packet acquisition module, configured to acquire a vehicle diagnostic data packet corresponding to a vehicle from a server;
[0029] A file query module, configured to query whether a target diagnostic file exists in the vehicle diagnostic data packet;
[0030] A first flashing module, configured to, if the target diagnostic file exists in the vehicle diagnostic data packet, flash the vehicle electronic control unit by using the target diagnostic file;
[0031] A second flashing module, configured to, if the target diagnostic file does not exist in the vehicle diagnostic data packet, call a preset flashing module written by a preset flashing code to flash the vehicle electronic control unit.
[0032] In a fourth aspect, the present application discloses an electronic device, including a processor and a memory; wherein, when the processor executes a computer program stored in the memory, the vehicle electronic control unit flashing method described in the first aspect or the vehicle electronic control unit flashing method described in the second aspect is implemented.
[0033] In a fifth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the vehicle electronic control unit flashing method described in the first aspect or the vehicle electronic control unit flashing method described in the second aspect is implemented.
[0034] It can be seen that the present application obtains the vehicle diagnostic data packet corresponding to the vehicle from the server; queries whether there is a target diagnostic file in the vehicle diagnostic data packet; if there is the target diagnostic file in the vehicle diagnostic data packet, the vehicle electronic control unit is flashed using the target diagnostic file; if there is no target diagnostic file in the vehicle diagnostic data packet, a preset flashing module written in advance through a preset flashing code is called to flash the vehicle electronic control unit. Thus, it can be seen that the present application is compatible with two methods of flashing the vehicle electronic control unit, namely, using the target diagnostic file to flash the vehicle electronic control unit and calling the preset flashing module written in advance through the preset flashing code to flash the vehicle electronic control unit, providing two different flashing methods for the diagnostic device; because the present application selects to use the target diagnostic file or call the preset flashing module written in advance through the preset flashing code to flash the vehicle electronic control unit by querying whether there is a target diagnostic file in the vehicle diagnostic data packet, providing an execution method for intelligently judging the flashing method, the flashing efficiency and the flashing fault tolerance rate are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0036] Figure 1 It is a schematic diagram of the system framework applicable to the vehicle electronic control unit flashing solution provided by the present application;
[0037] Figure 2 It is a flowchart of a method for flashing a vehicle electronic control unit provided by the present application;
[0038] Figure 3 It is a schematic diagram of a vehicle diagnostic data packet provided by the present application;
[0039] Figure 4 It is a schematic diagram of a JAR package provided by the present application;
[0040] Figure 5 It is a flowchart of a specific method for flashing a vehicle electronic control unit provided by the present application;
[0041] Figure 6 It is a flowchart of a method for flashing a vehicle electronic control unit provided by the present application;
[0042] Figure 7 It is a structural diagram of a device for flashing a vehicle electronic control unit provided by the present application;
[0043] Figure 8 A structural diagram of an electronic device provided for this application. Specific implementation manners
[0044] The embodiments of the present invention will be described below with reference to the accompanying drawings.
[0045] Currently, there are two ways to flash a vehicle. One is to use code to implement flashing according to the protocols and processes provided by OEM suppliers. The other is that the manufacturer writes a JAR package or an OTX source file, puts it into the vehicle diagnostic data packet for packaging, and the diagnostic device downloads the vehicle diagnostic data packet through the network, and then uses the vehicle diagnostic data packet for flashing. However, when using the above two methods for flashing, if a flashing failure occurs, the flashing fails and the flashing fault tolerance rate is relatively low.
[0046] To overcome the above problems, this application provides a vehicle electronic control unit flashing solution, which can improve the flashing fault tolerance rate.
[0047] In the vehicle electronic control unit flashing solution of this application, the system framework adopted can be seen Figure 1 as shown. Specifically, it may include a server 01 and a diagnostic device 02, and may also include a development terminal 03. The hardware forms of the diagnostic device 02 and the development terminal 03 include but are not limited to mobile terminals, personal computers (PCs, Personal Computers), and personal digital assistants.
[0048] Among them, the server 01 is specifically used to receive and save the vehicle diagnostic data packet uploaded by the development terminal 03, and send the vehicle diagnostic data packet to the diagnostic device 02. The diagnostic device 02 is specifically used to obtain the vehicle diagnostic data packet and determine whether there is target diagnostic data in the vehicle diagnostic data packet. If there is target diagnostic data, the vehicle electronic control unit is flashed using the target diagnostic file. If the target diagnostic file does not exist, a preset flashing module written in advance through a preset flashing code is called to flash the vehicle electronic control unit. The development terminal 03 is specifically used to determine whether a target diagnostic file is required when flashing the vehicle electronic control unit; if it is determined that the target diagnostic file is required, the target diagnostic file is saved to the vehicle diagnostic data packet corresponding to the vehicle and the vehicle diagnostic data packet is uploaded to the server 01; if it is determined that the target diagnostic file is not required, a preset flashing module written in advance through a preset flashing code is directly saved to the diagnostic device 02.
[0049] See Figure 2 As shown, an embodiment of this application discloses a method for flashing a vehicle electronic control unit, which is applied to a diagnostic device. The method includes:
[0050] Step S11: Obtain the vehicle diagnostic data packet corresponding to the vehicle from the server.
[0051] In the embodiment of the present application, first, the vehicle flashing program needs to be started, then the vehicle identification information corresponding to the vehicle is obtained, the vehicle identification information is uploaded to the server, and based on the vehicle identification information, the vehicle diagnostic data packet corresponding to the vehicle is obtained from the server. It should be noted that after obtaining the vehicle diagnostic data packet, the diagnostic device can save the vehicle diagnostic data packet locally.
[0052] It should be noted that the vehicle identification information includes, but is not limited to, VIN (Vehicle Identification Number).
[0053] Step S12: Query whether there is a target diagnostic file in the vehicle diagnostic data packet.
[0054] In the embodiment of the present application, after obtaining the vehicle diagnostic data packet, the vehicle diagnostic data packet is parsed, and it is determined whether there is a target diagnostic file in the vehicle diagnostic data packet.
[0055] It should be noted that as Figure 3 shown, the target diagnostic file is a flashing JAR package, and the vehicle diagnostic data packet includes, but is not limited to, the target diagnostic file and other vehicle diagnostic data files; as Figure 4 shown, the JAR package is taken out from the vehicle diagnostic data packet.
[0056] Step S13: If there is the target diagnostic file in the vehicle diagnostic data packet, use the target diagnostic file to flash the vehicle electronic control unit.
[0057] In an embodiment of the present application, if the target diagnostic file exists in the vehicle diagnostic data packet, the target diagnostic file is copied to a preset directory, and then the target diagnostic file is called from the preset directory to flash the vehicle electronic control unit. Specifically, the target diagnostic file, the dynamic link library file, the first preset source file constructed based on the target diagnostic process, and the second preset source file constructed based on the target diagnostic data are copied to the preset directory; the first preset source file is selected from the preset directory and parsed to obtain the target diagnostic process, and then the second preset source file is selected from the preset directory and parsed to obtain the target diagnostic data; based on the target diagnostic process and the target diagnostic data, the target diagnostic file and the dynamic link library file are called from the preset directory to flash the vehicle electronic control unit. It should be noted that the first preset source file is an OTX source file, and the second preset source file is an ODX source file; specifically, it should be noted that when flashing using a JAR package, the manufacturer does not need to inform the supplier of the flashing protocol and steps, and the supplier only needs to parse the source file according to the corresponding standard, and then the JAR package will be called in relevant places in the source file, and the entire flashing process is completed by the manufacturer by configuring the source file and the JAR package, which can effectively prevent leakage of secrets. It should be noted that the JAR package is a packaged file developed using JAVA, and JAR is a computer file format; the dynamic link library (DLL, Dynamic Link Library) file includes but is not limited to the security algorithm calculation dynamic link library file, and the security algorithm calculation dynamic link library file is used to calculate the security algorithm in the JAR package. It should be noted that the manufacturer may be a vehicle OEM, and the supplier may be a diagnostic equipment service provider.
[0058] It should be noted that the target diagnostic data includes but is not limited to fault codes and data stream algorithms, and the target diagnostic process is a special function mainly used to perform vehicle diagnosis; for example, matching keys, and the corresponding steps include the first step of prompting the user to power on the vehicle, the second step of sending a target instruction, and the third step of parsing the target diagnostic process.
[0059] Step S14: If the target diagnostic file does not exist in the vehicle diagnostic data packet, a preset flashing module written by a preset flashing code is called to flash the vehicle electronic control unit.
[0060] In an embodiment of the present application, when flashing the vehicle electronic control unit with a preset flashing module written by a preset flashing code, the manufacturer needs to inform all the protocols and steps of the flashing.
[0061] It can be seen that the present application obtains the vehicle diagnostic data packet corresponding to the vehicle from the server; queries whether there is a target diagnostic file in the vehicle diagnostic data packet; if there is the target diagnostic file in the vehicle diagnostic data packet, the vehicle electronic control unit is flashed using the target diagnostic file; if there is no target diagnostic file in the vehicle diagnostic data packet, a preset flashing module pre-written with a preset flashing code is called to flash the vehicle electronic control unit. Thus, the present application is compatible with two methods of flashing the vehicle electronic control unit, namely, using the target diagnostic file to flash the vehicle electronic control unit and calling the preset flashing module pre-written with the preset flashing code to flash the vehicle electronic control unit, providing two different flashing methods for the diagnostic device; because the present application queries whether there is a target diagnostic file in the vehicle diagnostic data packet and selects to use the target diagnostic file or call the preset flashing module pre-written with the preset flashing code to flash the vehicle electronic control unit, providing an execution mode for intelligent judgment of the flashing method, the flashing efficiency and the flashing fault tolerance rate are improved.
[0062] See Figure 5 As shown, an embodiment of the present application discloses a specific method for flashing a vehicle electronic control unit, which is applied to a diagnostic device. The method includes:
[0063] Step S21: Obtain the vehicle diagnostic data packet corresponding to the vehicle from the server.
[0064] Step S22: Query whether there is a target diagnostic file in the vehicle diagnostic data packet.
[0065] Step S23: If there is the target diagnostic file in the vehicle diagnostic data packet, flash the vehicle electronic control unit using the target diagnostic file.
[0066] Step S24: If the flashing of the vehicle electronic control unit using the target diagnostic file fails, call the preset flashing module pre-written with the preset flashing code to flash the vehicle electronic control unit.
[0067] In the embodiment of the present application, if the flashing of the vehicle electronic control unit using the target diagnostic file fails, it is necessary to call the preset flashing module pre-written with the preset flashing code to flash the vehicle electronic control unit. This process provides a method of calling the preset flashing module pre-written with the preset flashing code for flashing in the case of failure of flashing using the target diagnostic file, improving the flashing stability, security and success rate.
[0068] Step S25: If there is no target diagnostic file in the vehicle diagnostic data packet, call the preset flashing module pre-written with the preset flashing code to flash the vehicle electronic control unit.
[0069] In this embodiment, for the specific processes of the above steps S21 to S23 and S25, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details thereof will not be elaborated herein.
[0070] It can be seen that this application obtains the vehicle diagnostic data packet corresponding to the vehicle from the server; queries whether there is a target diagnostic file in the vehicle diagnostic data packet; if there is the target diagnostic file in the vehicle diagnostic data packet, the vehicle electronic control unit is flashed with the target diagnostic file; if the flashing of the vehicle electronic control unit with the target diagnostic file fails, the preset flashing module pre-written with the preset flashing code is called to flash the vehicle electronic control unit; if there is no target diagnostic file in the vehicle diagnostic data packet, the preset flashing module pre-written with the preset flashing code is called to flash the vehicle electronic control unit. Thus, this application is compatible with two methods of flashing the vehicle electronic control unit, namely, flashing with the target diagnostic file and calling the preset flashing module pre-written with the preset flashing code to flash the vehicle electronic control unit, providing two different flashing methods for the diagnostic device; because this application selects to use the target diagnostic file or call the preset flashing module pre-written with the preset flashing code to flash the vehicle electronic control unit by querying whether there is a target diagnostic file in the vehicle diagnostic data packet, providing an execution mode of intelligent judgment of the flashing method, the flashing efficiency and the flashing fault tolerance rate are improved; because this application can also use the preset flashing module written with the preset flashing code to flash after the flashing with the target diagnostic file fails, the flashing stability, security and success rate are improved.
[0071] See Figure 6 As shown, an embodiment of this application discloses a specific method for flashing a vehicle electronic control unit, which is applied to a development terminal. The method includes:
[0072] Step S31: Determine whether a target diagnostic file needs to be used when flashing the vehicle electronic control unit.
[0073] Step S32: If it is determined that the target diagnostic file needs to be used, save the target diagnostic file to the vehicle diagnostic data packet corresponding to the vehicle and upload the vehicle diagnostic data packet to the server.
[0074] In the embodiment of the present application, if it is determined that the target diagnostic file needs to be used, the target diagnostic file needs to be saved to the vehicle diagnostic data packet corresponding to the vehicle, and then the vehicle diagnostic data packet is uploaded to the server. Specifically, after the target diagnostic file is saved to the vehicle diagnostic data packet corresponding to the vehicle, it is necessary to determine the vehicle identification information corresponding to the vehicle, and associate the vehicle identification information with the vehicle diagnostic data packet, and upload the associated vehicle diagnostic data packet to the server, so that the diagnostic device can obtain and save the vehicle diagnostic data packet corresponding to the vehicle from the server based on the vehicle identification information.
[0075] It should be noted that when uploading the vehicle diagnostic data packet to the server, it is also necessary to save the preset flashing module written by the preset flashing code to the diagnostic device, so that when the flashing using the target diagnostic file fails, the preset flashing module written by the preset flashing code can be called for flashing.
[0076] Step S33: If it is determined that the target diagnostic file does not need to be used, directly save the preset flashing module written by the preset flashing code to the diagnostic device.
[0077] In the embodiment of the present application, if it is determined that the target diagnostic file does not need to be used, directly save the preset flashing module written by the preset flashing code to the diagnostic device, so that when the target diagnostic file does not exist in the vehicle diagnostic data packet, the preset flashing module written by the preset flashing code can be directly called for flashing.
[0078] It should be noted that when it is determined that the target diagnostic file does not need to be used, the vehicle diagnostic data packet still needs to be sent to the server, but the target diagnostic file does not exist in the vehicle diagnostic data packet.
[0079] It can be seen that the present application determines whether the target diagnostic file needs to be used when flashing the vehicle electronic control unit; if it is determined that the target diagnostic file needs to be used, the target diagnostic file is saved to the vehicle diagnostic data packet corresponding to the vehicle and the vehicle diagnostic data packet is uploaded to the server; if it is determined that the target diagnostic file does not need to be used, directly save the preset flashing module written by the preset flashing code to the diagnostic device. The present application develops the vehicle diagnostic data packet based on whether the target diagnostic file needs to be used when flashing the vehicle electronic control unit, so that the diagnostic device can intelligently select the flashing method based on whether the target diagnostic file exists in the vehicle diagnostic data packet, improving the flashing fault tolerance rate.
[0080] See Figure 7 As shown, the embodiment of the present application discloses a vehicle electronic control unit flashing device, which is applied to a diagnostic device and includes:
[0081] A data packet acquisition module 11, configured to acquire a vehicle diagnostic data packet corresponding to a vehicle from a server;
[0082] A file query module 12, configured to query whether a target diagnostic file exists in the vehicle diagnostic data packet;
[0083] A first flashing module 13, configured to, if the target diagnostic file exists in the vehicle diagnostic data packet, flash a vehicle electronic control unit by using the target diagnostic file;
[0084] A second flashing module 14, configured to, if the target diagnostic file does not exist in the vehicle diagnostic data packet, call a preset flashing module pre-written with a preset flashing code to flash the vehicle electronic control unit.
[0085] It can be seen that this application is compatible with two methods of flashing a vehicle electronic control unit, namely, flashing by using a target diagnostic file and calling a preset flashing module pre-written with a preset flashing code to flash the vehicle electronic control unit, providing two different flashing methods for a diagnostic device; because this application selects to use a target diagnostic file or call a preset flashing module pre-written with a preset flashing code to flash the vehicle electronic control unit by querying whether a target diagnostic file exists in the vehicle diagnostic data packet, providing an execution manner for intelligently judging the flashing method, the flashing efficiency and the flashing fault tolerance rate are improved.
[0086] In some embodiments, the first flashing module 13 specifically further includes:
[0087] A first flashing unit, configured to copy the target diagnostic file to a preset directory, and then call the target diagnostic file from the preset directory to flash the vehicle electronic control unit;
[0088] A second flashing unit, configured to, if the flashing of the vehicle electronic control unit fails by using the target diagnostic file, call the preset flashing module pre-written with the preset flashing code to flash the vehicle electronic control unit.
[0089] The first flashing unit is specifically configured to copy the target diagnostic file, the dynamic link library file, the first preset source file constructed based on the target diagnostic process, and the second preset source file constructed based on the target diagnostic data to a preset directory; select the first preset source file from the preset directory and parse the first preset source file to obtain the target diagnostic process, and then select the second preset source file from the preset directory and parse the second preset source file to obtain the target diagnostic data; based on the target diagnostic process and the target diagnostic data, and call the target diagnostic file and the dynamic link library file from the preset directory to flash the vehicle electronic control unit.
[0090] In some embodiments, the data packet acquisition module 11 is specifically configured to acquire the vehicle identification information corresponding to the vehicle, and acquire the vehicle diagnostic data packet corresponding to the vehicle from the server based on the vehicle identification information.
[0091] Furthermore, an embodiment of the present application also provides an electronic device. Figure 8 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure should not be considered as any limitation to the scope of use of the present application.
[0092] Figure 8 This is a schematic structural diagram of an electronic device 20 provided by an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, an input / output interface 24, a communication interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps of the vehicle electronic control unit flashing method applied to the diagnostic device or the vehicle electronic control unit flashing method applied to the development terminal disclosed in the foregoing embodiments.
[0093] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of the present application, and no specific limitation is made thereto here; the input / output interface 24 is used to acquire external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitation is made here.
[0094] In addition, as a carrier for storing resources, the memory 22 can be a read-only memory, a random access memory, a magnetic disk, an optical disc, etc. The memory 22 can include a random access memory as the operating memory and a non-volatile memory for storage purposes of the external memory. The storage resources thereon include an operating system 221, a computer program 222, etc., and the storage method can be transient storage or permanent storage.
[0095] Among them, the operating system 221 is used to manage and control each hardware device and the computer program 222 on the electronic device 20 on the source host. The operating system 221 can be Windows, Unix, Linux, etc. In addition to the computer program that can be used to complete the vehicle electronic control unit flashing method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.
[0096] In this embodiment, the input / output interface 24 can specifically include, but is not limited to, a USB interface, a hard disk reading interface, a serial interface, a voice input interface, a fingerprint input interface, etc.
[0097] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program. When the computer program is executed by a processor, it implements the vehicle electronic control unit flashing method applied to a diagnostic device or the vehicle electronic control unit flashing method applied to a development terminal disclosed above.
[0098] For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.
[0099] The computer-readable storage medium mentioned here includes a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a magnetic disk, an optical disc, or any other form of storage medium well-known in the technical field. Among them, when the computer program is executed by a processor, it implements the foregoing vehicle electronic control unit flashing method. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.
[0100] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the vehicle electronic control unit flashing method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0101] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0102] The steps of the algorithms described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0103] Finally, it should also be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0104] The above has introduced in detail a method, device, equipment and medium for flashing a vehicle electronic control unit provided by the present invention. Specific examples are used herein to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for flashing a vehicle electronic control unit, characterized in that, Applied to a diagnostic device, including: Obtain the vehicle diagnostic data packet corresponding to the vehicle from the server; Query whether there is a target diagnostic file in the vehicle diagnostic data packet; the target diagnostic file is a flashing JAR package; If the target diagnostic file exists in the vehicle diagnostic data packet, call the target diagnostic file to flash the vehicle electronic control unit; If the target diagnostic file does not exist in the vehicle diagnostic data packet, call a preset flashing module written in advance with a preset flashing code to flash the vehicle electronic control unit; the preset flashing code includes a flashing protocol and steps; Among them, the step of "if the target diagnostic file exists in the vehicle diagnostic data packet, call the target diagnostic file to flash the vehicle electronic control unit" includes: If the flashing of the vehicle electronic control unit fails using the target diagnostic file, call the preset flashing module written in advance with the preset flashing code to flash the vehicle electronic control unit.
2. The vehicle electronic control unit flashing method according to claim 1, wherein The step of "call the target diagnostic file to flash the vehicle electronic control unit" includes: Copy the target diagnostic file to a preset directory, and then call the target diagnostic file from the preset directory to flash the vehicle electronic control unit.
3. The vehicle electronic control unit flashing method according to claim 2, wherein, The step of "copy the target diagnostic file to a preset directory, and then call the target diagnostic file from the preset directory to flash the vehicle electronic control unit" includes: Copy the target diagnostic file, a dynamic link library file, a first preset source file constructed based on the target diagnostic process, and a second preset source file constructed based on the target diagnostic data to the preset directory; the first preset source file is an OTX source file, and the second preset source file is an ODX source file; Select the first preset source file from the preset directory and parse the first preset source file to obtain the target diagnostic process, and then select the second preset source file from the preset directory and parse the second preset source file to obtain the target diagnostic data; Based on the target diagnostic process and the target diagnostic data, and call the target diagnostic file and the dynamic link library file from the preset directory to flash the vehicle electronic control unit.
4. The vehicle electronic control unit flashing method according to any one of claims 1 to 3, characterized in that, The step of "obtain the vehicle diagnostic data packet corresponding to the vehicle from the server" includes: Obtain the vehicle identification information corresponding to the vehicle, and based on the vehicle identification information, obtain the vehicle diagnostic data packet corresponding to the vehicle from the server.
5. A method for flashing a vehicle electronic control unit, characterized in that, Applied to a development terminal, including: Judge whether a target diagnostic file needs to be used when flashing the vehicle electronic control unit; the target diagnostic file is a flashing JAR package; If it is determined that the target diagnostic file needs to be used, save the target diagnostic file to the vehicle diagnostic data packet corresponding to the vehicle and upload the vehicle diagnostic data packet to the server, so that the diagnostic device can call the target diagnostic file to flash the vehicle electronic control unit, and when the flashing fails, call a preset flashing module written in advance with a preset flashing code to flash the vehicle electronic control unit; If it is determined that the target diagnostic file does not need to be used, the preset flashing module written by the preset flashing code is directly saved to the diagnostic device so that the diagnostic device can call the preset flashing module to flash the vehicle electronic control unit; the preset flashing code includes a flashing protocol and steps.
6. The method for flashing a vehicle electronic control unit according to claim 5, wherein The saving the target diagnostic file to the vehicle diagnostic data packet corresponding to the vehicle and uploading the vehicle diagnostic data packet to the server includes: Saving the target diagnostic file to the vehicle diagnostic data packet corresponding to the vehicle; Determining the vehicle identification information corresponding to the vehicle, associating the vehicle identification information with the vehicle diagnostic data packet, and uploading the associated vehicle diagnostic data packet to the server so that the diagnostic device can obtain and save the vehicle diagnostic data packet corresponding to the vehicle from the server based on the vehicle identification information.
7. A vehicle electronic control unit flashing device, characterized in that, Applied to a diagnostic device, it includes: A data packet acquisition module for acquiring the vehicle diagnostic data packet corresponding to the vehicle from the server; A file query module for querying whether a target diagnostic file exists in the vehicle diagnostic data packet; the target diagnostic file is a flashing JAR package; A first flashing module for flashing the vehicle electronic control unit by calling the target diagnostic file if the target diagnostic file exists in the vehicle diagnostic data packet; A second flashing module for flashing the vehicle electronic control unit by calling a preset flashing module written in advance by a preset flashing code if the target diagnostic file does not exist in the vehicle diagnostic data packet; the preset flashing code includes a flashing protocol and steps; Among them, the first flashing module specifically further includes: A second flashing unit for flashing the vehicle electronic control unit by calling the preset flashing module written in advance by the preset flashing code if the flashing of the vehicle electronic control unit using the target diagnostic file fails.
8. An electronic device, characterized in that, It includes a processor and a memory; wherein, when the processor executes the computer program saved in the memory, the method for flashing the vehicle electronic control unit according to any one of claims 1 to 4 or any one of claims 5 to 6 is implemented.
9. A computer-readable storage medium, characterized in that, For storing a computer program; wherein, when the computer program is executed by a processor, the method for flashing the vehicle electronic control unit according to any one of claims 1 to 4 or any one of claims 5 to 6 is implemented.
Citation Information
Patent Citations
Intelligent integrated automatic test method and system
CN109933536A