Brushing method and system for diagnosing CAN specification based on UDS

Based on the UDS -based brush writing method, the use of the CAN wake -up function and segmented data is used to solve the dilemma of software upgrades when the vehicle cannot be turned on, and the success rate and accuracy of software upgrades are improved.

CN119356295APending Publication Date: 2025-01-24CHERY NEW ENERGY AUTOMOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411737895.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

When the whole vehicle cannot be powered on, software upgrades face difficulties, and existing technologies are difficult to achieve effective software upgrades.

Method used

Adopt a brushing method based on the UDS diagnostic CAN specification, activating the electronic control unit (ECU) through the CAN awakening function, and segmental data transmission under multiple verification methods to ensure the accuracy and reliability of the software upgrade.

Benefits of technology

The success rate and accuracy of software upgrades can be achieved, ensuring that the software upgrades of software upgrades can ensure that the software update of the electronic control unit can be carried out smoothly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356295A_ABST
    Figure CN119356295A_ABST
Patent Text Reader

Abstract

The invention discloses a flashing method and system based on a UDS diagnosis CAN specification, and relates to the technical field of new energy automobiles, and the method comprises the steps: sending a specific frame to an electronic control unit (ECU) to wake up the ECU; fault diagnosis is carried out on an electronic control unit ECU; entering a software flashing mode, and performing data transmission; sectional transmission is adopted for data transmission, and data transmission and data consistency are carried out. According to the method, the target ECU is accurately positioned through a specific frame wake-up mechanism, false wake-up interference is avoided, the success rate and accuracy of software upgrading are improved through sectional transmission and data consistency verification, and software upgrading of the upper computer can be achieved under the condition that the whole vehicle cannot be powered on.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of new energy vehicles and provides a flashing method and system based on UDS diagnostic CAN specification. Background Art

[0002] In recent years, automobile technology has continued to develop, and people's expectations for automobile safety and comfort have continued to rise. In order to meet user requirements, the number of controllers (ECU, Electronic Control Unit) in automobiles has increased accordingly. In order to make the controller have more functions and better performance, car owners need to upgrade the software programs in the controller in a timely manner. The success rate and accuracy of software upgrades are more important.

[0003] However, in terms of the current technical status, software upgrades are usually highly dependent on the precondition that the vehicle is powered on. Once the vehicle is unable to be powered on, such as battery failure, power line damage, or other electrical system abnormalities, the communication link and data transmission channel between the host computer and the ECU will be severely hindered, and the host computer will find it difficult to successfully complete the software upgrade operation, which greatly limits the flexibility and convenience of software upgrades.

[0004] Further innovation and breakthroughs in related technologies are urgently needed to solve the difficulties faced in software upgrades when the vehicle cannot be powered on. Summary of the invention

[0005] The purpose of the present invention is to provide a flashing method and system based on the UDS diagnostic CAN specification, adding a CAN wake-up function, and increasing multiple verification methods to overcome the shortcomings of the prior art that the entire vehicle cannot be powered on and the host computer cannot upgrade the software.

[0006] In order to achieve the above object, the present invention provides the following technical solutions: On the one hand, the present invention provides a flashing method based on the UDS diagnostic CAN specification, which specifically includes the following steps: In order to realize the software update of the electronic control unit ECU when the vehicle is powered off, the host computer first sends a specific frame to the CAN bus through the CAN box. After receiving the specific frame, the CAN bus sends a specific frame to the electronic control unit. After the electronic control unit ECU receives and recognizes the specific frame, it is awakened and waits for the execution of various service controls sent by the host computer to realize the software update; After the electronic control unit ECU is diagnosed for a fault and a response is obtained, a flash session mode command in a diagnostic session control command is sent to the electronic control unit ECU. In the flash session mode, the electronic control unit ECU jumps from the APP to the BootLoader. After the electronic control unit ECU jumps to the BootLoader, it enters the software flashing mode, and sends the clear memory command and the request download command in the routine program control command to the electronic control unit ECU in sequence, and obtains a positive response from the electronic control unit ECU; After receiving a positive response from the electronic control unit ECU, a data transmission command is sent to the electronic control unit ECU, and the data to be downloaded to the electronic control unit ECU is transmitted in segments through the data transmission command; After the data transmission is completed, the data consistency security check is performed on the transmitted data through the data check sub-service in the routine program control command. If the check result is consistent, the flash writing is completed; if the check result is inconsistent, the flash writing fails after continuous check failures; After the data is flashed, the host computer sends the diagnostic session control command, communication control command and diagnostic session control command in sequence to restore the electronic control unit ECU to the state before the flash.

