UDS diagnosis flashing method and device of vehicle electronic controller and electronic equipment

By dividing the flash write packets of the vehicle electronic controller into multiple UDS messages and transmitting them in sequence, the problem of low upgrade efficiency of the vehicle electronic controller is solved, and a faster flash write process is achieved.

CN119583583APending Publication Date: 2025-03-07CONTINENTAL SMART CORE TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410758365.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

As the update packets in the vehicle electronic controller continue to increase, the brushing time increases, resulting in a decrease in the vehicle upgrade efficiency.

Method used

By obtaining the flashing data packet of the vehicle electronic controller, it detects whether the upper computer and the vehicle electronic controller have successfully shaken hands, requests data download, and generates the flashing data packet into multiple UDS messages, and transmits these messages in turn. Only after confirming that the positive response of the previous UDS message has been received, continue to transmit the next message until all transmissions are completed and flashing is performed.

Benefits of technology

The refreshing time of vehicle electronic controllers is shortened and the upgrading efficiency of vehicle electronic controllers is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583583A_ABST
    Figure CN119583583A_ABST
Patent Text Reader

Abstract

The invention provides a UDS diagnosis flashing method for a vehicle electronic controller, and the method is used for an upper computer connected with the vehicle electronic controller, and comprises the steps: obtaining a flashing data package of the vehicle electronic controller; detecting whether the handshake between the upper computer and the vehicle electronic controller succeeds or not; requesting the vehicle electronic controller for data downloading; generating a plurality of UDS messages by the flashing data packet; and sequentially transmitting the plurality of UDS messages, and continuing to transmit the next UDS message until all transmission of the plurality of UDS messages is completed when it is confirmed that the positive response of the transmitted last UDS message is received, and flashing. The invention further provides a UDS diagnosis flashing device of the vehicle electronic controller, electronic equipment, a computer storage medium and a computer program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle networking technology, and in particular to a UDS diagnostic flashing method, device, electronic equipment, computer storage medium and computer program product of a vehicle electronic controller. Background Art

[0002] With the rapid development of computer control, entertainment systems, and communication network technologies, the vehicle field has also been integrated with a variety of entertainment and communication devices, and the electronic control units are equipped with more and more functions, and the vehicle data information is becoming more and more complicated. In order to continuously optimize the existing functions of the vehicle and improve the user experience, the ECU in the electronic products in the car needs to be updated in various aspects such as data and software in a timely manner. Therefore, it is necessary to flash the ECU and write the updated data into the ECU to achieve the upgrade.

[0003] However, as the update data packets continue to grow, the flash writing time also continues to increase, resulting in a decrease in the efficiency of vehicle upgrades. How to improve the efficiency of vehicle ECU upgrades has become a technical problem that needs to be solved. Summary of the invention

[0004] The present invention is completed to solve the above-mentioned problems, and its purpose is to provide a UDS diagnostic flashing method, device, electronic equipment, computer storage medium and computer program product for a vehicle electronic controller to shorten the flashing time of the vehicle electronic controller and improve the upgrade efficiency of the vehicle electronic controller.

[0005] According to one aspect of the present invention, there is provided a UDS diagnostic flashing method for a vehicle electronic controller, the method being used for a host computer connected to the vehicle electronic controller, the method comprising: obtaining a flashing data packet of the vehicle electronic controller; detecting whether a handshake between the host computer and the vehicle electronic controller is successful; requesting data download from the vehicle electronic controller; generating a plurality of UDS messages from the flashing data packet; and transmitting the plurality of UDS messages in sequence, wherein upon confirming receipt of a positive response to the previous transmitted UDS message, continuing to transmit the next UDS message until all transmissions of the plurality of UDS messages are completed and flashing is performed.

[0006] Preferably, generating multiple UDS messages from the flash data packet includes: segmenting the flash data packet based on a preset length to obtain multiple UDS segmented messages; and encapsulating the multiple UDS segmented messages using a transmission control protocol to finally obtain multiple UDS messages.

[0007] Preferably, multiple UDS messages are transmitted in sequence, wherein, upon confirming receipt of a positive response to the previous transmitted UDS message, the next UDS message is continuously transmitted until all transmissions of the multiple UDS messages are completed, and flashing is performed, including: transmitting the first UDS message, and after the first UDS message is transmitted, continuing to transmit the second UDS message without confirming whether a positive response to the first UDS message is received; upon confirming receipt of a positive response to the previous transmitted UDS message, the next UDS message is transmitted; and repeating the previous step, and flashing is performed after all transmissions of the multiple UDS messages are completed.

