CN114647422A - Vehicle electronic control unit flashing method, device, equipment and medium - Google Patents

Vehicle electronic control unit flashing method, device, equipment and medium Download PDF

Info

Publication number
CN114647422A
CN114647422A CN202210339452.7A CN202210339452A CN114647422A CN 114647422 A CN114647422 A CN 114647422A CN 202210339452 A CN202210339452 A CN 202210339452A CN 114647422 A CN114647422 A CN 114647422A
Authority
CN
China
Prior art keywords
vehicle
file
diagnosis
control unit
electronic control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210339452.7A
Other languages
Chinese (zh)
Inventor
刘新
樊球
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202210339452.7A priority Critical patent/CN114647422A/en
Publication of CN114647422A publication Critical patent/CN114647422A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

The application discloses a vehicle electronic control unit flashing method, which is applied to diagnostic equipment and relates to the technical field of computers, and comprises the following steps: acquiring a vehicle diagnosis data packet corresponding to a vehicle from a server; inquiring whether a target diagnosis file exists in the vehicle diagnosis data packet; if the target diagnosis file exists in the vehicle diagnosis data packet, the target diagnosis file is utilized to write the vehicle electronic control unit in a flashing manner; and if the target diagnosis file does not exist in the vehicle diagnosis data packet, calling a preset flashing module which is written by preset flashing codes in advance to flash the vehicle electronic control unit. Therefore, the method and the device have the advantages that two flashing methods for flashing by using the target diagnosis file and calling the preset flashing module are provided, whether the target diagnosis file exists in the vehicle diagnosis data packet is used for intelligently judging which flashing mode is used, and the flashing efficiency and the flashing fault tolerance rate are improved.

Description

