Mobile terminal, vehicle ECU upgrading method thereof and computer readable storage medium

By connecting to the vehicle with the mobile terminal and selecting the automatic upgrade mode or the PC upgrade mode, the problem of cumbersome upgrade operation of the vehicle ECU is solved, and the effect of simplifying the upgrade steps and expanding the coverage of the upgrade service is achieved.

CN120029641APending Publication Date: 2025-05-23CHENGDU DESAY SV KAWA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411881808.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

In the prior art, the upgrade of vehicle ECUs needs to be carried out in a 4S store, which is cumbersome, time-consuming, and error-prone.

Method used

It provides a method for mobile terminals to upgrade vehicle ECUs. By connecting to the vehicle with the mobile terminal, selecting automatic upgrade mode or PC upgrade mode, automatically obtaining ECU software upgrade information packages from cloud servers or external storage devices, and controlling the ECU for upgrading.

Benefits of technology

The ECU upgrade steps have been greatly simplified, the upgrade difficulty has been reduced, and the coverage of ECU upgrade services has been expanded. ECU upgrades can be easily upgraded regardless of old models or new models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029641A_ABST
    Figure CN120029641A_ABST
Patent Text Reader

Abstract

The invention provides a method for upgrading a vehicle ECU by a mobile terminal, a computer readable storage medium and the mobile terminal. After detecting that the mobile terminal is connected with the vehicle, the mobile terminal determines that the current upgrading mode is an automatic upgrading mode or a PC upgrading mode according to the interface of the mobile terminal and the communication connection state; in the automatic upgrading mode, the ECU software upgrading data package is obtained from the cloud server through the first communication module or from the external storage device through the first interface, and the ECU needing to be upgraded is upgraded; in the PC upgrading mode, the ECU software upgrading data package is obtained from the PC end through the second communication module, and the ECU, needing to be upgraded, of the vehicle is upgraded. According to the method, the problem that ECU upgrading cannot be carried out through OTA due to the fact that a vehicle does not have a network function is solved, the coverage range of ECU upgrading service is widened, and ECU upgrading can be conveniently carried out on old vehicle types or new vehicle types in various places through the method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicle ECU upgrade, and in particular to a method for upgrading a vehicle ECU via a mobile terminal, a computer-readable storage medium, and a mobile terminal. Background Art

[0002] With the development of automobile intelligence, the upgrade frequency of vehicle ECU (Electronic Control Unit) is getting higher and higher. At present, the upgrade of the whole vehicle ECU needs to be sent to the 4S store and professional technical staff is asked to upgrade the ECU. The upgrade steps include manually determining the version of each ECU of the vehicle, downloading the corresponding upgrade package respectively, and then connecting the computer to the vehicle to gradually upgrade each ECU. The operation is cumbersome, time-consuming, labor-intensive, and prone to errors. Summary of the invention

[0003] In order to solve the above technical problems, the present application provides a method for upgrading a vehicle ECU using a mobile terminal, a computer-readable storage medium and a mobile terminal.

[0004] The present application provides a method for a mobile terminal to upgrade a vehicle ECU, the method comprising:

[0005] After detecting the connection with the vehicle, determine the current upgrade mode as automatic upgrade mode or PC upgrade mode according to its own interface and communication connection status;

[0006] In the automatic upgrade mode, the ECU software upgrade data package is obtained from the cloud server through the first communication module or from the external storage device through the first interface, and the ECU that needs to be upgraded is upgraded;

[0007] In the PC upgrade mode, the ECU software upgrade data package is obtained from the PC through the second communication module, and the ECU of the vehicle that needs to be upgraded is upgraded.

