Controller upgrade method, electronic device, and storage medium
By switching the mode of the on-board controller after vehicle startup and using a short link for upgrades, the problem of low transmission efficiency caused by long links in existing technologies is solved, achieving more efficient controller upgrades.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, vehicle controller upgrades involve long links, resulting in low transmission efficiency, excessively long upgrade times, and reduced success rates.
After the vehicle starts, the vehicle controller is switched to the target mode by sending a mode switching command through the first link, and then switched to a second link shorter than the first link for upgrade, avoiding the parsing and routing of the vehicle diagnostic gateway and communicating directly through the second link.
This significantly shortens the upgrade process, improves the efficiency of controller upgrades, reduces upgrade time, and increases the success rate.
Smart Images

Figure CN121386731B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle diagnostic technology, and more particularly to a controller upgrade method, electronic device, and storage medium. Background Technology
[0002] As the level of intelligence in automobiles continues to increase, more and more cars are being equipped with electronic control units (ECUs) related to intelligent driving, such as millimeter-wave radar and vision cameras. Moreover, the software functions of ECUs are becoming increasingly rich, which makes the upgrade package of the controller very large. For example, the upgrade package of the Digital Cockpit Head Unit (DHU) can reach several gigabytes or even tens of gigabytes, which will cause the upgrade time to be too long and the upgrade success rate to be reduced.
[0003] The relevant technology involves ECU upgrades requiring diagnostic equipment to exchange all information with the ECU via an Ethernet interface through a vehicle diagnostic gateway. This results in a relatively long link for the vehicle diagnostic gateway and lower transmission efficiency. Summary of the Invention
[0004] This application provides a controller upgrade method, an electronic device, and a storage medium.
[0005] This application provides a controller upgrade method applied to diagnostic equipment, the method comprising:
[0006] After the vehicle starts, a first instruction for mode switching is sent to the vehicle controller via the first link; the first instruction is used to instruct the vehicle controller to switch the current mode to the desired target mode.
[0007] Upon receiving information that the vehicle controller has switched its current mode to the target mode, the communication link is switched to a second link; the second link is shorter than the first link.
[0008] The vehicle controller is upgraded via the second link.
[0009] Furthermore, the first link includes a first port of the switch and a vehicle diagnostic gateway;
[0010] The second link includes a second port of the switch; the diagnostic device upgrades the vehicle controller via the second port of the second link.
[0011] Furthermore, the switching of the communication link to the second link includes:
[0012] Send a diagnostic command; the diagnostic command contains a specific IP address and the second port of the switch, so that after establishing the second link between the diagnostic device and the vehicle controller through the switch, the communication link is switched to the second link through the diagnostic device.
[0013] Furthermore, before the vehicle is powered on after starting, the target mode required by the first instruction is server mode. The first instruction is used to instruct the vehicle controller to switch from client mode to client mode, and the vehicle controller is used as a server.
[0014] The upgrade of the vehicle controller via the second link includes:
[0015] A diagnostic command is sent to the vehicle controller via the second link, so that the vehicle controller can perform a diagnosis based on the diagnostic command; the diagnostic command includes diagnostic upgrade data.
[0016] Furthermore, the upgrade of the vehicle controller via the second link includes:
[0017] After the vehicle has started and been powered on, a second command for mode switching is sent to the vehicle controller via the second link; the second command is used to instruct the vehicle controller to switch from server mode to client mode, and accordingly, the vehicle controller is used as a client.
[0018] The diagnostic response returned by the vehicle controller in response to the diagnostic command is received via the second link; the diagnostic response is obtained by the vehicle controller upon receiving the diagnostic command.
[0019] Furthermore, the diagnostic command is used to indicate the target mode to be switched to, and correspondingly, at least one of the first command and the second command for mode switching is the diagnostic command;
[0020] or,
[0021] The first instruction, the second instruction, and the diagnostic instruction are each independent instructions, and their contents are different.
[0022] Furthermore, the client is a TCP client; the server is a TCP server;
[0023] The second link is a DoIP communication link; the diagnostic command is a TCP packet;
[0024] The vehicle controller is an Ethernet controller.
[0025] This application provides a controller upgrade method applied to an in-vehicle controller, the method comprising:
[0026] The system receives a first instruction for mode switching sent by the diagnostic device via the first link after the vehicle is started; the first instruction is used to instruct the vehicle controller to switch the current mode to the desired target mode.
[0027] Based on the first instruction, the current mode is switched to the target mode, and a switching response is returned to the diagnostic device in response to the first instruction, so that when the diagnostic device receives the information that the vehicle controller has switched the current mode to the target mode, it switches the communication link to the second link; the second link is shorter than the first link.
[0028] The vehicle controller is upgraded via the second link.
[0029] Furthermore, before the vehicle is powered on after starting, the target mode required by the first instruction is server mode, and the first instruction is used to instruct the vehicle controller to switch from client mode to client mode, and the vehicle controller is used as a server.
[0030] The upgrade of the vehicle controller via the second link includes:
[0031] The diagnostic device receives a diagnostic command sent via the second link and performs an upgrade; the diagnostic command includes diagnostic upgrade data.
[0032] Furthermore, the upgrade of the vehicle controller via the second link includes:
[0033] After the vehicle has started and been powered on, a second instruction for mode switching is received from the diagnostic device via the second link; the second instruction is used to instruct the vehicle controller to switch from server mode to client mode, and correspondingly, the vehicle controller is used as a client.
[0034] A diagnostic response is obtained based on the diagnostic instructions;
[0035] The diagnostic response is returned to the diagnostic device.
[0036] This application provides an electronic device including one or more processors for implementing the method described in any of the preceding claims.
[0037] This application provides a computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the method described in any of the preceding claims.
[0038] This application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the method described in any of the preceding claims.
[0039] In some embodiments, in the controller upgrade method of this application, after the diagnostic device switches the mode of the vehicle controller via a first link, the diagnostic device then uses a second link, which is shorter than the first link, to upgrade the vehicle controller. Thus, because the second link is shorter, the diagnostic device directly upgrades the vehicle controller via the second link, eliminating the need for a gateway to participate in the parsing and routing of diagnostic messages, significantly reducing the upgrade link and improving upgrade efficiency. Attached Figure Description
[0040] Figure 1 The diagram shown is a structural schematic of the vehicle controller, diagnostic equipment, and vehicle diagnostic gateway of the controller upgrade method provided in this application embodiment;
[0041] Figure 2 The diagram shown is a flowchart illustrating the application of the controller upgrade method provided in this application to a diagnostic device.
[0042] Figure 3 As shown Figure 2 The diagram shows a specific application structure of the controller upgrade method.
[0043] Figure 4 As shown Figure 2 A schematic diagram of the second link of the controller upgrade method shown;
[0044] Figure 5 The diagram shown is a flowchart illustrating the application of the controller upgrade method provided in this application to an in-vehicle controller.
[0045] Figure 6 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application. Detailed Implementation
[0046] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0047] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0048] When upgrading the ECU of related technologies, the diagnostic equipment needs to issue a diagnostic command to the Ethernet ECU through the vehicle diagnostic gateway (hereinafter referred to as the gateway). The Ethernet ECU then receives the diagnostic request from the diagnostic equipment through the gateway, obtains the diagnostic response, and then sends the diagnostic response back to the diagnostic equipment through the gateway.
[0049] However, the ECU upgrade process for related technologies involves relatively long transmission links and low efficiency.
[0050] To address the technical issue of relatively long transmission links and low efficiency during ECU upgrades, this application provides a controller upgrade method. After the diagnostic device switches the vehicle controller's mode via a first link, it then uses a second link, shorter than the first, to upgrade the vehicle controller. Because the second link is shorter, the diagnostic device upgrades the vehicle controller directly through it, eliminating the need for a gateway to participate in the parsing and routing of diagnostic messages. This significantly reduces the upgrade link and improves upgrade efficiency.
[0051] Firstly, Figure 1 The diagram shown is a structural schematic of the vehicle controller, diagnostic equipment, and vehicle diagnostic gateway of the controller upgrade method provided in this application embodiment. Figure 2 The diagram shown is a flowchart illustrating the application of the controller upgrade method provided in this application to a diagnostic device. Figure 3 As shown Figure 2 The diagram shows the specific application structure of the controller upgrade method.
[0052] like Figure 1 and Figure 2 As shown, this controller upgrade method is applied to diagnostic device 11. This controller upgrade method may include, but is not limited to, steps 110 to 130:
[0053] Step 110: After the vehicle is started, a first instruction for mode switching is sent to the vehicle controller 12 via the first link; the first instruction is used to instruct the vehicle controller 12 to switch the current mode to the desired target mode.
[0054] The first link includes the vehicle diagnostic gateway 13. The aforementioned vehicle diagnostic gateway 13 is responsible for routing and forwarding diagnostic communication messages of the vehicle ECU (Electronic Control Unit).
[0055] like Figure 3 As shown, the vehicle controller 12 may include, but is not limited to, an Ethernet ECU 121 and / or a vehicle controller. The Ethernet ECU 121 is an Ethernet ECU 121 capable of directly communicating with devices that have the function of a switch 14.
[0056] In step 110, the first link is the foundation for establishing a communication link between the vehicle controller 12 and the diagnostic device 11 solely through the switch 14. Before establishing the second link, a first command needs to be sent through the first link to complete the establishment of the second link.
[0057] Step 120: Upon receiving confirmation that the vehicle controller 12 has switched from its current mode to the target mode, the communication link is switched to a second link; the second link is shorter than the first link. This second link does not include the vehicle diagnostic gateway 13. Thus, by switching the link to use the shorter second link for communication, communication on the first link is disconnected, and communication is conducted without passing through the devices of the vehicle diagnostic gateway 13 in the first link, thereby improving communication efficiency.
[0058] The target pattern in this article is used to represent the mode that needs to be switched. For example, the mode to be switched to is the TCP (Transmission Control Protocol) server mode. Continuing... Figure 3 As shown, the diagnostic device 11 may include, but is not limited to, a diagnostic host computer 111, which is generally a handheld diagnostic instrument or diagnostic host computer software installed on a PC.
[0059] Step 130: Upgrade the vehicle controller 12 via the second link.
[0060] In step 130, after the second link is established, the first link can be shut down, and then the vehicle controller 12 and the diagnostic device 11 can be interconnected and communicate bidirectionally via the switch 14.
[0061] In this embodiment, after the diagnostic device 11 switches the mode of the vehicle controller 12 via the first link, the diagnostic device 11 then uses a second link, which is shorter than the first link, to upgrade the vehicle controller 12. Thus, the second link is shorter, allowing the diagnostic device 11 to directly upgrade the vehicle controller 12 via the second link. Furthermore, the second link does not include the vehicle diagnostic gateway 13, therefore the gateway is not required to participate in the parsing and routing of diagnostic messages, significantly reducing the upgrade link and improving upgrade efficiency.
[0062] Figure 4 As shown Figure 2 A schematic diagram of the second link of the controller upgrade method shown.
[0063] like Figure 3 and Figure 4 As shown, the first link includes the first port 141 of the switch 14 and the vehicle diagnostic gateway 13.
[0064] The second link includes the second port 142 of the switch 14, but does not include the first port; the diagnostic device 11 upgrades the vehicle controller 12 via the second port of the second link.
[0065] In this embodiment, the first link and the second link are two different links, and the first port and the second port are also two different ports. The first port, as the input port of the first link, is used to transmit switching instructions, thus preparing the first link for switching. The second port, as the input port of the second link, is used to input diagnostic upgrade instructions. The second link is used to implement diagnostic upgrades.
[0066] In this embodiment, the first link uses the first port 141 of the switch 14, and the second link uses the second port 142 of the switch 14, thereby ensuring that data transmission between different links is independent and avoiding mutual interference.
[0067] Combination Figure 1 As shown, switching the communication link to the second link in step 120 above may include, but is not limited to:
[0068] Send a diagnostic command; the diagnostic command contains a specific IP address and the second port of the switch 14, so that after establishing the second link between the diagnostic device 11 and the vehicle controller 12 through the switch 14, the communication link is switched to the second link through the diagnostic device.
[0069] See also Figure 4 As shown, after the second link is established by switch 14, the vehicle controller 12 sends a ready-to-switch response, indicating it is ready to switch to the second link, back to the diagnostic device via the first link. This ready-to-switch response includes the port used to establish the second link. Upon receiving the ready-to-switch response from the vehicle controller 12, the diagnostic device switches the communication link to the second link based on the response and continues to send subsequent commands or conduct communication, such as bidirectional communication, to the vehicle controller 12 via the second port 142 of switch 14.
[0070] The diagnostic commands mentioned above are used to implement the upgrade procedure. For example, a diagnostic command may contain a diagnostic upgrade message.
[0071] Furthermore, the diagnostic command is first sent to the second port 142 of the switch 14. The switch 14 will route the command to the corresponding vehicle controller 12 based on the relevant information of the diagnostic command, such as a specific IP address.
[0072] The DoIP (Diagnostic communication over Internet Protocol) described in this article uses Ethernet to transmit automotive diagnostic data, replacing the traditional CAN (Controller Area Network) / LIN (Local Interconnect Network) bus diagnostics.
[0073] In this embodiment, the diagnostic device sends a first instruction for mode switching to the vehicle controller 12 in step 110, causing the vehicle controller 12 to temporarily switch from the auxiliary sub-node of the vehicle diagnostic gateway 13 to the TCP Server mode. Then, the diagnostic device can directly establish DoIP communication with the vehicle controller 12 to be upgraded through the switch and send diagnostic instructions, avoiding the vehicle diagnostic gateway 13 from parsing and routing the diagnostic instructions, thereby greatly reducing the upgrade link and improving upgrade efficiency.
[0074] Combination Figure 1 As shown, before the vehicle is powered on after startup, the target mode required by the first instruction is the server mode, and the vehicle controller 12 is used as the server.
[0075] Accordingly, step 130 may include, but is not limited to, sending a diagnostic command to the vehicle controller 12 via the second link; the diagnostic command includes diagnostic upgrade data.
[0076] The aforementioned vehicle controller 12 acts as a server, and the server mode is TCP Server mode.
[0077] In this paper, when the vehicle controller 12 acts as a TCP server, it can send messages to the diagnostic device 11 in TCP server mode, thereby enabling the diagnostic processing of the diagnostic device 11 that communicates with the vehicle controller 12 and improving the convenience of the diagnostic device 11.
[0078] like Figure 1 and Figure 4 As shown, step 130 above may include, but is not limited to, the following first to third steps:
[0079] The first step is that after the vehicle is started and powered on, a second command for mode switching is sent to the vehicle controller 12 via the second link; the second command is used to instruct the vehicle controller 12 to switch the server mode to the client mode, and accordingly, the vehicle controller 12 is used as the client.
[0080] The client mode for this step is the TCP client mode.
[0081] The second step is to send a diagnostic command to the vehicle controller 12 via the second link; the diagnostic command includes diagnostic upgrade data.
[0082] In some embodiments, the diagnostic instruction is used to indicate the target mode to be switched to, and correspondingly, at least one of the first instruction and the second instruction for mode switching is the diagnostic instruction. In this way, the first instruction and / or the second instruction can be a diagnostic instruction. Thus, diagnostic instructions can be shared, avoiding the need to generate new dedicated mode switching instructions, reducing the system's processing burden.
[0083] In other embodiments, the first instruction, the second instruction, and the diagnostic instruction are each independent instructions with different content. This facilitates the parsing of different instructions based on their identifiers, enabling faster decision-making.
[0084] The third step is to receive, via the second link, a diagnostic response returned by the vehicle controller 12 in response to the diagnostic command; the diagnostic response is obtained by the vehicle controller 12 upon receiving the diagnostic command.
[0085] In this embodiment of the application, when the vehicle controller 12 receives a diagnostic command sent by the switch, the vehicle controller 12 can default to acting as a TCP client and directly convert the data transmission format of the received diagnostic command so that the vehicle controller 12 can perform diagnostic processing based on the converted diagnostic command data.
[0086] Combination Figure 4 As shown, this paper uses a second link to send the second instruction, switches the server mode to client mode, and uses the second link to enable the vehicle controller 12 to return a diagnostic response to the diagnostic instruction to the diagnostic device.
[0087] In this embodiment, the Ethernet ECU can be switched to TCP Server mode or TCP Client mode according to the actual situation of the diagnostic host computer 111 or Ethernet ECU 121. The above process can achieve the purpose of shortening the diagnostic upgrade link and improving upgrade efficiency.
[0088] As an optional embodiment of this application, the client is a TCP client; the server is a TCP server. The second link is a DoIP communication link; the diagnostic command is a TCP message; and the vehicle controller 12 is an Ethernet controller.
[0089] In this article, the Ethernet ECU is powered on as a TCP Client by default, and can initially connect to the vehicle diagnostic gateway. It will only switch to TCP mode after receiving a specific command under special operating conditions. It will automatically switch back to the default mode after a timeout or if no connection establishment command is received.
[0090] In this way, the upgrade speed of the vehicle controller on the Ethernet node is improved by shortening the transmission link of upgrade data packets. TCP communication is reliable, simple, and convenient for fast communication.
[0091] Combination Figure 1 and Figure 3 As shown, when the vehicle controller 12 switches its current mode to the target mode, the specific implementation process of switching the communication link to the second link and disconnecting the communication of the first link is as follows:
[0092] 1. After the vehicle starts, the Ethernet ECU121 establishes a DoIP link with the vehicle diagnostic gateway through the switch and waits to receive diagnostic messages; the diagnostic messages contain upgrade data. The vehicle diagnostic gateway includes at least one device, such as a diagnostic message management module and an Ethernet link management module.
[0093] 2. The diagnostic host computer 111 will establish a DoIP communication link with the vehicle diagnostic gateway through the switch 14, i.e., step 21;
[0094] 3. The diagnostic host computer 111 can now extract upgrade data and send the message with the target logical address set to the Ethernet ECU 121 to be upgraded. This is also included in the diagnostic upgrade message. Figure 3 In step 21 shown;
[0095] 4. This diagnostic upgrade message will reach the vehicle diagnostic gateway, i.e. Figure 3 Step 22 is shown;
[0096] 5. The transport layer protocol stack of the vehicle diagnostic gateway extracts the target logical address of the diagnostic message from the Ethernet link management module, i.e. Figure 3 Step 23 is shown. The diagnostic message management module interfaces with the Ethernet link management module. The diagnostic message management module is used to receive all diagnostic commands and / or first commands containing indications of the target mode to be switched, analyze the diagnostic commands and first commands, and then transmit them to the corresponding vehicle controller via the Ethernet link management module. The vehicle controller then executes the operations corresponding to all diagnostic commands and / or first commands.
[0097] 6. After the vehicle diagnostic gateway parses the target logical address of the diagnostic message, it then uses that target logical address to locate the communication link of the vehicle controller from the Ethernet link management module. Figure 3 Step 24 is shown;
[0098] 7. After the vehicle diagnostic gateway locates the communication link of the on-board controller, it then forwards the diagnostic message to switch 14. Figure 3 Step 25 is shown;
[0099] 8. Switch 14 will route the diagnostic message to the corresponding Ethernet ECU 121 based on the relevant information. Figure 3 Step 26 is shown;
[0100] 9. The Ethernet ECU121 transmits the diagnostic results obtained from the diagnostic message to the diagnostic host computer 111 via the switch, i.e. Figure 3 Steps 27 and 28 are shown. The diagnostic result can also be referred to as the diagnostic response.
[0101] Combination Figure 1 and Figure 4 As shown, the specific implementation process is as follows:
[0102] (1) After the vehicle is powered on, the diagnostic host computer 111 sends a diagnostic command to the Ethernet ECU 121 to be upgraded to switch to TCPClient. The Ethernet ECU 121 to be upgraded will actively establish a DoIP communication link with the diagnostic host computer 111.
[0103] (2) Subsequently, the diagnostic host computer 111 extracts the upgrade data and sets the diagnostic target logical address to the Ethernet ECU 121 to be upgraded. After assembling the diagnostic message for the diagnostic command, it sends it to the Ethernet ECU 121 to be upgraded, i.e. step 31.
[0104] (3) After the Ethernet ECU121 to be upgraded receives the diagnostic message from the switch 14, it performs parsing, data saving and other tasks, i.e., step 32;
[0105] (4) After the Ethernet ECU121 to be upgraded has finished processing, it gives a diagnostic response message and sends it to the diagnostic host computer 111 via Switch, i.e., step 33.
[0106] (5) After the diagnostic host computer 111 receives the response message of the Ethernet ECU 121 to be upgraded from the switch 14, i.e. step 34, it can continue to send the next frame or choose to let the vehicle controller switch back to the lower sub-node of the vehicle diagnostic gateway.
[0107] In this paper, diagnostic commands are used to switch the Ethernet ECU node from TCP client mode to TCP server mode, thereby allowing the diagnostic host computer 111 to directly establish a DoIP communication link with the Ethernet ECU 121 to be upgraded.
[0108] Alternatively, in this paper, the Ethernet ECU node is switched from establishing a DoIP link with the gateway to establishing a DoIP link with the diagnostic host computer 111, and diagnostic data packets are sent, thereby improving the upgrade efficiency and stability of the Ethernet ECU node.
[0109] Secondly, Figure 5 The diagram shown is a flowchart illustrating the application of the controller upgrade method provided in this embodiment of the application to the vehicle controller 12.
[0110] like Figure 5 As shown, this controller upgrade method is applied to the vehicle controller 12. The controller upgrade method may include, but is not limited to, the following steps 210 to 230:
[0111] Step 210: Receive a first instruction for mode switching sent by the diagnostic device 11 via the first link after the vehicle is started; the first instruction is used to instruct the vehicle controller 12 to switch the current mode to the desired target mode.
[0112] Step 220: According to the first instruction, switch the current mode to the target mode and return a switching response to the diagnostic device 11 in response to the first instruction, so that the diagnostic device 11 switches the communication link to the second link when it receives the information that the vehicle controller 12 has switched the current mode to the target mode; the second link is shorter than the first link.
[0113] Step 230: Upgrade the vehicle controller 12 via the second link.
[0114] As an embodiment of this application, before the vehicle is powered on after starting, the target mode required by the first instruction is server mode, and the first instruction is used to instruct the vehicle controller to switch the client mode to client mode, and the vehicle controller is used as a server.
[0115] The upgrade of the vehicle controller via the second link includes:
[0116] The diagnostic device 11 receives a diagnostic command sent via the second link and performs an upgrade; the diagnostic command includes diagnostic upgrade data.
[0117] As one embodiment of this application, receiving a diagnostic command sent by the diagnostic device via the second link for upgrading, or upgrading the vehicle controller via the second link, includes:
[0118] After the vehicle is started and powered on, a second instruction for mode switching is received from the diagnostic device 11 via the second link; the second instruction is used to instruct the vehicle controller 12 to switch the server mode to the client mode, and correspondingly, the vehicle controller 12 is used as the client.
[0119] A diagnostic response is obtained based on the diagnostic instructions;
[0120] The diagnostic response is returned to the diagnostic device 11.
[0121] For example, when the vehicle controller 12 receives a diagnostic command sent by the gateway, the vehicle controller 12 can default to acting as a TCP client and directly convert the data transmission format of the received diagnostic command so that the vehicle controller 12 can perform diagnostic processing based on the converted diagnostic command data.
[0122] Each step of the method in the second aspect above has the same inventive concept as the method in the first aspect above, and corresponds to the steps of the method in the first aspect above. For details on the implementation process of the function and role of each step in the method in the second aspect above, please refer to the implementation process of the corresponding step in the method in the first aspect above. The same technical effect can be achieved, and will not be repeated here.
[0123] Thirdly, the electronic devices in the embodiments of this application may include, but are not limited to, in-vehicle terminals connected to a vehicle and terminals independent of the vehicle. In-vehicle terminals connected to a vehicle may be, but are not limited to, body processors, center consoles, or automotive HUDs (Head-Up Displays), in-vehicle controllers, or head-up displays. Terminals independent of the vehicle may be, but are not limited to, host computers, smartphones, smartwatches, tablets, or laptops.
[0124] Figure 6 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application.
[0125] like Figure 6 As shown, the electronic device includes one or more processors 51 for implementing the controller upgrade method described above.
[0126] In some embodiments, the electronic device may include a storage medium 59. For example, a computer-readable storage medium may store a program that can be invoked by a processor 51, and may include a non-volatile storage medium. In some embodiments, the electronic device may include memory 58 and an interface 57. In some embodiments, the electronic device may also include other hardware depending on the specific application.
[0127] The computer-readable storage medium of this application embodiment stores a program that, when executed by the processor 51, is used to implement the controller upgrade method described above.
[0128] This application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the method described in any of the preceding claims.
[0129] This application also provides a computer program stored in a computer-readable storage medium, for example... Figure 6 The storage medium 59, and when the processor executes the computer program, causes the processor 51 to perform the method described above.
[0130] This application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented using any method or technology. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0131] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
[0132] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Without further limitation, an element qualified by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A controller upgrade method, characterized in that, Applied to diagnostic devices, the method includes: After the vehicle starts, a first instruction for mode switching is sent to the vehicle controller via the first link; the first instruction is used to instruct the vehicle controller to switch the current mode to the desired target mode. Upon receiving information that the vehicle controller has switched its current mode to the target mode, the communication link is switched to a second link; the second link is shorter than the first link; the second link does not include a vehicle diagnostic gateway; The vehicle controller is upgraded via the second link.
2. The controller upgrade method as described in claim 1, characterized in that, The first link includes the first port of the switch and the vehicle diagnostic gateway; The second link includes a second port of the switch; the diagnostic device upgrades the vehicle controller via the second port of the second link.
3. The controller upgrade method as described in claim 2, characterized in that, The switching of the communication link to the second link includes: Send a diagnostic command; the diagnostic command contains a specific IP address and the second port of the switch, so that after establishing the second link between the diagnostic device and the vehicle controller through the switch, the communication link is switched to the second link through the diagnostic device.
4. The controller upgrade method according to any one of claims 1 to 3, characterized in that, Before the vehicle is powered on after starting, the target mode required by the first instruction is server mode. The first instruction is used to instruct the vehicle controller to switch from client mode to server mode, and the vehicle controller is used as a server. The upgrade of the vehicle controller via the second link includes: A diagnostic command is sent to the vehicle controller via the second link, so that the vehicle controller performs a diagnosis according to the diagnostic command. The diagnostic instructions include diagnostic upgrade data.
5. The controller upgrade method according to any one of claims 1 to 3, characterized in that, The upgrade of the vehicle controller via the second link includes: After the vehicle has started and been powered on, a second command for mode switching is sent to the vehicle controller via the second link; the second command is used to instruct the vehicle controller to switch from server mode to client mode, and accordingly, the vehicle controller is used as a client. The diagnostic response returned by the vehicle controller in response to the diagnostic command is received via the second link; the diagnostic response is obtained by the vehicle controller upon receiving the diagnostic command.
6. The controller upgrade method as described in claim 5, characterized in that, The diagnostic command is used to indicate the target mode to be switched to, and correspondingly, at least one of the first command and the second command for mode switching is the diagnostic command. or, The first instruction, the second instruction, and the diagnostic instruction are each independent instructions, and their contents are different.
7. The controller upgrade method as described in claim 5, characterized in that, The client is a TCP client; the server is a TCP server. The second link is a DoIP communication link; the diagnostic command is a TCP packet; The vehicle controller is an Ethernet controller.
8. A controller upgrade method, characterized in that, Applied to an on-board controller, the method includes: The system receives a first instruction for mode switching sent by the diagnostic device via the first link after the vehicle is started; the first instruction is used to instruct the vehicle controller to switch the current mode to the desired target mode. Based on the first instruction, the current mode is switched to the target mode, and a switching response is returned to the diagnostic device in response to the first instruction, so that when the diagnostic device receives the information that the vehicle controller has switched the current mode to the target mode, it switches the communication link to the second link; the second link is shorter than the first link; the second link does not include the vehicle diagnostic gateway; The vehicle controller is upgraded via the second link.
9. The controller upgrade method as described in claim 8, characterized in that, Before the vehicle is powered on after starting, the target mode required by the first instruction is server mode. The first instruction is used to instruct the vehicle controller to switch from client mode to server mode, and the vehicle controller is used as the server. The upgrade of the vehicle controller via the second link includes: Receive diagnostic commands sent by the diagnostic device via the second link and perform upgrades; The diagnostic instructions include diagnostic upgrade data.
10. The controller upgrade method as described in claim 8, characterized in that, The upgrade of the vehicle controller via the second link includes: After the vehicle has started and been powered on, a second instruction for mode switching is received from the diagnostic device via the second link; the second instruction is used to instruct the vehicle controller to switch from server mode to client mode, and correspondingly, the vehicle controller is used as a client. A diagnostic response is obtained based on the diagnostic instructions; The diagnostic response is returned to the diagnostic device.
11. An electronic device, characterized in that, It includes one or more processors for implementing the controller upgrade method as described in any one of claims 1 to 7 or the controller upgrade method as described in any one of claims 8 to 10.
12. A computer-readable storage medium, characterized in that, It stores a program that, when executed by a processor, implements the controller upgrade method as described in any one of claims 1 to 7 or the controller upgrade method as described in any one of claims 8 to 10.
Citation Information
Patent Citations
Communication method and device in vehicle controller upgrading and automatic driving vehicle
CN116193424A