[0007] Furthermore, the specific frame is a specific frame with an ID of 6XX and a byte length of 8. The specific frame serves as a wake-up signal, which can activate the electronic control unit (ECU) when the vehicle is in a sleep or other low-power state, so that it enters an operational state and prepares to receive subsequent instructions. The ID is 6XX and the byte length is 8 so that the ECU can accurately identify and distinguish it from regular communication frames on other CAN buses.

[0008] Furthermore, after the fault diagnosis of the electronic control unit ECU is performed and a response is obtained, a session control command for entering the flashing is sent to the electronic control unit ECU, and the electronic control unit ECU jumps from the APP to the BootLoader specifically as follows: The host computer sends a diagnostic session control command to all electronic control units ECU through the CAN box, and the sub-service extends the session mode. After the electronic control unit ECU replies with a positive response, it enters the extended session mode; After receiving the diagnostic session control command, the host computer sends the diagnostic fault code setting control command, the communication control command and the security access command to the electronic control unit ECU in sequence through the CAN box. The electronic control unit ECU stops diagnosing the fault after replying with an affirmative response; The host computer sends a session control command to the electronic control unit ECU to enter the flashing process, and the electronic control unit ECU jumps from the APP to the BootLoader.

[0009] Furthermore, the electronic control unit ECU jumps to the BootLoader and enters the flash mode, and sends a clear memory command and a download request command to the electronic control unit ECU in sequence, and obtains a positive response from the electronic control unit ECU, specifically: The electronic control unit ECU jumps to the BootLoader and then enters the flashing mode; The host computer sends a clear memory command to the sending electronic control unit ECU through the CAN box. After the electronic control unit ECU replies with an affirmative response, the host computer sends a request download command to the sending electronic control unit ECU through the CAN box again. The electronic control unit ECU replies with an affirmative response.

[0010] Furthermore, the data transmission command adopts segmented transmission as follows: The number of data transmitted by the host computer each time is a fixed value, and a data consistency security check will be performed after each data transmission is completed. After the first data transmission is completed, the start of the second data transmission requires the consistency check of the last data transmission to pass before it can be started, until the last set of data transmission is completed.

[0011] Furthermore, after receiving the diagnostic session control command, the host computer sends the diagnostic trouble code setting control command, the communication control command and the security access command to the electronic control unit ECU in sequence through the CAN box. If the electronic control unit ECU replies with a negative response, the host computer repeats sending the diagnostic trouble code setting control command, the communication control command and the security access command to the electronic control unit ECU three times in sequence. If the electronic control unit ECU replies with a negative response three times, the flashing is terminated and the user is prompted.

[0012] Furthermore, if the data security check fails, the host computer will automatically send a download request command to the electronic control unit ECU to transmit the group of data again. After the data security check fails three times, the software upgrade process will end and the host computer will pop up a window to prompt the user that the flashing failed.

[0013] Furthermore, each time the host computer transmits data, the number of data transmitted is 256, which is a fixed value. When the data to be transmitted is less than 256, the host computer will automatically fill the downloaded data with zeros until the number of data meets the requirement.