[0008] In the above technical solution, there are two optional modes for upgrading the vehicle ECU through the mobile terminal, namely, the automatic upgrade mode and the PC upgrade mode. After the mobile terminal is connected to the vehicle and performs self-checking, in the automatic upgrade mode, the ECU software upgrade package can be obtained from the external storage device or the cloud server, and the ECU can be controlled to upgrade. This method greatly simplifies the upgrade steps and reduces the difficulty of upgrading; in addition, when the external environmental conditions do not support automatic upgrading, the ECU software upgrade package can be downloaded from the PC in the PC upgrade mode, sent to the mobile terminal, and controlled by the mobile terminal. This method can more clearly understand the upgrade process and upgrade results, and the ECU software upgrade package can be selectively downloaded for upgrading. The upgrade process is relatively simplified and controllable. Through the above technical solution, the vehicle ECU can be upgraded outside the 4S store, such as in places with mobile communication networks or where upgrade storage devices can be purchased, and the coverage of the ECU upgrade service is expanded. Whether it is an old model or a new model, the ECU can be easily upgraded in a variety of places through this method.

[0009] Furthermore, the mobile terminal actively collects vehicle version information and vehicle ECU version information from the vehicle after detecting that it is connected to the vehicle; in the automatic upgrade mode, it first detects whether the first interface is connected to an external storage device, and if not, it connects to the cloud server through the first communication module, uploads the collected vehicle version information and vehicle ECU version information to the cloud server, and then receives the ECU version information that needs to be upgraded from the cloud server, and automatically downloads the ECU software upgrade package from the cloud server according to the ECU version information that needs to be upgraded.

[0010] In the above technical solution, after the mobile terminal detects that it is connected to the vehicle, it can use the UDS diagnostic protocol or a private custom protocol to actively collect the vehicle version information and the vehicle ECU version information, and control the upgrade by automatically downloading the ECU software upgrade package from the cloud server without connecting to an external storage device. Specifically, the collected vehicle version information and the vehicle ECU version information are uploaded to the cloud server, and the cloud service confirms the ECU that needs to be upgraded after version comparison and analysis and feeds back the information to the mobile terminal. Based on this information, the mobile terminal sends a download request to the cloud server to automatically download the ECU software upgrade package.

[0011] Furthermore, when it is detected that the first interface is connected to an external storage device, the ECU software upgrade package is copied from the external storage device, and the ECU software upgrade package corresponding to the ECU to be upgraded is determined based on the collected vehicle version information and vehicle ECU version information.

[0012] In the above technical solution, the relevant ECU software upgrade package is stored in advance in the external storage device. After the mobile terminal detects that it is connected to the vehicle, it actively collects the vehicle version information and the vehicle ECU version information. When the external storage device is connected, the mobile terminal copies the ECU software upgrade package from the external storage device and parses it, and automatically determines the ECU software upgrade package corresponding to the ECU that needs to be upgraded through version comparison and analysis.

[0013] Furthermore, the mobile terminal actively collects vehicle version information and vehicle ECU version information from the vehicle after detecting that it is connected to the vehicle; in PC upgrade mode, the ECU software upgrade package is obtained from the PC through the second communication module, and the ECU software upgrade package corresponding to the ECU that needs to be upgraded is determined based on the collected vehicle version information and vehicle ECU version information.

[0014] In the above technical solution, the mobile terminal can establish a connection with the PC via Ethernet, WIFI or Bluetooth, and download the ECU software upgrade package. When the ECU that needs to be upgraded is known, the ECU software upgrade package can be downloaded in a targeted manner or downloaded in general. The downloaded ECU software upgrade package is sent to the mobile terminal, and the ECU software upgrade package corresponding to the ECU that needs to be upgraded is automatically determined through version comparison analysis.

[0015] Furthermore, the mobile terminal has an OBD interface, and after detecting that the OBD interface is connected to the OBD interface of the vehicle, the vehicle version information and the vehicle ECU version information are collected through its own OBD interface.

[0016] The OBD (On Board Diagnostics) interface is a very important vehicle diagnostic and data monitoring tool. Through the OBD interface, the vehicle can be diagnosed, performance tested, data recorded and analyzed, etc. The mobile terminal establishes a communication connection with the vehicle through the OBD interface, sends relevant instructions through the OBD interface, collects basic vehicle information and data of the ECU connected to the OBD interface, and controls the ECU to upgrade through the OBD interface.