Vehicle electronic control unit flashing method, device, equipment and medium
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device, equipment and a medium for flashing an electronic control unit of a vehicle.
Background
Currently, ODX-OTX (Open Diagnostic data eXchange-Open Test sequence eXchange) is a novel technology for vehicle diagnosis, and vehicle diagnosis can be performed by parsing a vehicle diagnosis data packet to obtain Diagnostic data and a Diagnostic flow. In the existing method, there are two ways of flashing a vehicle, one is to use codes to implement flashing according to a protocol and a process provided by an OEM (Original managed manufacturing, Original commission production) provider, and the other is to write a jar (java archive) package or an OTX (-Open Test sequence eXchange) source file, put it into a vehicle type diagnosis data package to package, download a vehicle diagnosis data package by a diagnosis device through a network, and then use the vehicle diagnosis data package to flash; the method has the advantages that the method has high brushing coupling performance by using the codes, high after-sale development cost and difficult change, and the requirement on developers for brushing by using the JAR package is high. However, when the two methods are used for flash writing, if a flash writing fault occurs, the flash writing fails, and the flash writing fault tolerance rate is low.
In summary, how to improve the flash fault tolerance rate is a problem to be solved urgently at present.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method, an apparatus, a device and a medium for flashing a vehicle electronic control unit, which can improve the error tolerance rate of flashing. The specific scheme is as follows:
in a first aspect, the application discloses a vehicle electronic control unit flash method, applied to a diagnostic device, comprising:
acquiring a vehicle diagnosis data packet corresponding to a vehicle from a server;
inquiring whether a target diagnosis file exists in the vehicle diagnosis data packet;
if the target diagnosis file exists in the vehicle diagnosis data packet, the target diagnosis file is utilized to write the vehicle electronic control unit in a flashing manner;
and if the target diagnosis file does not exist in the vehicle diagnosis data packet, calling a preset flashing module which is written by preset flashing codes in advance to flash the vehicle electronic control unit.
Optionally, the flashing the vehicle electronic control unit by using the target diagnostic file includes:
and copying the target diagnosis file to a preset directory, and calling the target diagnosis file from the preset directory to flash the vehicle electronic control unit.
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:
copying the target diagnosis file, the dynamic link library file, a first preset source file constructed based on a target diagnosis process and a second preset source file constructed based on target diagnosis data to a preset directory;
selecting the first preset source file from the preset directory and analyzing the first preset source file to obtain the target diagnosis process, and then selecting the second preset source file from the preset directory and analyzing the second preset source file to obtain the target diagnosis data;
and calling the target diagnosis file and the dynamic link library file from the preset directory to flash the vehicle electronic control unit based on the target diagnosis flow and the target diagnosis data.
Optionally, if the target diagnostic file exists in the vehicle diagnostic data packet, the flashing of the vehicle electronic control unit by using the target diagnostic file includes:
and if the brushing of the vehicle electronic control unit by using the target diagnosis file fails, calling the preset brushing module written by the preset brushing code in advance to brush the vehicle electronic control unit.
Optionally, the obtaining the vehicle diagnosis data packet corresponding to the vehicle from the server includes:
and acquiring vehicle identification information corresponding to the vehicle, and acquiring a vehicle diagnosis data packet corresponding to the vehicle from the server based on the vehicle identification information.
In a second aspect, the application discloses a method for flashing a vehicle electronic control unit, which is applied to a development terminal and includes:
judging whether a target diagnosis file is needed to be used when the vehicle electronic control unit is subjected to flash writing;
if the target diagnosis file is judged to be needed, saving the target diagnosis file to a vehicle diagnosis data packet corresponding to the vehicle and uploading the vehicle diagnosis data packet to a server;
and if the target diagnosis file is judged not to be used, directly saving a preset flash module written by the preset flash code to the diagnosis equipment.
Optionally, the saving the target diagnostic file to a vehicle diagnostic data packet corresponding to the vehicle and uploading the vehicle diagnostic data packet to a server includes:
saving the target diagnosis file to a vehicle diagnosis data packet corresponding to the vehicle;
and determining vehicle identification information corresponding to the vehicle, associating the vehicle identification information with the vehicle diagnosis data packet, and uploading the associated vehicle diagnosis data packet to a server, so that the diagnosis equipment acquires and stores the vehicle diagnosis data packet corresponding to the vehicle from the server based on the vehicle identification information.
In a third aspect, the present application discloses a vehicle electronic control unit writing device, applied to a diagnostic device, comprising:
the data packet acquisition module is used for acquiring a vehicle diagnosis data packet corresponding to the vehicle from the server;
the file query module is used for querying whether a target diagnosis file exists in the vehicle diagnosis data packet or not;
the first flashing module is used for flashing a vehicle electronic control unit by using the target diagnosis file if the target diagnosis file exists in the vehicle diagnosis data packet;
and the second flashing module is used for calling a preset flashing module which is written by preset flashing codes in advance to flash the vehicle electronic control unit if the target diagnosis file does not exist in the vehicle diagnosis data packet.
In a fourth aspect, the present application discloses an electronic device comprising a processor and a memory; wherein the processor implements the vehicle electronic control unit flashing method according to the first aspect or the vehicle electronic control unit flashing method according to the second aspect when executing the computer program stored in the memory.
In a fifth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the vehicle electronic control unit flash method of the first aspect or the vehicle electronic control unit flash method of the second aspect.
Therefore, the vehicle diagnosis data packet corresponding to the vehicle is obtained from the server; inquiring whether a target diagnosis file exists in the vehicle diagnosis data packet or not; if the target diagnosis file exists in the vehicle diagnosis data packet, the target diagnosis file is utilized to write the vehicle electronic control unit in a flashing manner; and if the target diagnosis file does not exist in the vehicle diagnosis data packet, calling a preset flashing module which is written by preset flashing codes in advance to flash the vehicle electronic control unit. Therefore, the method is compatible with two methods of using the target diagnosis file to write the vehicle electronic control unit in a flashing manner and calling the preset writing module written by the preset writing code in advance to write the vehicle electronic control unit in a flashing manner, and two different methods are provided for diagnosis equipment; according to the method and the device, whether the target diagnosis file exists in the vehicle diagnosis data packet or not is inquired, the target diagnosis file is selected and utilized or the preset flashing module written through the preset flashing code in advance is called to flash the vehicle electronic control unit, and the execution mode of intelligently judging the flashing mode is provided, so that the flashing efficiency and the flashing fault-tolerant rate are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic diagram of a system framework to which a vehicle Electronic Control Unit (ECU) flashing scheme provided herein is applicable;
FIG. 2 is a flowchart of a vehicle ECU flashing method provided in the present application;
FIG. 3 is a schematic illustration of a vehicle diagnostic data package provided herein;
FIG. 4 is a JAR package diagram provided herein;
FIG. 5 is a flowchart of a specific vehicle electronic control unit flashing method provided herein;
FIG. 6 is a flow chart of a vehicle electronic control unit flashing method provided by the present application;
FIG. 7 is a block diagram of a vehicle electronic control unit flash apparatus according to the present application;
fig. 8 is a block diagram of an electronic device provided in the present application.
Detailed Description
Embodiments of the present invention will be described below with reference to the accompanying drawings.
At present, two modes of flashing a vehicle are provided, one mode is that flashing is realized according to protocols and flow use codes provided by an OEM (original equipment manufacturer), the other mode is that a manufacturer writes a JAR (java archive) packet or an OTX (over the x) source file, the JAR packet or the OTX source file is put into a vehicle type diagnosis data packet to be packaged, a diagnosis device downloads the vehicle diagnosis data packet through a network, and then the vehicle diagnosis data packet is used for flashing, but when the two modes are used for flashing, if a flashing fault occurs, the flashing fails, and the flashing fault tolerance rate is low.
In order to overcome the problems, the application provides a flash scheme of the vehicle electronic control unit, which can improve the flash fault tolerance rate.
In the vehicle electronic control unit flash scheme of the present application, a system framework adopted may be as shown in fig. 1, and specifically may include a server 01 and a diagnostic device 02, and may further include a development terminal 03. The hardware form of the diagnosis apparatus 02 and the hardware form of the development terminal 03 include, but are not limited to, a mobile terminal, a Personal Computer (PC), and a Personal digital assistant.
The server 01 is specifically used for receiving and storing the vehicle diagnosis data packet uploaded by the development terminal 03 and sending the vehicle diagnosis data packet to the diagnosis device 02, and the diagnosis device 02 is specifically used for obtaining the vehicle diagnosis data packet and judging whether target diagnosis data exist in the vehicle diagnosis data packet, and if the target diagnosis data exist, the target diagnosis file is used for writing the vehicle electronic control unit. And if the target diagnosis file does not exist, calling a preset flashing module written by preset flashing codes in advance to flash the vehicle electronic control unit. The development terminal 03 is specifically used for judging whether a target diagnosis file is required to be used when the vehicle electronic control unit is subjected to flash writing; if the target diagnosis file is judged to be needed, saving the target diagnosis file to a vehicle diagnosis data packet corresponding to the vehicle and uploading the vehicle diagnosis data packet to a server 01; and if the target diagnosis file is judged not to be used, directly saving the preset flash module written by the preset flash code to the diagnosis equipment 02.
Referring to fig. 2, an embodiment of the present application discloses a vehicle electronic control unit flashing method applied to a diagnostic device, the method including:
step S11: and acquiring a vehicle diagnosis data packet corresponding to the vehicle from the server.
In the embodiment of the application, a vehicle writing program needs to be started firstly, then vehicle identification information corresponding to a vehicle is obtained, the vehicle identification information is uploaded to a server, and a vehicle diagnosis data packet corresponding to the vehicle is obtained from the server based on the vehicle identification information. It is noted that the diagnostic device may store the vehicle diagnostic data packet locally after obtaining the vehicle diagnostic data packet.
It should be noted that the Vehicle Identification information includes, but is not limited to, a VIN (Vehicle Identification Number).
Step S12: and inquiring whether a target diagnosis file exists in the vehicle diagnosis data packet.
In the embodiment of the application, after the vehicle diagnosis data packet is obtained, the vehicle diagnosis data packet is analyzed, and whether a target diagnosis file exists in the vehicle diagnosis data packet or not is judged.
It should be noted that, as shown in fig. 3, the target diagnostic file is a flash JAR package, and the vehicle diagnostic data package includes, but is not limited to, the target diagnostic file and other vehicle diagnostic data files; as shown in fig. 4, the JAR packet is taken out from the vehicle diagnosis data packet.
Step S13: and if the target diagnosis file exists in the vehicle diagnosis data packet, the target diagnosis file is utilized to write the vehicle electronic control unit in a flashing manner.
In the embodiment of the application, if the target diagnosis file exists in the vehicle diagnosis data packet, the target diagnosis file is copied to a preset directory, and then the target diagnosis file is called from the preset directory to flash the vehicle electronic control unit. Specifically, the target diagnosis file, the dynamic link library file, the first preset source file constructed based on the target diagnosis process, and the second preset source file constructed based on the target diagnosis data are copied to a preset directory; selecting the first preset source file from the preset directory and analyzing the first preset source file to obtain the target diagnosis process, and then selecting the second preset source file from the preset directory and analyzing the second preset source file to obtain the target diagnosis data; and calling the target diagnosis file and the dynamic link library file from the preset directory to flash the vehicle electronic control unit based on the target diagnosis flow and the target diagnosis data. 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, when the JAR package is used for flashing, a manufacturer does not need to inform a supplier of a flashing protocol and steps, the supplier only needs to analyze a source file according to a corresponding standard, then the JAR package is called by a relevant place in the source file, and the whole flashing process is completed by the manufacturer through configuration of the source file and the JAR package, so that leakage of secrets can be effectively prevented. It should be noted that the JAR package is a package file developed by using JAVA, and JAR is a computer file format; the Dynamic Link Library (DLL) files include, but are not limited to, security algorithm computing Dynamic Link Library files that are used to compute security algorithms in JAR packages. It should be noted that the manufacturer may be a vehicle manufacturer, and the supplier may be a diagnostic device facilitator.
It should be noted that the target diagnostic data includes, but is not limited to, fault codes and data flow algorithms, and the target diagnostic process is a special function mainly used to perform vehicle diagnostics; for example, matching keys, the corresponding steps comprise the first step of prompting a user to power on a vehicle, the second step of sending a target instruction, and the third step of analyzing a target diagnosis process.
Step S14: and if the target diagnosis file does not exist in the vehicle diagnosis data packet, calling a preset flashing module which is written by preset flashing codes in advance to flash the vehicle electronic control unit.
In the embodiment of the application, when the vehicle electronic control unit is flashed by the preset flashing module written by the preset flashing code, a manufacturer is required to inform all protocols and steps of flashing.
Therefore, the vehicle diagnosis data packet corresponding to the vehicle is obtained from the server; inquiring whether a target diagnosis file exists in the vehicle diagnosis data packet; if the target diagnosis file exists in the vehicle diagnosis data packet, the target diagnosis file is utilized to write the vehicle electronic control unit in a flashing manner; and if the target diagnosis file does not exist in the vehicle diagnosis data packet, calling a preset flashing module which is written by preset flashing codes in advance to flash the vehicle electronic control unit. Therefore, the method is compatible with two methods of using the target diagnosis file to write the vehicle electronic control unit in a flashing manner and calling the preset writing module written by the preset writing code in advance to write the vehicle electronic control unit in a flashing manner, and two different methods are provided for diagnosis equipment; according to the method and the device, whether the target diagnosis file exists in the vehicle diagnosis data packet or not is inquired, the target diagnosis file is selected and utilized or the preset flashing module written through the preset flashing code in advance is called to flash the vehicle electronic control unit, and the execution mode of intelligently judging the flashing mode is provided, so that the flashing efficiency and the flashing fault-tolerant rate are improved.
Referring to fig. 5, an embodiment of the present application discloses a specific vehicle electronic control unit flashing method applied to a diagnostic device, where the method includes:
step S21: and acquiring a vehicle diagnosis data packet corresponding to the vehicle from the server.
Step S22: and inquiring whether a target diagnosis file exists in the vehicle diagnosis data packet or not.
Step S23: and if the target diagnosis file exists in the vehicle diagnosis data packet, the target diagnosis file is utilized to write the vehicle electronic control unit in a flashing manner.
Step S24: and if the brushing of the vehicle electronic control unit by using the target diagnosis file fails, calling the preset brushing module written by the preset brushing code in advance to brush the vehicle electronic control unit.
In the embodiment of the application, if the target diagnosis file is used for the brushing failure of the vehicle electronic control unit, the preset brushing module written by the preset brushing codes in advance needs to be called for brushing the vehicle electronic control unit, and the process provides a method for calling the preset brushing module written by the preset brushing codes in advance for brushing under the condition that the target diagnosis file is used for brushing the failure, so that the brushing stability, the safety and the success rate are improved.
Step S25: and if the target diagnosis file does not exist in the vehicle diagnosis data packet, calling a preset flashing module which is written by preset flashing codes in advance to flash the vehicle electronic control unit.
In this embodiment, as to the specific processes of the steps S21 to S23 and S25, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and details are not repeated herein.
Therefore, the vehicle diagnosis data packet corresponding to the vehicle is obtained from the server; inquiring whether a target diagnosis file exists in the vehicle diagnosis data packet; if the target diagnosis file exists in the vehicle diagnosis data packet, the target diagnosis file is utilized to write the vehicle electronic control unit in a flashing manner; if the brushing of the vehicle electronic control unit by using the target diagnosis file fails, calling the preset brushing module written by the preset brushing code in advance to brush the vehicle electronic control unit; and if the target diagnosis file does not exist in the vehicle diagnosis data packet, calling a preset flashing module which is written by preset flashing codes in advance to flash the vehicle electronic control unit. Therefore, the method is compatible with two methods of using the target diagnosis file to write the vehicle electronic control unit in a flashing manner and calling the preset writing module written by the preset writing code in advance to write the vehicle electronic control unit in a flashing manner, and two different methods are provided for diagnosis equipment; according to the method and the device, whether the target diagnosis file exists in the vehicle diagnosis data packet or not is inquired, the target diagnosis file is selected and utilized or the preset flash module written through the preset flash code in advance is called to flash the vehicle electronic control unit, and the execution mode of intelligently judging the flash mode is provided, so that the flash efficiency and the flash fault tolerance rate are improved; according to the method and the device, after the target diagnosis file is used for flashing failure, the preset flashing module compiled through the preset flashing codes can be used for flashing, so that the flashing stability, the safety and the success rate are improved.
Referring to fig. 6, an embodiment of the present application discloses a specific vehicle electronic control unit flash method, which is applied to a development terminal, and the method includes:
step S31: and judging whether the target diagnosis file is needed to be used when the vehicle electronic control unit is subjected to flash writing.
Step S32: and if the target diagnosis file is determined to be needed, saving the target diagnosis file to a vehicle diagnosis data packet corresponding to the vehicle and uploading the vehicle diagnosis data packet to a server.
In the embodiment of the application, if it is determined that the target diagnostic file needs to be used, the target diagnostic file needs to be saved in a vehicle diagnostic data packet corresponding to the vehicle, and then the vehicle diagnostic data packet is uploaded to a server, specifically, after the target diagnostic file is saved in the vehicle diagnostic data packet corresponding to the vehicle, vehicle identification information corresponding to the vehicle needs to be determined, the vehicle identification information is associated with the vehicle diagnostic data packet, and the associated vehicle diagnostic data packet is uploaded to the server, so that the diagnostic device obtains and saves the vehicle diagnostic data packet corresponding to the vehicle from the server based on the vehicle identification information.
It should be noted that, while the vehicle diagnostic data packet is uploaded to the server, the preset flush module written by the preset flush code needs to be saved to the diagnostic device, so that when the target diagnostic file fails to be flushed, the preset flush module written by the preset flush code is called to perform the flush.
Step S33: and if the target diagnosis file is judged not to be used, directly saving a preset flash module written by the preset flash code to the diagnosis equipment.
In the embodiment of the application, if the target diagnosis file is judged not to be used, the preset writing module written by the preset writing codes is directly stored in the diagnosis equipment, so that when the target diagnosis file does not exist in the vehicle diagnosis data packet, the preset writing module written by the preset writing codes is directly called to perform writing.
It should be noted that, if it is determined that the target diagnostic file is not needed, 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.
Therefore, the method and the device for processing the vehicle electronic control unit judge whether the target diagnosis file is needed to be used or not when the vehicle electronic control unit is subjected to flash writing; if the target diagnosis file is judged to be needed, saving the target diagnosis file to a vehicle diagnosis data packet corresponding to the vehicle and uploading the vehicle diagnosis data packet to a server; and if the target diagnosis file is judged not to be used, directly saving a preset flash module written by the preset flash code to the diagnosis equipment. According to the method and the device, whether the target diagnosis file is needed to be used for developing the vehicle diagnosis data packet or not when the vehicle electronic control unit is subjected to flash writing is determined, so that the diagnostic equipment can intelligently select the flash method based on whether the target diagnosis file exists in the vehicle diagnosis data packet or not, and the flash fault tolerance rate is improved.
Referring to fig. 7, an embodiment of the present application discloses a vehicle electronic control unit writing device, applied to a diagnostic device, including:
the data packet acquisition module 11 is configured to acquire a vehicle diagnosis data packet corresponding to a vehicle from a server;
the file query module 12 is configured to query whether a target diagnostic file exists in the vehicle diagnostic data packet;
the first flashing module 13 is configured to flash the vehicle electronic control unit by using the target diagnostic file if the target diagnostic file exists in the vehicle diagnostic data packet;
and the second flashing module 14 is configured to call a preset flashing module written by preset flashing codes in advance to flash the vehicle electronic control unit if the target diagnostic file does not exist in the vehicle diagnostic data packet.
Therefore, the method is compatible with two methods of using the target diagnosis file to write the vehicle electronic control unit in a flashing manner and calling the preset writing module written by the preset writing code in advance to write the vehicle electronic control unit in a flashing manner, and two different methods are provided for diagnosis equipment; according to the method and the device, whether the target diagnosis file exists in the vehicle diagnosis data packet or not is inquired, the target diagnosis file is selected and utilized or the preset flashing module written through the preset flashing code in advance is called to flash the vehicle electronic control unit, and the execution mode of intelligently judging the flashing mode is provided, so that the flashing efficiency and the flashing fault-tolerant rate are improved.
In some embodiments, the first flashing module 13 specifically further includes:
the first flash unit is used for copying the target diagnosis file to a preset directory and calling the target diagnosis file from the preset directory to flash the vehicle electronic control unit;
and the second flashing unit is used for calling the preset flashing module which is written by the preset flashing codes in advance to flash the vehicle electronic control unit if the target diagnosis file fails to flash the vehicle electronic control unit.
The first flash unit is specifically configured to copy the target diagnosis file, the dynamic link library file, a first preset source file constructed based on a target diagnosis process, and a second preset source file constructed based on target diagnosis data to a preset directory; selecting the first preset source file from the preset directory and analyzing the first preset source file to obtain the target diagnosis process, and then selecting the second preset source file from the preset directory and analyzing the second preset source file to obtain the target diagnosis data; and calling the target diagnosis file and the dynamic link library file from the preset directory to flash the vehicle electronic control unit based on the target diagnosis flow and the target diagnosis data.
In some embodiments, the data packet obtaining module 11 is specifically configured to obtain vehicle identification information corresponding to the vehicle, and obtain a vehicle diagnosis data packet corresponding to the vehicle from the server based on the vehicle identification information.
Further, an electronic device is provided in the embodiments of the present application, and fig. 8 is a block diagram of an electronic device 20 according to an exemplary embodiment, which should not be construed as limiting the scope of the application.
Fig. 8 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. 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. The memory 22 is used for storing 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 equipment or the vehicle electronic control unit flashing method applied to the development terminal disclosed in the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide a working 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 an external device, and the communication protocol followed by the communication interface is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited herein; the input/output interface 24 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, and the storage 22 is used as a non-volatile storage that may include a random access memory as a running memory and a storage purpose for an external memory, and the storage resources on the storage include an operating system 221, a computer program 222, and the like, and the storage manner may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device and the computer program 222 on the electronic device 20 on the source host, and the operating system 221 may be Windows, Unix, Linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the vehicle electronic control unit flashing method performed by the electronic device 20 disclosed in any of the foregoing embodiments.
In this embodiment, the input/output interface 24 may 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, and the like.
Further, the embodiment of the application also discloses a computer readable storage medium for storing a computer program; wherein the computer program, when executed by the processor, implements the vehicle electronic control unit flash method applied to the diagnostic device or the vehicle electronic control unit flash method applied to the development terminal disclosed previously.
For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
A computer-readable storage medium as referred to herein 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 or optical disk, or any other form of storage medium known in the art. Wherein the computer program, when executed by a processor, implements the aforementioned vehicle electronic control unit flashing method. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
In the present specification, the embodiments are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same or similar parts between the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the vehicle electronic control unit flashing method disclosed by the embodiment, so that the description is relatively simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of an algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, the apparatus, the device and the medium for flashing the vehicle electronic control unit provided by the present invention are described in detail above, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A vehicle electronic control unit flashing method is applied to a diagnosis device and comprises the following steps:
acquiring a vehicle diagnosis data packet corresponding to a vehicle from a server;
inquiring whether a target diagnosis file exists in the vehicle diagnosis data packet or not;
if the target diagnosis file exists in the vehicle diagnosis data packet, the target diagnosis file is utilized to write the vehicle electronic control unit in a flashing manner;
and if the target diagnosis file does not exist in the vehicle diagnosis data packet, calling a preset flashing module which is written by preset flashing codes in advance to flash the vehicle electronic control unit.
2. The vehicle electronic control unit flashing method according to claim 1, wherein the flashing the vehicle electronic control unit with the target diagnostic file comprises:
and copying the target diagnosis file to a preset directory, and calling the target diagnosis file from the preset directory to flash the vehicle electronic control unit.
3. The vehicle electronic control unit flash method according to claim 2, wherein 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 comprises:
copying the target diagnosis file, the dynamic link library file, a first preset source file constructed based on a target diagnosis process and a second preset source file constructed based on target diagnosis data to a preset directory;
selecting the first preset source file from the preset directory and analyzing the first preset source file to obtain the target diagnosis flow, and then selecting the second preset source file from the preset directory and analyzing the second preset source file to obtain the target diagnosis data;
and calling the target diagnosis file and the dynamic link library file from the preset directory to flash the vehicle electronic control unit based on the target diagnosis flow and the target diagnosis data.
4. The vehicle electronic control unit flashing method according to claim 1, wherein the flashing the vehicle electronic control unit with the target diagnostic file if the target diagnostic file exists in the vehicle diagnostic data packet comprises:
and if the brushing of the vehicle electronic control unit by using the target diagnosis file fails, calling the preset brushing module written by the preset brushing code in advance to brush the vehicle electronic control unit.
5. The vehicle electronic control unit flashing method according to any one of claims 1 to 4, wherein the obtaining of the vehicle diagnosis data packet corresponding to the vehicle from the server comprises:
and acquiring vehicle identification information corresponding to the vehicle, and acquiring a vehicle diagnosis data packet corresponding to the vehicle from the server based on the vehicle identification information.
6. A vehicle electronic control unit flashing method is applied to a development terminal and comprises the following steps:
judging whether a target diagnosis file is needed to be used when the vehicle electronic control unit is subjected to flash writing;
if the target diagnosis file is judged to be needed, saving the target diagnosis file to a vehicle diagnosis data packet corresponding to the vehicle and uploading the vehicle diagnosis data packet to a server;
and if the target diagnosis file is judged not to be used, directly saving a preset flash module written by the preset flash code to the diagnosis equipment.
7. The vehicle electronic control unit flashing method according to claim 6, wherein the saving the target diagnosis file to a vehicle diagnosis data packet corresponding to the vehicle and uploading the vehicle diagnosis data packet to a server comprises:
saving the vehicle diagnosis data packet corresponding to the vehicle in the target diagnosis file;
and determining vehicle identification information corresponding to the vehicle, associating the vehicle identification information with the vehicle diagnosis data packet, and uploading the associated vehicle diagnosis data packet to a server, so that the diagnosis equipment acquires and stores the vehicle diagnosis data packet corresponding to the vehicle from the server based on the vehicle identification information.
8. A vehicle electronic control unit flash apparatus, applied to a diagnostic device, comprising:
the data packet acquisition module is used for acquiring a vehicle diagnosis data packet corresponding to the vehicle from the server;
the file query module is used for querying whether a target diagnosis file exists in the vehicle diagnosis data packet or not;
the first flashing module is used for flashing a vehicle electronic control unit by using the target diagnosis file if the target diagnosis file exists in the vehicle diagnosis data packet;
and the second flashing module is used for calling a preset flashing module which is written by preset flashing codes in advance to flash the vehicle electronic control unit if the target diagnosis file does not exist in the vehicle diagnosis data packet.
9. An electronic device comprising a processor and a memory; wherein the processor implements the vehicle electronic control unit flashing method according to any one of claims 1 to 5 or any one of claims 6 to 7 when executing the computer program stored in the memory.
10. A computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the vehicle electronic control unit flashing method of any one of claims 1 to 5 or any one of claims 6 to 7.
CN202210339452.7A 2022-04-01 2022-04-01 Vehicle electronic control unit flashing method, device, equipment and medium Pending CN114647422A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210339452.7A CN114647422A (en) 2022-04-01 2022-04-01 Vehicle electronic control unit flashing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210339452.7A CN114647422A (en) 2022-04-01 2022-04-01 Vehicle electronic control unit flashing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114647422A true CN114647422A (en) 2022-06-21