[0014] In another aspect, the present invention provides a flashing system based on the UDS diagnostic CAN specification, comprising: Wake-up module: sends a specific frame to the electronic control unit ECU, and the electronic control unit ECU is woken up after receiving and identifying the specific frame; Fault diagnosis module: after diagnosing the fault of the electronic control unit ECU and getting a response, send the flash session mode command in the diagnostic session control command to the electronic control unit ECU. After the electronic control unit ECU replies with an affirmative response, the electronic control unit ECU jumps from the APP to the BootLoader in the flash session mode. Data transmission module: sending the clear memory command and the download request command in the routine program control command to the electronic control unit ECU in sequence, obtaining a positive response from the electronic control unit ECU, sending the data transmission command to the electronic control unit ECU, and transmitting the data to be downloaded to the electronic control unit ECU in a segmented manner through the data transmission command; Security verification module: After data transmission is completed, the data consistency security verification is performed on the transmitted data through the data verification sub-service in the routine program control command.

[0015] The services involved in the electronic control unit ECU include diagnostic session control commands, security access commands, communication control commands, routine control commands, download request commands, data transmission commands, exit transmission request commands, and standby handshake commands.

[0016] Compared with the prior art, the present invention has the following beneficial technical effects: The present invention provides a flashing method based on the UDS diagnostic CAN specification, which sends a specific frame to the electronic control unit ECU. The electronic control unit ECU is awakened after receiving and identifying the specific frame. The specific frame awakening mechanism accurately locates the target electronic control unit ECU, and ensures system stability and safety while saving energy, avoiding false awakening interference; the data that needs to be downloaded to the electronic control unit ECU is transmitted in a segmented manner, which can effectively deal with the limited bandwidth of the CAN bus and the instability that may occur due to long data transmission. Through the transmission of fixed-size data segments, it is convenient to manage and monitor the transmission process, reduce the risk of transmission failure caused by the one-time transmission of a large amount of data, and improve the accuracy and reliability of data transmission. After the data transmission is completed, the transmission data is subjected to a data consistency security check to ensure that the software data written into the ECU is completely matched with the original data, thereby improving the quality and reliability of software flashing. This method improves the success rate and accuracy of software upgrades, and can realize the upgrade of software by the host computer when the whole vehicle cannot be powered on. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a schematic diagram of a flashing method based on the UDS diagnostic CAN specification in Example 1 of the present invention.

[0018] Figure 2 It is a schematic diagram of a flashing method process based on the UDS diagnostic CAN specification in Example 1 of the present invention. DETAILED DESCRIPTION

[0019] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0021] Example 1 See also Figure 1 to Figure 2 , a flashing method based on the UDS diagnostic CAN specification, comprising the following steps: In order to realize the software update of the electronic control unit ECU when the whole vehicle is powered off, first, the host computer sends a specific frame to the CAN bus through the CAN box. The specific frame is a specific frame with an ID of 6XX and a byte length of 8. When the vehicle is in a dormant or other low-power state, the electronic control unit ECU can be activated. After receiving the specific frame, the CAN bus sends a specific frame to the electronic control unit. After the electronic control unit ECU receives and recognizes the specific frame, it is awakened and waits for the execution of various service controls sent by the host computer to realize the software update. Updating the electronic control unit ECU software by CAN wake-up can realize the software update of a certain electronic control unit ECU when other controllers are in a dormant state. Since other controllers are in a dormant state, the utilization rate of the CAN bus is low. In this case, the software update speed is faster and the update success rate is higher. After the fault diagnosis of the electronic control unit ECU is performed and a response is obtained, a flash session mode command in the diagnostic session control command is sent to the electronic control unit ECU. In the flash session mode, the electronic control unit ECU jumps from the APP to the BootLoader. Specifically, the BootLoader environment is specially used to handle software flashing related operations, and has lower-level hardware access rights and specific flashing function interfaces. First, perform fault diagnosis on the electronic control unit ECU to prepare for entering the flashing session mode. The host computer sends a diagnostic session control command to the electronic control unit ECU through the CAN box. The diagnostic session control sub-service extends the session mode. The electronic control unit ECU enters the extended session mode after replying a positive response. After receiving the diagnostic session control command, the host computer sends the diagnostic fault code setting control command, the communication control command and the security access command to the electronic control unit ECU in sequence through the CAN box. The electronic control unit ECU replies with an affirmative response and stops diagnosing the fault of the electronic control unit ECU after confirming that there is no fault.