[0017] Furthermore, the mobile terminal also obtains an ECU upgrade strategy and an ECU upgrade condition, determines whether to upgrade according to the ECU upgrade condition, and when it is determined that the ECU upgrade condition is met, upgrades the ECU that needs to be upgraded according to the ECU upgrade strategy.

[0018] In order to ensure the success rate of ECU upgrade, certain conditions need to be met when performing ECU upgrade, such as the vehicle is stationary, the engine speed is lower than the preset speed threshold, the battery power is greater than the preset power threshold, etc. Only when the set upgrade conditions are met can the mobile terminal execute the upgrade task according to the ECU upgrade strategy to avoid upgrade interruption or upgrade failure rollback due to failure to meet the upgrade conditions, wasting time and energy.

[0019] Furthermore, the method of obtaining an ECU upgrade strategy and an ECU upgrade condition, and upgrading the ECU that needs to be upgraded according to the ECU upgrade strategy includes:

[0020] Parsing the ECU software upgrade data package;

[0021] generating an upgrade queue, wherein the upgrade queue includes a plurality of upgrade instruction groups;

[0022] Upgrade the ECU that needs to be upgraded according to the instruction sequence of the corresponding upgrade instruction group;

[0023] The ECU that failed to upgrade is added to the ECU rollback queue and the rollback operation is performed.

[0024] After the mobile terminal obtains the ECU software upgrade package, it parses the package to read the upgrade script file. The upgrade script file specifies the upgrade instruction group and the upgrade instruction sequence within the group, and associates the upgrade instruction group corresponding to the ECU that needs to be upgraded; an upgrade queue is generated according to the upgrade instruction group, and the ECU upgrade task is executed based on this.

[0025] Furthermore, when the vehicle ECU is upgraded, the upgrade progress and upgrade results are displayed in real time.

[0026] By effectively displaying the upgrade progress, you can understand the upgrade process so that the upgrade process is transparent and controllable. After the upgrade is completed, upload the upgrade result. If the upgrade fails, it will prompt that the firmware information acquisition failed and provide corresponding error information so that you can take corresponding measures to deal with it.

[0027] Based on the same concept, the present application also provides a computer-readable storage medium, which stores computer-executable instruction codes. When the computer-executable instruction codes are executed by a control processor, the above-mentioned method of upgrading a vehicle ECU by a mobile terminal is implemented.

[0028] Based on the same concept, the present application also provides a mobile terminal, the mobile terminal comprising:

[0029] A first communication module, used to establish a communication connection with a cloud server;

[0030] The second communication module is used to establish a communication connection with the PC;

[0031] A first interface, used to establish a communication connection with an external storage device;

[0032] A vehicle interface, used to establish a communication connection with the vehicle;

[0033] A detection module is used to detect its own interface and communication connection status;

[0034] The control module is used to determine whether the current upgrade mode is the automatic upgrade mode or the PC upgrade mode according to the interface and the communication connection status. In the automatic upgrade mode, the control module is used to obtain the ECU software upgrade package from the cloud server or from the external storage device through the first communication module through the first interface, and upgrade the ECU that needs to be upgraded. In the PC upgrade mode, the control module is used to obtain the ECU software upgrade package from the PC through the second communication module, and upgrade the ECU that needs to be upgraded in the vehicle.

[0035] Compared with the prior art, the beneficial effects of this application are:

[0036] In the above technical solution, there are two optional modes for upgrading the vehicle ECU through the mobile terminal, namely, the automatic upgrade mode and the PC upgrade mode. After the mobile terminal is connected to the vehicle and performs self-checking, in the automatic upgrade mode, the ECU software upgrade package can be obtained from the external storage device or the cloud server, and the ECU can be controlled to upgrade. This method greatly simplifies the upgrade steps and reduces the difficulty of upgrading; in addition, when the external environmental conditions do not support automatic upgrading, the ECU software upgrade package can be downloaded from the PC in the PC upgrade mode, sent to the mobile terminal, and controlled by the mobile terminal. This method can more clearly understand the upgrade process and upgrade results, and the ECU software upgrade package can be selectively downloaded for upgrading. The upgrade process is relatively simplified and controllable. Through the above technical solution, the vehicle ECU can be upgraded outside the 4S store, such as in places with mobile communication networks or where upgrade storage devices can be purchased, and the coverage of the ECU upgrade service is expanded. Whether it is an old model or a new model, the ECU can be easily upgraded in a variety of places through this method. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is a schematic diagram of the structure of the mobile terminal described in this application.

