CN115562705A - ECU (electronic control Unit) flashing method and device, terminal equipment and storage medium - Google Patents
ECU (electronic control Unit) flashing method and device, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN115562705A CN115562705A CN202211342256.1A CN202211342256A CN115562705A CN 115562705 A CN115562705 A CN 115562705A CN 202211342256 A CN202211342256 A CN 202211342256A CN 115562705 A CN115562705 A CN 115562705A
- Authority
- CN
- China
- Prior art keywords
- ecu
- flash
- flashing
- target
- vehicle
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3065—Monitoring arrangements determined by the means or processing involved in reporting the monitored data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Quality & Reliability (AREA)
- Small-Scale Networks (AREA)
Abstract
The application discloses ECU (electronic control unit) flashing method, device, terminal equipment and storage medium, wherein the ECU flashing method is applied to a vehicle APP and comprises the following steps: acquiring an ECU (electronic control unit) flash packet; analyzing and processing the ECU flash packet to obtain at least one flash task; each of the refresh tasks is executed to refresh the corresponding target ECU. Compared with the traditional diagnosis equipment flashing mode and OTA (over the air) upgrading mode, the scheme of the application is more convenient. Meanwhile, the vehicle APP is used as an execution main body of the ECU flashing process, so that excessive hardware limitation can be effectively avoided, the effects of cost reduction and efficiency improvement on the ECU flashing are achieved, the defects of the traditional ECU flashing mode are overcome, and the problem that actual business requirements cannot be met is solved.
Description
Technical Field
The application relates to the technical field of vehicles, in particular to an ECU (electronic control unit) flashing method and device, terminal equipment and a storage medium.
Background
ECU flash refers to upgrading the firmware of ECU, and the traditional ECU flash mode mainly includes two kinds: the first method is to perform ECU flash through a diagnostic device, and the flash mode needs special hardware and cannot be performed under the condition of lacking the diagnostic device; and secondly, ECU flashing is realized through OTA (over the air) over-the-air upgrading, the OTA over-the-air upgrading is mainly carried out based on a T-BOX (T-BOX) module, the T-BOX is short in development resources, large in development and maintenance workload and low in efficiency, and the T-BOX is adopted, so that the stability of the flashing process cannot be guaranteed. In conclusion, the traditional ECU flash mode has the defects that the actual business requirements cannot be met.
Disclosure of Invention
The application mainly aims to provide an ECU (electronic control unit) flashing method, an ECU flashing device, terminal equipment and a storage medium, and aims to solve the problem that the traditional ECU flashing mode has defects and cannot meet actual business requirements.
In order to achieve the above object, the present application provides an ECU flashing method, where the ECU flashing method is applied to a car APP, and the ECU flashing method includes:
acquiring an ECU (electronic control unit) flash packet;
analyzing and processing the ECU flash packet to obtain at least one flash task;
and executing each flash task to flash the corresponding target ECU.
Optionally, before the step of obtaining the ECU flash packet, the method further includes:
acquiring vehicle state information of a target vehicle;
judging whether a preset ECU flash precondition is met or not based on a preset precondition judgment rule and the vehicle state information;
and if so, executing the steps of acquiring the ECU flash packet and the subsequent steps.
Optionally, the step of obtaining the ECU flash package includes:
acquiring vehicle identification information of a target vehicle;
sending an ECU (electronic control unit) flash packet acquisition request to a server based on the vehicle identification information;
and receiving an ECU (electronic control unit) flash packet corresponding to the vehicle identification information fed back by the server.
Optionally, the step of analyzing and processing the ECU flash packet to obtain at least one flash task includes:
analyzing the ECU flash packet to obtain at least one piece of target ECU information and corresponding ECU flash data;
converting ECU flash data corresponding to each piece of target ECU information into ECU flash messages according with the communication protocol of the target ECU;
and obtaining the at least one brushing task based on the at least one target ECU information and the corresponding ECU brushing message.
Optionally, before the step of executing each of the flashing tasks to flash the corresponding target ECU, the method further includes:
analyzing and processing the ECU flash packet to obtain flash sequence information corresponding to the at least one flash task;
the step of executing each of the refresh tasks to refresh the corresponding target ECU includes:
and sequentially executing each brushing task according to the brushing sequence information so as to brush the corresponding target ECU.
Optionally, the ECU flashing method further comprises:
recording user operation information and ECU (electronic control unit) flashing result information in an ECU flashing process to obtain an ECU flashing log file;
and sending the ECU flash log file to a server.
Optionally, after the step of executing each of the refresh tasks to perform a refresh operation on the corresponding target ECU, the method further includes:
acquiring local target ECU version information and target ECU version information of a server;
judging whether the local target ECU version information is consistent with the target ECU version information of the server side or not;
if so, determining that the target ECU is successfully written;
if not, the target ECU is determined to be failed in the flash writing.
The embodiment of the present application further provides an ECU flashing device, which includes:
the acquisition module is used for acquiring the ECU flash package;
the analysis module is used for analyzing and processing the ECU flash package to obtain at least one flash task;
and the execution module is used for executing each flash task so as to flash the corresponding target ECU.
The embodiment of the present application further provides a terminal device, where the terminal device includes a memory, a processor, and an ECU flash program stored in the memory and capable of running on the processor, and the ECU flash program implements the steps of the ECU flash method described above when executed by the processor.
An embodiment of the present application further provides a computer-readable storage medium, where an ECU flash program is stored, and the ECU flash program implements the steps of the ECU flash method described above when executed by a processor.
According to the ECU flash method, the device, the terminal equipment and the storage medium, the ECU flash packet is obtained; analyzing and processing the ECU flash packet to obtain at least one flash task; and executing each flash task to flash the corresponding target ECU. Based on this application scheme, car machine APP can be analyzed and handle the ECU flash package that obtains, obtains at least one flash task, and then accomplishes the flash upgrading to target ECU based on the flash task, and it is more convenient for traditional diagnostic equipment flash mode and OTA aerial upgrading mode. Meanwhile, the vehicle APP is used as an execution main body of the ECU flashing process, so that excessive hardware limitation can be effectively avoided, the effects of cost reduction and efficiency improvement on the ECU flashing are achieved, the defects of the traditional ECU flashing mode are overcome, and the problem that actual business requirements cannot be met is solved.
Drawings
FIG. 1 is a functional module schematic diagram of a terminal device to which an ECU (electronic control unit) flash device belongs;
FIG. 2 is a schematic flow chart diagram of a first exemplary embodiment of an ECU flashing method of the present application;
FIG. 3 is a schematic flow chart diagram of a second exemplary embodiment of an ECU flashing method of the present application;
FIG. 4 is a schematic flow chart of a third exemplary embodiment of an ECU flashing method of the present application;
FIG. 5 is a schematic flow chart diagram illustrating a fourth exemplary embodiment of an ECU flashing method of the present application;
FIG. 6 is a schematic flow chart diagram illustrating a fifth exemplary embodiment of an ECU flashing method of the present application;
FIG. 7 is a flowchart illustrating a sixth exemplary embodiment of an ECU flashing method of the present application;
FIG. 8 is a flowchart illustrating a seventh exemplary embodiment of an ECU flashing method according to the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The main solution of the embodiment of the application is as follows: acquiring an ECU (electronic control unit) flash packet; analyzing and processing the ECU flash packet to obtain at least one flash task; and executing each flash task to flash the corresponding target ECU. Based on this application scheme, car machine APP can be analyzed and handle the ECU flash package that obtains, obtains at least one flash task, and then accomplishes the flash upgrading to target ECU based on the flash task, and it is more convenient for traditional diagnostic equipment flash mode and OTA aerial upgrading mode. Meanwhile, the vehicle APP is used as an execution main body of the ECU flashing process, so that excessive hardware limitation can be effectively avoided, the effects of cost reduction and efficiency improvement on the ECU flashing are achieved, the defects of the traditional ECU flashing mode are overcome, and the problem that actual business requirements cannot be met is solved.
Specifically, referring to fig. 1, fig. 1 is a schematic diagram of functional modules of a terminal device to which the ECU flashing device of the present application belongs. The ECU flashing device may be a device that is independent of the terminal device and is capable of performing ECU flashing, and may be carried on the terminal device in the form of hardware or software. The terminal device can be an intelligent mobile terminal with a data processing function, such as a mobile phone and a tablet personal computer, and can also be a fixed terminal device or a server with a data processing function.
In this embodiment, the terminal device to which the ECU flashing device belongs at least includes an output module 110, a processor 120, a memory 130, and a communication module 140.
The memory 130 stores an operating system and an ECU flash program, and the ECU flash device can flash the acquired ECU packets; analyzing and processing the ECU flash packet, and storing the acquired information such as at least one flash task in the memory 130; the output module 110 may be a display screen or the like. The communication module 140 may include a WIFI module, a mobile communication module, a bluetooth module, and the like, and communicates with an external device or a server through the communication module 140.
Wherein the ECU flash program in the memory 130 when executed by the processor implements the steps of:
acquiring an ECU (electronic control unit) flash packet;
analyzing and processing the ECU flash packet to obtain at least one flash task;
and executing each flash task to flash the corresponding target ECU.
Further, the ECU flushing program in the memory 130 when executed by the processor further implements the steps of:
acquiring vehicle state information of a target vehicle;
judging whether a preset ECU flash precondition is met or not based on a preset precondition judgment rule and the vehicle state information;
and if so, executing the steps of obtaining the ECU flash packet and the subsequent steps.
Further, the ECU flushing program in the memory 130 when executed by the processor further implements the steps of:
acquiring vehicle identification information of a target vehicle;
sending an ECU (electronic control unit) flash packet acquisition request to a server based on the vehicle identification information;
and receiving an ECU flash packet corresponding to the vehicle identification information fed back by the server.
Further, the ECU flash program in the memory 130 when executed by the processor further implements the steps of:
analyzing the ECU flash packet to obtain at least one piece of target ECU information and corresponding ECU flash data;
converting ECU flash data corresponding to each target ECU information into ECU flash messages conforming to the communication protocol of the target ECU;
and obtaining the at least one brushing task based on the at least one target ECU information and the corresponding ECU brushing message.
Further, the ECU flushing program in the memory 130 when executed by the processor further implements the steps of:
analyzing and processing the ECU flash packet to obtain flash sequence information corresponding to the at least one flash task;
and sequentially executing each brushing task according to the brushing sequence information so as to brush the corresponding target ECU.
Further, the ECU flushing program in the memory 130 when executed by the processor further implements the steps of:
recording user operation information and ECU (electronic control unit) flashing result information in an ECU flashing process to obtain an ECU flashing log file;
and sending the ECU flash log file to a server.
Further, the ECU flushing program in the memory 130 when executed by the processor further implements the steps of:
acquiring local target ECU version information and target ECU version information of a server;
judging whether the local target ECU version information is consistent with the target ECU version information of the server side or not;
if yes, the target ECU is determined to be successfully written;
if not, the target ECU is determined to be failed in the flash.
According to the scheme, the ECU flash package is obtained; analyzing and processing the ECU flash packet to obtain at least one flash task; and executing each flash task to flash the corresponding target ECU. In this embodiment, the vehicle APP may analyze and process the obtained ECU flash packet to obtain at least one flash task, and then complete the flash upgrade of the target ECU based on the flash task, which is more convenient for the flash mode of the conventional diagnostic device and the OTA air upgrade mode. Meanwhile, the vehicle APP is used as an execution main body of the ECU flashing process, so that excessive hardware limitation can be effectively avoided, the effects of cost reduction and efficiency improvement on the ECU flashing are achieved, the defects of the traditional ECU flashing mode are overcome, and the problem that actual business requirements cannot be met is solved.
The ECU according to the first embodiment of the present application refers to an electronic control unit of a vehicle, which is also called a vehicle computer, and can collect various index data of the vehicle or control electronic components of the vehicle. The ECU executes various functions by means of built-in firmware (or called software), and the ECU firmware is updated in a flash mode. The target ECU refers to the ECU to be flashed, and the target ECUs may be one or more in one upgrade process.
The target vehicle is loaded with a vehicle-mounted machine system including a display unit, such as a display screen, for displaying information. The vehicle machine APP is an APP of a vehicle machine system running on a target vehicle, has the capabilities of background processing and data storage, and provides a human-computer interaction interface. More specifically, the interior of the car APP can be divided into one or more functional modules, such as a UI interface module, a flash packet management module, a flash packet analysis module, a log management module, a communication module, and a background interaction module.
The ECU can be manually upgraded by operating the vehicle APP, or the ECU is automatically upgraded when the vehicle APP meets the automatic upgrading condition. More specifically, a user controls a target vehicle to an ON gear, a vehicle machine system of the target vehicle is powered ON the ON gear, and a vehicle machine APP starts to run.
Referring to fig. 2, a first embodiment of the ECU flashing method according to the present application provides a schematic flow chart, where the ECU flashing method is applied to a car APP, and includes:
and step S10, acquiring the ECU flash packet.
Before upgrading a target ECU through a vehicle APP, an ECU (electronic control unit) flash package needs to be obtained first. The ECU flash packet refers to a data packet containing ECU flash data, and the acquisition mode comprises online acquisition and offline acquisition.
(1) Online acquisition: after the car machine APP is started and operated, communication connection is established with the server based on WiFi, 4G, 5G or other wireless communication modes supported by the car machine system, namely data interaction can be achieved between the car machine APP and the server. Further, the vehicle APP sends an ECU (electronic control unit) flash packet acquisition request to the server. And after receiving the ECU flash packet acquisition request, the server side feeds back the corresponding ECU flash packet to the vehicle APP. So, car machine APP has just accomplished the acquirement to ECU flash package.
(2) Obtaining off line: under the condition of poor network signals or other conditions, the vehicle APP is not suitable for acquiring the ECU flash packet in an online acquisition mode. Therefore, the car APP also provides a mode for obtaining the ECU flash package in an off-line mode. More specifically, the external device storing the ECU flush packet is connected to the car machine system in a wired manner, the ECU flush packet is copied to a local disk fixed path of the car machine system by the external device, and the car machine APP is notified of the path information of the ECU flush packet. Therefore, the vehicle APP can search and obtain the ECU flash packet according to the path information, and the off-line acquisition of the ECU flash packet is completed. The wired connection may refer to a USB connection between an external device and the in-vehicle device system, and the external device may be a USB disk, a handheld diagnostic device, or another device.
And step S20, analyzing and processing the ECU flash packet to obtain at least one flash task.
Specifically, after the vehicle APP acquires the ECU flash packet, the ECU flash packet is analyzed to obtain ECU flash data and target ECU information, where the ECU flash data is data in an intermediate state, the ECU flash data is used to flash the ECU, and the target ECU information is used to indicate the ECU that needs to be flashed. Generally, the communication between the car APP and the target ECU is performed through a gateway or a domain controller, and the communication process involves a specific communication protocol, such as a CAN bus protocol, an on-board ethernet bus protocol (for example, ISO 13400), and the like. After the in-vehicle APP obtains the ECU flash data, the ECU flash data is subjected to protocol conversion processing to obtain an ECU flash message which accords with a communication protocol between the in-vehicle APP and a target ECU, for example, a DoIP Ethernet diagnostic protocol message which accords with ISO 13400 protocol standards. Then, a target ECU information and a corresponding ECU flash message form a flash task, that is, a flash task is used for correspondingly flashing a target ECU. It is noted that one target ECU may correspond to a plurality of refresh tasks, each of which involves refreshing a specific function of the target ECU.
Therefore, after the vehicle APP analyzes and processes the ECU flash packet, at least one flash task can be obtained.
And step S30, executing each brushing task to brush the corresponding target ECU.
Specifically, the vehicle-mounted APP executes the refresh tasks one by one, for example, when the current refresh task is executed, an ECU refresh message is sent to a target ECU related to the current refresh task according to target ECU information, and the ECU refresh message finally reaches the target ECU related to the current refresh task through a gateway or a domain controller. Correspondingly, the target ECU receives an ECU (electronic control unit) flash message from the vehicle-mounted APP, and flash upgrading is carried out on the firmware of the target ECU according to the content of the ECU flash message. In addition, in order to ensure the data safety of the target vehicle, the priority of the flash task executed by the vehicle-mounted APP is set to be the highest, and the vehicle-mounted system is forbidden to display the popup window or the advertisement of the non-flash task. After the flash of a certain target ECU is finished, the version information of the target ECU is correspondingly updated.
According to the scheme, the ECU flash package is obtained; analyzing and processing the ECU flash packet to obtain at least one flash task; and executing each flash task to flash the corresponding target ECU. In this embodiment, the vehicle APP may analyze and process the obtained ECU flash packet to obtain at least one flash task, and then complete the flash upgrade of the target ECU based on the flash task, which is more convenient for the flash mode of the conventional diagnostic device and the OTA air upgrade mode. Simultaneously, regard as the execution main part of ECU flash process with car machine APP, can effectively avoid too much hardware restriction, play cost reduction and increase's effect to ECU flash, solved traditional ECU flash mode and had the defect, can't satisfy the problem of actual business demand.
Further, referring to fig. 3, a second embodiment of the ECU flashing method according to the present application provides a flowchart, and based on the embodiment shown in fig. 2, before acquiring the ECU flashing packet, step S10 further includes:
step S001, vehicle state information of the target vehicle is acquired.
The function of the target ECU may temporarily fail during the flashing, and thus the ECU flashing cannot be performed in the driving state. Specifically, the vehicle APP acquires vehicle state information of a target vehicle, the vehicle state information includes one or more information such as gear information, vehicle speed information and vehicle identification information of the vehicle, and the purpose of acquiring the vehicle state information is to further judge whether ECU (electronic control unit) flashing can be safely performed at present.
Step S002, based on the preset precondition determination rule and the vehicle state information, determines whether the preset ECU flashing precondition is satisfied.
Specifically, after the vehicle state information of the target vehicle is acquired, the vehicle state information is analyzed and normalized, and various vehicle state values are obtained. And then, comparing each vehicle state value with a preset reference value, if the comparison result is consistent, meeting the preset ECU flashing precondition, otherwise, not meeting the preset ECU flashing precondition.
For example, the preset reference values of the vehicle APP are a gear value "ON" and a vehicle speed value "0km/h", and the preset ECU flashing precondition comprises that the current gear of the target vehicle is an ON gear and the vehicle speed is 0km/h. If the vehicle state information of the target vehicle obtained by the vehicle APP comprises gear information and vehicle speed information, analyzing and standardizing the gear information and the vehicle speed information to obtain a gear value 'ON' and a vehicle speed value '0 km/h', comparing the gear value 'ON' and the vehicle speed value '0 km/h' with a preset reference value, and meeting the ECU flash precondition; if the vehicle state information of the target vehicle obtained by the vehicle machine APP comprises gear information and vehicle speed information, analyzing and normalizing the gear information and the vehicle speed information to obtain a gear value 'START' (START represents the starting of an engine or a driving motor) and a vehicle speed value '0 km/h', and comparing the gear value 'START' with a preset reference value to obtain a gear value '0 km/h', wherein the gear value 'START' is inconsistent with the preset reference value, namely the ECU (electronic control unit) flashing precondition is not met.
Similarly, the vehicle state information of the target vehicle obtained by the vehicle machine APP can include gear information and vehicle speed information, and can also include battery power information of the target vehicle. The battery electric quantity information can be used for judging whether the target vehicle has enough battery electric quantity for ECU (electronic control unit) flash, and ECU flash failure caused by insufficient electric quantity in the flash process is avoided.
And S003, if so, executing the steps of acquiring the ECU flash package and the following steps.
Specifically, if the result of the above determination process is that a preset ECU flashing precondition is satisfied, it indicates that the target vehicle is currently in a relatively safe state, and the ECU flashing may be performed. Further, the vehicle APP acquires the ECU flash packet in an online or offline mode, and then executes subsequent ECU flash actions.
According to the scheme, the vehicle state information of the target vehicle is obtained; judging whether a preset ECU flash precondition is met or not based on a preset precondition judgment rule and the vehicle state information; and if so, executing the steps of acquiring the ECU flash packet and the subsequent steps. In the embodiment, the influence of ECU flash on traffic safety is considered, before the ECU flash process is carried out, the vehicle state information of the target vehicle is firstly obtained by the vehicle APP, and whether the ECU flash can be safely carried out is further judged based on the preset precondition judgment rule and the vehicle state information, if yes, the subsequent ECU flash step is executed, and the ECU flash can be ensured not to influence the traffic safety.
Further, referring to fig. 4, a flowchart is provided in a third embodiment of the ECU flashing method according to the present application, and based on the above embodiment shown in fig. 2, step S10 is performed to obtain further refinement of the ECU flashing packet, including:
in step S101, vehicle identification information of the target vehicle is acquired.
Different ECUs can be carried on to the vehicle of different models, in order to obtain the corresponding ECU flash package of vehicle model of target vehicle, vehicle machine APP need obtain the vehicle identification information of target vehicle earlier, also be vehicle VIN sign indicating number promptly. The VIN code is a 17-bit vehicle identification code, and each vehicle has a unique corresponding VIN code.
And step S102, sending an ECU (electronic control unit) flash packet acquisition request to a server based on the vehicle identification information.
Specifically, the service end prestores ECU (electronic control unit) flash packages corresponding to different vehicle models, wherein the ECU flash packages comprise ECU flash packages corresponding to a target vehicle. After the vehicle APP acquires the VIN code of the target vehicle, a corresponding ECU (electronic control unit) flash packet acquisition request is generated based on the VIN code, and the ECU flash packet acquisition request is sent to the server side in a wireless communication mode. Correspondingly, the server receives an ECU (electronic control unit) flashing packet acquisition request from the vehicle APP, and analyzes the ECU flashing packet acquisition request to obtain request content and the VIN (vehicle identification number) of the target vehicle. Further, the service end authenticates based on the VIN code of the target vehicle, and verifies whether the target vehicle has a legal user identity and the right to acquire the ECU flash packet. If the authentication is passed, searching and obtaining a corresponding ECU (electronic control unit) flash packet according to the VIN (vehicle identification number) of the target vehicle, and then feeding the ECU flash packet back to the vehicle APP; if the authentication is not passed, the server side feeds back information that the ECU flash packet acquisition fails to the vehicle APP.
And step S103, receiving an ECU (electronic control unit) flash packet corresponding to the vehicle identification information fed back by the server.
Specifically, the vehicle APP receives an ECU (electronic control unit) flash packet fed back by the server, and the ECU flash packet is matched with the vehicle model of the target vehicle, namely, the ECU flash packet is matched with the target ECU in the flash process. And the vehicle APP can execute the subsequent ECU flashing step.
On the basis, the car machine APP also provides an ECU (electronic control unit) flash packet operation rule based on user permission. Specifically, the current user of the target vehicle may be a research and development person, a production person, a sales person or a user, and the operation requirements of the current users with different identities on the ECU flash package are also different, for example, the operation requirements of the research and development person on the ECU flash package relate to uploading, reading, editing and the like, and the research and development person also has operation requirements on some unreleased ECU flash packages; and the operation requirement of a manufacturer, a salesperson or a user on the ECU flash package generally only relates to reading, namely, the ECU flash package is utilized to perform flash upgrading on the target ECU.
Therefore, the vehicle machine APP sets corresponding operation permission for different user identities, and the user identities are distinguished through the login account of the vehicle machine APP. For example, the operation authority corresponding to the research and development staff is uploading, reading, and editing, and the operation authority corresponding to the production staff, the sales staff, or the user is reading. If the vehicle APP is logged in through the login account corresponding to the research personnel, uploading, reading and editing operations can be carried out on the ECU flash package; if the vehicle APP is logged in through a login account corresponding to a producer, a salesperson or a user, the ECU flash package can be read. Similarly, the user identity corresponding to the login account is not limited to the research personnel, the production personnel, the sales personnel or the user, and the operation authority is not limited to uploading, reading and editing. The user identity and the operation authority corresponding to the login account can be set for the vehicle APP in advance according to actual requirements.
According to the scheme, the vehicle identification information of the target vehicle is obtained; sending an ECU (electronic control unit) flash packet acquisition request to a server based on the vehicle identification information; and receiving an ECU (electronic control unit) flash packet corresponding to the vehicle identification information fed back by the server. In this embodiment, the vehicle APP acquires the corresponding ECU update package on line from the server based on the vehicle identification information of the target vehicle, on one hand, the vehicle identification information can be provided for the server to perform authentication, and on the other hand, the ECU update package corresponding to the vehicle type of the target vehicle can be acquired, so that the safety and accuracy of the ECU update package on-line acquisition process are improved. In addition, the embodiment also provides an ECU flashing packet operation rule based on user permissions, and corresponding ECU flashing packet operation permissions are set for different user identities, so that different operation requirements can be effectively met, modification of the ECU flashing packet by persons without permission is avoided, and the safety of ECU flashing is improved.
Further, referring to fig. 5, a fourth embodiment of the ECU flashing method according to the present application provides a flowchart, based on the embodiment shown in fig. 2, in step S20, analyzing and processing the ECU flashing packet, and obtaining at least one flashing task for further refinement, including:
step S201, analyzing the ECU flash packet to obtain at least one piece of target ECU information and corresponding ECU flash data.
Specifically, the ECU flash packet exists in a data packet form, after the vehicle APP acquires the ECU flash packet, the vehicle APP analyzes the ECU flash packet to obtain ECU flash data and target ECU information, wherein the ECU flash data is data in an intermediate state, the ECU flash data is used for flashing the ECU, and the target ECU information is used for indicating the ECU needing to be flashed.
And step S202, converting the ECU flash data corresponding to each piece of target ECU information into an ECU flash message which accords with the communication protocol of the target ECU.
Specifically, the vehicle machine APP communicates with the target ECU through a gateway or a domain controller, and the communication process involves a specific communication protocol, such as a CAN bus protocol, a vehicle-mounted ethernet bus protocol (e.g., ISO 13400), and the like. After the vehicle-mounted APP obtains the ECU flash data, the ECU flash data is subjected to protocol conversion processing to obtain an ECU flash message which accords with a communication protocol between the vehicle-mounted APP and a target ECU, for example, a DoIP Ethernet diagnostic protocol message which accords with an ISO 13400 protocol specification is obtained.
Step S203, the at least one writing task is obtained based on the at least one target ECU information and the corresponding ECU writing message.
Specifically, a target ECU information and a corresponding ECU flash message form a flash task, that is, a flash task is written to a target ECU. It is noted that one target ECU may correspond to a plurality of refresh tasks, each of which involves refreshing a specific function of the target ECU.
Therefore, the vehicle APP can obtain at least one flash task based on at least one piece of target ECU information and the corresponding ECU flash message.
According to the scheme, the ECU flash packet is analyzed to obtain at least one piece of target ECU information and corresponding ECU flash data; converting ECU flash data corresponding to each target ECU information into ECU flash messages conforming to the communication protocol of the target ECU; and obtaining the at least one brushing task based on the at least one target ECU information and the corresponding ECU brushing message. In this embodiment, considering that there is a restriction of a communication protocol between the car machine APP and the target ECU, the car machine APP analyzes the obtained ECU flush packet to obtain at least one piece of target ECU information and corresponding ECU flush data, and further performs conversion processing on the ECU flush data according to the communication protocol between the car machine APP and the target ECU to obtain an ECU flush message. Similarly, when the car machine APP is applied to different vehicles, or the ECU required by different communication protocols is refreshed, the car machine APP can also smoothly convert the ECU refresh packet into the ECU refresh message meeting the requirements of the communication protocols, and the compatibility and the stability of the car machine APP to the ECU refresh process are improved. And finally, obtaining at least one brushing task based on at least one target ECU information and corresponding ECU brushing data so as to enable the vehicle APP to execute the brushing task and complete ECU brushing.
Further, referring to fig. 6, a fifth embodiment of the ECU flashing method of the present application provides a flowchart, based on the above embodiment shown in fig. 2, where step S20, before executing each of the flashing tasks to flash the corresponding target ECU, further includes:
and step S004, analyzing and processing the ECU flash packet to obtain the flash sequence information corresponding to the at least one flash task.
The process of ECU flashing may occur in two situations: in the first case, since the ECU flashing process involves a plurality of target ECUs, it is difficult to flash the plurality of target ECUs at the same time, and therefore it is necessary to specify the flashing order of the plurality of target ECUs in advance. In the second case, considering that the flashing process takes a long time, in a specific case, it is necessary to split the flashing process involved in one ECU flashing packet into several flashing processes that take a short time.
Therefore, the vehicle APP analyzes and processes the ECU flash packet to obtain the flash sequence information corresponding to the at least one flash task.
For the first case, the flush order information specifies the execution order of the plurality of flush tasks. For example, the flash tasks related to the ECU flash packet include task 1, task 2, and task 3, and the flash sequence information specifies the flash sequence of the three flash tasks as task 2, task 1, and task 3.
For the second case, the flush order information specifies a number of flush task blocks and corresponding flush orders. For example, the flash tasks related to the ECU flash package include task 4, task 5, task 6, task 7, task 8, and task 9, and the diagnostic queue information defines two flash task blocks, which are task block 1 and task block 2, respectively. The content of the task block 1 is to write tasks 4, 5, 6 and 7, and the writing sequence corresponding to the task block 1 is task 5, 4, 7 and 6; the content of the task block 2 is to write a flash to the tasks 8 and 9, and the flash sequence corresponding to the task block 2 is the tasks 8 and 9. Thus, the task block 1 and the task block 2 can be performed in different time periods, for example, the task block 1 can be performed immediately after the flush packet is acquired, and the task block 2 can be performed when the vehicle machine system is idle and the flush precondition is satisfied next time.
Step S30, executing each brushing task to further refine the brushing of the corresponding target ECU, wherein the brushing task comprises the following steps:
and S301, sequentially executing each brushing task according to the brushing sequence information so as to brush the corresponding target ECU.
Specifically, after the vehicle APP obtains the information of the brushing sequence, the brushing sequence corresponding to each brushing task is determined, and the brushing tasks are further sequentially executed according to the brushing sequence, for example, when the current brushing task is executed, an ECU brushing message is sent to a target ECU related to the current brushing task according to the information of the target ECU, and the ECU brushing message passes through a gateway or a domain controller and finally reaches the target ECU related to the current brushing task. Correspondingly, the target ECU receives an ECU (electronic control unit) flash message from the vehicle-mounted APP, and flash upgrading is carried out on the firmware of the target ECU according to the content of the ECU flash message. In addition, in order to ensure the data safety of the target vehicle, the priority of the flash task executed by the vehicle-mounted APP is set to be the highest, and the vehicle-mounted system is forbidden to display the popup window or the advertisement of the non-flash task. After the flashing of a certain target ECU is finished, the version information of the target ECU is correspondingly updated.
According to the scheme, the brushing sequence information corresponding to the at least one brushing task is obtained by analyzing and processing the ECU brushing package; and sequentially executing each brushing task according to the brushing sequence information so as to brush the corresponding target ECU. In the embodiment, the ECU flashing process is performed based on a certain sequence, the car APP analyzes and processes the ECU flashing packet to obtain the flashing sequence information corresponding to at least one of the flashing tasks, and the at least one of the flashing tasks can be sequentially executed based on the flashing sequence information, so that the ECU flashing can be performed in order.
Further, referring to fig. 7, a sixth embodiment of the ECU flashing method of the present application provides a flowchart, and based on the above embodiment shown in fig. 2, the ECU flashing method further includes:
and step S005, recording user operation information and ECU flashing result information in the ECU flashing process to obtain an ECU flashing log file.
In order to track the ECU flashing process, the technical personnel can improve the ECU flashing package or the vehicle APP subsequently, and the embodiment provides a recording mode of the ECU flashing process. Specifically, the car APP provides a human-computer interaction interface, such as a UI of a car APP displayed on a car central control display screen. Any operation trace of the user through the man-machine interaction interface in the ECU flashing process is recorded in the ECU flashing log file. And after the ECU flash process is finished, the vehicle APP also acquires the flashed ECU version information or ECU flash abnormal information and the like as ECU flash result information, and further records the ECU flash result information in an ECU flash log file. Notably, the recording of the ECU flush log file is applicable to both online and offline flushes.
And step S006, sending the ECU flash log file to a server.
And recording user operation information and ECU (electronic control unit) flashing result information in the ECU flashing process by the vehicle APP, and finishing the ECU flashing process after obtaining the ECU flashing log file. Further, the car machine APP sends the ECU flash log file to the server side in a wireless transmission mode, and correspondingly, the server side receives the ECU flash log file from the car machine APP and stores the ECU flash log file locally. A subsequent technician can call the ECU flash log file from the server at any time for analysis so as to improve the relevant technology of ECU flash.
In addition, if the ECU is flashed in an offline flashing mode, the vehicle APP stores the obtained ECU flashing log file locally, and after the subsequent vehicle APP and the server recover stable communication, the vehicle APP sends the ECU flashing log file to the server.
According to the scheme, the ECU flashing log file is obtained by recording the user operation information and the ECU flashing result information in the ECU flashing process; and sending the ECU flash log file to a server. In this embodiment, the car APP records an operation trace of the user in the ECU flashing process and an ECU flashing result, and thus obtains an ECU flashing log file. The car machine APP further sends the ECU flashing log file to the server side, the ECU flashing log file is stored by the server side, and follow-up technicians can conveniently trace and analyze the ECU flashing process based on the ECU flashing log file.
Further, referring to fig. 8, a seventh embodiment of the ECU flashing method of the present application provides a flowchart, and based on the above embodiment shown in fig. 2, step S30, executing each of the flashing tasks to flash the corresponding target ECU further includes:
step S007, local target ECU version information and target ECU version information of the server are acquired.
And judging whether the ECU flash is successful or not, wherein the most direct mode is to compare whether the flash ECU version number is consistent with an expected ECU version number or not. Specifically, after the execution of the flashing task is finished, the vehicle APP reads local target ECU version information, and the flashed ECU version number is obtained; meanwhile, the vehicle APP sends a target ECU version information acquisition request of the server to obtain the fed back target ECU version information of the server, namely the expected ECU version number is obtained; in addition, the desired ECU version number may also be parsed from the ECU flash packet.
Step S008, determining whether the local target ECU version information is consistent with the target ECU version information of the server.
Specifically, after the vehicle-mounted APP obtains the local target ECU version information and the target ECU version information of the server, that is, after the flashed ECU version number and the expected ECU version number are obtained, further comparing whether the flashed ECU version number is consistent with the expected ECU version number.
And step S009, if yes, determining that the target ECU is successfully written.
Specifically, if the flashed ECU version number is consistent with the expected ECU version number, it indicates that the firmware of the target ECU has been flashed to the expected version, i.e., the target ECU can be deemed to be flashed successfully.
And step S010, if not, determining that the target ECU is failed in the flash writing.
Specifically, if the flashed ECU version number does not match the expected ECU version number, it indicates that the firmware of the target ECU is not flashed to the expected version, i.e., the target ECU may be deemed to have failed to be flashed.
According to the scheme, the local target ECU version information and the target ECU version information of the server are obtained; judging whether the local target ECU version information is consistent with the target ECU version information of the server side; if so, determining that the target ECU is successfully written; if not, the target ECU is determined to be failed in the flash. The embodiment provides a verification rule of an ECU flashing result, that is, the vehicle APP obtains local target ECU version information and target ECU version information of a server, and by comparing whether the local target ECU version information and the target ECU version information are consistent or not, whether the target ECU flashing is successful or not can be judged, and then information is fed back to a user in time or a protection mechanism of flashing failure is executed, so that robustness of an ECU flashing process is improved.
In addition, an embodiment of the present application further provides an ECU flashing device, including:
the acquisition module is used for acquiring the ECU flash package;
the analysis module is used for analyzing and processing the ECU flash package to obtain at least one flash task;
the execution module is used for executing each flash task so as to flash the corresponding target ECU;
the ECU flash device also comprises a vehicle state information acquisition unit, a precondition judgment unit and an execution unit; the vehicle state information acquisition unit is used for acquiring an ECU (electronic control unit) flash packet; the precondition judging unit is used for judging whether preset ECU flashing preconditions are met or not based on preset precondition judging rules and the vehicle state information; the execution unit is used for executing the steps of acquiring the ECU flash packet and the subsequent steps if the ECU flash packet is acquired;
the acquisition module further comprises a vehicle identification information acquisition unit, a request unit and a receiving unit; the vehicle identification information acquisition unit is used for acquiring vehicle identification information of a target vehicle; the request unit is used for sending an ECU (electronic control unit) flash packet acquisition request to a server based on the vehicle identification information; the receiving unit is used for receiving an ECU (electronic control unit) flash packet corresponding to the vehicle identification information fed back by the server;
the analysis module also comprises a first analysis unit, a conversion unit and a task generation unit; the analysis unit is used for analyzing the ECU flash packet to obtain at least one piece of target ECU information and corresponding ECU flash data; the conversion unit is used for converting the ECU flash data corresponding to each piece of target ECU information into the ECU flash message which conforms to the communication protocol of the target ECU; and the task generating unit is used for obtaining the at least one writing task based on the at least one target ECU information and the corresponding ECU writing message.
The ECU flash device further comprises a second analysis unit, wherein the second analysis unit is used for analyzing and processing the ECU flash packet to obtain flash sequence information corresponding to the at least one flash task; the execution module further comprises an execution unit; the execution unit is used for sequentially executing each brushing task according to the brushing sequence information so as to brush the corresponding target ECU;
the ECU flash device also comprises a log recording unit and a log sending unit; the log recording unit is used for recording user operation information and ECU flashing result information in the ECU flashing process to obtain an ECU flashing log file; the log sending unit is used for sending the ECU flash log file to a server;
the ECU flash device also comprises a version information acquisition unit, a version information judgment unit, a flash success identification unit and a flash failure identification unit; the version information acquisition unit is used for acquiring local target ECU version information and target ECU version information of a server; the version information judging unit is used for judging whether the local target ECU version information is consistent with the target ECU version information of the server side; the successful flash identification unit is used for identifying that the target ECU is successful in flash if the target ECU is successful in flash; and the flash failure identification unit is used for identifying that the target ECU flash fails if the target ECU flash fails.
For the principle and implementation process of the ECU flashing in this embodiment, please refer to the above embodiments, which are not described herein again.
In addition, the embodiment of the present application also provides a terminal device, where the terminal device includes a memory, a processor, and an ECU flash program that is stored in the memory and is executable on the processor, and the ECU flash program implements the steps of the ECU flash method described above when executed by the processor.
Since the ECU flash program is executed by the processor, all technical solutions of all the foregoing embodiments are adopted, so that at least all the beneficial effects brought by all the technical solutions of all the foregoing embodiments are achieved, and details are not repeated herein.
Furthermore, an embodiment of the present application also provides a computer-readable storage medium, where an ECU flash program is stored, and the ECU flash program implements the steps of the ECU flash method as described above when executed by a processor.
Since the ECU flash program is executed by the processor, all technical solutions of all the foregoing embodiments are adopted, so that at least all the beneficial effects brought by all the technical solutions of all the foregoing embodiments are achieved, and details are not repeated herein.
Compared with the prior art, the ECU flash method, the device, the terminal equipment and the storage medium provided by the embodiment of the application acquire the ECU flash packet; analyzing and processing the ECU flash packet to obtain at least one flash task; and executing each flash task to flash the corresponding target ECU. Based on this application scheme, car machine APP can be analyzed and handle the ECU flash package that obtains, obtains at least one flash task, and then accomplishes the flash upgrading to target ECU based on the flash task, and it is more convenient for traditional diagnostic equipment flash mode and OTA aerial upgrading mode. Simultaneously, regard as the execution main part of ECU flash process with car machine APP, can effectively avoid too much hardware restriction, play cost reduction and increase's effect to ECU flash, solved traditional ECU flash mode and had the defect, can't satisfy the problem of actual business demand.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or system comprising the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, a controlled terminal, or a network device) to execute the method of each embodiment of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all the equivalent structures or equivalent processes that can be directly or indirectly applied to other related technical fields by using the contents of the specification and the drawings of the present application are also included in the scope of the present application.
Claims (10)
1. The ECU flashing method is applied to a vehicle APP, and comprises the following steps:
acquiring an ECU (electronic control unit) flash packet;
analyzing and processing the ECU flash packet to obtain at least one flash task;
and executing each flash task to flash the corresponding target ECU.
2. The ECU flash method of claim 1, wherein the step of obtaining an ECU flash packet is preceded by:
acquiring vehicle state information of a target vehicle;
judging whether a preset ECU flash precondition is met or not based on a preset precondition judgment rule and the vehicle state information;
and if so, executing the steps of obtaining the ECU flash packet and the subsequent steps.
3. The ECU flash method of claim 1, wherein the step of obtaining an ECU flash package comprises:
acquiring vehicle identification information of a target vehicle;
sending an ECU (electronic control unit) flash packet acquisition request to a server based on the vehicle identification information;
and receiving an ECU flash packet corresponding to the vehicle identification information fed back by the server.
4. The ECU flashing method of claim 1, wherein the step of parsing and processing the ECU flashing packet to obtain at least one flashing task comprises:
analyzing the ECU flash packet to obtain at least one piece of target ECU information and corresponding ECU flash data;
converting ECU flash data corresponding to each target ECU information into ECU flash messages conforming to the communication protocol of the target ECU;
and obtaining the at least one brushing task based on the at least one target ECU information and the corresponding ECU brushing message.
5. The ECU flashing method of claim 1, wherein prior to the step of performing each of the flashing tasks to flash the corresponding target ECU, further comprising:
analyzing and processing the ECU flash packet to obtain flash sequence information corresponding to the at least one flash task;
the step of executing each of the refresh tasks to refresh the corresponding target ECU includes:
and sequentially executing each flashing task according to the flashing sequence information so as to flash the corresponding target ECU.
6. The ECU flashing method of claim 1, further comprising:
recording user operation information and ECU flashing result information in an ECU flashing process to obtain an ECU flashing log file;
and sending the ECU flash log file to a server.
7. The ECU flashing method of claim 1, wherein after the step of performing each of the flashing tasks to flash the corresponding target ECU, further comprising:
acquiring local target ECU version information and target ECU version information of a server;
judging whether the local target ECU version information is consistent with the target ECU version information of the server side or not;
if yes, the target ECU is determined to be successfully written;
if not, the target ECU is determined to be failed in the flash.
8. An ECU flashing device characterized by comprising:
the acquisition module is used for acquiring the ECU flash package;
the analysis module is used for analyzing and processing the ECU flash package to obtain at least one flash task;
and the execution module is used for executing each flash task so as to flash the corresponding target ECU.
9. A terminal device, characterized in that the terminal device comprises a memory, a processor and an ECU flash stored on the memory and executable on the processor, which when executed by the processor implements the steps of the ECU flash method as claimed in any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon an ECU flash program, which when executed by a processor implements the steps of the ECU flash method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211342256.1A CN115562705A (en) | 2022-10-28 | 2022-10-28 | ECU (electronic control Unit) flashing method and device, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211342256.1A CN115562705A (en) | 2022-10-28 | 2022-10-28 | ECU (electronic control Unit) flashing method and device, terminal equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115562705A true CN115562705A (en) | 2023-01-03 |
Family
ID=84768491
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211342256.1A Pending CN115562705A (en) | 2022-10-28 | 2022-10-28 | ECU (electronic control Unit) flashing method and device, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115562705A (en) |
-
2022
- 2022-10-28 CN CN202211342256.1A patent/CN115562705A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109164783B (en) | Vehicle diagnosis method, apparatus, device, and medium | |
CN107199971B (en) | Vehicle-mounted voice interaction method, terminal and computer readable storage medium | |
CN111488165B (en) | Method and system for upgrading vehicle ECU through script | |
CN110928567A (en) | Vehicle system upgrading method, terminal device and computer-readable storage medium | |
WO2019114603A1 (en) | Vehicle detection method and apparatus and vehicle diagnostic device | |
CN108965293B (en) | Message analysis method and device and electronic equipment | |
CN110286923A (en) | Based on cloud to the method for vehicle electronic control unit system upgrade | |
WO2021203604A1 (en) | Update test method and apparatus for vehicle component, and computer device and storage medium | |
CN113608518B (en) | Data generation method, device, terminal equipment and medium | |
CN112990495A (en) | Method, device and system for vehicle after-sale diagnosis and storage medium | |
WO2023103712A1 (en) | Ecu upgrade method and device, and readable storage medium | |
CN115562705A (en) | ECU (electronic control Unit) flashing method and device, terminal equipment and storage medium | |
CN114356760A (en) | CANFD controller software remote upgrade test method and system based on L3 whole vehicle architecture | |
CN111857103B (en) | Vehicle diagnosis method, device, equipment and storage medium | |
CN109286689B (en) | Information sending method and device and vehicle-mounted man-vehicle interaction terminal | |
CN115080085A (en) | Method and system for solving EOL calibration in OEM | |
CN114488997B (en) | ECU (electronic control Unit) refreshing method and device, electronic equipment and storage medium | |
CN116880874A (en) | Vehicle remote diagnosis and writing method, vehicle and system | |
CN112908330B (en) | Voice wake-up method and device for terminal equipment and computer readable storage medium | |
CN105530288B (en) | Data interaction method | |
CN111061255B (en) | Control method and device of electric vehicle | |
CN115397008A (en) | OTA (over the air) registration method, device, equipment and medium of vehicle | |
CN107171824B (en) | Wifi disconnection processing method of terminal, terminal and storage device | |
CN118870346A (en) | Vehicle remote upgrading method, vehicle upgrading platform, vehicle, medium and product | |
CN116319736A (en) | Voice skill UI updating method, online debugging method and device |
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 |