[0008] Preferably, in the case of confirming that a positive response to the previous transmitted UDS message has been received, transmitting the next UDS message includes: before transmitting the next UDS message, first confirming whether a positive response to the previous transmitted UDS message has been received, if so, transmitting the next UDS message, if not, waiting for a predetermined time and then confirming again whether a positive response to the previous transmitted UDS message has been received; and if no positive response to the previous transmitted UDS message has been received after waiting for the predetermined time, retransmitting the previous UDS message until a positive response to the previous transmitted UDS message is received.

[0009] Preferably, the host computer is connected to the vehicle electronic controller via Ethernet, and the connection protocol adopts the Ethernet-based UDS diagnostic protocol.

[0010] Preferably, multiple UDS messages are transmitted in sequence, wherein, when it is confirmed that a positive response to the previous transmitted UDS message has been received, the next UDS message is transmitted until all transmissions of multiple UDS messages are completed and flashing is performed. After all transmissions of multiple UDS messages are completed, the SHA256 and RSA2048 algorithms are used to verify whether the signature is correct.

[0011] According to another aspect of the present invention, a UDS diagnostic flashing device for a vehicle electronic controller is provided, the device being connected to the vehicle electronic controller and comprising: an acquisition unit for acquiring a flashing data packet of the vehicle electronic controller; a detection unit for detecting whether a handshake between the host computer and the vehicle electronic controller is successful; a request unit for requesting data download from the vehicle electronic controller; a generation unit for generating a plurality of UDS messages from the flashing data packet; and a transmission unit for sequentially transmitting a plurality of UDS messages, wherein upon confirming receipt of a positive response to the previous UDS message transmitted, the next UDS message is continuously transmitted until all transmissions of the plurality of UDS messages are completed and flashing is performed.

[0012] According to another aspect of the present invention, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded by the processor and executes the method described in the above aspect.

[0013] According to another aspect of the present invention, a computer storage medium is provided, wherein at least one instruction or at least one program is stored in the storage medium, and the at least one instruction or the at least one program is loaded by a processor and executes the method according to the above aspect of claim 1.

[0014] According to another aspect of the present invention, a computer program product is provided, comprising at least one instruction or at least one program segment, wherein the at least one instruction or the at least one program segment is loaded by a processor and executes the method according to the above aspect of claim 1 . BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flowchart of a UDS diagnostic flashing method for a vehicle electronic controller provided in an embodiment of the present invention.

[0016] Figure 2 It is a schematic diagram of the process of transmitting multiple UDS messages in an embodiment of the present invention.

[0017] Figure 3 It is a structural block diagram of a UDS diagnostic flashing device for a vehicle electronic controller provided by an embodiment of the present invention.

[0018] Figure 4 It is a structural block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0019] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0020] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present invention, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

[0021] The present invention provides a UDS diagnostic flashing method, device, electronic device, computer storage medium and computer program product for a vehicle electronic controller, so as to shorten the flashing time of the vehicle electronic controller and improve the upgrade efficiency of the vehicle electronic controller. The method and the device are based on the same concept. Since the method and the device solve the problem in a similar principle, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.

[0022] Figure 1 It is a flow chart of the UDS diagnostic flashing method for the vehicle electronic controller provided in an embodiment of the present invention. The UDS diagnostic flashing method for the vehicle electronic controller provided in an embodiment of the present invention is used for a host computer connected to the vehicle electronic controller. This specification provides method operation steps such as the embodiments or flow charts, but more or fewer operation steps may be included based on conventional or non-creative labor. The sequence of steps listed in the embodiments is only one way of executing the steps among many sequences and does not represent the only execution sequence. When the actual system or server product is executed, it can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment) according to the method sequence shown in the embodiments or the drawings.

[0023] S101: Obtain a flash data packet of a vehicle electronic controller.

[0024] The flash data packet can be a vehicle upgrade data packet of different functional modules on the whole vehicle. It should be noted that the host computer in the embodiment of the present invention can obtain the flash data packet of the vehicle electronic controller from the server, or obtain the flash data packet of the vehicle electronic controller manually. In the case where the host computer obtains the flash data packet of the vehicle electronic controller from the server, the flash data packet can first be authenticated by the PKI system, and the encrypted flash data packet can be pushed to the host computer using an encrypted channel. The host computer decrypts the flash data packet and performs authenticity and integrity verification.

[0025] S102: Check whether the upper computer and the vehicle electronic controller have successfully handshaked.

[0026] Handshake in communication refers to the process of establishing a connection between two devices and confirming each other's identities. A successful handshake means that a communication link has been established and data transmission can be carried out.

[0027] In a specific implementation, the host computer and the vehicle electronic controller are connected via Ethernet to flash the vehicle electronic controller, and the connection protocol adopts the DoIP (Diagnostic Communication over Internet Protocol) diagnostic protocol.