[0038] Figure 2 This is a flowchart of the mobile terminal upgrading the vehicle ECU described in this application.

[0039] Figure 3 Schematic diagram of the interaction among the cloud server, mobile terminal and vehicle in the automatic upgrade mode described in this application.

[0040] Figure 4This is a schematic diagram of the interaction between a PC, a mobile terminal and a vehicle in the PC upgrade mode described in this application.

[0041] Figure 5 This is a flow chart of the process of upgrading according to the ECU upgrade strategy described in this application.

[0042] Figure 6 for Figure 5 Flow chart of the upgrade instruction group indicated by 1. DETAILED DESCRIPTION

[0043] The following is a further detailed description of a method for upgrading a vehicle ECU via a mobile terminal, a computer-readable storage medium, and a mobile terminal of the present application in conjunction with specific embodiments and drawings.

[0044] Embodiment 1:

[0045] The method for upgrading a vehicle ECU by a mobile terminal of the present application is applied to a mobile terminal. Figure 1 The mobile terminal may mainly include a first communication module, a second communication module, a first interface, a vehicle interface, a detection module and a control module.

[0046] Among them, the first communication module is used to establish a communication connection with the cloud server, and the first communication module can be a communication module using mobile communication technology (Mobile Communication Technology) such as 4G / 5G.

[0047] The second communication module is used to establish a communication connection with the PC. The second communication module may include one or more of an Ethernet communication module, a WIFI module, and a Bluetooth module. The mobile terminal and the PC may be connected by a wired connection via a network cable, or may be connected wirelessly via Bluetooth, or may be placed within the coverage of the same wireless local area network (WIFI) so that the mobile terminal and the PC may establish a communication connection via the wireless local area network.

[0048] The first interface is used to establish a communication connection with an external storage device. The first interface may be a universal serial bus (USB) interface, such as a USB 4.0 interface, a Micro USB interface, or a USB Type-C interface.

[0049] The vehicle interface is used to establish a communication connection with the vehicle. The present application preferably uses an OBD interface, so that the parsing and data processing of the ECU software upgrade data package can be completed on the mobile terminal side, thereby improving the upgrade efficiency.

[0050] The detection module is used to detect the interface and communication connection status.

[0051] The control module is used to determine whether the current upgrade mode is automatic upgrade mode or PC upgrade mode according to its own interface and communication connection status. In the automatic upgrade mode, it is used to obtain the ECU software upgrade package from the cloud server or from the external storage device through the first communication module, and upgrade the ECU that needs to be upgraded. In the PC upgrade mode, it is used to obtain the ECU software upgrade package from the PC through the second communication module, and upgrade the ECU that needs to be upgraded.

[0052] In addition, the mobile terminal may also include a download module, a storage module, a display module and a start button. Among them, the download module is used to download data from the cloud server. The storage module is used to store system parameters, upgrade programs, downloaded ECU software upgrade packages, etc. The display module can be used to display the upgrade progress and upgrade results. The display module can use multiple indicator lights, and in the automatic upgrade mode, the upgrade progress is displayed by the state change of the indicator light. For example: the display module may include five indicator lights. After the upgrade starts, the first indicator light displays red. During the upgrade process, the number of red indicator lights gradually increases. For example, if three indicator lights turn red, it means that at least 60% of the ECU upgrade is completed. For another example, the display module may include a display screen, which displays the upgrade progress in real time through the display screen. The start button is used to start the mobile terminal.

[0053] Please refer to Figure 2 The above-mentioned method for upgrading the vehicle ECU by the mobile terminal mainly includes the following steps:

[0054] After detecting the connection with the vehicle, determine the current upgrade mode as automatic upgrade mode or PC upgrade mode according to its own interface and communication connection status;

