Remote flashing and fault diagnosis method and vehicle-mounted terminal flashing system thereof
Through remote flashing and troubleshooting methods, combined with hardware terminals and web clients, the existing Internet of Vehicles solutions in compatibility, security and user experience are solved, and efficient, safe and easy-to-use remote flashing is achieved. and troubleshooting function.
Patent Information
- Application Number
- CN202411516118.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-14
AI Technical Summary
Existing Internet of Vehicles solutions have compatibility, security and user experience issues in remote flashing and troubleshooting, which is difficult to meet the needs of Hyundai’s maintenance.
Provide a remote flashing and troubleshooting method, by connecting to hardware terminals, detecting the flashing conditions of the MCU and ECU, selecting the appropriate flashing method, and ensuring the security of data transmission through security authentication seeds, providing a multi-functional Web client To improve user experience.
It improves the compatibility and security of the on-board terminal flashing system, simplifies the operation process, improves the work efficiency of testers, and provides vehicle position query function when remote flashing fails, improving the efficiency of ECU fault handling.
Smart Images

Figure CN119440578A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of automobile electronic testing technology and vehicle networking communication technology, and in particular to a remote flashing and fault diagnosis method and a vehicle-mounted terminal flashing system. Background Art
[0002] In recent years, with the rapid development of the automotive industry, the degree of automotive electronics has continued to increase, the functions of vehicles have become increasingly rich, and the number of electronic control units (ECUs) has also increased significantly. These ECUs are responsible for controlling various key systems of the vehicle, such as engine management, braking system, airbags, entertainment system, etc. In order to ensure the normal operation and timely update of these systems, the traditional on-site maintenance method has gradually shown its limitations. On the one hand, the traditional maintenance method requires the vehicle to be sent to a repair station or service center for software upgrades and fault diagnosis. This method is not only time-consuming and costly, but also unable to quickly solve the problem in some emergency situations; on the other hand, with the increasing complexity of vehicles, software updates and fault diagnosis have become more complicated, and traditional manual operation methods have become difficult to meet the needs of modern automobile maintenance. At present, there are some Internet of Vehicles solutions on the market that attempt to solve these problems. Internet of Vehicles technology connects vehicles with external devices or servers through wireless communication networks, realizing remote monitoring and management of vehicle information.
[0003] However, existing Internet of Vehicles solutions still face many challenges in practical applications: 1) Compatibility issues: Vehicles of different brands and models may use different communication protocols, which makes it difficult for remote flashing and diagnostic tools to be universal, increasing the complexity of maintenance work; 2) Security issues: The security of data transmission must be ensured during the remote flashing process to prevent unauthorized access or malicious attacks. Any security loopholes may lead to serious consequences, such as tampering with the vehicle control system and endangering driving safety; 3) User experience: Existing remote service tools may not be intuitive enough, the operation process is complicated, and they are not friendly enough for testers, reducing work efficiency.
[0004] Therefore, it is necessary to provide a remote flashing method that is easy to use and has high compatibility, high security, and high efficiency for testers of automobile OEMs. Summary of the invention
[0005] The purpose of the present invention is to provide a remote flashing and fault diagnosis method and a vehicle terminal flashing system in order to overcome the defects of the above-mentioned prior art.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] According to a first aspect of the present invention, a remote flashing and fault diagnosis method is provided, the method comprising:
[0008] Connect the hardware terminal to check whether the MCU is ready for flashing. If so, select MCU remote flashing to flash the MCU firmware.
[0009] If the MCU flashing conditions are not met, perform diagnosis and / or obtain vehicle address information operations;
[0010] Check the ECU flashing conditions, if the ECU flashing conditions are not met, then end;
[0011] If the ECU flashing conditions are met, select ECU remote flashing and output the ECU remote flashing results;
[0012] If the ECU remote flashing result is successful, the flashing is ended. If the ECU remote flashing result is failed, the ECU remote flashing is performed again.
[0013] As a preferred technical solution, the types of MCU flashing conditions include: the MCU needs to be updated and the MCU does not match the vehicle communication protocol; and the MCU remote flashing includes the following steps:
[0014] Get the MCU flashing condition type;
[0015] If the MCU flashing condition type is that the MCU needs to be updated, the MCU update instruction is obtained, and the MCU is flashed according to the MCU update instruction;
[0016] If the MCU flashing condition type is that the MCU does not match the vehicle communication protocol, the MCU communication protocol rewrite instruction is obtained, and the MCU is flashed according to the MCU communication protocol rewrite instruction.
[0017] As a preferred technical solution, the ECU remote flashing includes the following steps:
[0018] Pre-flash: Check whether all flash prerequisites are met, obtain the software version information of the flash ECU and switch to the extended mode, set to prohibit fault code storage and data stream refresh;
[0019] Flashing: Switch programming session and perform security verification. If the security verification passes, execute the ECU flashing instruction, update the ECU version and output the execution status;
[0020] End flashing: If the execution status is successful, fault code storage and data stream refresh are enabled, and the ECU communicates normally at the default baud rate.
[0021] As a preferred technical solution, the flashing prerequisites include: the vehicle is stationary, that is, the driving speed is 0 km / h; the ECU has a stable power supply; the ECU power supply voltage is within the specified range; and the ECU needs to be updated.
[0022] As a preferred technical solution, the steps of security verification include:
[0023] Obtaining an ECU security authentication seed and sending it to a hardware terminal, the hardware terminal being used to implement vehicle communication, data conversion, and 4G communication, the vehicle communication including data transmission and reception and security authentication;
[0024] The hardware terminal calculates a first key based on the ECU security authentication seed using a preset encryption algorithm, and sends the first key to the ECU;
[0025] The ECU receives the first key and calculates the second key based on the ECU security authentication seed using the encryption algorithm;
[0026] The ECU compares the first key with the second key. If the comparison results are the same, the authentication is passed. If they are different, the key is recalculated and the number of failures is accumulated;
[0027] If the number of times reaches the specified value, a first negative response code is sent, and re-authentication is not allowed within a preset first time period;
[0028] If a request for re-authentication is received within the first time period, a second negative response code is sent, and re-authentication is not allowed within a preset second time period, where the second time period is longer than the first time period.
[0029] According to a second aspect of the present invention, a vehicle-mounted terminal flashing system is provided, and the vehicle-mounted terminal flashing system is used to implement the above-mentioned remote flashing method, including: a cloud server: used to execute business logic, process data and store data; a Web client: a user implements fault diagnosis and remote flashing through the Web client, and the remote flashing includes MCU remote flashing and ECU remote flashing, and the Web client also has a secure access service for establishing an access relationship with the ECU; a hardware terminal: used to realize communication with the vehicle, including an MCU for vehicle communication, an EC20 for 4G communication, and an MPU for data conversion.
[0030] As a preferred technical solution, the Web client implements data interaction with the hardware terminal through the MQTT protocol and can directly obtain cloud server data; the hardware terminal utilizes the UDS protocol to communicate with the vehicle and obtain the vehicle frame number and fault code, and utilizes the MQTT protocol to implement data interaction with the cloud server.
[0031] As a preferred technical solution, the Web client is provided with multiple interfaces matching the functions, including: a main interface, the function of which is to connect to the vehicle; a diagnostic interface, the function of which is to display the vehicle's frame number and fault code; a flashing interface, the function of which is to remotely flash the ECU and MCU; and a location viewing interface, the function of which is to display the vehicle's address information.
[0032] According to a third aspect of the present invention, there is provided an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the method described above is implemented when the processor executes the program.
[0033] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the program implements the method described when executed by a processor.
[0034] Compared with the prior art, the present invention has the following advantages:
[0035] 1) The present invention takes into account the flashing obstacles caused by different communication protocols used by vehicles of different brands and models. Before flashing the ECU, the MCU is diagnosed first, and the appropriate MCU flashing method is selected according to the MCU state so that the vehicle terminal flashing system can adapt to vehicles of different brands and models, thereby improving the overall compatibility of the vehicle terminal flashing system and facilitating testers to use this method to test various brands and models of vehicles on the market;
[0036] 2) The present invention realizes the connection between the vehicle terminal flashing system and the ECU through the security authentication seed, which ensures the security of data transmission and avoids unauthorized access or malicious attacks;
[0037] 3) The present invention provides a multifunctional Web client, each function corresponds to an interface, and the interface operation is simple, so that testers can quickly get started, thereby improving the work efficiency of testers;
[0038] 4) The present invention also provides a vehicle location query function. When remote flashing fails multiple times, the tester can take offline on-site inspections and solve the problem in a timely manner based on the obtained vehicle location information, ensuring that timely measures can be taken even if the remote flashing fails, thereby improving the efficiency of ECU fault handling. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a flow chart of the method of the present invention;
[0040] Figure 2 A flowchart of pre-flashing in remote flashing mode of the ECU of the present invention;
[0041] Figure 3A flowchart of flashing in remote flashing mode of the ECU of the present invention;
[0042] Figure 4 This is a structural diagram of the vehicle terminal flashing system of the present invention;
[0043] Figure 5 It is a composition diagram of the hardware terminal of the present invention;
[0044] Figure 6 The figure is a flow chart of the use of the Web client of the present invention. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0046] Embodiment 1:
[0047] This embodiment provides a remote flashing and fault diagnosis method, the flow chart of which is as follows: Figure 1 As shown, specifically including:
[0048] S1. Connect the hardware terminal based on the device ID of the hardware terminal to detect whether the MCU has the flashing conditions. If the MCU has the flashing conditions, select MCU remote flashing to flash the firmware of the MCU.
[0049] The types of MCU flashing conditions include: the MCU needs to be updated and the communication protocol between the MCU and the device to be flashed does not match.
[0050] S11. Obtain the MCU flashing condition type. If the MCU flashing condition type is that the MCU needs to be updated, execute S12. If the MCU flashing condition type is that the communication protocol of the MCU and the device to be flashed does not match, execute S13.
[0051] S12, obtaining an MCU update instruction, and flashing the MCU according to the MCU update instruction.
[0052] S13, obtaining an MCU communication protocol rewriting instruction, and flashing the MCU according to the MCU communication protocol rewriting instruction.
[0053] S2. If the MCU flashing conditions are not met, perform diagnosis and / or obtain vehicle address information operations, and transmit the diagnosis results to the vehicle OEM. The vehicle OEM repairs the vehicle with the fault corresponding to the fault code according to the frame number and fault code to the address information of the vehicle obtained. The diagnosis results here include the frame number and fault code.
[0054] S3: Check the ECU flashing condition. If the ECU flashing condition is not met, the process ends.
[0055] S4. If the ECU flashing conditions are met, select ECU remote flashing and output the ECU remote flashing result.
[0056] S41, pre-flash: check whether all flash prerequisites are met, obtain the software version information of the flash ECU and switch to the extended mode, set to prohibit fault code storage and data stream refresh;
[0057] Among them, the flashing prerequisites include: the vehicle is stationary, that is, the driving speed is 0km / h; the ECU has a stable power supply; the ECU power supply voltage is within the specified range; the ECU needs to be updated; the ECU can be flashed only when and only when the above four conditions are met at the same time;
[0058] S42, Flashing: Switch the programming session and perform security verification. If the security verification passes, execute the ECU flashing instruction, update the ECU version and output the execution status. The flowchart is as follows Figure 3 As shown in the figure, the specific security verification process is as follows:
[0059] S421, obtaining an ECU security authentication seed and sending it to a hardware terminal, wherein the hardware terminal is used to implement vehicle communication, data conversion, and 4G communication, and vehicle communication includes data transmission and reception and security authentication;
[0060] S422, the hardware terminal calculates a first key based on the ECU security authentication seed using a preset encryption algorithm, and sends the first key to the ECU;
[0061] S423, the ECU receives the first key and calculates the second key based on the ECU security authentication seed using the above encryption algorithm;
[0062] S424, the ECU compares the first key with the second key. If the comparison results are the same, the authentication is passed. If they are different, the key is recalculated and the number of failures is accumulated.
[0063] S425: If the number of times reaches 3, a first negative response code is sent, and re-authentication is not allowed within 10 seconds;
[0064] S426: If a re-authentication request is received within 10 seconds, a second negative response code is sent, and re-authentication is not allowed within 20 seconds.
[0065] S43, end flashing: If the execution status is successful, the fault code storage and data stream refresh are enabled, and the ECU communicates normally at the default baud rate.
[0066] S5. If the result of ECU remote flashing is successful, the flashing is ended. If the result of ECU remote flashing is failed, the process returns to step S4 and executes the ECU remote flashing operation again.
[0067] Embodiment 2:
[0068] The above is an introduction to a method embodiment. The following is a further explanation of the solution of the present invention through a system embodiment.
[0069] like Figure 4 As shown, the system includes: a cloud server: used to execute business logic, process data and store data; a Web client: users implement fault diagnosis and remote flashing through the Web client, the remote flashing includes MCU remote flashing and ECU remote flashing, and the Web client also has a secure access service for establishing an access relationship with the ECU; a hardware terminal: used to realize communication with the vehicle, including an MCU for vehicle communication, an EC20 for 4G communication, and an MPU for data conversion.
[0070] The Web client implements data interaction with the hardware terminal through the MQTT protocol and can directly obtain cloud server data; the hardware terminal uses the UDS protocol to communicate with the vehicle and obtain the vehicle frame number and fault code, and uses the MQTT protocol to implement data interaction with the cloud server. The detailed composition of the hardware terminal is as follows: Figure 5 shown.
[0071] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0072] Specifically, the process for users to use the Web client is as follows: Figure 6 As shown, specifically:
[0073] A1. The user enters the web page, enters the vehicle terminal flashing system using the user name and password, and uses the hardware terminal device number to connect the Web client and the hardware terminal.
[0074] A2. Get the MCU flashing condition on the main interface. If it meets the MCU flashing condition, execute A3. Otherwise, execute steps A4-A6.
[0075] A3. Enter the flashing interface, click the MCU remote flashing button, enter the corresponding MCU flashing instruction in the edit box according to the type of MCU flashing condition, and click OK to perform MCU remote flashing;
[0076] A4. Enter the diagnosis interface, click the diagnosis button to obtain the vehicle frame number and fault code, and then feedback the frame number and fault code to the vehicle OEM. The vehicle OEM will repair the vehicle with the fault corresponding to the fault code based on the frame number and fault code;
[0077] A5. Enter the location view interface, click the View button to obtain and record the vehicle location information, and then feed the location information back to the vehicle OEM;
[0078] A6. Enter the flashing interface and click the ECU remote flashing button to perform ECU remote flashing.
[0079] Embodiment 3:
[0080] The electronic device of the present invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0081] Multiple components in the device are connected to the I / O interface, including: input units, such as keyboards, mice, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as disks, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunication networks.
[0082] The processing unit performs the various methods and processes described above, such as methods S1 to S5 and A1 to A6. For example, in some embodiments, methods S1 to S5 and A1 to A6 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via a ROM and / or a communication unit. When the computer program is loaded into the RAM and executed by the CPU, one or more steps of methods S1 to S5 and A1 to A6 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1 to S5 and A1 to A6 by any other appropriate means (e.g., by means of firmware).
[0083] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0084] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0085] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0086] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and these modifications or substitutions should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A remote flashing and fault diagnosis method, characterized in that: The method includes: Connect the hardware terminal to check whether the MCU is ready for flashing. If so, select MCU remote flashing to flash the MCU firmware. If the MCU flashing conditions are not met, perform diagnosis and / or obtain vehicle address information operations; Check the ECU flashing conditions, if the ECU flashing conditions are not met, then end; If the ECU flashing conditions are met, select ECU remote flashing and output the ECU remote flashing results; If the ECU remote flashing result is successful, the flashing is ended. If the ECU remote flashing result is failed, the ECU remote flashing is performed again.
2. A remote flashing and fault diagnosis method according to claim 1, characterized in that: The types of MCU flashing conditions include: the MCU needs to be updated and the MCU does not match the vehicle communication protocol; and the MCU remote flashing includes the following steps: Get the MCU flashing condition type; If the MCU flashing condition type is that the MCU needs to be updated, the MCU update instruction is obtained, and the MCU is flashed according to the MCU update instruction; If the MCU flashing condition type is that the MCU does not match the vehicle communication protocol, the MCU communication protocol rewrite instruction is obtained, and the MCU is flashed according to the MCU communication protocol rewrite instruction.
3. A remote flashing and fault diagnosis method according to claim 1, characterized in that: The ECU remote flashing comprises the following steps: Pre-flash: Check whether all flash prerequisites are met, obtain the software version information of the flash ECU and switch to the extended mode, set to prohibit fault code storage and data stream refresh; Flashing: Switch programming session and perform security verification. If the security verification passes, execute the ECU flashing instruction, update the ECU version and output the execution status; End flashing: If the execution status is successful, fault code storage and data stream refresh are enabled, and the ECU communicates normally at the default baud rate.
4. A remote flashing and fault diagnosis method according to claim 3, characterized in that: The flashing prerequisites include: the vehicle is stationary, that is, the driving speed is 0 km / h; the ECU has a stable power supply; the ECU power supply voltage is within the specified range; and the ECU needs to be updated.
5. A remote flashing and fault diagnosis method according to claim 3, characterized in that: The steps of the safety verification include: Obtaining an ECU security authentication seed and sending it to a hardware terminal, the hardware terminal being used to implement vehicle communication, data conversion, and 4G communication, the vehicle communication including data transmission and reception and security authentication; The hardware terminal calculates a first key based on the ECU security authentication seed using a preset encryption algorithm, and sends the first key to the ECU; The ECU receives the first key and calculates the second key based on the ECU security authentication seed using the encryption algorithm; The ECU compares the first key with the second key. If the comparison results are the same, the authentication is passed. If they are different, the key is recalculated and the number of failures is accumulated; If the number of times reaches the specified value, a first negative response code is sent, and re-authentication is not allowed within a preset first time period; If a request for re-authentication is received within the first time period, a second negative response code is sent, and re-authentication is not allowed within a preset second time period, where the second time period is longer than the first time period.
6. A vehicle terminal flashing system, characterized in that: The vehicle terminal flashing system is used to implement the remote flashing method according to any one of claims 1 to 5, including: Cloud server: used to execute business logic, process data, and store data; Web client: Users can perform fault diagnosis and remote flashing through the Web client. The remote flashing includes MCU remote flashing and ECU remote flashing. The Web client also has a secure access service for establishing an access relationship with the ECU. Hardware terminal: used to achieve communication with the vehicle, including MCU for vehicle communication, EC20 for 4G communication and MPU for data conversion.
7. A vehicle terminal flash writing system according to claim 6, characterized in that: The Web client realizes data interaction with the hardware terminal through the MQTT protocol and can directly obtain cloud server data; the hardware terminal uses the UDS protocol to communicate with the vehicle and obtain the frame number and fault code, and uses the MQTT protocol to realize data interaction with the cloud server.
8. The vehicle terminal flash writing system according to claim 6, characterized in that: The Web client is provided with multiple interfaces matching the functions, including: a main interface, the function of which is to connect to the vehicle; a diagnostic interface, the function of which is to display the vehicle's frame number and fault code; a flashing interface, the function of which is to perform remote flashing of the ECU and MCU; and a location viewing interface, the function of which is to display the vehicle's address information.
9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.