[0022] After confirming that the electronic control unit ECU has no faults, the host computer sends a session control command to enter the flashing process to the electronic control unit ECU, and the electronic control unit ECU jumps from the APP to the BootLoader; fault diagnosis helps to discover potential problems in advance and avoid flashing failure or even damage to the electronic control unit ECU due to original faults during the flashing process.

[0023] After receiving the diagnostic session control command, the host computer sends the diagnostic trouble code setting control command, communication control command and security access command to the electronic control unit ECU through the CAN box in sequence. After the electronic control unit ECU replies with a negative response, the host computer repeats sending the diagnostic trouble code setting control command, communication control command and security access command to the electronic control unit ECU three times in sequence. If the electronic control unit ECU replies with a negative response three times, the flashing is terminated and the user is prompted.

[0024] After the electronic control unit ECU jumps to BootLoader, it enters the software flashing mode. The upper computer sends a clear memory command to the sending electronic control unit ECU through the CAN box, which is used to clean up the data in the storage area of ​​the electronic control unit ECU where the new software is about to be written, ensuring that there is enough clean space to store the new software code and data; after receiving an affirmative response from the electronic control unit ECU, the upper computer sends a request download command to the sending electronic control unit ECU through the CAN box, informing the upper computer that it can start sending the software data to be flashed, and also letting the electronic control unit ECU prepare to receive data and wait for data transmission from the upper computer.

[0025] After receiving a positive response from the electronic control unit ECU, the host computer sends a data transmission command to the electronic control unit ECU through the CAN box. The data transmission command starts the process of transmitting software data from the host computer to the electronic control unit ECU, and adopts a segmented transmission method. The segmented transmission method divides the complete software data into multiple fixed-size data segments for transmission. The number of data transmitted each time is fixed (such as 256). After each segment of data transmission is completed, a data consistency security check will be performed to ensure that there is no error, loss or tampering during the transmission of this segment of data. After the first segment of data transmission is completed, the start of the next segment of data transmission depends on the consistency check of the last transmitted data. In this way, problems in the transmission process can be discovered and handled in a timely manner to avoid the accumulation of erroneous data.

[0026] Segmented transmission can effectively deal with the limited bandwidth of the CAN bus and the instability that may occur in long data transmission. Through the transmission of fixed-size data segments, it is easy to manage and monitor the transmission process, reducing the risk of transmission failure caused by transmitting a large amount of data at one time. The data consistency check mechanism greatly improves the accuracy and reliability of data transmission, can promptly detect and correct transmission errors, and ensure the integrity and correctness of the software data that is finally flashed to the electronic control unit ECU, thereby improving the success rate of software flashing and the stability of software running in the electronic control unit ECU.

[0027] After all data transmission is completed, the data verification sub-service is used to perform a comprehensive consistency security check on the entire data transmitted to the electronic control unit ECU to determine whether the transmitted data is completely consistent with the original software data. After the verification result sent by the host computer is consistent with the verification result of the data downloaded to the ECU, the data downloaded to the electronic control unit ECU is confirmed to be valid, and the flashing is completed. If the data security check fails, the host computer will automatically send a download request command to the ECU to transmit the group of data again. If the data security check fails three times in a row, the software upgrade process will be terminated, and the host computer will also pop up a window to prompt the user that the flashing failed. After the data is flashed, the host computer sends the diagnostic session control command, communication control command and diagnostic session control command in sequence to restore the electronic control unit ECU to the state before the flash.