[0055] In the automatic upgrade mode, the ECU software upgrade data package is obtained from the cloud server through the first communication module or from the external storage device through the first interface, and the ECU that needs to be upgraded is upgraded;

[0056] In the PC upgrade mode, the ECU software upgrade package is obtained from the PC through the second communication module, and the ECU that needs to be upgraded in the vehicle is upgraded.

[0057] During use, after the OBD interface of the mobile terminal is connected to the OBD interface of the vehicle through the OBD connection line, the mobile terminal can be started by pressing the start button, and the mobile terminal automatically performs a communication check. If normal communication is possible, it means that the OBD interface is connected normally and can work normally. Then the mobile terminal detects the connection and communication status of the first communication module, the second communication module and the first interface to confirm whether the current upgrade mode is the automatic upgrade mode or the PC upgrade mode.

[0058] If it is detected that the first interface is connected to an external storage device, the automatic upgrade mode is adopted, and the mobile terminal obtains the ECU software upgrade package from the external storage device; if it is not detected that the first interface is connected to an external storage device, and it is detected that the first communication module establishes a communication connection with the cloud server, the automatic upgrade mode is adopted, and the mobile terminal obtains the ECU software upgrade package from the cloud server; if it is detected that the second communication module establishes a communication connection with the PC, the PC upgrade mode is adopted to obtain the ECU software upgrade package from the PC. After the mobile terminal is connected to the vehicle OBD interface and performs self-test, in the automatic upgrade mode, the ECU software upgrade package can be obtained from the external storage device or the cloud server, and the ECU can be controlled to upgrade. This method greatly simplifies the upgrade steps and reduces the difficulty of the upgrade; in addition, when the external environmental conditions do not support automatic upgrades, the ECU software upgrade package can be downloaded from the PC in the PC upgrade mode, sent to the mobile terminal, and controlled by the mobile terminal. This method can more clearly understand the upgrade process and upgrade results, and the ECU upgrade package can be selectively downloaded for upgrade. The upgrade process is relatively simplified and controllable. Through the above technical solutions, the coverage of ECU upgrade services has been expanded. Whether it is an old or new model, ECU upgrades can be conveniently performed in a variety of locations through this method.

[0059] It should be noted that, in an embodiment of the present invention, ECU software that can be used for upgrading is stored in the cloud server. When the developer develops the latest version of the ECU software and uploads it to the cloud server as the upgraded software, the cloud server analyzes and processes the software through the corresponding algorithm to obtain the upgraded ECU software version information, such as the software name, version number, version size, and applicable vehicle version.

[0060] After detecting the connection with the vehicle, the mobile terminal actively collects the vehicle version information and vehicle ECU version information from the vehicle. Specifically, the mobile terminal establishes a communication connection with the vehicle through the OBD interface, adopts the UDS diagnostic protocol or a private custom protocol, sends relevant request instructions through the OBD interface, collects the vehicle version information and the ECU data connected to the OBD interface, the vehicle version information includes but is not limited to the VIN (Vehicle Identification Number), and the ECU version information includes but is not limited to the software name, version number, version size, update date, etc.

[0061] Please refer to Figure 3In the automatic upgrade mode, firstly, it is detected whether the first interface is connected to an external storage device. If not, the cloud server is connected through the first communication module, and the collected vehicle version information and vehicle ECU version information are uploaded to the cloud server. The cloud server analyzes the VIN code to determine the basic information such as the version model of the vehicle, and based on this, confirms all the upgradeable ECU version information of the corresponding vehicle version, and compares the vehicle ECU version information with the corresponding upgradeable ECU version information to obtain the ECU version information that needs to be upgraded. For example, taking the lighting system as an example, if the ECU software version number of the lighting system stored in the cloud server is 8.0.48, and the ECU software version number of the lighting system of the vehicle collected is 8.0.45, the ECU software version number of the lighting system stored in the cloud server is greater than the ECU software version number of the lighting system of the vehicle, indicating that the ECU of the lighting system of the vehicle needs to be upgraded, thereby obtaining the ECU version information of the lighting system that needs to be upgraded, such as the name, version number, version size, etc.; then the cloud server feeds back the ECU version information that needs to be upgraded to the mobile terminal, and the mobile terminal sends a download request to the cloud server according to the ECU version information that needs to be upgraded to automatically download the ECU software upgrade package.

