ECU flashing method, device and equipment and storage medium
By pre-storing ECU flashing precondition information in the OEM server and using backup communication methods to obtain condition values, the problem in the existing technology that ECU flashing relies on gateway systems and code updates is solved, and the flashing efficiency and cost-effectiveness are improved.
Patent Information
- Application Number
- CN202410619799.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-08-27
AI Technical Summary
The existing ECU flashing method relies on the vehicle gateway system to obtain flashing prerequisites, resulting in failure to flash when the gateway fails, and the diagnostic equipment manufacturer needs to modify the code update conditions, which is costly and inconvenient, affecting efficiency.
The flashing precondition information of different ECUs is pre-stored on the OEM server. After the diagnostic device obtains the ECU version information, it sends it to the server to determine the target flashing conditions, and obtains the precondition value through the backup communication method to ensure that the flashing precondition information is still available when a single communication abnormality occurs. Can be flashed to reduce maintenance costs.
It improves the efficiency of ECU flashing and after-sales service, reduces maintenance costs, avoids flashing failures caused by a single communication system failure, and simplifies the maintenance process of diagnostic equipment.
Smart Images

Figure CN118550554A
Abstract
Description
Technical Field
[0001] The present application relates to the field of automobile diagnostic technology, and in particular to an ECU flashing method, device, equipment and storage medium. Background Art
[0002] ECU (Electronic Control Unit) flashing is a very important function in automobile diagnosis. Maintenance technicians can flash and upgrade the ECU through diagnostic equipment to achieve the expected state. At present, before flashing the ECU, the various flashing preconditions of the ECU are usually judged, and the flashing will not actually start until all these conditions are met, such as when the vehicle gear is in P gear and the vehicle speed is less than 3km / h. The ECU is flashed and upgraded. Since the flashing preconditions for different ECUs may be different, the judgment of the flashing preconditions needs to obtain different precondition values according to different ECUs for judgment, such as the vehicle gear is read from the transmission system, the vehicle speed is obtained from the instrument system, etc.
[0003] At present, for the flashing and upgrading of ECU, the OEM usually writes the data flow information of the flashing preconditions into the vehicle gateway system, and organizes the specifications for the diagnostic equipment manufacturers. The development engineers of the diagnostic equipment manufacturers then write the flashing preconditions into the diagnostic equipment according to the specifications. In this way, when the user uses the diagnostic equipment to perform the ECU flashing function, it can automatically obtain the data of each flashing precondition by sending commands to the vehicle gateway system, and determine whether each data meets the corresponding flashing conditions. Only when all the flashing preconditions are met can the ECU be officially flashed.
[0004] However, the above-mentioned ECU flashing method has the following disadvantages: 1. All flashing preconditions need to be obtained through the vehicle gateway system. When the vehicle gateway system fails, the data streams of these flashing preconditions cannot be obtained, resulting in the inability to flash the ECU; 2. The flashing preconditions are written into the diagnostic equipment by the diagnostic equipment manufacturer in the form of code. If there are subsequent changes that require changing the preconditions, the diagnostic equipment manufacturer needs to modify the code and release a new version, resulting in very high costs for ECU flashing and inconvenient operation.
[0005] In summary, how to upgrade the ECU is a problem that needs to be further solved in this field. Summary of the invention
[0006] In view of this, the purpose of this application is to provide an ECU flashing method, device, equipment and storage medium, which can improve the efficiency of ECU flashing, improve the after-sales efficiency of OEMs and diagnostic equipment manufacturers, and reduce maintenance costs. The specific scheme is as follows:
[0007] In a first aspect, the present application discloses an ECU flashing method, which is applied to a diagnostic device, comprising:
[0008] Determine the target ECU to be flashed, and obtain the version information of the target ECU to obtain the ECU version information;
[0009] Sending the ECU version information to the host factory server to determine the target flashing precondition information corresponding to the target ECU according to the ECU version information, and sending the target flashing precondition information to the diagnostic device; the target flashing precondition information includes the first communication ECU information, the second communication ECU information, the DID and the precondition positive response value;
[0010] When the target flashing precondition information is received, determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information, and judging whether the communication of the first communication ECU system is normal;
[0011] If the communication of the first communication ECU system is abnormal, obtaining the precondition value corresponding to each of the DIDs through the second communication ECU system corresponding to the second communication ECU information in the target flash precondition information;
[0012] It is determined whether the precondition values corresponding to the DIDs all meet the corresponding precondition positive response values, and if so, the target ECU is flashed.
[0013] Optionally, when the target flashing precondition information is received, determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information includes:
[0014] When receiving the target flashing precondition information sent by the host factory server, downloading and saving the target flashing precondition information as a file to obtain a precondition file;
[0015] The precondition file is parsed to obtain the first communication ECU information in the target flash precondition information, and the first communication ECU system corresponding to the first communication ECU information is determined.
[0016] Optionally, downloading and saving the target flashing precondition information as a file to obtain a precondition file includes:
[0017] The target flashing precondition information is downloaded and saved as a file according to a preset file format to obtain a precondition file.
[0018] Optionally, the target flashing precondition information includes the first communication ECU information, the second communication ECU information, the DID, the precondition positive response value, the precondition information prompt content, the command type and the ECU reply byte length;
[0019] Correspondingly, the second communication ECU system corresponding to the second communication ECU information in the target flashing precondition information obtains the precondition value corresponding to each of the DIDs, including:
[0020] Determine a second communication ECU system corresponding to the second communication ECU information in the target flashing precondition information;
[0021] The address corresponding to the second communication ECU system is obtained to obtain the ECU address, and a command for obtaining the precondition value corresponding to each of the DIDs is sent to the second communication ECU system according to the ECU address to obtain the precondition value corresponding to each of the DIDs.
[0022] Optionally, the determining whether the precondition values corresponding to the DIDs all satisfy the corresponding precondition positive response values includes:
[0023] Determine respectively the type of command for obtaining the precondition value corresponding to each of the DIDs to obtain a target command type;
[0024] If the target command type is a switch type, determining whether the precondition value corresponding to the DID is consistent with the corresponding precondition positive response value;
[0025] If the target command type is an algorithm type, the ECU reply byte length is obtained, and it is determined whether the precondition value corresponding to the DID is within the ECU reply byte length range of the precondition positive response value.
[0026] Optionally, before determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information, the method further includes:
[0027] Displaying the pre-information prompt content on the front-end interface;
[0028] After receiving the confirmation response returned by the front-end interface, the step of determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information is executed.
[0029] Optionally, before determining the target ECU to be flashed, the method further includes:
[0030] The flashing precondition information of ECUs of different types and versions is obtained respectively, a plurality of flashing precondition information is obtained, and the plurality of flashing precondition information is saved in the OEM server.
[0031] In a second aspect, the present application discloses an ECU flashing device, which is applied to a diagnostic device, comprising:
[0032] A target ECU determination module is used to determine the target ECU to be flashed;
[0033] A version information acquisition module, used to acquire the version information of the target ECU, and obtain the ECU version information;
[0034] An information sending module, used for sending the ECU version information to the host factory server, so as to determine the target flashing precondition information corresponding to the target ECU according to the ECU version information, and send the target flashing precondition information to the diagnostic device; the target flashing precondition information includes the first communication ECU information, the second communication ECU information, the DID and the precondition positive response value;
[0035] a communication ECU system determination module, configured to determine, when receiving the target flashing precondition information, a first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information;
[0036] A first judging module, used to judge whether the communication of the first communication ECU system is normal;
[0037] A precondition value acquisition module, used for acquiring the precondition value corresponding to each of the DIDs through the second communication ECU system corresponding to the second communication ECU information in the target flash precondition information if the communication of the first communication ECU system is abnormal;
[0038] A second judgment module is used to judge whether the precondition values corresponding to the DIDs all meet the corresponding precondition positive response values;
[0039] The ECU flashing module is used to flash the target ECU if the precondition values corresponding to the DIDs all meet the corresponding precondition positive response values.
[0040] In a third aspect, the present application discloses an electronic device, comprising a processor and a memory; wherein the processor implements the aforementioned ECU flashing method when executing a computer program stored in the memory.
[0041] In a fourth 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 aforementioned ECU flashing method is implemented.
[0042] It can be seen that the present application is applied to the diagnostic equipment, firstly determining the target ECU to be ECU flashed, and obtaining the version information of the target ECU to obtain the ECU version information, and then sending the ECU version information to the host manufacturer server, so as to determine the target flashing precondition information corresponding to the target ECU according to the ECU version information, and send the target flashing precondition information to the diagnostic equipment; the target flashing precondition information includes the first communication ECU information, the second communication ECU information, the DID and the precondition positive response value; when the target flashing precondition information is received, the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information is determined, and it is judged whether the communication of the first communication ECU system is normal, if the communication of the first communication ECU system is abnormal, then the precondition value corresponding to each of the DIDs is obtained through the second communication ECU system corresponding to the second communication ECU information in the target flashing precondition information, and finally it is judged whether the precondition values corresponding to each of the DIDs meet the corresponding precondition positive response value, if so, the target ECU is flashed. The present application stores the flashing precondition information of different ECUs in the host factory server in advance. In this way, when a certain ECU needs to be flashed, the corresponding target flashing precondition information can be directly determined from the host factory server, and it is determined whether the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information is communicating normally. If normal, the ECU is directly used to obtain the precondition value, and the ECU is flashed when all preconditions are met. If the first communication ECU system is abnormal, the precondition value is obtained through the second communication ECU system corresponding to the second communication ECU information. That is, the present application has a backup communication method, which can prevent the ECU flashing failure caused by an abnormality in a single communication ECU system, thereby improving the efficiency of ECU flashing. In addition, since the flashing precondition information is maintained on the host factory server side, compared with the method of modifying the diagnostic software code, it can greatly improve the after-sales efficiency of the host factory and the diagnostic equipment manufacturer and reduce maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0044] Figure 1 This is a flow chart of an ECU flashing method disclosed in this application;
[0045] Figure 2 This is a flow chart of a specific ECU flashing method disclosed in this application;
[0046] Figure 3 A schematic diagram of a specific flashing precondition information content disclosed in this application;
[0047] Figure 4 A specific prompt content display schematic diagram disclosed in this application;
[0048] Figure 5 A schematic diagram of a specific precondition file code disclosed in this application;
[0049] Figure 6 This is a schematic diagram of the structure of an ECU flashing device disclosed in this application;
[0050] Figure 7 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0052] The present application discloses an ECU flashing method, which is applied to diagnostic equipment, see Figure 1 As shown, the method includes:
[0053] Step S11: Determine the target ECU to be flashed, and obtain the version information of the target ECU to obtain the ECU version information.
[0054] It should be pointed out that the ECU flashing scheme proposed in this application is applied to diagnostic equipment, such as automobile diagnostic instruments. When ECU flashing is required, the target ECU to be flashed is first determined, and then the version information corresponding to the target ECU is obtained to obtain the ECU version information. Among them, the number of target ECUs can be one or more, which is determined according to the actual flashing requirements, such as all ECUs to be flashed selected by the user from the diagnostic software, including but not limited to the gearbox system, instrument system, etc., wherein the gearbox system is used to read the vehicle gear, and the instrument system is used to read the vehicle speed.
[0055] In addition, it should be pointed out that before determining the target ECU to be flashed, the present application specifically also includes: respectively obtaining the flashing precondition information of ECUs of different types and versions, obtaining multiple flashing precondition information, and saving the multiple flashing precondition information to the host factory server. That is, the present application collects the flashing precondition information of ECUs of different types and versions in advance, and stores all the collected flashing precondition information in the host factory server, and the host factory server can also maintain the flashing precondition information of each ECU, and when a new version or new type of ECU appears, the flashing precondition information of the corresponding old version is directly updated, and each flashing precondition information is mapped with the corresponding ECU in advance, such as mapping each flashing precondition information with the version information of the corresponding ECU; wherein, the target flashing precondition information specifically includes the first communication ECU information, the second communication ECU information, and the DID (Data Identifier, an identifier used for vehicle diagnosis, used to identify and obtain specific parameter data) and a precondition positive response value, wherein each DID corresponds to a specific data item of the vehicle, such as sensor data, status information, etc., and the precondition positive response value is the expected positive response value. The first communication ECU information corresponds to the first communication ECU system (the default communication ECU system), such as the vehicle gateway (GW, Gateway) system; the second communication ECU information corresponds to the second communication ECU system, such as the IPK (Identity Key Pair) system, BSGL (Low Voltage Belt Driven Starter Generator, pulley driven starter motor (48V)) system, etc., wherein the first communication ECU system and the second communication ECU system are not the same.
[0056] Step S12: Send the ECU version information to the host manufacturer server to determine the target flashing precondition information corresponding to the target ECU according to the ECU version information, and send the target flashing precondition information to the diagnostic device; the target flashing precondition information includes the first communication ECU information, the second communication ECU information, the DID and the precondition positive response value.
[0057] In this embodiment, after obtaining the version information of the target ECU to obtain the ECU version information, the obtained ECU version information is further sent to the host manufacturer server; when the host manufacturer server receives the ECU version information sent by the diagnostic device, it can directly determine the target flashing precondition information corresponding to the target ECU according to the ECU version information, and then send the target flashing precondition information to the diagnostic device; wherein, the target flashing precondition information specifically includes the first communication ECU information, the second communication ECU information, the DID and the precondition positive response value.
[0058] Step S13: when the target flashing precondition information is received, determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information, and judging whether the communication of the first communication ECU system is normal.
[0059] In this embodiment, when the target flashing prerequisite information sent by the above-mentioned OEM server is received, the first communication ECU system corresponding to the first communication ECU information in the above-mentioned target flashing prerequisite information is first determined, such as the vehicle gateway system, and then it is determined whether the communication of the first communication ECU system is normal, that is, whether it can communicate normally.
[0060] In a specific implementation, when the target flashing precondition information is received, determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information may specifically include: when the target flashing precondition information issued by the host factory server is received, downloading and saving the target flashing precondition information as a file to obtain a precondition file; parsing the precondition file to obtain the first communication ECU information in the target flashing precondition information, and determining the first communication ECU system corresponding to the first communication ECU information. In this embodiment, when the target flashing precondition information issued by the host factory server is received, downloading and saving the target flashing precondition information as a file to obtain a precondition file; parsing the precondition file to obtain the first communication ECU information in the target flashing precondition information, and determining the first communication ECU system corresponding to the first communication ECU information. In this embodiment, when the target flashing precondition information sent by the host manufacturer server is received, the target flashing precondition information is first downloaded and saved in a file format to obtain a precondition file; further, the downloaded precondition file is parsed to obtain the first communication ECU information in the target flashing precondition information, and then the first communication ECU system corresponding to the first communication ECU information is determined, such as a vehicle gateway system.
[0061] Specifically, the downloading and saving of the target flashing precondition information as a file to obtain the precondition file may include: downloading and saving the target flashing precondition information as a file according to a preset file format to obtain the precondition file. That is, the target flashing precondition information is downloaded and saved according to a preset file format, thereby obtaining a precondition file, such as a FlashPrecondition.xml file, and the preset file format includes but is not limited to .xml (Extensible Markup Language), .json (JavaScript Object Notation, JS object notation) and other file formats.
[0062] Step S14: If the communication of the first communication ECU system is abnormal, the precondition value corresponding to each of the DIDs is obtained through the second communication ECU system corresponding to the second communication ECU information in the target flash precondition information.
[0063] In this embodiment, after judgment, if there is a communication abnormality in the above-mentioned first communication ECU system, the second communication ECU system corresponding to the second communication ECU information in the above-mentioned target flashing pre-condition information is further determined, such as the IPK system, and the pre-condition values corresponding to each of the above-mentioned DIDs are obtained through the second communication ECU system, such as the vehicle gear is in P gear, the vehicle speed is less than 3km / h, etc.
[0064] Step S15: Determine whether the precondition values corresponding to the DIDs all meet the corresponding precondition positive response values, and if so, flash the target ECU.
[0065] In this embodiment, after obtaining the precondition values corresponding to each of the DIDs, it is necessary to further determine whether the precondition values corresponding to each of the above DIDs all satisfy the corresponding precondition positive response values. If the precondition values corresponding to each of the above DIDs all satisfy the corresponding precondition positive response values, it indicates that the corresponding ECU can be flashed at this time, that is, the target ECU can be flashed.
[0066] It can be seen that the embodiment of the present application is applied to a diagnostic device, first determining a target ECU to be ECU flashed, and obtaining the version information of the target ECU to obtain the ECU version information, and then sending the ECU version information to the host manufacturer server, thereby determining the target flashing precondition information corresponding to the target ECU according to the ECU version information, and sending the target flashing precondition information to the diagnostic device; the target flashing precondition information includes first communication ECU information, second communication ECU information, DID and precondition positive response value; when the target flashing precondition information is received, the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information is determined, and it is determined whether the communication of the first communication ECU system is normal. If the communication of the first communication ECU system is abnormal, the precondition value corresponding to each of the DIDs is obtained through the second communication ECU system corresponding to the second communication ECU information in the target flashing precondition information, and finally it is determined whether the precondition values corresponding to each of the DIDs meet the corresponding precondition positive response value. If so, the target ECU is flashed. The embodiment of the present application stores the flashing precondition information of different ECUs in the host factory server in advance. In this way, when a certain ECU needs to be flashed, the corresponding target flashing precondition information can be directly determined from the host factory server, and it is determined whether the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information is communicating normally. If normal, the ECU is directly used to obtain the precondition value, and the ECU is flashed when all preconditions are met. If the first communication ECU system is abnormal, the precondition value is obtained through the second communication ECU system corresponding to the second communication ECU information. That is, the embodiment of the present application has a backup communication method, which can prevent the ECU flashing failure caused by an abnormality in a single communication ECU system, thereby improving the efficiency of ECU flashing. In addition, since the flashing precondition information is maintained on the host factory server side, compared with the method of modifying the diagnostic software code, it can greatly improve the after-sales efficiency of the host factory and the diagnostic equipment manufacturer and reduce maintenance costs.
[0067] The present application embodiment discloses a specific ECU flashing method, which is applied to diagnostic equipment, see Figure 2 As shown, the method includes:
[0068] Step S21: Determine the target ECU to be flashed, and obtain the version information of the target ECU to obtain the ECU version information.
[0069] Step S22: Send the ECU version information to the host manufacturer server to determine the target flashing precondition information corresponding to the target ECU according to the ECU version information, and send the target flashing precondition information to the diagnostic device; the target flashing precondition information includes the first communication ECU information, the second communication ECU information, the DID, the precondition positive response value, the precondition prompt content, the command type and the ECU reply byte length.
[0070] In this embodiment, see Figure 3 As shown, the flashing precondition information pre-stored in the OEM server may specifically include the first communication ECU information (such as GW), the second communication ECU information (such as IPK, BSGL, etc.), DID (such as DF0A, DF06, DF01, etc.), the precondition positive response value (such as 0x00, 0x02, 0x0000:0x0300x), the precondition prompt content (such as the vehicle gear is in P gear or N gear, the vehicle power gear is in ON gear, the vehicle speed is <= 3km / h, etc.), the command type (including Switch and Algorithm, i.e., switch and algorithm) and the ECU reply byte length (such as 1 byte, 2 bytes, etc.). In addition, it may also include a default address and a second address, wherein the default communication ECU corresponds to the default address, and the second communication ECU corresponds to the second address. In addition, it should be pointed out that the flashing precondition information can be maintained by the OEM backend management system located at the OEM server end, and the content in the flashing precondition information can be added, modified, deleted, etc. according to actual application requirements, see. Figure 5 As shown, the corresponding code in the precondition file FlashPrecondition.xml can be directly adjusted.
[0071] Step S23: when the target flashing precondition information is received, determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information, and judging whether the communication of the first communication ECU system is normal.
[0072] In this embodiment, before determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information, it may also include: displaying the precondition information prompt content on the front-end interface; when receiving the confirmation response returned by the front-end interface, the step of determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information is performed. For example, referring to 4, the precondition information prompt content (the EMS system (Engine Management System) is being flashed, please meet the following conditions before clicking the "Confirm" button to start flashing 1. The vehicle gear is in P gear or N gear 2. The vehicle power gear is in ON gear 3. The vehicle speed is <= 3km / h) is displayed on the front-end interface, and when the confirmation response returned by the user after clicking the confirmation button on the front-end interface is received, the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information is further determined.
[0073] Step S24: If the communication of the first communication ECU system is abnormal, determining the second communication ECU system corresponding to the second communication ECU information in the target flashing precondition information.
[0074] Step S25: Acquire the address corresponding to the second communication ECU system, obtain the ECU address, and send a command to the second communication ECU system according to the ECU address to obtain the precondition value corresponding to each of the DIDs, so as to obtain the precondition value corresponding to each of the DIDs.
[0075] In this embodiment, after determining the second communication ECU system corresponding to the second communication ECU information, the address corresponding to the second communication ECU system (such as 0x07E4) can be further obtained from the target flashing precondition information, and then a command for obtaining the precondition values corresponding to each DID is sent to the above-mentioned second communication ECU system according to the ECU address, thereby obtaining the precondition values corresponding to each DID.
[0076] Step S26: respectively determine the type of command for obtaining the precondition value corresponding to each of the DIDs to obtain the target command type.
[0077] Furthermore, the types of commands for obtaining the precondition values corresponding to the above-mentioned DIDs are determined respectively.
[0078] Step S27: If the target command type is a switch type, determine whether the precondition value corresponding to the DID is consistent with the corresponding precondition positive response value, and if so, flash the target ECU.
[0079] In this embodiment, if the above-mentioned target command type is a switch type (ie, Switch type), it is determined whether the precondition value corresponding to the DID is consistent with the corresponding precondition positive response value. If they are consistent, the above-mentioned target ECU is flashed.
[0080] Step S28: If the target command type is an algorithm type, the ECU reply byte length is obtained, and it is determined whether the precondition value corresponding to the DID is within the ECU reply byte length range of the precondition positive response value. If so, the target ECU is flashed.
[0081] In this embodiment, if the above-mentioned target command type is an algorithm type (i.e., Algorithm type), the corresponding ECU reply byte length is further obtained, and it is determined whether the precondition value corresponding to the DID is within the ECU reply byte length range of the corresponding precondition positive response value; if it is within the ECU reply byte length range of the corresponding precondition positive response value, the above-mentioned target ECU is flashed.
[0082] Among them, for more specific processing procedures of the above steps S21 and S24, reference can be made to the corresponding contents disclosed in the above embodiments, which will not be repeated here.
[0083] It can be seen that the embodiment of the present application stores the flashing precondition information of different ECUs in the host factory server in advance, and when a certain ECU needs to be flashed, the corresponding target flashing precondition information is directly determined from the host factory server, and it is judged whether the first communication ECU system corresponding to the default communication ECU information in the target flashing precondition information communicates normally. If it is normal, the ECU is directly used to obtain the precondition value, and the ECU is flashed when all the preconditions are met. If the default communication ECU system is abnormal, the precondition value is obtained through the second communication ECU system corresponding to the second communication ECU information, and it is determined whether the communication is normal. Take the command type of the precondition value corresponding to each DID, such as Switch type or Algorithm type, and determine whether the corresponding conditions are met. If so, perform the flashing operation. This application has two channels to obtain the precondition information of ECU flashing, so as to prevent the ECU flashing failure caused by an abnormality in a single communication ECU system, thereby improving the efficiency and security of ECU flashing. Since the flashing precondition information is maintained on the OEM server side and the preconditions can be set dynamically, it can also greatly improve the after-sales efficiency of the OEM and diagnostic equipment manufacturers, thereby reducing maintenance costs.
[0084] Correspondingly, the present application also discloses an ECU flashing device, see Figure 6 As shown, the device comprises:
[0085] A target ECU determination module 11 is used to determine a target ECU to be flashed;
[0086] A version information acquisition module 12 is used to acquire the version information of the target ECU to obtain the ECU version information;
[0087] The information sending module 13 is used to send the ECU version information to the host factory server, so as to determine the target flashing precondition information corresponding to the target ECU according to the ECU version information, and send the target flashing precondition information to the diagnostic device; the target flashing precondition information includes the first communication ECU information, the second communication ECU information, the DID and the precondition positive response value;
[0088] The communication ECU system determination module 14 is used to determine the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information when the target flashing precondition information is received;
[0089] A first judging module 15, used to judge whether the communication of the first communication ECU system is normal;
[0090] The precondition value acquisition module 16 is used to acquire the precondition value corresponding to each of the DIDs through the second communication ECU system corresponding to the second communication ECU information in the target flash precondition information if the communication of the first communication ECU system is abnormal;
[0091] The second judgment module 17 is used to judge whether the precondition values corresponding to the DIDs all meet the corresponding precondition positive response values;
[0092] The ECU flashing module 18 is used to flash the target ECU if the precondition values corresponding to the DIDs all meet the corresponding precondition positive response values.
[0093] Among them, the specific working processes of the above-mentioned modules can refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0094] It can be seen that the embodiment of the present application is applied to a diagnostic device, first determining a target ECU to be ECU flashed, and obtaining the version information of the target ECU to obtain the ECU version information, and then sending the ECU version information to the host manufacturer server, thereby determining the target flashing precondition information corresponding to the target ECU according to the ECU version information, and sending the target flashing precondition information to the diagnostic device; the target flashing precondition information includes first communication ECU information, second communication ECU information, DID and precondition positive response value; when the target flashing precondition information is received, the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information is determined, and it is determined whether the communication of the first communication ECU system is normal. If the communication of the first communication ECU system is abnormal, the precondition value corresponding to each of the DIDs is obtained through the second communication ECU system corresponding to the second communication ECU information in the target flashing precondition information, and finally it is determined whether the precondition values corresponding to each of the DIDs meet the corresponding precondition positive response value. If so, the target ECU is flashed. The embodiment of the present application stores the flashing precondition information of different ECUs in the host factory server in advance. In this way, when a certain ECU needs to be flashed, the corresponding target flashing precondition information can be directly determined from the host factory server, and it is determined whether the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information is communicating normally. If normal, the ECU is directly used to obtain the precondition value, and the ECU is flashed when all preconditions are met. If the first communication ECU system is abnormal, the precondition value is obtained through the second communication ECU system corresponding to the second communication ECU information. That is, the embodiment of the present application has a backup communication method, which can prevent the ECU flashing failure caused by an abnormality in a single communication ECU system, thereby improving the efficiency of ECU flashing. In addition, since the flashing precondition information is maintained on the host factory server side, compared with the method of modifying the diagnostic software code, it can greatly improve the after-sales efficiency of the host factory and the diagnostic equipment manufacturer and reduce maintenance costs.
[0095] In some specific embodiments, the communication ECU system determination module 14 may specifically include:
[0096] A first downloading and saving unit is used to download and save the target flashing precondition information as a file when receiving the target flashing precondition information sent by the host factory server to obtain a precondition file;
[0097] The file parsing unit is used to parse the precondition file to obtain the first communication ECU information in the target flash precondition information and determine the first communication ECU system corresponding to the first communication ECU information.
[0098] In some specific embodiments, the first downloading and saving unit may specifically include:
[0099] The second downloading and saving unit is used to download and save the target flashing precondition information as a file according to a preset file format to obtain a precondition file.
[0100] In some specific embodiments, the target flashing precondition information includes the first communication ECU information, the second communication ECU information, the DID, the precondition positive response value, the precondition information prompt content, the command type and the ECU reply byte length;
[0101] Accordingly, the precondition value acquisition module 16 may specifically include:
[0102] An ECU system determining unit, configured to determine a second communication ECU system corresponding to the second communication ECU information in the target flashing precondition information;
[0103] An address acquisition unit, used to acquire an address corresponding to the second communication ECU system to obtain an ECU address;
[0104] A command sending unit is used to send a command for obtaining the precondition value corresponding to each of the DIDs to the second communication ECU system according to the ECU address, so as to obtain the precondition value corresponding to each of the DIDs.
[0105] In some specific embodiments, the second determination module 17 may specifically include:
[0106] A command type determination unit, used to respectively determine the type of command for obtaining the precondition value corresponding to each of the DIDs, and obtain a target command type;
[0107] A first judgment unit, configured to judge whether the precondition value corresponding to the DID is consistent with the corresponding precondition positive response value if the target command type is a switch type;
[0108] A byte length acquisition unit, used for acquiring the byte length of the ECU reply if the target command type is an algorithm type;
[0109] The second judgment unit is used to judge whether the precondition value corresponding to the DID is within the ECU reply byte length range of the precondition positive response value.
[0110] In some specific embodiments, before the communication ECU system determination module 14, the following may also be included:
[0111] A prompt content display unit, used to display the pre-information prompt content on a front-end interface;
[0112] The execution unit is used to execute the step of determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information after receiving the confirmation response returned by the front-end interface.
[0113] In some specific embodiments, before the target ECU determination module 11, the following steps may also be included:
[0114] The precondition information acquisition unit is used to respectively acquire the flashing precondition information of different types and versions of ECUs to obtain a plurality of flashing precondition information;
[0115] The information storage unit is used to store the plurality of flash precondition information in the host factory server.
[0116] Furthermore, the present application also discloses an electronic device. Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0117] Figure 7 A schematic diagram of the structure of an electronic device 20 provided in 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, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the ECU flashing method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0118] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0119] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0120] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the ECU flashing method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.
[0121] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed ECU flashing method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0122] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0123] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0124] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in 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 removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0125] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0126] The above is a detailed introduction to an ECU flashing method, device, equipment and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An ECU flashing method, characterized in that: Applications in diagnostic equipment, including: Determine the target ECU to be flashed, and obtain the version information of the target ECU to obtain the ECU version information; Sending the ECU version information to the host factory server to determine the target flashing precondition information corresponding to the target ECU according to the ECU version information, and sending the target flashing precondition information to the diagnostic device; the target flashing precondition information includes the first communication ECU information, the second communication ECU information, the DID and the precondition positive response value; When the target flashing precondition information is received, determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information, and judging whether the communication of the first communication ECU system is normal; If the communication of the first communication ECU system is abnormal, obtaining the precondition value corresponding to each of the DIDs through the second communication ECU system corresponding to the second communication ECU information in the target flash precondition information; It is determined whether the precondition values corresponding to the DIDs all meet the corresponding precondition positive response values, and if so, the target ECU is flashed.
2. The ECU flashing method according to claim 1, characterized in that: When the target flashing precondition information is received, determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information includes: When receiving the target flashing precondition information sent by the host factory server, downloading and saving the target flashing precondition information as a file to obtain a precondition file; The precondition file is parsed to obtain the first communication ECU information in the target flash precondition information, and the first communication ECU system corresponding to the first communication ECU information is determined.
3. The ECU flashing method according to claim 2, characterized in that: The downloading and saving of the target flashing precondition information as a file to obtain a precondition file includes: The target flashing precondition information is downloaded and saved as a file according to a preset file format to obtain a precondition file.
4. The ECU flashing method according to claim 1, characterized in that: The target flashing precondition information includes the first communication ECU information, the second communication ECU information, the DID, the precondition positive response value, the precondition information prompt content, the command type and the ECU reply byte length; Correspondingly, the second communication ECU system corresponding to the second communication ECU information in the target flashing precondition information obtains the precondition value corresponding to each of the DIDs, including: Determine a second communication ECU system corresponding to the second communication ECU information in the target flashing precondition information; The address corresponding to the second communication ECU system is obtained to obtain the ECU address, and a command for obtaining the precondition value corresponding to each of the DIDs is sent to the second communication ECU system according to the ECU address to obtain the precondition value corresponding to each of the DIDs.
5. The ECU flashing method according to claim 4, characterized in that: The determining whether the precondition values corresponding to the DIDs all satisfy the corresponding precondition positive response values includes: Determine respectively the type of command for obtaining the precondition value corresponding to each of the DIDs to obtain the target command type; If the target command type is a switch type, determining whether the precondition value corresponding to the DID is consistent with the corresponding precondition positive response value; If the target command type is an algorithm type, the ECU reply byte length is obtained, and it is determined whether the precondition value corresponding to the DID is within the ECU reply byte length range of the precondition positive response value.
6. The ECU flashing method according to claim 4, characterized in that: Before determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information, the method further includes: Displaying the pre-information prompt content on the front-end interface; After receiving the confirmation response returned by the front-end interface, the step of determining the first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information is executed.
7. The ECU flashing method according to any one of claims 1 to 6, characterized in that: Before determining the target ECU to be flashed, the method further includes: The flashing precondition information of ECUs of different types and versions is obtained respectively, a plurality of flashing precondition information is obtained, and the plurality of flashing precondition information is saved in the OEM server.
8. An ECU flashing device, characterized in that: Applications in diagnostic equipment, including: A target ECU determination module is used to determine the target ECU to be flashed; A version information acquisition module, used to acquire the version information of the target ECU, and obtain the ECU version information; An information sending module, used for sending the ECU version information to the host factory server, so as to determine the target flashing precondition information corresponding to the target ECU according to the ECU version information, and send the target flashing precondition information to the diagnostic device; the target flashing precondition information includes the first communication ECU information, the second communication ECU information, the DID and the precondition positive response value; a communication ECU system determination module, configured to determine, when receiving the target flashing precondition information, a first communication ECU system corresponding to the first communication ECU information in the target flashing precondition information; A first judging module, used to judge whether the communication of the first communication ECU system is normal; A precondition value acquisition module, used for acquiring the precondition value corresponding to each of the DIDs through the second communication ECU system corresponding to the second communication ECU information in the target flash precondition information if the communication of the first communication ECU system is abnormal; A second judgment module is used to judge whether the precondition values corresponding to the DIDs all meet the corresponding precondition positive response values; The ECU flashing module is used to flash the target ECU if the precondition values corresponding to the DIDs all meet the corresponding precondition positive response values.
9. An electronic device, characterized in that: It comprises a processor and a memory; wherein, when the processor executes the computer program stored in the memory, the ECU flashing method as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the ECU flashing method as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Automatic flashing system and method for ECU (Electronic Control Unit) of engine
CN119105367A