Family

ID=81996233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210339452.7A Pending CN114647422A (en) 2022-04-01 2022-04-01 Vehicle electronic control unit flashing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114647422A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116088470A (en) * 2022-12-28 2023-05-09 镁佳(武汉)科技有限公司 Automobile diagnosis method, device, computer equipment and medium
CN116107617A (en) * 2023-02-01 2023-05-12 上海拿森汽车电子有限公司 Vehicle ECU (electronic control Unit) refreshing method and system, electronic equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116088470A (en) * 2022-12-28 2023-05-09 镁佳(武汉)科技有限公司 Automobile diagnosis method, device, computer equipment and medium
CN116107617A (en) * 2023-02-01 2023-05-12 上海拿森汽车电子有限公司 Vehicle ECU (electronic control Unit) refreshing method and system, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN109933348B (en) Method and device for updating Bootloader in electronic control unit
CN110569035B (en) Code compiling method, device, equipment and storage medium of software development project
CN114647422A (en) Vehicle electronic control unit flashing method, device, equipment and medium
US20030023770A1 (en) Automated software driver installation
CN111064621B (en) Service data docking method and device
CN110543327B (en) Service component multiplexing method, device, computer equipment and storage medium
CA3167549A1 (en) Method and apparatus for authority control, computer device and storage medium
JP2010134643A (en) Test case selection method and selection system
CN113672224A (en) Method and device for generating small program page code and computer equipment
CN116069341A (en) Automatic deployment method, equipment and storage medium for application program
CN114895935A (en) Method and device for flashing vehicle ECU, electronic equipment and storage medium
CN111338644A (en) Task script deployment method and system
CN116886558A (en) Network protocol testing method, device, equipment, medium and system
CN115755867A (en) Vehicle diagnosis method and related device
CN109358972B (en) Log management method and device of middleware client and computer system
CN115129360A (en) Code file management method and device, electronic equipment and storage medium
CN114281341A (en) Compiling method and device of data structure definition file, computer equipment and medium
CN114064467A (en) Resource analysis method and device, electronic equipment and storage medium
CN114185557A (en) Software product deployment method, device, medium and electronic equipment
EP2053504A1 (en) System and method for managing processing resources
CN111339736B (en) Method for adding prefix name, configuration acquisition method, device and electronic equipment
CN111782183B (en) Method and device for judging component dependency, electronic device and medium
CN109492181B (en) Page jump method, device, computer equipment and storage medium
CN111818511B (en) Method and device for recycling seed card
CN111209056B (en) Method and device for loading function, readable storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination