In-vehicle device, computer program, and program update method
Through the priority update and abnormal detection mechanism, the problem that the relay device cannot work normally after program updates in the vehicle is solved, ensuring the stability of inter-bus communication and the accuracy of the update process, and avoiding communication interruptions.
Patent Information
- Application Number
- CN202380029354.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-04-04
- Filing Date
- 2023-04-04
- Publication Date
- 2024-12-03
AI Technical Summary
In a vehicle, the relay device cannot work normally after the program is updated, resulting in interruption of inter-bus communication, and the prior art has failed to effectively solve this problem.
By prioritizing the update of the relay device and continuing to update the programs of other on-board ECUs while ensuring its normal state, an exception detection and rollback processing mechanism is adopted to ensure the stability of the update process and communication continuity.
It effectively prevents inter-bus communication interruption of the relay device after the program is updated, ensures the accuracy and stability of the update process, and avoids communication failures caused by update errors.
Smart Images

Figure CN119072679A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a vehicle-mounted device, a computer program, and a program update method.
[0002] This application claims the benefit of priority based on Japanese Application No. 2022-062541 filed on April 4, 2022, and incorporates by reference all the contents described in the aforementioned Japanese Application. Background Art
[0003] The vehicle is equipped with an ECU (Electronic Control Unit) for controlling vehicle-mounted devices, such as a drive control system such as engine control, and a body system such as air conditioning control. The ECU includes an arithmetic processing unit such as an MPU, a rewritable non-volatile storage unit such as an EEPROM, and a communication unit for communicating with other ECUs. The vehicle-mounted devices are controlled by reading and executing the control program stored in the storage unit. The vehicle is also equipped with a communication device with a wireless communication function, which can communicate with a program provider connected to a network outside the vehicle via the communication device, download (receive) the control program of the ECU from the program provider, and update the control program of the ECU (for example, refer to Patent Document 1).
[0004] Prior art literature Patent Literature Patent Document 1: Japanese Patent Application Publication No. 2017-97851 Summary of the invention
[0005] The vehicle-mounted device of an embodiment of the present disclosure is connected to a first bus, obtains an update program from outside the vehicle, and updates the programs of a relay device and a vehicle-mounted ECU, wherein the first bus is connected to the relay device that relays communication between buses, wherein the vehicle-mounted device includes a control unit that gives priority to updating the relay device when the update object includes the relay device and the vehicle-mounted ECU of a second bus connected to the relay device.
[0006] The computer program of the embodiment of the present disclosure enables a computer of a vehicle-mounted device to execute processing, wherein the vehicle-mounted device is connected to a first bus, obtains an update program from outside the vehicle, and updates the programs of a relay device and a vehicle-mounted ECU. The first bus is connected to the relay device that relays for inter-bus communication. When the update object includes the relay device and a vehicle-mounted ECU of a second bus connected to the relay device, the processing gives priority to updating the relay device.
[0007] The program update method of the embodiment of the present disclosure enables a vehicle-mounted device to execute processing, and the vehicle-mounted device is connected to a first bus, obtains an update program from outside the vehicle, and updates the programs of a relay device and a vehicle-mounted ECU. The first bus is connected to the relay device that relays for inter-bus communication. When the update object includes the relay device and the vehicle-mounted ECU of a second bus connected to the relay device, the processing gives priority to updating the relay device. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 1 is a schematic diagram showing the configuration of the in-vehicle updating system according to the first embodiment. Figure 2 is a block diagram showing the structure of the vehicle-mounted device. Figure 3 This is an explanatory diagram illustrating an example of the flow (sequence) of processing executed by the in-vehicle device, the device to be updated (the first GW and the in-vehicle ECU), and the like. 4 is an explanatory diagram illustrating a state transition of the vehicle-mounted device, the first GW, and the vehicle-mounted ECU as an update target in the program update process. FIG. 5 is an explanatory diagram illustrating a state transition of the vehicle-mounted device, the first GW, and the vehicle-mounted ECU to be updated in the rollback process. Figure 6 This is a flowchart illustrating an example of processing of the control unit of the vehicle-mounted device. Figure 7 This is an explanatory diagram illustrating another example of the flow (sequence) of processing executed by the in-vehicle device, the device to be updated (the first GW and the in-vehicle ECU), and the like. FIG. 8 is an explanatory diagram illustrating a state transition of the vehicle-mounted device, the first GW, and the vehicle-mounted ECU as an update target in the program update process. FIG. 9 is an explanatory diagram illustrating a state transition of the vehicle-mounted device, the first GW, and the vehicle-mounted ECU as an update target in the rollback process. Fig.10 This is a flowchart illustrating another example of the processing of the control unit of the vehicle-mounted device. FIG. 11 is an explanatory diagram illustrating a state transition of each device in a program update process in Modification 1. FIG. FIG. 12 is an explanatory diagram illustrating a state transition of each device during a rollback process in Modification 1. FIG. FIG. 13 is a diagram illustrating an example of a configuration in which the in-vehicle update system according to Modification 2 includes a virtual network. DETAILED DESCRIPTION
[0009] [Problems to be Solved by the Invention]
[0010] Assume that two buses are connected to a relay device, and the control program includes the relay device and the devices connected to the two buses in the update object. In the above case, if an abnormality occurs such as the relay device is not updated correctly, there is a concern that communication between the two buses will no longer be possible after the update.
[0011] However, the communication device of Patent Document 1 does not make any study on the above-mentioned problem and cannot solve it.
[0012] Therefore, an object of the present invention is to provide an in-vehicle device, a computer program, and a program updating method that can prevent communication between buses connected by a relay device from becoming unavailable after a program update process.
[0013] [Effects of the present disclosure]
[0014] According to the present disclosure, it is possible to prevent the situation where communication between buses connected by a relay device becomes impossible after a program update process.
[0015] [Description of Embodiments of the Invention]
[0016] First, the embodiments of the present disclosure will be described by way of example. In addition, at least a part of the embodiments described below may be arbitrarily combined.
[0017] (1) An on-board device according to an embodiment of the present disclosure is connected to a first bus, obtains an update program from outside the vehicle, and updates programs of a relay device and an on-board ECU, wherein the first bus is connected to the relay device that relays inter-bus communication, wherein the on-board device includes a control unit that gives priority to updating the relay device when an update target includes the relay device and an on-board ECU of a second bus connected to the relay device.
[0018] In this embodiment, when the update object includes the relay device and the vehicle-mounted ECU of the second bus, the control unit gives priority to updating the relay device, and continues the update process on the basis of ensuring the normal state of the relay device. Therefore, the program update for the vehicle-mounted ECU of the second bus can be accurately performed.
[0019] (2) In the vehicle-mounted device of the embodiment of the present disclosure, when the update targets include the relay device and the vehicle-mounted ECU of the second bus as well as the vehicle-mounted ECU of the first bus, the control unit preferentially updates the relay device and the vehicle-mounted ECU of the first bus.
[0020] In this embodiment, when the update object includes the on-board ECU of the first bus in addition to the on-board ECU of the relay device and the second bus, the control unit gives priority to updating the on-board ECU of the relay device and the first bus, and continues the update process on the basis of ensuring the normal state of the relay device. Therefore, the program update for the on-board ECU of the second bus can be accurately performed.
[0021] (3) The vehicle-mounted device according to the embodiment of the present disclosure includes an abnormality detection unit that detects abnormality in the relay device after the relay device executes activation processing for applying the update program.
[0022] In this embodiment, after the relay device performs activation processing, the abnormality detection unit performs abnormality detection on the relay device and confirms that it is normal. In this way, the processing is continued on the basis of ensuring the normal state of the relay device, so that the program update of the vehicle-mounted ECU for the second bus can be accurately performed.
[0023] (4) In the vehicle-mounted device according to the embodiment of the present disclosure, when no abnormality is detected, the control unit updates the vehicle-mounted ECU of the second bus.
[0024] In this embodiment, after the activation process is executed by the relay device, the abnormality detection unit detects the abnormality of the relay device, and after confirming that no abnormality is detected, continues to update the vehicle-mounted ECU for the second bus. In this way, the program update for the vehicle-mounted ECU for the second bus can be accurately executed while the normal state of the relay device is ensured.
[0025] (5) In the vehicle-mounted device of the embodiment of the present disclosure, when the update object also includes other relay devices connected to the second bus and a vehicle-mounted ECU of a third bus connected to the other relay devices, the control unit updates the vehicle-mounted ECU of the second bus and the other relay devices at the same time. After the other relay devices are updated, the control unit performs the update processing of the vehicle-mounted ECU of the third bus.
[0026] In this embodiment, when the update object includes the relay device, the vehicle-mounted ECU of the first bus, the vehicle-mounted ECU of the second bus, the other relay devices, and the vehicle-mounted ECU of the third bus, the control unit updates the vehicle-mounted ECU of the second bus and the other relay devices at the same time, and continues to update the vehicle-mounted ECU of the third bus on the basis of ensuring the normal status of the other relay devices. Therefore, the program update for the vehicle-mounted ECU of the third bus can be accurately performed.
[0027] (6) In the vehicle-mounted device according to the embodiment of the present disclosure, when an abnormality is detected, the control unit preferentially performs a rollback process on the relay device and the vehicle-mounted ECU of the first bus, wherein the rollback process returns the updated program to the program before the update.
[0028] In this embodiment, when an abnormality is detected after the update, the control unit causes the relay device and the vehicle-mounted ECU of the first bus to perform rollback processing first. Thus, after ensuring the normal state of the relay device in the execution environment of the original program, the rollback processing is continued. In this way, the rollback processing is performed on the basis of ensuring the normal state of the relay device, so the rollback processing for the vehicle-mounted ECU of the second bus can be accurately performed.
[0029] (7) In the vehicle-mounted device according to the embodiment of the present disclosure, the control unit performs the rollback process on the vehicle-mounted ECU of the second bus after performing the rollback process on the relay device.
[0030] In this embodiment, the control unit causes the relay device to perform rollback processing, and after ensuring the normal state of the relay device in the execution environment of the original program, causes the on-board ECU of the second bus to perform rollback processing. In this way, the rollback processing is performed on the basis of ensuring the normal state of the relay device, so the rollback processing for the on-board ECU of the second bus can be accurately performed.
[0031] (8) Regarding the vehicle-mounted device of the embodiment of the present disclosure, when further updates are performed in the vehicle-mounted ECU of the other relay devices connected to the second bus and the third bus connected to the other relay devices, the control unit performs rollback processing on the vehicle-mounted ECU of the second bus and the other relay devices at the same time, and after the rollback processing of the other relay devices, the control unit performs rollback processing on the vehicle-mounted ECU of the third bus.
[0032] In this embodiment, when the other relay devices and the vehicle-mounted ECU of the third bus are updated in addition to the relay device, the vehicle-mounted ECU of the first bus, and the vehicle-mounted ECU of the second bus, the control unit performs rollback processing on the vehicle-mounted ECU of the second bus and the other relay devices at the same time, and continues to perform rollback processing on the vehicle-mounted ECU of the third bus on the basis of ensuring the normal state of the other relay devices. Therefore, the rollback processing for the vehicle-mounted ECU of the third bus can be accurately performed.
[0033] (9) A computer program according to an embodiment of the present disclosure causes a computer of an on-board device to execute processing, wherein the on-board device is connected to a first bus, obtains an update program from outside the vehicle, and updates programs of a relay device and an on-board ECU, wherein the first bus is connected to the relay device that relays inter-bus communication, and when the update object includes the relay device and an on-board ECU of a second bus connected to the relay device, the processing gives priority to updating the relay device.
[0034] In this embodiment, when the update object includes the relay device and the vehicle-mounted ECU of the second bus, the computer of the vehicle-mounted device gives priority to updating the relay device, and continues to perform the update process on the basis of ensuring the normal state of the relay device. Therefore, the program update for the vehicle-mounted ECU of the second bus can be accurately performed.
[0035] (10) The program update method of the embodiment of the present disclosure causes an on-board device to execute processing, the on-board device being connected to a first bus, obtaining an update program from outside the vehicle, and updating programs of a relay device and an on-board ECU, the first bus being connected to the relay device that relays for inter-bus communication, the processing giving priority to updating the relay device when the update object includes the relay device and an on-board ECU of a second bus connected to the relay device.
[0036] In this embodiment, when the update object includes the relay device and the vehicle-mounted ECU of the second bus, the vehicle-mounted device gives priority to updating the relay device, and continues to perform the update process on the basis of ensuring the normal state of the relay device. Therefore, the program update for the vehicle-mounted ECU of the second bus can be accurately performed.
[0037] [Details of the embodiments of the present invention]
[0038] The vehicle-mounted device, computer program, and program update method of the embodiments of the present disclosure are described below with reference to the accompanying drawings. In addition, the present invention is not limited to these examples, but is represented by the claims, and is intended to include all changes within the meaning and scope equivalent to the claims.
[0039] Hereinafter, embodiments will be described based on the drawings. Figure 1 1 is a schematic diagram showing the structure of the vehicle-mounted update system S according to Embodiment 1. The vehicle-mounted update system S includes an off-vehicle communication device 1 and an on-vehicle device 2 mounted on a vehicle C, and transmits an update program obtained from an external server S1 (OTA server) connected via an off-vehicle network N to an on-vehicle ECU 3 (Electronic Control Unit) mounted on the vehicle C.
[0040] The external server S1 is a computer such as a server connected to an external network N such as the Internet or a public line network, and has a storage unit S11 composed of a RAM (Random Access Memory), a ROM (Read Only Memory) or a hard disk. In the storage unit S11 of the external server S1, a program or data for controlling the vehicle-mounted ECU 3 made by a manufacturer of the vehicle-mounted ECU 3 is stored. The program or data is sent to the vehicle C as an update program as described later, and is used to update the program or data of the vehicle-mounted ECU 3 installed in the vehicle C. The external server S1 thus constructed is also called an OTA (Over The Air) server.
[0041] The in-vehicle device 2 functions as a so-called OTA host that transmits an update program obtained from an external server S1 via the off-vehicle communication device 1 to the in-vehicle ECU 3 to be updated and transmits an activation instruction for causing the in-vehicle ECU 3 to apply the transmitted update program.
[0042] The on-board ECU 3 mounted on the vehicle C obtains the update program sent from the external server S1 by wireless communication via the on-board device 2, and applies the update program (activation processing) according to the activation instruction from the on-board device 2, thereby updating (reprogramming) the program executed by this ECU.
[0043] For example, the program includes an external file that records program codes including control statements for processing by the vehicle-mounted ECU 3 and data referenced when executing the program code. When sending the update program, the external file that records these program codes and data is sent from the external server S1 as, for example, an encrypted archive file. When sending the update program, the external server S1 generates a data packet including the update program and sends the generated data packet to the vehicle C. The data packet includes, for example, information related to program update, namely, data packet information (activity information), information indicating the update object (target information), and the update program applied to the update object.
[0044] The vehicle C includes an off-vehicle communication device 1, an on-vehicle device 2, and a first GW (gateway) 8. A plurality of buses 4 are connected to the first GW 8, and a plurality of on-vehicle ECUs 3 for controlling various on-vehicle devices are connected to the buses 4. In addition, the vehicle C includes a display device 5 (see Figure 2 ) and IG switch 6 (refer to Figure 2 ).
[0045] The following description will be made by taking the case where two buses 4A and 4B are connected to the first GW 8, the vehicle-mounted ECUs 3Aa and 3Ab are connected to the bus 4A, and the vehicle-mounted ECUs 3Ba, 3Bb, and 3Bc are connected to the bus 4B as an example. The present invention is not limited thereto, and the number of buses 4 may be more than three, and more than four vehicle-mounted ECUs 3 may be connected to each bus 4.
[0046] The off-vehicle communication device 1 and the on-vehicle device 2 are connected in a communicative manner, for example, via a wiring harness such as a serial cable. The first GW8 selectively relays the communication data between the bus 4A and the bus 4B, and can convert the communication protocol between the bus 4A and the bus 4B during the relay. The first GW8, the on-vehicle device 2, and the on-vehicle ECU 3 are connected in a communicative manner via the bus 4 corresponding to a communication protocol such as CAN (Control Area Network), CAN-FD (CAN with Flexible Data Rate), or Ethernet (registered trademark).
[0047] The vehicle-external communication device 1 includes an vehicle-external communication unit (not shown) and an input / output I / F (interface) (not shown) for communicating with the vehicle-mounted device 2. The vehicle-external communication unit is a communication device for wireless communication using a mobile communication protocol such as LTE (registered trademark), 4G, 5G, or WiFi (registered trademark), and transmits and receives data with an external server S1 via an antenna connected to the vehicle-external communication unit. The communication between the vehicle-external communication device 1 and the external server S1 is performed via an external network N such as a public line network or the Internet.
[0048] The input / output I / F of the off-vehicle communication device 1 is a communication interface for performing serial communication with the on-vehicle device 2, for example. The off-vehicle communication device 1 and the on-vehicle device 2 communicate with each other via a wiring harness such as a serial cable. In the present embodiment, the off-vehicle communication device 1 is set as a device independent of the on-vehicle device 2, and these devices are connected in a communicative manner through the input / output I / F, etc., but it is not limited to this. The off-vehicle communication device 1 can also be built into the on-vehicle device 2 as a structural part of the on-vehicle device 2. Alternatively, the off-vehicle communication device 1 and the on-vehicle device 2 can also be connected through a bus such as CAN.
[0049] The first GW8 is, for example, an on-board relay device that integrates the buses 4 (segments) of multiple systems such as the on-board ECU 3 of the control system, the on-board ECU 3 of the safety system, and the on-board ECU 3 of the body system, and relays the communication between the on-board ECUs 3 between these buses (segments). The first GW8 functions as a CAN gateway in the relay of the CAN protocol, and functions as a second-layer switch or a third-layer switch in the relay of the TCP / IP protocol. The first GW8 can also be a PLB (Power Lan Box) that functions as a power distribution device in addition to the communication-related relay. The power distribution device distributes and relays the power output from the power supply device such as the secondary battery, and supplies the power to the on-board devices such as the actuator connected to the device.
[0050] The first GW8 has a storage unit 81. The storage unit 81 stores information related to the versions of the current version and the old version of the two programs, as well as information related to the area (action surface) storing the currently executed (applied) program. That is, when executing a program (control program) stored in the first area under the current situation, the action surface is set to be the first area for storage. In this case, the non-action surface is set to be the second area for storage. The current version of the control program is stored in the first area as the action surface. The old version of the control program is stored in the second area as the non-action surface. Alternatively, in the second area as the non-action surface, there may be no old version of the control program, etc. stored, but a storage area with free capacity. In this way, the non-action surface becomes a storage area with free capacity or a state in which the old version of the control program, etc. is stored, so that by writing the new version of the control program to the non-action surface during the update, it is possible to ensure that it returns to the state of the old version.
[0051] Figure 2 It is a block diagram showing the structure of the vehicle-mounted device 2.
[0052] The vehicle-mounted device 2 includes a control unit 20, a storage unit 23, an input / output I / F 21, and an in-vehicle communication unit 22. The vehicle-mounted device 2 is configured to obtain an update program (data packet) from the external communication device 1, which is a program received by the external communication device 1 from the external server S1 through wireless communication, and transmit it to the device to be updated via the bus 4. That is, the vehicle-mounted device 2 functions as an OTA host (update control device) that controls program updates in the device to be updated.
[0053] The vehicle-mounted device 2 may be configured as a functional unit of a body ECU that controls the entire vehicle C. Alternatively, the vehicle-mounted device 2 may be an integrated ECU that controls the entire vehicle C and is configured as a central control device such as an onboard computer.
[0054] The control unit 20 is composed of a CPU (Central Processing Unit) or an MPU (MicroProcessing Unit), and reads and executes a control program P and data pre-stored in the storage unit 23 to perform various control processes and calculation processes.
[0055] The storage unit 23 is composed of two storage areas, which are composed of a first storage unit 231 and a second storage unit 232. The first storage unit 231 and the second storage unit 232 are respectively composed of a volatile memory element such as a RAM (Random Access Memory) or a non-volatile memory element such as a ROM (Read Only Memory), an EEPROM (Electrically Erasable Programmable ROM) or a flash memory. The control program P and data referenced during processing are pre-stored in the first storage unit 231 and the second storage unit 232. The control program P stored in the storage unit 23 (the first storage unit 231 and the second storage unit 232) may be a control program P read from a recording medium 24 readable by the vehicle-mounted device 2. In addition, the control program P may be downloaded from an external computer not shown connected to a communication network not shown and stored in the storage unit 23.
[0056] The input / output I / F 21 is a communication interface for serial communication, for example, similar to the input / output I / F of the vehicle-external communication device 1. The vehicle-mounted device 2 is connected to the vehicle-external communication device 1, the display device 5, and the IG switch 6 in a communicative manner via the input / output I / F 21. In addition, the IG signal can also be obtained via the in-vehicle LAN.
[0057] The in-vehicle communication unit 22 is an input / output interface using a communication protocol such as CAN or Ethernet (registered trademark). The control unit 20 communicates with the in-vehicle ECU 3 or the first GW 8 on the bus 4A via the in-vehicle communication unit 22, and communicates with the in-vehicle ECU 3 on the bus 4B via the first GW 8. A plurality of in-vehicle communication units 22 are provided (two in this embodiment).
[0058] The vehicle-mounted device 2 executes processing related to applying the update program to the vehicle-mounted ECU 3 and the first GW 8. As will be described in detail later, the vehicle-mounted device 2 sends the update program to the vehicle-mounted ECU 3 and the first GW 8, instructs activation, confirms abnormalities after activation processing, and instructs rollback when abnormalities are detected.
[0059] The vehicle-mounted device 2 generates and stores update information used for abnormality confirmation after activation based on the update program from the external server S1. The update information stores at least the ID of each vehicle-mounted ECU 3, the current program version, and the update program version in association with each other.
[0060] Specifically, the vehicle-mounted device 2 communicates with all the vehicle-mounted ECUs 3 and the first GW8 mounted on the vehicle C (the vehicle itself) regularly, periodically or stably, and obtains the version information of the programs related to all the vehicle-mounted ECUs 3 and the first GW8 in advance. The vehicle-mounted device 2 stores the version information of the sent programs in correspondence with each device. Alternatively, the vehicle-mounted device 2 may not request each vehicle-mounted ECU 3 and the first GW8 to send the current program version, but each vehicle-mounted ECU 3 and the first GW8 may send the current program version to the vehicle-mounted device 2 regularly or periodically.
[0061] In addition, when the vehicle-mounted device 2 obtains the data packet from the external server S1, it obtains the version of the update program for each device as an update target based on the activity information, the target information and the update program. Alternatively, it can be configured so that each device as an update target sends the version of the update program applied to the device to the vehicle-mounted device 2 whenever the activation of the update program is completed.
[0062] The vehicle-mounted device 2 generates the update information by collecting the current program version and the update program version obtained from each vehicle-mounted ECU 3 and the first GW 8, and stores it in the storage unit 23. The update information is stored in the first storage unit 231 or the second storage unit 232, or it can be stored in both the first storage unit 231 and the second storage unit 232.
[0063] The vehicle-mounted ECU 3, like the vehicle-mounted device 2, includes a control unit, a storage unit, and an in-vehicle communication unit (not shown). The storage unit is composed of volatile memory elements such as RAM (Random Access Memory) or non-volatile memory elements such as ROM (Read Only Memory), EEPROM (Electrically Erasable Programmable ROM) or flash memory, and stores the program or data of the vehicle-mounted ECU 3. The program or data is an object to be updated by an update program sent from an external server S1 and relayed by the vehicle-mounted device 2 (first GW8). The in-vehicle communication unit of the vehicle-mounted ECU 3, like the vehicle-mounted device 2, is composed of, for example, a CAN transceiver or an Ethernet PHY unit, and communicates with the vehicle-mounted device 2.
[0064] In the storage unit of each vehicle-mounted ECU 3, similarly to the storage unit 81 of the first GW 8, a first area and a second area are provided. When executing a program (control program) currently stored in the first area, the operating side is set to be stored in the first area, and the non-operating side is set to be stored in the second area. The current version of the control program is stored in the first area as the operating side. The old version of the control program is stored in the second area as the non-operating side. Alternatively, the second area as the non-operating side may not store the old version of the control program, etc., but may be a storage area with free capacity.
[0065] Figure 3 1 is an explanatory diagram illustrating an example of the flow (sequence) of processing performed by the vehicle-mounted device 2 and the devices to be updated (the first GW 8 and the vehicle-mounted ECU 3 ). Figure 3 The flowchart shows the processing sequence of the external server S1 , the onboard device 2 , the first GW 8 , and the onboard ECU 3 as an update target when performing the processing related to the program update in the onboard device 2 and the update target devices (the first GW 8 and the onboard ECU 3 ).
[0066] For convenience of explanation, the following description will be made by taking as an example a case where the vehicle-mounted ECU 3Aa and the first GW 8 on the bus 4A and the vehicle-mounted ECUs 3Ba and 3Bb on the bus 4B are update targets.
[0067] In addition, FIG. 4 is an explanatory diagram illustrating the state transition of the vehicle-mounted device 2, the first GW8, and the vehicle-mounted ECU3 as the update object during the program update process, and FIG. 5 is an explanatory diagram illustrating the state transition of the vehicle-mounted device 2, the first GW8, and the vehicle-mounted ECU3 as the update object during the rollback process. In FIG. 4 and FIG. 5, the display format of the first GW8 and the vehicle-mounted ECU3 as the update object is reversed to show the state before the application of the update program and the state after the application. In addition, in FIG. 4, the update object is indicated by adding a black circle.
[0068] The vehicle-mounted device 2 obtains an update program from the external server S1 (S01). The vehicle-mounted device 2 uses, for example, the identification number (VIN: Vehicle Identification Number) of the vehicle C (the vehicle) on which the vehicle-mounted device is mounted to access the external server S1, and obtains a data packet including an update program applied to the vehicle from the external server S1. The data packet includes, for example, data packet information (activity information) related to program update, information (target information) related to the first GW8 and the vehicle-mounted ECU3 that are update targets, and an update program applied to the first GW8 and the vehicle-mounted ECU3 that are program update targets.
[0069] The vehicle-mounted device 2 stores the update program included in the acquired data package in the storage unit 23 (S02). The acquired update program is stored in the first storage unit 231 or the second storage unit 232. In addition, the vehicle-mounted device 2 updates the update information based on the acquired data package.
[0070] First, the vehicle-mounted device 2 sends an update to the first GW 8 and the vehicle-mounted ECU 3Aa (see Figure 4A ) outputs (sends) an update program for the first GW8 and the vehicle-mounted ECU 3Aa (S03). The vehicle-mounted device 2 recognizes that the first GW8 is included in the update target based on the target information obtained from the external server S1, and sends the update program to the first GW8 and the vehicle-mounted ECU 3Aa on the bus 4A.
[0071] The first GW 8 stores the update program acquired (received) from the in-vehicle device 2 in the storage unit 81 , and the in-vehicle ECU 3Aa installs the update program acquired from the in-vehicle device 2 in the storage unit ( S04 ).
[0072] For example, when the currently executed program is stored in the first area of the storage unit 81, the first area corresponds to the operation surface. In this case, in the second area of the storage unit 81, which is the non-operation surface, a program of a version earlier than the currently executed program (older version) is saved as a backup. The first GW 8 stores the acquired update program for the present device in the second area, which is the non-operation surface. As a result, the program executed at the current time point is not overwritten, and the current operation state can be stably maintained.
[0073] The on-vehicle ECU 3Aa, like the first GW 8 , can prevent the program currently being executed (stored in the operating surface) from being overwritten by storing the acquired update program in the non-operating surface.
[0074] The onboard device 2 outputs (transmits) an activation instruction to the first GW8 and the onboard ECU 3Aa on the own bus 4A (S05). The first GW8 and the onboard ECU 3Aa perform activation processing according to the activation instruction output from the onboard device 2 (S06). The first GW8 and the onboard ECU 3Aa that obtain (receive) the activation instruction from the onboard device 2 restart by setting the storage area (non-operating surface) storing the update program as the operating surface, thereby performing activation processing for applying the update program.
[0075] Through the above processing, the activation process of the update program is completed only in the first GW8 and the vehicle-mounted ECU 3Aa among the update targets (see Figure 4B ).
[0076] The vehicle-mounted device 2 performs an operation confirmation (abnormality detection) process on the first GW8 and the vehicle-mounted ECU 3Aa for which the activation process has been completed (S07). For example, the vehicle-mounted device 2 requests to send version information indicating the version of the updated program, and compares the version information sent from the first GW8 and the vehicle-mounted ECU 3Aa in response to the request of the vehicle-mounted device 2 with the update information. If they are consistent, it is determined to be normal, and if they are inconsistent, it is determined to be abnormal.
[0077] Alternatively, the in-vehicle device 2 may monitor the presence of periodic spontaneous transmission frames transmitted from the activated first GW 8 and the in-vehicle ECU 3Aa, and perform abnormality detection processing based on whether the spontaneous transmission frames are received.
[0078] The vehicle-mounted device 2 outputs (transmits) an update program for the vehicle-mounted ECU 3 (vehicle-mounted ECU 3Ba, 3Bb) connected to another bus 4B (hereinafter referred to as another bus 4B) to which the vehicle-mounted device 2 is not connected as an update target (S08). The vehicle-mounted device 2 identifies the vehicle-mounted ECU 3 of the another bus 4B as an update target based on the target information obtained from the external server S1, and transmits the update program to the vehicle-mounted ECU 3Ba, 3Bb on the bus 4B via the first GW 8 for the identified vehicle-mounted ECU 3.
[0079] The on-vehicle ECU 3 (on-vehicle ECU 3Ba, 3Bb) to be updated installs the update program acquired (received) from the on-vehicle device 2 via the first GW 8 (S09). The on-vehicle ECU 3Ba, 3Bb to be updated stores the acquired update program in the non-operating surface, similarly to the first GW 8, thereby preventing the program on the operating surface currently being executed from being overwritten.
[0080] The vehicle-mounted device 2 outputs (transmits) an activation instruction to the vehicle-mounted ECUs 3 (vehicle-mounted ECUs 3Ba and 3Bb) to be updated on the other bus 4B via the first GW 8 ( S10 ). The vehicle-mounted device 2 outputs the activation instruction to the vehicle-mounted ECUs 3Ba and 3Bb to cause the vehicle-mounted ECUs 3Ba and 3Bb to execute activation processing.
[0081] The vehicle-mounted ECU 3Ba, 3Bb on the other bus 4B performs activation processing (S11) according to the activation instruction output from the vehicle-mounted device 2. The vehicle-mounted ECU 3Ba, 3Bb that obtains (receives) the activation instruction from the vehicle-mounted device 2 restarts by setting the storage area (non-operating surface) storing the update program as the operating surface, thereby performing activation processing for applying the update program.
[0082] Through the above processing, the activation process of the update program is completed in all of the first GW8 and the vehicle-mounted ECUs 3Aa, 3Ba, and 3Bb that are the update targets (see Figure 4C and Figure 5A ).
[0083] The vehicle-mounted device 2 performs an operation confirmation (abnormality detection) process on the vehicle-mounted ECU 3Ba, 3Bb for which the activation process has been completed (S12). For example, the vehicle-mounted device 2 requests to send version information indicating the version of the updated program, and compares the version information sent from the vehicle-mounted ECU 3Ba, 3Bb via the first GW8 in response to the request of the vehicle-mounted device 2 with the update information. If they are consistent, it is determined to be normal, and if they are inconsistent, it is determined to be abnormal.
[0084] In addition, the in-vehicle device 2 may monitor the presence or absence of a periodic spontaneous transmission frame transmitted from the in-vehicle ECU 3Ba, 3Bb after the activation process, and perform abnormality detection processing according to whether the spontaneous transmission frame is received.
[0085] As a result of the abnormality detection, if it is normal, the vehicle-mounted device 2 outputs (transmits) to the external server S1 a message indicating that the update process has been completed normally, and ends the update process (see S16 ).
[0086] On the other hand, when it is determined to be abnormal, the vehicle-mounted device 2 simultaneously outputs (transmits) a rollback instruction to the first GW8 and the vehicle-mounted ECU 3Aa connected to the own bus 4A and the vehicle-mounted ECU 3Ba and 3Bb connected to the other bus 4B (S13). That is, when the update of the program in the vehicle-mounted ECU 3Ba and 3Bb is not normally completed due to some reasons, the vehicle-mounted device 2 outputs (transmits) the rollback instruction to the first GW8 and the vehicle-mounted ECU 3Aa on the own bus 4A and the vehicle-mounted ECU 3Ba and 3Bb on the other bus 4B.
[0087] The first GW 8 and the vehicle-mounted ECU 3Aa on the own bus 4A perform rollback processing according to the rollback instruction output from the vehicle-mounted device 2 ( S14 ). The vehicle-mounted ECUs 3Ba and 3Bb on the other bus 4B perform rollback processing according to the rollback instruction output from the vehicle-mounted device 2 ( S15 ).
[0088] Specifically, the first GW8, the on-vehicle ECU 3Aa, and the on-vehicle ECU 3Ba, 3Bb, which have received the rollback instruction output from the on-vehicle device 2, are restarted to execute the program (original program) executed before the update program is applied (activated), thereby performing the rollback process. The original program is stored (saved) as a backup in a storage area (non-operating surface) different from the storage area (operating surface) storing the update program. The first GW8, the on-vehicle ECU 3Aa, and the on-vehicle ECU 3Ba, 3Bb are restarted by setting the storage area (non-operating surface) storing the original program as the operating surface and the storage area storing the update program as the non-operating surface, thereby performing the rollback process.
[0089] Through the above processing, the rollback process is performed on all of the first GW 8 and the vehicle-mounted ECUs 3Aa, 3Ba, and 3Bb that are the update targets, and the execution environment of the original program is returned. (See Figure 5B ).
[0090] The vehicle-mounted device 2 outputs (sends) the processing result related to the update program to the external server S1 (S16). As the result of the processing related to the update program, the vehicle-mounted device 2 outputs (sends) an update success notification or an update failure notification to the external server S1, wherein the update success notification indicates that the application of the update program to the first GW8 and the vehicle-mounted ECU3Aa, 3Ba, 3Bb as the update object is successful, and the update failure notification indicates that the application of the update program failed and a rollback process was performed. The vehicle-mounted device 2 may also output the processing result related to the update program to the display device 5 so that the display device 5 displays the processing result. The vehicle-mounted device 2 may also modify the update information related to the first GW8 and the vehicle-mounted ECU3Aa, 3Ba, 3Bb as the update object based on the processing result of the update program.
[0091] The above series of processing related to program update (S01 to S16) is performed during a period during which the vehicle C is prohibited from being in a start state, such as during a period during which the engine start or the traction motor drive is prohibited. By performing the processing during the prohibition period, it is possible to prevent the engine from being started in a state where a temporary mismatch (version difference) between the applied programs occurs. When the vehicle-mounted device 2 performs a series of processing related to program update during a period during which the vehicle C is prohibited from being in a start state, the on-board device 2 may temporarily invalidate the on signal output from the IG switch 6 via the input / output I / F 21, etc., by, for example, masking processing.
[0092] Figure 6 4 and 5 , the vehicle-mounted ECU 3Aa and the first GW 8 on the bus 4A and the vehicle-mounted ECU 3Ba and 3Bb on the bus 4B are update targets.
[0093] The control unit 20 obtains an update program (data package) from the external server S1 via the vehicle external communication device 1 ( S101 ). The control unit 20 stores the update program included in the obtained data package in the storage unit 23 ( S102 ). In addition, the control unit 20 updates the update information based on the obtained data package.
[0094] First, the control unit 20 outputs (transmits) the update program to the first GW8 and the vehicle-mounted ECU 3 on the bus 4A as the update target (S103). The control unit 20 determines the first GW8 and the vehicle-mounted ECU 3 (vehicle-mounted ECU 3Aa) as the update target based on the target information included in the data packet obtained from the external server S1, and transmits the update program to the determined first GW8 and vehicle-mounted ECU 3Aa.
[0095] At this time, the first GW 8 stores the update program sent from the control unit 20 in the storage unit 81, and the vehicle-mounted ECU 3Aa installs the update program sent from the control unit 20 in the storage unit. The update program installation process has been described above, and detailed description is omitted.
[0096] Next, the control unit 20 outputs (transmits) an activation instruction to the first GW8 and the vehicle-mounted ECU 3Aa on the own bus 4A as update targets ( S104 ). The control unit 20 outputs the activation instruction to the first GW8 and the vehicle-mounted ECU 3Aa respectively to cause the first GW8 and the vehicle-mounted ECU 3Aa to execute activation processing.
[0097] At this time, the first GW 8 and the on-vehicle ECU 3Aa perform activation processing according to the activation instruction output from the on-vehicle device 2. The above-mentioned activation processing has been described, and detailed description thereof will be omitted.
[0098] The control unit 20 performs abnormality detection processing (action confirmation) on the first GW8 and the vehicle-mounted ECU 3Aa for which the activation processing has been completed, and determines whether an abnormality is detected (S105). For example, the control unit 20 requests the transmission of version information indicating the version of the updated program, and compares the version information transmitted from the first GW8 and the vehicle-mounted ECU 3Aa according to the request of the control unit 20 with the update information in the storage unit 23. If they are consistent, the control unit 20 determines that it is normal (no abnormality), and if they are inconsistent, the control unit 20 determines that it is abnormal.
[0099] When an abnormality is detected, that is, when it is determined to be abnormal ( S105 : YES), the control unit 20 outputs (transmits) a rollback instruction to the first GW 8 and the vehicle-mounted ECU 3Aa on the own bus 4A in which the update program has been installed ( S110 ).
[0100] The first GW 8 and the vehicle-mounted ECU 3Aa perform a rollback process according to the rollback instruction output from the vehicle-mounted device 2. The first GW 8 and the vehicle-mounted ECU 3Aa restart to execute the program (original program) executed before applying (activating) the update program, thereby performing the rollback process. The rollback process has been described, and detailed description is omitted.
[0101] After that, the process proceeds to S109.
[0102] If no abnormality is detected, that is, if it is determined to be normal (S105: No), the control unit 20 outputs (sends) the update program to the remaining on-vehicle ECUs 3 on the other buses 4B that are to be updated (S106). The control unit 20 determines the on-vehicle ECUs 3 (on-vehicle ECUs 3Ba and 3Bb) on the other buses 4B that are to be updated based on the target information included in the data packet obtained from the external server S1, and sends the update program to the determined on-vehicle ECUs 3Ba and 3Bb via the first GW 8.
[0103] At this time, the vehicle-mounted ECUs 3Ba and 3Bb install the update program sent from the control unit 20 into the storage unit. The installation process of the update program has been described above, and detailed description thereof will be omitted.
[0104] Next, the control unit 20 outputs (transmits) an activation instruction to the vehicle-mounted ECUs 3Ba and 3Bb on the other bus 4B to be updated ( S107 ). The control unit 20 outputs the activation instruction to the vehicle-mounted ECUs 3Ba and 3Bb via the first GW 8 to cause the vehicle-mounted ECUs 3Ba and 3Bb to execute the activation process.
[0105] At this time, the vehicle-mounted ECUs 3Ba and 3Bb perform activation processing according to the activation instruction output from the vehicle-mounted device 2. The above-mentioned activation processing has been described, and detailed description thereof will be omitted.
[0106] The control unit 20 performs abnormality detection processing (action confirmation) on the vehicle-mounted ECU 3Ba, 3Bb that has completed the activation process, and determines whether an abnormality is detected (S108). For example, the control unit 20 requests the transmission of version information indicating the version of the updated program, and compares the version information transmitted from the vehicle-mounted ECU 3Ba, 3Bb according to the request of the control unit 20 with the update information in the storage unit 23. If they are consistent, the control unit 20 determines that it is normal (no abnormality), and if they are inconsistent, the control unit 20 determines that it is abnormal.
[0107] When an abnormality is detected, that is, when it is determined to be abnormal (S108: Yes), the control unit 20 outputs (sends) a rollback instruction to the first GW8, the vehicle-mounted ECU 3Aa on the own bus 4A, and the vehicle-mounted ECU 3Ba, 3Bb on the other bus 4B, on which the update program has been installed (S111). In step S105, since it is confirmed that the first GW8 is normal, the rollback instruction can be simultaneously issued to the first GW8, the vehicle-mounted ECU 3Aa on the own bus 4A, and the vehicle-mounted ECU 3Ba, 3Bb on the other bus 4B.
[0108] The first GW 8 and the on-vehicle ECU 3Aa and the on-vehicle ECUs 3Ba and 3Bb perform a rollback process in accordance with the rollback instruction output from the on-vehicle device 2. The rollback process has been described above, and detailed description thereof will be omitted.
[0109] Through the above processing, the rollback process is performed on all the first GW8 and the vehicle-mounted ECUs 3Aa, 3Ba, and 3Bb that are the update objects, and the execution environment of the original program is returned. Therefore, the following situation is prevented in advance: the occurrence of mismatches caused by differences in program versions between the vehicle-mounted ECUs 3Ba and 3Bb and the first GW8 and the vehicle-mounted ECU 3Aa, etc.
[0110] On the other hand, when no abnormality is detected, that is, when it is determined to be normal (S108: No), the control unit 20 outputs (transmits) the processing result related to the update program to the external server S1 (S109). As the processing result related to the update program, the control unit 20 outputs (transmits) an update success notification or an update failure notification to the external server S1 via the vehicle external communication device 1, wherein the update success notification indicates that the application of the update program to the first GW8 and the vehicle-mounted ECUs 3Aa, 3Ba, 3Bb as the update target is successful, and the update failure notification indicates that the application of the update program failed and a rollback process was performed.
[0111] In the vehicle-mounted device 2 of the present embodiment, when the first GW8 is included in the update object during the program update, the first GW8 is updated first. That is, as described above, when the first GW8 and the vehicle-mounted ECU 3 on the present bus 4 and the vehicle-mounted ECU 3 on the other bus 4B are included in the update object, the vehicle-mounted device 2 first completes the activation process for the first GW8 and the vehicle-mounted ECU 3 on the present bus 4A, and then, after confirming that the first GW8 is normal, continues to process the vehicle-mounted ECU 3 on the other bus 4B. In this way, the program update for the vehicle-mounted ECU 3 on the other bus 4B can be accurately executed while the normal state of the first GW8 is guaranteed. Therefore, the situation that the communication between the present bus 4A and the other bus 4B can no longer be carried out after the program update process can be prevented in advance.
[0112] In addition, in the vehicle-mounted device 2 of the present embodiment, when the update object includes the first GW8 and the vehicle-mounted ECU3 on other buses 4B, that is, when the vehicle-mounted ECU3 on the present bus 4A is not included, the vehicle-mounted device 2 first completes the activation processing for the first GW8, and then, after confirming that the first GW8 is normal, continues the processing for the vehicle-mounted ECU3 on other buses 4B.
[0113] Figure 7This is an explanatory diagram illustrating another example of the flow (sequence) of the processing executed by the in-vehicle device 2 , the devices to be updated (the first GW 8 and the in-vehicle ECU 3 ), and the like.
[0114] For convenience of explanation, the following description will be made by taking as an example a case where the vehicle-mounted ECU 3Aa and the first GW 8 on the bus 4A and the vehicle-mounted ECUs 3Ba and 3Bb on the bus 4B are update targets.
[0115] In addition, FIG. 8 is an explanatory diagram illustrating the state transition of the vehicle-mounted device 2, the first GW8, and the vehicle-mounted ECU3 as the update object during the program update process, and FIG. 9 is an explanatory diagram illustrating the state transition of the vehicle-mounted device 2, the first GW8, and the vehicle-mounted ECU3 as the update object during the rollback process. In FIG. 8 and FIG. 9, the display format of the first GW8 and the vehicle-mounted ECU3 as the update object is reversed to show the state before the application of the update program and the state after the application. In addition, in FIG. 8, the update object is indicated by adding a black circle.
[0116] The vehicle-mounted device 2 obtains an update program from the external server S1 (S21). The vehicle-mounted device 2 uses, for example, the identification number (VIN) of the vehicle C (the vehicle) on which the vehicle-mounted device is mounted to access the external server S1, and obtains a data packet including the update program applied to the vehicle from the external server S1. The data packet includes, for example, data packet information (activity information) related to program update, information (target information) related to the first GW8 and the vehicle-mounted ECU3 that are the update targets, and the update program applied to the first GW8 and the vehicle-mounted ECU3 that are the update targets of the program.
[0117] The vehicle-mounted device 2 stores the update program included in the acquired data package in the storage unit 23 (S22). The acquired update program is stored in the first storage unit 231 or the second storage unit 232. In addition, the vehicle-mounted device 2 updates the update information based on the acquired data package.
[0118] The in-vehicle device 2 sends the target information obtained from the external server S1 to the first GW 8 and the in-vehicle ECU 3Aa connected to the own bus 4A and the in-vehicle ECU 3Ba, 3Bb connected to the other bus 4B as update targets (see Fig. 8A ) outputs (sends) an update program for the first GW8 and each vehicle-mounted ECU (S23).
[0119] The first GW 8 stores the update program acquired (received) from the in-vehicle device 2 in the storage unit 81 , and the in-vehicle ECU 3Aa installs the update program acquired from the in-vehicle device 2 in the storage unit ( S24 ).
[0120] For example, when the currently executed program is stored in the first area of the storage unit 81, the first area corresponds to the action surface. In this case, in the second area of the storage unit 81, which is the non-action surface, a program of a version earlier than the currently executed program (older version) is saved as a backup. The first GW 8 stores the acquired update program for the device in the second area, which is the non-action surface. As a result, the program executed at the current time point is not overwritten, and the current action state can be stably maintained.
[0121] The on-vehicle ECU 3Aa, like the first GW 8 , can prevent the program currently being executed (stored in the operating surface) from being overwritten by storing the acquired update program in the non-operating surface.
[0122] At this time, the vehicle-mounted ECU 3Ba, 3Bb to be updated also installs the update program obtained (received) from the vehicle-mounted device 2 via the first GW 8 (S25). The vehicle-mounted ECU 3Ba, 3Bb, like the first GW 8, can avoid overwriting the program on the operating side currently executed by storing the obtained update program on the non-operating side.
[0123] The in-vehicle device 2 outputs (transmits) an activation instruction to the first GW8 and the in-vehicle ECU 3Aa on the own bus 4A and the in-vehicle ECUs 3Ba and 3Bb on the other bus 4B ( S26 ), causing the first GW8 and the in-vehicle ECUs 3Aa, 3Ba, and 3Bb to execute activation processing.
[0124] The first GW 8 and the vehicle-mounted ECU 3Aa on the bus 4 perform activation processing (S27) according to the activation instruction output from the vehicle-mounted device 2. The first GW 8 and the vehicle-mounted ECU 3Aa that obtain (receive) the activation instruction from the vehicle-mounted device 2 restart by setting the storage area (non-operating surface) storing the update program as the operating surface, thereby performing activation processing for applying the update program.
[0125] At this time, the vehicle-mounted ECU 3Ba, 3Bb on the other bus 4B also performs activation processing (S28) according to the activation instruction output from the vehicle-mounted device 2. The vehicle-mounted ECU 3Ba, 3Bb that obtains (receives) the activation instruction from the vehicle-mounted device 2 restarts by setting the storage area (non-operating surface) storing the update program as the operating surface, thereby performing activation processing for applying the update program.
[0126] Through the above processing, the activation process of the update program is completed in all of the first GW8 and the vehicle-mounted ECUs 3Aa, 3Ba, and 3Bb that are the update targets (see Figure 8B and Fig.9A ).
[0127] The vehicle-mounted device 2 performs operation confirmation (abnormality detection) processing on the first GW 8 and vehicle-mounted ECU 3Aa on the own bus 4A that have completed the activation processing, and the vehicle-mounted ECU 3Ba and 3Bb on the other bus 4B (S29). The above abnormality detection method has been described, and detailed description is omitted.
[0128] If the result of the abnormality detection is normal, the vehicle-mounted device 2 outputs (transmits) to the external server S1 a message that the update process has been completed normally, and ends the update process (see S35 ).
[0129] On the other hand, when it is determined that there is an abnormality, the vehicle-mounted device 2 first outputs (transmits) a rollback instruction to the first GW8 and the vehicle-mounted ECU 3Aa connected to the own bus 4A (S30). That is, when the update of the program in the vehicle-mounted ECU 3Ba, 3Bb is not normally completed due to some reason, or when an abnormality occurs in the first GW8, the vehicle-mounted device 2 first outputs (transmits) a rollback instruction to the first GW8 and the vehicle-mounted ECU 3Aa on the own bus 4A.
[0130] The first GW8 and the vehicle-mounted ECU3Aa on the present bus 4A perform a rollback process according to the rollback instruction output from the vehicle-mounted device 2 (S31). The first GW8 and the vehicle-mounted ECU3Aa that receive the rollback instruction output from the vehicle-mounted device 2 restart to execute the program (original program) executed before applying (activating) the update program, thereby performing a rollback process. The original program is stored (saved) as a backup in a storage area (non-operating surface) different from the storage area (operating surface) storing the update program. The first GW8 and the vehicle-mounted ECU3Aa restart the storage area (non-operating surface) storing the original program as the operating surface and the storage area storing the update program as the non-operating surface, thereby performing a rollback process.
[0131] Through the above processing, only the first GW8 and the vehicle-mounted ECU 3Aa perform the rollback process, returning to the execution environment of the original program (see Fig. 9B ). At this time, the vehicle-mounted device 2 updates the update information to the information of the original program.
[0132] Next, the vehicle-mounted device 2 confirms whether the version of the program of the first GW8 after the rollback process is the original program version (S32). For example, the vehicle-mounted device 2 requests to send version information indicating the version of the program after the rollback process, and compares the version information sent from the first GW8 according to the request of the vehicle-mounted device 2 with the update information.
[0133] When the program version of the first GW8 is the original program version, the vehicle-mounted device 2 outputs (sends) a rollback instruction to the vehicle-mounted ECU 3Ba, 3Bb connected to the other bus 4B (S33). That is, when the rollback process of the first GW8 and the vehicle-mounted ECU 3Aa is performed in the device as the update target, the vehicle-mounted device 2 also outputs a rollback instruction to the vehicle-mounted ECU 3Ba, 3Bb, thereby preventing the following situation from occurring: the incompatibility caused by the difference in program version between the vehicle-mounted ECU 3Ba, 3Bb and the first GW8 and the vehicle-mounted ECU 3Aa is prevented.
[0134] The on-vehicle ECU 3Ba, 3Bb on the other bus 4B performs a rollback process based on the rollback instruction output from the on-vehicle device 2 (S34). The on-vehicle ECU 3Ba, 3Bb that receives the rollback instruction output from the on-vehicle device 2 restarts to execute the original program, thereby performing a rollback process. The original program is stored (saved) on the non-operating surface as a backup. The on-vehicle ECU 3Ba, 3Bb performs a rollback process by setting the non-operating surface storing the original program as the operating surface and switching the storage area storing the update program to the non-operating surface and restarting.
[0135] Through the above processing, the rollback process is performed on all of the first GW 8 and the vehicle-mounted ECUs 3Aa, 3Ba, and 3Bb that are the update targets, and the execution environment of the original program is returned. (See Fig.10 C).
[0136] The in-vehicle device 2 outputs (sends) the processing result related to the update program to the external server S1 (S35). As the result of the processing related to the update program, the in-vehicle device 2 outputs (sends) to the external server S1 an update success notification or an update failure notification, wherein the update success notification indicates that the application of the update program to the first GW 8 and the in-vehicle ECUs 3Aa, 3Ba, 3Bb as the update target is successful, and the update failure notification indicates that the application of the update program failed and a rollback process was performed.
[0137] The above series of processing (S21 to S35) related to program update is performed during a period during which the vehicle C is prohibited from being started, such as during a period during which the engine is prohibited from being started or the traction motor is prohibited from being driven. By performing the processing during the prohibited period, it is possible to prevent the engine from being started when a temporary mismatch (version difference) between the applied programs occurs.
[0138] Fig.108 and 9 , the vehicle-mounted ECU 3Aa and the first GW 8 on the bus 4A and the vehicle-mounted ECU 3Ba and 3Bb on the bus 4B are update targets.
[0139] The control unit 20 obtains an update program (data package) from the external server S1 via the vehicle external communication device 1 ( S201 ). The control unit 20 stores the update program included in the obtained data package in the storage unit 23 ( S202 ). In addition, the control unit 20 updates the update information based on the obtained data package.
[0140] Next, the control unit 20 outputs (transmits) the update program to the first GW8 as the update target, the on-vehicle ECU 3Aa on the own bus 4A, and the on-vehicle ECU 3Ba, 3Bb on the other bus 4B (S203). The control unit 20 specifies the first GW8 and the on-vehicle ECU 3 (on-vehicle ECU 3Aa, 3Ba, 3Bb) as the update target based on the target information included in the data packet obtained from the external server S1, and transmits the update program to the specified first GW8 and on-vehicle ECU 3Aa, 3Ba, 3Bb.
[0141] At this time, the first GW 8 stores the update program sent from the control unit 20 in the storage unit 81, and the vehicle-mounted ECUs 3Aa, 3Ba, and 3Bb install the update program sent from the control unit 20 in the storage unit. The update program installation process has been described above, and detailed description is omitted.
[0142] Next, the control unit 20 outputs (sends) an activation instruction to the first GW8, the vehicle-mounted ECU 3Aa on the own bus 4A, and the vehicle-mounted ECU 3Ba, 3Bb on the other bus 4B that are the update targets (S204). The control unit 20 outputs the activation instruction to the first GW8 and the vehicle-mounted ECU 3Aa, 3Ba, 3Bb, respectively, so that the first GW8 and the vehicle-mounted ECU 3Aa, 3Ba, 3Bb execute the activation process.
[0143] At this time, the first GW 8 and the onboard ECUs 3Aa, 3Ba, and 3Bb perform activation processing according to the activation instruction output from the onboard device 2. The above-mentioned activation processing has been described, and detailed description thereof will be omitted.
[0144] The control unit 20 performs abnormality detection processing (action confirmation) on the first GW8 and the onboard ECU 3Aa, 3Ba, 3Bb for which the activation processing has been completed, and determines whether an abnormality is detected (S205). For example, the control unit 20 requests to send version information indicating the version of the updated program, and compares the version information sent from the first GW8 and the onboard ECU 3Aa, 3Ba, 3Bb according to the request of the control unit 20 with the update information of the storage unit 23. If they are consistent, the control unit 20 determines that it is normal (no abnormality), and if they are inconsistent, the control unit 20 determines that it is abnormal.
[0145] When an abnormality is detected, that is, when it is determined that any one of the first GW8 and the on-board ECUAa, 3Ba, 3Bb is abnormal (S205: Yes), the control unit 20 first outputs (sends) a rollback instruction to the first GW8 and the on-board ECU3Aa on the own bus 4A (S207). At this time, the control unit 20 updates the update information related to the first GW8 and the on-board ECU3Aa on the own bus 4A to the information of the original program.
[0146] The first GW 8 and the vehicle-mounted ECU 3Aa perform a rollback process according to the rollback instruction output from the vehicle-mounted device 2. The first GW 8 and the vehicle-mounted ECU 3Aa restart to execute the program (original program) executed before applying (activating) the update program, thereby performing the rollback process. The rollback process has been described, and detailed description is omitted.
[0147] Next, the control unit 20 determines whether the version of the program of the first GW 8 after the rollback process is the original program version before the update (S208). For example, the control unit 20 requests to send version information indicating the version of the program after the rollback process, and compares the version information sent from the first GW 8 according to the request of the control unit 20 with the update information.
[0148] If the control unit 20 determines that the program version of the first GW 8 after the rollback process is not the original program version before the update (S208: No), the control unit 20 repeats the above determination. The control unit 20 may be configured to return to S207 if the above determination is repeated a predetermined number of times or more.
[0149] When the control unit 20 determines that the version of the program of the first GW8 after the rollback process is the version of the original program before the update (S208: Yes), the first GW8 is confirmed to be normal, and therefore outputs (sends) a rollback instruction to the vehicle-mounted ECUs 3Ba and 3Bb on the other bus 4B (S209). At this time, the control unit 20 updates the update information related to the vehicle-mounted ECUs 3Ba and 3Bb on the other bus 4B to the information of the original program.
[0150] The in-vehicle ECUs 3Ba and 3Bb perform a rollback process in accordance with the rollback instruction output from the in-vehicle device 2. The rollback process has been described above, and detailed description thereof will be omitted.
[0151] Through the above-described processing, the rollback process is performed on all of the first GW 8 and the on-vehicle ECUs 3Aa, 3Ba, and 3Bb that are the update targets, and the environment for executing the original program is returned.
[0152] On the other hand, in S205, when no abnormality is detected, that is, when it is determined to be normal (S205: No), the control unit 20 outputs (transmits) the processing result related to the update program to the external server S1 (S206). As the processing result related to the update program, the control unit 20 outputs (transmits) an update success notification or an update failure notification to the external server S1 via the external vehicle communication device 1, wherein the update success notification indicates that the application of the update program to the first GW8 and the vehicle-mounted ECUs 3Aa, 3Ba, 3Bb as the update object is successful, and the update failure notification indicates that the application of the update program failed and a rollback process was performed.
[0153] As described above, in the vehicle-mounted device 2 of the present embodiment, when an abnormality occurs in the vehicle-mounted ECU 3 or the first GW8 on the other bus 4B after the program is updated, the rollback process of the first GW8 is performed preferentially. That is, when an abnormality occurs in the vehicle-mounted ECU 3 or the first GW8 on the other bus 4 after the activation process for all devices (the first GW8 and the vehicle-mounted ECU 3Aa, 3Ba, 3Bb) as the update object is completed, the vehicle-mounted device 2 first causes the first GW8 and the vehicle-mounted ECU 3 on the own bus 4A to perform the rollback process. Thus, after ensuring the normal state of the first GW8 in the execution environment of the original program, the vehicle-mounted device 2 causes the vehicle-mounted ECU 3 on the other bus 4B to perform the rollback process. In this way, the rollback process is performed on the basis of ensuring the normal state of the first GW8, so the rollback process for the vehicle-mounted ECU 3 on the other bus 4B can be accurately performed. Therefore, the situation in which the communication between the own bus 4A and the other bus 4B is no longer possible due to the abnormality after the program update process can be prevented in advance.
[0154] (Variant 1)
[0155] In the above, the case where only the in-vehicle ECU 3 is connected to the other bus 4B is described as an example, but the present invention is not limited to this.
[0156] FIG. 11 is an explanatory diagram illustrating the state transition of each device in the program update process in Modification 1, and FIG. 12 is an explanatory diagram illustrating the state transition of each device in the rollback process in Modification 1. In FIG. 11 and FIG. 12, in the first GW 8 and the vehicle-mounted ECU 3, which are the devices to be updated, the display format is reversed to show the state before and after the application of the update program. In addition, in FIG. 11, the update object is indicated by adding a black circle.
[0157] In this modification, the present bus 4A and the other bus 4B are connected to the first GW 8, the second GW 9 is further connected to the other end of the other bus 4B, and the bus 4C is connected to the second GW 9. The vehicle-mounted device 2 and the vehicle-mounted ECUs 3Aa and 3Ab are connected to the present bus 4A, the vehicle-mounted ECUs 3Ba, 3Bb and 3Bc are connected to the other bus 4B, and the vehicle-mounted ECUs 3Ca and 3Cb are connected to the bus 4C.
[0158] In the vehicle-mounted device 2 of this modified example, when the first GW8 and other devices are included in the update targets during the program update, the first GW8 is updated first. In the following, for the convenience of explanation, the vehicle-mounted ECU 3Aa on the bus 4A, the first GW8, the vehicle-mounted ECU 3Ba, 3Bb, the second GW9 and the vehicle-mounted ECU 3Ca on the bus 4B are the update targets. Fig.11A ).
[0159] First, the vehicle-mounted device 2 performs activation processing on the first GW 8 and the vehicle-mounted ECU 3 (vehicle-mounted ECU 3Aa) on the own bus 4A (see Fig. 11B After the activation process of the first GW8 and the vehicle-mounted ECU3Aa is completed, the vehicle-mounted device 2 confirms whether the first GW8 is operating normally (abnormality detection). When the first GW8 is operating normally, the vehicle-mounted device 2 activates the vehicle-mounted ECU3 (vehicle-mounted ECU3Ba, 3Bb) and the second GW9 on the other bus 4B via the first GW8 (refer to Fig. 11C After the activation process of the second GW9 and the onboard ECU3Ba, 3Bb is completed, the onboard device 2 confirms whether the second GW9 is operating normally (abnormality detection). If the second GW9 is operating normally, the onboard device 2 continues to activate the onboard ECU3 (onboard ECU3Ca) on the bus 4C via the first GW8 and the second GW9 (refer to Fig.11D ).
[0160] In this way, when the update object includes the first GW8 and the second GW9, the vehicle-mounted device 2 updates the second GW9 after giving priority to updating the first GW8 with a small number of hops, thereby executing the program update on the basis of ensuring the normal state of the first GW8 and the second GW9. Therefore, it is possible to accurately execute the program update for the vehicle-mounted ECU 3 on the other bus 4B and the vehicle-mounted ECU 3 on the bus 4C.
[0161] In the vehicle-mounted device 2 of this modification, if an abnormality occurs in the first GW 8 , the vehicle-mounted ECU 3 on another bus 4 , the second GW 9 , or the vehicle-mounted ECU 3 on the bus 4C after the program is updated, the rollback process of the first GW 8 is performed preferentially.
[0162] It can be assumed that after the activation process for all the devices to be updated (the first GW8, the second GW9 and the on-vehicle ECUs 3Aa, 3Ba, 3Bb, and 3Ca) is completed (see Fig. 12A ) An abnormality occurs in any one of the first GW8, the second GW9 and the on-vehicle ECU3Aa, 3Ba, 3Bb, 3Ca.
[0163] In this case, the in-vehicle device 2 first causes the first GW 8 and the in-vehicle ECU 3 (in-vehicle ECU 3Aa) on the own bus 4A to execute a rollback process (see Fig. 12B ). Thus, the normal state of the first GW8 in the execution environment of the original program is ensured. Thereafter, the vehicle-mounted device 2 causes the vehicle-mounted ECU 3 (vehicle-mounted ECU 3Ba, 3Bb) and the second GW9 on the other bus 4B to perform rollback processing via the first GW8 (refer to Fig. 12C ). Thus, the normal state of the second GW9 in the execution environment of the original program is ensured. Thereafter, the vehicle-mounted device 2 causes the vehicle-mounted ECU 3 (vehicle-mounted ECU 3Ca) on the bus 4C to execute the rollback process (refer to Fig.12D ).
[0164] In this way, when the first GW8 and the second GW9 are included in the objects of the rollback process, the vehicle-mounted device 2 performs the rollback process of the second GW9 after preferentially performing the rollback process of the first GW8 with a small number of hops, thereby performing the rollback process on the basis of ensuring the normal state of the first GW8 and the second GW9. Therefore, the rollback process for the vehicle-mounted ECU 3 on the other bus 4B and the vehicle-mounted ECU 3 on the bus 4C can be accurately performed.
[0165] (Variant 2)
[0166] The present invention is also applicable when the vehicle-mounted update system S includes a virtual network. Figure 1) stores a virtualization operating system such as Hypervisor, VMware or Xen in a storage unit (not shown). The control unit (not shown) of the vehicle C is started by using the virtualization operating system, so that a plurality of virtual devices can be constructed on the virtualization operating system. By executing a predetermined program on each virtual device, a single or multiple tasks are generated according to the processing content of the program.
[0167] In this embodiment, the virtualization method is described as an example of a hypervisor method in which a virtualized operating system directly accesses the hardware resources such as the control unit, but the virtualization method is not limited to the hypervisor method. For example, the virtualization method may also be a host OS method in which an operating system such as Linux (registered trademark) is interposed between the virtualized operating system and the hardware resources. In addition, the virtualization method may also use a container-based virtualized operating system.
[0168] FIG. 13 is a diagram illustrating an example of a configuration in which the in-vehicle update system S according to Modification 2 includes a virtual network.
[0169] The vehicle C started using the virtualized operating system can construct a virtual vehicle-mounted device 200, a virtual GW800, a virtual vehicle-mounted ECU30Ba, a virtual vehicle-mounted ECU30Bb, a virtual bus I40A, and a virtual bus II40B by using the function of the virtualized operating system. The virtual vehicle-mounted device 200 and the virtual GW800 are logically connected to the virtual bus I40A, and the virtual GW800, the virtual vehicle-mounted ECU30Ba, and the virtual vehicle-mounted ECU30Bb are logically connected to the virtual bus II40B. In addition, the virtual bus I40A is connected to the external vehicle communication device 1 via the first communication unit 50, and the virtual GW800 is connected to the bus 4D via the second communication unit 60. The vehicle-mounted ECUs 3Da, 3Db, and 3Dc are connected to the bus 4D.
[0170] For example, hardware resources of the control unit of vehicle C are allocated to the virtual vehicle-mounted device 200, the virtual GW 800, and the virtual vehicle-mounted ECUs 30Ba and 30Bb, and hardware resources of the storage unit of vehicle C are allocated to the virtual bus I40A and the virtual bus II40B.
[0171] In the vehicle-mounted update system S of the second modification, when the virtual GW800 is included in the update target during the program update, the update of the virtual GW800 is performed preferentially. In the following, for the convenience of explanation, the virtual vehicle-mounted ECU 30Ba and the virtual GW800 on the virtual bus II40B and the vehicle-mounted ECU 3Da and 3Db on the bus 4D are the update targets. Fig.13A ).
[0172] First, the virtual vehicle-mounted device 200 performs activation processing on the virtual GW 800 (see Fig. 13B ). After the activation process of the virtual GW800 is completed, the virtual vehicle-mounted device 200 confirms whether the virtual GW800 is operating normally (abnormality detection). When the virtual GW800 is operating normally, the virtual vehicle-mounted device 200 activates the virtual vehicle-mounted ECU30Ba on the virtual bus II40B via the virtual GW800, and activates the vehicle-mounted ECU3Da, 3Db on the bus 4D via the second communication unit 60 (refer to Fig. 13C ).
[0173] In addition, in the vehicle-mounted update system S of the second modification, when an abnormality occurs in the virtual GW800, the virtual vehicle-mounted ECU30Ba, or the vehicle-mounted ECU3Da, 3Db after the program is updated, the rollback process of the virtual GW800 is performed first. That is, the rollback process for the virtual GW800 is performed first, and then the rollback process for the virtual vehicle-mounted ECU30Ba or the vehicle-mounted ECU3Da, 3Db is performed. The rollback process has been described, and the detailed description is omitted.
[0174] The embodiments disclosed this time should be considered as illustrative in all aspects and not restrictive. The scope of the present invention is indicated by the claims rather than the above meaning, and is intended to include all changes within the meaning and scope equivalent to the claims.
[0175] Description of symbols 1External vehicle communication device 2. Vehicle-mounted device 3. 3Aa, 3Ab, 3Ba, 3Bb, 3Bc, 3Ca, 3Cb, 3Da, 3Db, 3Dc vehicle ECU 4, 4A, 4B, 4C, 4D bus 5 Display device 6IG switch 8The First GW 9 Second GW 20. Control Unit 21Input and output I / F 22In-vehicle communication unit 23 Storage 24 Recording media 30Ba, 30Bb virtual vehicle ECU 40A Virtual Bus I 40B Virtual Bus II 50First Ministry of Communications 60Second Communications Department 81 Storage 200 virtual vehicle devices 800 virtual GW 231 first storage unit 232 Second storage unit C Vehicle N External network P control program S Car Update System S1 External Server S11 storage unit.
Claims
1. A vehicle-mounted device connected to a first bus, acquiring an update program from outside the vehicle and updating programs of a relay device and a vehicle-mounted ECU, wherein the first bus is connected to the relay device that relays inter-bus communication, wherein: The in-vehicle device includes a control unit configured to prioritize updating of the relay device when an update target includes the relay device and an in-vehicle ECU of a second bus connected to the relay device.
2. The vehicle-mounted device according to claim 1, wherein: When the update targets include the relay device and the vehicle-mounted ECU of the second bus, and the vehicle-mounted ECU of the first bus, the control unit preferentially updates the relay device and the vehicle-mounted ECU of the first bus.
3. The vehicle-mounted device according to claim 2, wherein: The in-vehicle device includes an abnormality detection unit that detects abnormality in the relay device after the relay device executes activation processing for applying the update program.
4. The vehicle-mounted device according to claim 3, wherein: When no abnormality is detected, the control unit updates the vehicle-mounted ECU of the second bus.
5. The vehicle-mounted device according to any one of claims 2 to 4, wherein: When the update target further includes another relay device connected to the second bus and an on-vehicle ECU of a third bus connected to the other relay device, The control unit updates the vehicle-mounted ECU of the second bus and the other relay devices at the same time. After the other relay devices are updated, the control unit performs an update process of the vehicle-mounted ECU of the third bus.
6. The vehicle-mounted device according to claim 3, wherein: When an abnormality is detected, the control unit preferentially performs a rollback process on the relay device and the vehicle-mounted ECU of the first bus, the rollback process returning the updated program to the program before the update.
7. The vehicle-mounted device according to claim 6, wherein: The control unit performs the rollback process on the vehicle-mounted ECU of the second bus after performing the rollback process on the relay device.
8. The vehicle-mounted device according to claim 7, wherein: When an update is further performed in another relay device connected to the second bus and an on-vehicle ECU of a third bus connected to the other relay device, The control unit performs rollback processing on the vehicle-mounted ECU of the second bus and the other relay devices at the same time, After the rollback process of the other relay device, the control unit performs the rollback process on the vehicle-mounted ECU of the third bus.
9. A computer program for causing a computer of an on-vehicle device to execute a process, The vehicle-mounted device is connected to a first bus, obtains an update program from outside the vehicle, and updates the programs of a relay device and a vehicle-mounted ECU. The first bus is connected to the relay device that relays inter-bus communication. In the process, when the update targets include the relay device and an in-vehicle ECU of a second bus connected to the relay device, the update of the relay device is performed preferentially.
10. A program updating method, causing a vehicle-mounted device to execute processing, The vehicle-mounted device is connected to a first bus, obtains an update program from outside the vehicle, and updates the programs of a relay device and a vehicle-mounted ECU. The first bus is connected to the relay device that relays inter-bus communication. In the process, when the update targets include the relay device and an in-vehicle ECU of a second bus connected to the relay device, the update of the relay device is performed preferentially.