[0028] S103: Requesting the vehicle electronic controller to download data.

[0029] In this embodiment, requesting the vehicle electronic controller to download data specifically means sending a UDS message to the vehicle electronic controller requesting to download data. The UDS message includes a diagnostic ID, and the diagnostic ID is used to identify the type of the UDS message.

[0030] S104: Generate multiple UDS messages from the flash data packet.

[0031] In a specific implementation, it may specifically include: dividing the flash data packet based on a preset length to obtain multiple UDS segmented messages; and encapsulating the multiple UDS segmented messages using the Transmission Control Protocol (TCP) to finally obtain multiple UDS messages. Thus, the multiple UDS messages finally obtained can all be transmitted.

[0032] S105: transmitting a plurality of UDS messages in sequence, wherein, when confirming receipt of a positive response to the last transmitted UDS message, continuing to transmit the next UDS message until all transmissions of the plurality of UDS messages are completed and flashing is performed.

[0033] This step may further include a series of sub-steps, Figure 2 FIG. 1 is a flow chart of the transmission of multiple UDS messages in an embodiment of the present invention. Figure 2 A series of sub-steps of step S105 will be described.

[0034] S1051: Transmit the first UDS message. After the first UDS message is transmitted, there is no need to confirm whether a positive response to the first UDS message is received, and continue to transmit the second UDS message.

[0035] S1052: Confirm whether a positive response to the last transmitted UDS message is received.

[0036] That is, before sending the N+1th UDS message, first confirm whether a positive response to the N-1th UDS message is received, where N is a positive integer and is greater than or equal to 2. For example, before transmitting the third UDS message, first confirm whether a positive response to the first UDS message is received. If a positive response to the first UDS message is received, proceed to step S1053. If a positive response to the first UDS message is not received, proceed to step S1054.

[0037] S1053: Transmit the next UDS message.

[0038] That is, the N+1th UDS message is transmitted. For example, when the first UDS message and the second UDS message are both transmitted and a positive response to the first UDS message is received, the third UDS message is then transmitted.

[0039] S1054: After waiting for a predetermined time, confirm again whether a positive response to the last transmitted UDS message is received.

[0040] That is, after waiting for a predetermined time, confirm again whether a positive response to the transmitted N-1th UDS message is received. For example, if a positive response to the first UDS message is not received, then after waiting for a predetermined time, confirm again whether a positive response to the transmitted first UDS message is received.

[0041] S1055: If a positive response to the last transmitted UDS message is still not received after waiting for a predetermined time, the last transmitted UDS message is retransmitted until a positive response to the last transmitted UDS message is received.

[0042] That is, if a positive response to the transmitted N-1th UDS message is not received after waiting for a predetermined time, the N-1th UDS message is retransmitted until a positive response to the N-1th UDS message is received. Then, the process jumps to step S1053. For example, if a positive response to the transmitted first UDS message is not received after waiting for a predetermined time, the first UDS message is retransmitted until a positive response to the first UDS message is received.

[0043] S1056: Confirm whether all transmission of multiple UDS messages has been completed.

[0044] After the N+1th UDS message is transmitted, it is confirmed whether all transmissions of the multiple UDS messages are completed, and if so, the process proceeds to step S1057. If not, the process returns to step S1052 to further transmit the UDS message.

[0045] In a specific implementation, after all transmissions of multiple UDS messages are completed, the SHA256 and RSA2048 algorithms may be used to verify whether the signature is correct.

[0046] Figure 3 The structure block diagram of the UDS diagnostic flash writing device 200 of the vehicle electronic controller provided by the embodiment of the present invention is shown, and the UDS diagnostic flash writing device 200 of the vehicle electronic controller is connected to the vehicle electronic controller. Figure 3 As shown, the UDS diagnostic flashing device 200 of the vehicle electronic controller includes: an acquisition unit 201 , a detection unit 202 , a request unit 203 , a generation unit 204 and a transmission unit 205 .

[0047] Among them, the acquisition unit 201 is used to obtain the flash data packet of the vehicle electronic controller. The detection unit 202 is used to detect whether the handshake between the host computer and the vehicle electronic controller is successful. The request unit 203 is used to request data download from the vehicle electronic controller. The generation unit 204 is used to generate multiple UDS messages from the flash data packet. The transmission unit 205 is used to transmit multiple UDS messages in sequence, wherein, when confirming that a positive response to the last transmitted UDS message has been received, the next UDS message is continued to be transmitted until all transmissions of multiple UDS messages are completed and flashing is performed.