[0062] When it is detected that the first interface is connected to an external storage device, the ECU software upgrade package is copied from the external storage device. It should be noted that in this embodiment, the relevant ECU software upgrade package is stored in advance in the external storage device, and the mobile terminal parses the ECU software upgrade package to obtain ECU version information, including but not limited to the software name, version number, and version size, and automatically determines the ECU to be upgraded and the corresponding ECU software upgrade package after comparing and analyzing the version number. The analysis and comparison method refers to the comparison method of the cloud server, which will not be repeated here.

[0063] Please refer to Figure 4In the PC upgrade mode, the mobile terminal actively collects vehicle version information and vehicle ECU version information from the vehicle after detecting that it is connected to the vehicle; and obtains the ECU software upgrade data package from the PC through the second communication module. Specifically, the second communication module of the mobile terminal can be one or more combinations of an Ethernet communication module, a WIFI module or a Bluetooth module. The mobile terminal and the PC can be connected by wire through a network cable, or by wireless connection through Bluetooth. The PC and the mobile terminal can also be placed within the coverage of the same wireless local area network, so that the mobile terminal and the PC can establish a communication connection through the wireless local area network. Download the ECU software upgrade package through the PC. If the ECU that needs to be upgraded is known, the ECU software upgrade package can be downloaded specifically and sent to the mobile terminal. This method can reduce the time required for the mobile terminal to compare and analyze the ECU that needs to be upgraded and the corresponding ECU software upgrade package, thereby improving the upgrade efficiency. If the ECU that needs to be upgraded is unknown, a general download can be performed, that is, as many ECU software upgrade packages of the corresponding vehicle model as possible are downloaded and sent to the mobile terminal. The ECU software upgrade package is parsed by the mobile terminal to obtain the ECU version information, including but not limited to the software name, version number, and version size. The ECU that needs to be upgraded and the corresponding ECU software upgrade package are automatically determined through version number comparison and analysis. The analysis and comparison method refers to the comparison method of the cloud server, which will not be repeated here.

[0064] Furthermore, the mobile terminal also obtains the ECU upgrade strategy and ECU upgrade conditions, determines whether to upgrade according to the ECU upgrade conditions, and upgrades the ECU that needs to be upgraded according to the ECU upgrade strategy when it is determined that the ECU upgrade conditions are met. Specifically, in order to ensure the success rate of the ECU upgrade, certain upgrade conditions need to be met when the ECU is upgraded. The upgrade conditions can be set as the vehicle is stationary, the engine speed is lower than the preset speed threshold, the battery power is greater than the preset power threshold, etc. For example: (1) the vehicle speed is 0, (2) the engine speed is lower than 1000rpm, (3) the battery power is greater than 50%, (4) the vehicle gear is in P gear or N gear. It should be noted that the upgrade conditions are configured according to different vehicle versions and models, and are not completely universal. This is just an example. The actual upgrade conditions need to be set according to the actual situation. Only when the set upgrade conditions are met can the mobile terminal perform the upgrade task according to the ECU upgrade strategy to avoid upgrade interruption or upgrade failure rollback due to failure to meet the upgrade conditions, which wastes time and energy.

[0065] Furthermore, the ECU upgrade strategy and ECU upgrade conditions are obtained, and the ECUs that need to be upgraded are upgraded according to the ECU upgrade strategy. The upgrade method includes: parsing the ECU software upgrade package, which includes not only the software upgrade package but also the upgrade script file. The upgrade script file can be in json format, or in other formats such as xml or bin. The script file can specify the upgrade instruction group to which each ECU belongs and the order of upgrade instructions within the group, and also define the upgrade association between ECUs. The upgrade instructions include customized instructions such as switching high and low voltage, ECU flashing, ECU activation, and ECU version verification. These instructions are combined as needed to form an upgrade instruction group.