[0028] This method accurately locates the target electronic control unit ECU through a specific frame wake-up mechanism, ensuring system stability and security while saving energy, and avoiding false wake-up interference. Fault diagnosis and orderly session switching can detect hidden dangers in advance, ensure a smooth transition in the flash preparation phase, reduce flash risks and enhance compatibility. Clear memory and request download commands are used to open up a pure space for data transmission and establish a reliable start signal, thereby improving efficiency and success rate. Segmented transmission and data consistency verification overcome the limitations of the CAN bus, correct errors in a timely manner, ensure data integrity and accuracy, and improve the quality and stability of software flashing. Finally, the post-flash state recovery command allows the electronic control unit ECU to return to normal smoothly, improves the success rate and accuracy of software upgrades, solves the problem that the entire vehicle cannot be powered on, and the host computer will not be able to upgrade the software, and realizes that when the entire vehicle cannot be powered on, the host computer can still perform software upgrades.

[0029] Example 2 The present invention also provides a flash writing system based on the UDS diagnostic CAN specification, comprising: Wake-up module: sends a specific frame to the electronic control unit ECU, and the electronic control unit ECU is woken up after receiving and identifying the specific frame; Fault diagnosis module: after diagnosing the fault of the electronic control unit ECU and getting a response, send the flash session mode command in the diagnostic session control command to the electronic control unit ECU. After the electronic control unit ECU replies with an affirmative response, the electronic control unit ECU jumps from the APP to the BootLoader in the flash session mode. Data transmission module: sending the clear memory command and the download request command in the routine program control command to the electronic control unit ECU in sequence, obtaining a positive response from the electronic control unit ECU, sending the data transmission command to the electronic control unit ECU, and transmitting the data to be downloaded to the electronic control unit ECU in a segmented manner through the data transmission command; Security verification module: After data transmission is completed, the data consistency security verification is performed on the transmitted data through the data verification sub-service in the routine program control command.

[0030] The above system uses a host computer, a CAN box, and an electronic control unit ECU to achieve the above functions: Host computer: responsible for communicating with the CAN box, passing the operator's instructions and flashing data to the CAN box, and receiving feedback information from the CAN box; CAN box: used to connect the host computer with the internal CAN network of the car; Electronic Control Unit ECU: includes service layer and network management. The service layer is used to process UDS diagnostic service requests. The network management is used for connection management and communication status monitoring of ECU in the vehicle network. The services involved in the electronic control unit ECU include diagnostic session control commands, security access commands, communication control commands, routine control commands, download request commands, data transmission commands, exit transmission request commands, and standby handshake commands.

[0031] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the attached claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved.

[0032] In addition, it should be understood that although this specification is described in accordance with the implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation modes that can be understood by those skilled in the art. The above content is only to illustrate the technical idea of ​​the present invention, and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution according to the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.

Claims

1. A flashing method based on a flashing system of the UDS diagnostic CAN specification, characterized in that: The following steps are involved: Send a specific frame to the electronic control unit ECU, and the electronic control unit ECU is awakened after receiving and identifying the specific frame; After the electronic control unit ECU is fault diagnosed and a response is obtained, a flash session mode command in a diagnostic session control command is sent to the electronic control unit ECU. After the electronic control unit ECU replies with an affirmative response, the electronic control unit ECU jumps from the APP to the BootLoader in the flash session mode. After the electronic control unit ECU jumps to the BootLoader, it enters the software flashing mode, and sends the clear memory command and the request download command in the routine program control command to the electronic control unit ECU in sequence, and obtains a positive response from the electronic control unit ECU; After receiving a positive response from the electronic control unit ECU, a data transmission command is sent to the electronic control unit ECU, and the data to be downloaded to the electronic control unit ECU is transmitted in segments through the data transmission command; After the data transmission is completed, the data consistency security check is performed on the transmitted data through the data check sub-service in the routine program control command. If the check result is consistent, the flash writing is completed; if the check result is inconsistent, the flash writing fails after continuous check failures; After the data is flashed, the host computer sends the diagnostic session control command, communication control command and diagnostic session control command in sequence to restore the electronic control unit ECU to the state before the flash.

2. The flashing method according to claim 1, characterized in that: The specific frame is a specific frame with an ID of 6XX and a byte length of 8.