[0048] Figure 4 is a structural block diagram of an electronic device provided by an embodiment of the present invention. Figure 4 As shown, the present invention also provides an electronic device 300, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded by the processor and executes the method described in the above embodiment.

[0049] The present invention also provides a computer storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded by a processor to execute the method described in the above embodiment.

[0050] The present invention also provides a computer program product, comprising at least one instruction or at least one program segment, characterized in that the at least one instruction or the at least one program segment is loaded by a processor and executes the method described in the above embodiment.

[0051] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0052] Those skilled in the art should be able to appreciate that the modules, units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of electronic hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0053] Although the present invention has been described with reference to the current specific embodiments, those skilled in the art should recognize that the scope of the invention involved in the present invention is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) by each other.

Claims

1. A UDS diagnostic flashing method for a vehicle electronic controller, characterized in that: The method is used for a host computer connected to a vehicle electronic controller, and the method comprises: Obtain the flash data packet of the vehicle electronic controller; Detecting whether the host computer and the vehicle electronic controller have successfully shaken hands; requesting data download from the vehicle electronic controller; Generating a plurality of UDS messages from the flash data packet; and A plurality of UDS messages are transmitted in sequence, wherein, when it is confirmed that a positive response to the last transmitted UDS message has been received, the next UDS message is continuously transmitted until all transmissions of the plurality of UDS messages are completed and flashing is performed.

2. The UDS diagnostic flashing method for a vehicle electronic controller as claimed in claim 1, characterized in that: The flash data packet generates multiple UDS messages, including: Segmenting the flash data packet based on a preset length to obtain a plurality of UDS segmented messages; and The plurality of UDS segmented messages are encapsulated using a transmission control protocol to finally obtain a plurality of UDS messages.

3. The UDS diagnostic flashing method for a vehicle electronic controller as claimed in claim 2, characterized in that: Transmitting multiple UDS messages in sequence, wherein, upon confirming receipt of a positive response to the previous UDS message transmitted, continuing to transmit the next UDS message until all transmissions of the multiple UDS messages are completed and flashing is being performed, including: The first UDS message is transmitted. After the first UDS message is transmitted, there is no need to confirm whether a positive response to the first UDS message is received, and the second UDS message is continued to be transmitted. Upon confirming receipt of a positive response to the last transmitted UDS message, transmitting a next UDS message; and Repeat the previous step and flash after all the UDS messages have been transmitted.

4. The UDS diagnostic flashing method for a vehicle electronic controller as claimed in claim 3, characterized in that: When a positive response to the last transmitted UDS message is confirmed, the next UDS message is transmitted, including: Before transmitting the next UDS message, first confirm whether a positive response to the previous UDS message transmitted is received, if yes, transmit the next UDS message, if not, wait for a predetermined time and then confirm again whether a positive response to the previous UDS message transmitted is received; and If a positive response to the last previously transmitted UDS message is not received after waiting for a predetermined time, the last previously transmitted UDS message is retransmitted until a positive response to the last previously transmitted UDS message is received.

5. The UDS diagnostic flashing method for a vehicle electronic controller according to any one of claims 1 to 4, characterized in that: The host computer is connected to the vehicle electronic controller via Ethernet, and the connection protocol adopts the Ethernet-based UDS diagnostic protocol.

6. The UDS diagnostic flashing method for a vehicle electronic controller according to any one of claims 1 to 4, characterized in that: Transmit multiple UDS messages in sequence, wherein, when confirming receipt of a positive response to the previous UDS message transmitted, continue to transmit the next UDS message until all transmissions of multiple UDS messages are completed and flashing is in progress. After all the UDS messages are transmitted, the SHA256 and RSA2048 algorithms are used to verify whether the signature is correct.

7. A UDS diagnostic flashing device for a vehicle electronic controller, characterized in that: The device is connected to the vehicle electronic controller and includes: An acquisition unit, used for acquiring a flash data packet of a vehicle electronic controller; A detection unit, used to detect whether the host computer and the vehicle electronic controller have successfully shaken hands; a request unit, configured to request data download from the vehicle electronic controller; A generating unit, configured to generate a plurality of UDS messages from the flash data packet; and The transmission unit is used to transmit multiple UDS messages in sequence, wherein when confirming the receipt of the positive response of the last transmitted UDS message, the next UDS message is continuously transmitted until all transmissions of the multiple UDS messages are completed and flashing is performed.

8. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded by the processor and executes the method according to any one of claims 1 to 6.

9. A computer storage medium, characterized in that: The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded by a processor and executes the method according to any one of claims 1 to 6.

10. A computer program product, comprising at least one instruction or at least one program, characterized in that: The at least one instruction or the at least one program is loaded by a processor and executes the method according to any one of claims 1 to 6.