[0066] The upgrade method further includes: generating an upgrade queue. As shown in the following table, the upgrade queue includes multiple upgrade instruction groups, each upgrade instruction group corresponds to a number of ECUs, and the ECUs are controlled to be upgraded through the upgrade instructions and instruction sequence in the group, thereby forming an ECU upgrade strategy.

[0067]

[0068] The upgrade method also includes: upgrading the ECU to be upgraded according to the instruction sequence of the corresponding upgrade instruction group. For specific steps, please refer to Figure 5 and Figure 6 , the mobile terminal sends the software upgrade package to the ECU that needs to be upgraded, and starts a thread for each upgrade instruction group in the upgrade queue to process the ECU upgrade instructions of the group, and controls the ECU to upgrade according to the upgrade instructions. In addition, before upgrading, the ECU first determines whether there is an associated ECU upgrade failure. Since the associated ECU upgrade fails, the ECU will also have abnormal functions even if it is successfully upgraded. Therefore, if the associated ECU upgrade fails, the upgrade of the ECU is canceled. After completing the upgrade of each ECU in all upgrade instruction groups, the ECU that failed to upgrade is determined, and added to the rollback queue, and the rollback task is started to roll back the ECU that failed to upgrade to the version before the upgrade to ensure its normal function.

[0069] Furthermore, when the vehicle ECU is upgraded, the mobile terminal displays the upgrade progress and upgrade results in real time. The mobile terminal is designed with a display module, and the display module can use multiple indicator lights. In the automatic upgrade mode, the upgrade progress is displayed by the state change of the indicator lights. For example, five indicator lights are designed. When the upgrade starts, the indicator lights are red. During the upgrade process, the indicator lights can turn red. If three indicator lights turn red, it means that at least 60% of the ECU upgrade is completed. In addition, a display screen can also be designed to display the upgrade progress in real time. In the PC upgrade mode, the mobile terminal can also feed back the upgrade progress to the PC client, and the upgrade progress can also be displayed in real time on the client. By effectively displaying the upgrade progress to understand the upgrade process, the upgrade process can be made transparent and controllable. After the upgrade is completed, the upgrade results are uploaded. If the upgrade fails, it prompts that the firmware information acquisition failed, and provides corresponding error information, so that corresponding measures can be taken to deal with it.

[0070] Embodiment 2:

[0071] The present application also provides a computer-readable storage medium, and the above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer instruction code that can be recorded in a storage medium, or is implemented as a computer instruction code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer instruction codes. When the computer instruction code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0072] In summary, the present application provides a method for upgrading a vehicle ECU by a mobile terminal, a computer-readable storage medium, and a mobile terminal. There are two optional modes for upgrading a vehicle ECU by a mobile terminal, namely, automatic upgrade mode and PC upgrade mode. After the mobile terminal is connected to the vehicle and performs self-check, in the automatic upgrade mode, the ECU software upgrade package can be obtained from an external storage device or a cloud server, and the ECU can be controlled to upgrade. This method greatly simplifies the upgrade steps and reduces the difficulty of the upgrade; in addition, when the external environmental conditions do not support automatic upgrades, the ECU software upgrade package can be downloaded from the PC in PC upgrade mode, sent to the mobile terminal, and controlled by the mobile terminal. This method can more clearly understand the upgrade process and upgrade results, and the ECU upgrade package can be selectively downloaded for upgrade. The upgrade process is relatively simplified and controllable. Through the above technical solutions, the coverage of the ECU upgrade service has been broadened. Whether it is an old model or a new model, this method can be used to conveniently upgrade the ECU in a variety of places.

[0073] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present application to this. Those of ordinary skill in the art may make various changes and modifications therein without departing from the scope and spirit of the present application. All these changes and modifications are intended to be included within the scope of the present application as required by the appended claims.

[0074] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can 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.

[0075] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.

[0076] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some modules according to the embodiments of the present application. The application can also be implemented as a device program (e.g., computer program and computer program product) for executing a part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0077] 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 existence of other identical elements in the process, method, article or device including the elements.

[0078] Although the description of the present application is carried out in conjunction with the above specific embodiments, it is obvious that those skilled in the art can make many substitutions, modifications and changes based on the above content. Therefore, all such substitutions, improvements and changes are included in the spirit and scope of the appended claims.