3. The flashing method according to claim 1, characterized in that: After the fault diagnosis of the electronic control unit ECU is performed and a response is obtained, a session control command for entering the flashing is sent to the electronic control unit ECU, and the electronic control unit ECU jumps from the APP to the BootLoader as follows: The host computer sends a diagnostic session control command to the electronic control unit ECU through the CAN box, and the diagnostic session control sub-service extends the session mode. After the electronic control unit ECU replies with a positive response, it enters the extended session mode; After receiving the diagnostic session control command, the host computer sends the diagnostic fault code setting control command, the communication control command and the security access command to the electronic control unit ECU in sequence through the CAN box. The electronic control unit ECU stops diagnosing the fault after replying with an affirmative response; The host computer sends a session control command to the electronic control unit ECU to enter the flashing process, and the electronic control unit ECU jumps from the APP to the BootLoader.

4. The flashing method according to claim 1, characterized in that: After the electronic control unit ECU jumps to BootLoader, it enters the flash mode, sends the clear memory command and the request download command to the electronic control unit ECU in sequence, and gets a positive response from the electronic control unit ECU: The electronic control unit ECU jumps to the BootLoader and then enters the flashing mode; The host computer sends a clear memory command to the sending electronic control unit ECU through the CAN box. After the electronic control unit ECU replies with an affirmative response, the host computer sends a request download command to the sending electronic control unit ECU through the CAN box again. The electronic control unit ECU replies with an affirmative response.

5. The flashing method according to claim 1, characterized in that: The data transmission command adopts segmented transmission as follows: The number of data transmitted by the host computer each time is a fixed value, and a data consistency security check will be performed after each data transmission is completed. After the first data transmission is completed, the start of the second data transmission requires the consistency check of the last data transmission to pass before it can be started, until the last set of data transmission is completed.

6. The flashing method according to claim 3, characterized in that: After receiving the diagnostic session control command, the host computer sends the diagnostic trouble code setting control command, communication control command and security access command to the electronic control unit ECU through the CAN box in sequence. If the electronic control unit ECU replies with a negative response, the host computer repeats sending the diagnostic trouble code setting control command, communication control command and security access command to the electronic control unit ECU three times in sequence. If the electronic control unit ECU replies with a negative response three times, the flashing is terminated and the user is prompted.

7. The flashing method according to claim 1, characterized in that: If the data security check fails, the host computer will automatically send a download request command to the electronic control unit ECU to transmit the group of data again. After the data security check fails three times, the software upgrade process will end and the host computer will pop up a window to prompt the user that the flashing failed.

8. The flashing method according to claim 5, characterized in that: Each time the host computer transmits data, the number of data transmitted is 256, which is a fixed value. When the data to be transmitted is less than 256, the host computer will automatically fill the downloaded data with zeros until the number of data meets the requirement.

9. Application of a flashing system based on the UDS diagnostic CAN specification as described in any one of claims 1 to 8, characterized in that: include, Wake-up module: sends a specific frame to the electronic control unit ECU, and the electronic control unit ECU is woken up after receiving and identifying the specific frame; Fault diagnosis module: after diagnosing the fault of the electronic control unit ECU and getting a response, send the flash session mode command in the diagnostic session control command to the electronic control unit ECU. After the electronic control unit ECU replies with an affirmative response, the electronic control unit ECU jumps from the APP to the BootLoader in the flash session mode. Data transmission module: sending the clear memory command and the download request command in the routine program control command to the electronic control unit ECU in sequence, obtaining a positive response from the electronic control unit ECU, sending the data transmission command to the electronic control unit ECU, and transmitting the data to be downloaded to the electronic control unit ECU in a segmented manner through the data transmission command; Security verification module: After data transmission is completed, the data consistency security verification is performed on the transmitted data through the data verification sub-service in the routine program control command.

10. A flashing system based on UDS diagnostic CAN specification according to claim 9, characterized in that: The services involved in the electronic control unit ECU include diagnostic session control commands, security access commands, communication control commands, routine control commands, download request commands, data transmission commands, exit transmission request commands, and standby handshake commands.