Claims

1. A method for upgrading a vehicle ECU by a mobile terminal, characterized in that: The method comprises: After detecting the connection with the vehicle, determine the current upgrade mode as automatic upgrade mode or PC upgrade mode according to its own interface and communication connection status; In the automatic upgrade mode, the ECU software upgrade data package is obtained from the cloud server through the first communication module or from the external storage device through the first interface, and the ECU that needs to be upgraded is upgraded; In the PC upgrade mode, the ECU software upgrade data package is obtained from the PC through the second communication module, and the ECU that needs to be upgraded in the vehicle is upgraded.

2. The method according to claim 1, characterized in that The mobile terminal actively collects vehicle version information and vehicle ECU version information from the vehicle after detecting connection with the vehicle; In the automatic upgrade mode, first detect whether the first interface is connected to an external storage device. If not, connect to the cloud server through the first communication module, upload the collected vehicle version information and vehicle ECU version information to the cloud server, and then receive the ECU version information that needs to be upgraded from the cloud server, and automatically download the ECU software upgrade package from the cloud server according to the ECU version information that needs to be upgraded.

3. The method according to claim 2, characterized in that When it is detected that the first interface is connected to an external storage device, the ECU software upgrade package is copied from the external storage device, and the ECU software upgrade package corresponding to the ECU to be upgraded is determined based on the collected vehicle version information and vehicle ECU version information.

4. The method according to claim 1, characterized in that The mobile terminal actively collects vehicle version information and vehicle ECU version information from the vehicle after detecting connection with the vehicle; in PC upgrade mode, the ECU software upgrade package is obtained from the PC through the second communication module, and the ECU software upgrade package corresponding to the ECU that needs to be upgraded is determined based on the collected vehicle version information and vehicle ECU version information.

5. The method according to any one of claims 1 to 4, characterized in that The mobile terminal has an OBD interface, and after detecting that the OBD interface is connected to the OBD interface of the vehicle, the vehicle version information and the vehicle ECU version information are collected through the OBD interface of the mobile terminal.

6. The method according to claim 1, characterized in that The mobile terminal also obtains an ECU upgrade strategy and an ECU upgrade condition, determines whether to upgrade according to the ECU upgrade condition, and when it is determined that the ECU upgrade condition is met, upgrades the ECU that needs to be upgraded according to the ECU upgrade strategy.

7. The method according to claim 6, characterized in that The method of obtaining an ECU upgrade strategy and an ECU upgrade condition, and upgrading an ECU that needs to be upgraded according to the ECU upgrade strategy includes: Parsing the ECU software upgrade data package; generating an upgrade queue, wherein the upgrade queue includes a plurality of upgrade instruction groups; Upgrade the ECU that needs to be upgraded according to the instruction sequence of the corresponding upgrade instruction group; The ECU that failed to upgrade is added to the ECU rollback queue and the rollback operation is performed.

8. The method according to claim 6, characterized in that When upgrading the vehicle ECU, the upgrade progress and results are displayed in real time.

9. A computer-readable storage medium storing computer-executable instruction codes, characterized in that: When the computer executable instruction code is executed by a control processor, the method according to any one of claims 1 to 8 is implemented.

10. A mobile terminal, characterized in that: The mobile terminal comprises: A first communication module, used to establish a communication connection with a cloud server; The second communication module is used to establish a communication connection with the PC; A first interface, used to establish a communication connection with an external storage device; A vehicle interface, used to establish a communication connection with the vehicle; A detection module is used to detect its own interface and communication connection status; The control module is used to determine whether the current upgrade mode is the automatic upgrade mode or the PC upgrade mode according to the interface and the communication connection status. In the automatic upgrade mode, the control module is used to obtain the ECU software upgrade package from the cloud server or from the external storage device through the first communication module through the first interface, and upgrade the ECU that needs to be upgraded. In the PC upgrade mode, the control module is used to obtain the ECU software upgrade package from the PC through the second communication module, and upgrade the ECU that needs to be upgraded in the vehicle.