Patent Description:
On a vehicle, a network system is mounted in which a plurality of in-vehicle devices, referred to as electronic control units (ECUs), is connected to each other via communication lines. Each in-vehicle device transmits and receives a message to and from the other in-vehicle devices in order to divide and execute each function of the vehicle.

An in-vehicle device typically includes a transitory storage unit, such as a processor and a RAM, or a non-volatile storage unit, such as a flash ROM. A program (software) executed by the processor is stored in the non-volatile storage unit. By rewriting the program as a newer version thereof and updating it, it is possible to enhance and improve functions of the in-vehicle devices.

Program updating includes a step of downloading for receiving update data from an external apparatus (a center) using wireless communication and the like, and a step of installing for writing an update program (update software) based on the downloaded update data in a storage unit of the in-vehicle device. In installation, there are an overwriting installation for overwriting a current program (a previous program) with the downloaded update program according to specifications of an in-vehicle device in one area (one side: a single bank) defined as an area for program storage from among storage areas of a storage unit and an other-side installation for writing the downloaded update program in an area (the other side) that is not an area (one side) in which a current program (a previous program) is stored from among two areas (two sides: a dual bank) defined as an area for the program storage.

In a case of the other-side installation, the step of program updating includes, in addition to respective steps of downloading and installing, a step of activating for configuring setting values, such as a start address of the update program such that the installed update program is set as an execution version.

In association with program updating of an ECU, <CIT> (<CIT>) discloses a system that updates a program of an ECU with a version-up program transmitted from a server. In the system of <CIT>, when the program of the ECU is updated, whether a consistency between a program version after updating and a program version of another ECU is attained is confirmed, and an inconsistency in the versions due to the updating is prevented.

<CIT> discloses a system in which each ECU includes a program backup area, a current program is stored as a previous program in the backup area before updating with a version-up program, and, in a case where a defect occurs in an ECU after updating with the version-up program, the previous program stored in the backup area is used, whereby a state is returned to a state where the ECU has operated normally.

In order for the network system to function normally, it is necessary for a combination of program versions of a plurality of ECUs to be a combination in which their operations are guaranteed in advance (a combination in which a consistency is attained). Therefore, in a case where a program updating fails or in a case where a user desires to download a program, it is desirable not only to return the program of a specific ECU to a previous version, but also to execute transition to a state where the consistency in all program versions of a plurality of in-vehicle devices is attained and their operations are guaranteed.

The present invention provides, a software update apparatus, a software update method, a non-transitory storage medium storing a program, and a vehicle that can return updated software of an electronic control unit to the software before the updating while ensuring consistency in all the program versions of a plurality of in-vehicle devices and their operations are guaranteed in program updating of an in-vehicle device.

A software update apparatus according to a first aspect of the present invention is provided according to claim <NUM>.

In the first aspect, the control unit may restrict a predetermined operation of a vehicle, at least during the process for attaining the consistency.

In the first aspect, the control unit may start a restriction on the predetermined operation of the vehicle before the returning of the updated software of the designated electronic control unit to the software before the updating, acquire software versions of the electronic control units after the returning of the updated software of the designated electronic control unit to the software before the updating, and release the restriction on the predetermined operation of the vehicle when the consistency in the acquired combination is confirmed.

In the first aspect, the control unit may acquire, when an electronic control unit that stores the software before the updating receives a designation for setting the software before the updating as an execution version, the software versions of the electronic control units, and control, in a case where, in the combination of the acquired versions, there is the consistency in the combination of versions even when the software version of the designated electronic control unit is set as the software version before the updating, the electronic control unit such that the electronic control unit sets the software before the updating as the execution version.

In the first aspect, a function of the control unit may be implemented in software of two or more electronic control units, respectively or in software, which is separate from software to be updated, of one electronic control unit from among the electronic control units.

A second aspect of the present invention is a software update method according to claim <NUM>.

A third aspect of the present invention is a non-transitory storage medium according to claim <NUM>.

A fourth aspect of the present invention is a vehicle including the software update apparatus.

The software update apparatus of the first aspect may be an OTA master.

With each aspect of the present invention, in program updating of an in-vehicle device, since a consistency in a combination of program versions of a plurality of in-vehicle devices is confirmed, it is possible to execute transition to a state where a consistency in all program versions of the plurality of in-vehicle devices is attained and an operation of a network system is guaranteed.

<FIG> illustrates a configuration diagram of a network system <NUM> according to one embodiment. The network system <NUM> is mounted on a vehicle. The network system <NUM> includes a software update apparatus <NUM>. A plurality of buses <NUM>, <NUM>, <NUM>,. is connected to the software update apparatus (an OTA master) <NUM>. A plurality of in-vehicle devices (electronic control units) <NUM>, <NUM>,. is connected to the bus <NUM>. A plurality of in-vehicle devices <NUM>, <NUM>,. is connected to the bus <NUM>. A plurality of actuators <NUM>, <NUM>,. is connected to the bus <NUM>. In <FIG> and the following descriptions, the buses <NUM>, <NUM>, <NUM> are exemplified as buses, the in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM> are exemplified as in-vehicle devices, and actuators <NUM>, <NUM> are exemplified as actuators, but the number of buses, in-vehicle devices, or actuators is not limited.

The software update apparatus <NUM> includes a communication unit (a communication module) <NUM>, which can communicate with an external apparatus <NUM> (a center) provided outside the vehicle, and a control unit <NUM> that controls updating of programs of the respective in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM> based on update data provided from the external apparatus <NUM>. The software update apparatus <NUM> is typically a computer that includes a non-volatile storage unit (a storage) <NUM>, such as a flash ROM, a processor that executes various processes by reading a program from the non-volatile storage unit and executing it, and a transitory storage unit, such as a RAM, that stores a part of a program or data. The software update apparatus <NUM> also controls or relays communication between the external apparatus <NUM> and the respective in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM>, communication between the in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM>, communication between the respective in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM> and the respective actuators <NUM>, <NUM> via the respective buses <NUM>, <NUM>, <NUM>. In this manner, the software update apparatus <NUM> also functions as a relay apparatus that relays communication.

The respective in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM> communicate with each other to execute various processes for controlling the vehicle. Similar to the software update apparatus <NUM>, these in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM> are typically computers that include storage units (storages) and processors, respectively.

The actuators <NUM>, <NUM> are devices that cause a vehicle or its parts, such as a brake, an engine, or a power steering device, to generate a mechanical action and operate based on instructions from the in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM>.

The control unit <NUM> of the software update apparatus <NUM> can update the programs stored in the respective storage units of the in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM>. In other words, the software update apparatus <NUM> executes controls for downloading, installation, or further, activation. The downloading is a process for receiving and storing update data (a distribution package) for updating any of the programs of the in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM>, which is transmitted from the external apparatus <NUM>. A control for downloading can include not only execution of the downloading but also controls of a series of processes associated with the downloading, such as a determination on whether the execution of the downloading is possible and verification of the update data. Installation is a process for writing a program (update software) of an updated version on a storage unit of an in-vehicle device to be updated, based on downloaded update data. A control for installation can include not only execution of the installation but also controls of a series of processes associated with the installation, such as a determination on whether the execution of the installation is possible, sending the update data, and verification of the updated version of the program. Activation is a process for making the updated version of the installed program effective (activate). A control for activation can include not only execution of the activation but also controls of a series of processes associated with the activation, such as a determination on whether the execution of the activation is possible and verification of a result of the execution.

In the control for installation, when the update data includes an update program itself, the control unit <NUM> can transmit the update program to the in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM>. Alternatively, when the update data includes compressed data, difference data, or divided data of the update program, the control unit <NUM> may generate the update program by, for example, developing or assembling the update data and transmit it to the in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM>. Alternatively, the control unit <NUM> may transmit the update data to the in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM>, and the in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM> may generate the update program by, for example, developing or assembling the update data.

The installation itself for writing the update program on a second storage unit of the in-vehicle device may be executed by the control unit <NUM>, by the in-vehicle device that has received an instruction from the control unit <NUM>, or autonomously by the in-vehicle device that has received the update data (or the update program) without the explicit instruction from the control unit <NUM>.

The activation itself for making the installed update program effective may be executed by the control unit <NUM>, by the in-vehicle device that has received an instruction from the control unit <NUM>, or autonomously by the in-vehicle device without the explicit instruction from the control unit <NUM>, following the installation.

Such a program updating process can be executed continuously or in parallel for each of the plurality of in-vehicle devices <NUM>, <NUM>, <NUM>, <NUM>.

Hereinbelow, an example of a process that may be carried out in combination with the claimed invention will be described. <FIG> is a flowchart illustrating an example of a software updating process executed by the software update apparatus <NUM>. This process is started when, for example, the software update apparatus <NUM> requests the update data from the external apparatus <NUM>.

(Step S101) The communication unit <NUM> receives, from the external apparatus <NUM>, the update data for updating one or more programs of the in-vehicle devices included in the vehicle. The control unit <NUM> stores the update data in the storage unit of the software update apparatus <NUM> (downloading).

In response to an inquiry from the software update apparatus <NUM>, the external apparatus <NUM> determines whether the updated versions of the programs of in-vehicle devices exist among the programs provided to the external apparatus <NUM> based on types or current program versions of the in-vehicle devices that the external apparatus <NUM> has stored in advance or that is acquired from the software update apparatus <NUM>. Here, the in-vehicle devices refers to in-vehicle devices included in the network system <NUM>. When the updated program version is provided, the external apparatus <NUM> generates the update data based on the updated version of the provided program and provides the generated update data to the software update apparatus <NUM>. Upon successfully updating all the programs based on the update data, the external apparatus <NUM> generates the update data such that the consistency in the program versions of all the in-vehicle devices included in the network system <NUM> is attained.

(Step S102) The control unit <NUM> restricts an operation of the vehicle. For example, when the in-vehicle device executes the above-described overwriting installation or activation, the operation of the in-vehicle device may be influenced and the control of the vehicle by the network system <NUM> may also be influenced. For this reason, in this step, the control unit <NUM> may stop or prohibit a predetermined operation of the vehicle, which is defined as an operation that should not be influenced, such as engine driving, so as to prevent an unexpected behavior. The control unit <NUM> may postpone such a restriction on the predetermined operation and processes after this step until the user permits it. When the type of all the in-vehicle devices of which the programs are to be updated is the above-described dual bank type, the control unit <NUM> may restrict the predetermined operation after the execution of the above-described other-side installation and before the execution of the activation.

(Step S103) The control unit <NUM> controls the communication unit <NUM> such that the in-vehicle device of which the program is to be updated executes, based on the update data, the installation, activation, or the like. In other words, when the type of the in-vehicle device is the above-described single bank type, the control unit <NUM> causes the in-vehicle device to execute the overwriting installation. On the other hand, when the type of the in-vehicle device is the dual bank type, the control unit <NUM> causes the in-vehicle device to execute the other-side installation and activation in order.

(Step S104) The control unit <NUM> acquires information indicating a current program version from each in-vehicle device via the communication unit <NUM>.

(Step S105) The control unit <NUM> determines whether there is a consistency in a combination of the acquired versions. For example, when the acquired versions include all the versions of the update versions of the programs that are included in the update data, the control unit <NUM> can determine that there is the consistency in the acquired versions. Otherwise, the control unit <NUM> can determine that an abnormality has occurred in any of the in-vehicle devices for some reason in the program updating process or thereafter. When the program has been successfully updated, the process proceeds to step S109. Otherwise, the process proceeds to step S106.

(Step S106) For example, the control unit <NUM> compares the combination of the acquired versions with the versions of the updated versions of the programs included in the update data, and specifies an in-vehicle device that causes an inconsistency in the versions.

(Step S107) The control unit <NUM> repeats the same process as in step S103 to each in-vehicle device that causes the inconsistency, and re-executes the updating. Alternatively, when the in-vehicle device that causes the inconsistency is the in-vehicle device that executes the other-side installation (the dual bank) and stores the program before the updating (the program that has been executed until now), the control unit <NUM> may cause the in-vehicle device to execute a process for configuring the setting (a recovery process) such that the in-vehicle device continuously executes the program before the updating. Even the program before the updating is often consistent with the program versions of other in-vehicle devices. When executing such a recovery process, the control unit <NUM> may acquire program versions of a plurality of in-vehicle devices, and in a combination of the acquired versions, may cause the in-vehicle device that is to execute the recovery process to execute the recovery process after confirming that there is the consistency in the combination of the versions even when the program version of the in-vehicle device is set as the version of the program before the updating.

(Step S108) In the same manner as in step S104, the control unit <NUM> acquires the information indicating the current program version from each in-vehicle device and confirms that there is the consistency in the combination of the current program versions. The consistency is confirmed when, for example, the acquired versions include all the versions of the updated versions of the programs that are included in the update data, and the control unit <NUM> can determine that the program has been successfully updated. Alternatively, when some of the in-vehicle devices have executed the recovery process, the control unit <NUM> may transmit, to the external apparatus <NUM>, the combination of the current program versions and inquire whether there is the consistency therein. The external apparatus <NUM> can determine whether there is the consistency in the combination of the program versions by referring to a table, given in advance, of a plurality of combinations of the versions, of which the consistency has been attained. Alternatively, the control unit <NUM> may acquire and store such a table from the external apparatus <NUM> together with the update data in advance, and confirm the consistency in the combination of the current program versions by referring to the table.

In this step, when the control unit <NUM> cannot confirm that there is the consistency in the combination of the current program versions, the control unit <NUM> may repeat steps S107 and S108 until there is the consistency. For example, when the control unit <NUM> cannot confirm the consistency even after re-executing the updating a plurality of number of times, the control unit <NUM> may cause the in-vehicle devices to execute the recovery process. Further, when the control unit <NUM> cannot confirm the consistency even after repeating steps S107 and S108 a predetermined number of times, there is a probability that a non-temporary abnormality has occurred in the software update apparatus <NUM> or the in-vehicle device, or, as a result of the recovery process, there is the inconsistency between the version and the program version after the updating of the other in-vehicle devices. Thus, the control unit <NUM> takes a measure, such as notifying the user of the occurrence of an abnormality. When such an abnormality occurs, in a case where all the in-vehicle devices store the programs before the updating, the control unit <NUM> may cause all the in-vehicle devices to execute the recovery process.

(Step S109) The control unit <NUM> releases the restriction on the operation of the vehicle, executed in step S102. Then, the process ends. In the installation, when the update data includes the update program itself, the control unit <NUM> transmits the update program to the in-vehicle device. Further, when the update data includes the compressed data, the difference data, or the divided data of the update program, the control unit <NUM> may generate the update program by, for example, developing or assembling the update data and transmit it to the in-vehicle device. Alternatively, the control unit <NUM> may transmit the update data to the in-vehicle device, and the in-vehicle device may generate the update program by, for example, developing or assembling the update data. The external apparatus <NUM> or the software update apparatus <NUM> may explicitly instruct the in-vehicle device to execute the installation or the activation, the in-vehicle device may execute these processes based on the instruction, or the in-vehicle device that has received the update data (or the update program) may autonomously execute these processes without the explicit instruction.

As described above, since the operation of the vehicle is restricted without completing the updating process until confirming the consistency in the combination of the program versions of the respective in-vehicle devices, in a case where the program updating fails, it is possible to attain the consistency in the versions while preventing an unexpected behavior of the vehicle.

Further, since the updating is re-executed even when the program updating fails once, a probability of finally updating the program successfully can be increased.

Further, since the program before the updating can be used with a premise that the consistency in the combination of the program versions of the respective in-vehicle devices can be confirmed even when the program updating fails, the operation of the network system <NUM> can be guaranteed.

After the program is successfully updated, a user may desire to return a program of a specific in-vehicle device to a program before the updating. This is carried out in accordance with the claimed invention. In such a case, the control unit <NUM> receives a designation on the in-vehicle device from the user and returns the program of the in-vehicle device to the program before the updating. When the in-vehicle device stores the program before the updating, such a process can be executed by configuring the setting such that the in-vehicle device sets the program before the updating as the execution version. In this case, the control unit <NUM> acquires the program versions of the plurality of in-vehicle devices, and when the control unit <NUM> can confirm that there is the consistency in the combination of the acquired versions even if the control unit <NUM> returns the program version of the designated in-vehicle device to the program before the updating, the control unit <NUM> configures the setting. As such, according to the desire of the user, it is possible to download the program with a premise that the consistency in the combination of the program versions of the respective in-vehicle devices can be confirmed. During the execution of this process, the control unit <NUM> may also restrict a predetermined operation of the vehicle, and release the restriction after confirming the consistency in the versions similar to step S108.

As described above, when there is the inconsistency in the combination of the program versions acquired after executing the program installation (in the case of the single bank), or the installation and the activation (in the case of the dual bank), the control unit <NUM> determines that the program version cannot be notified to the control unit <NUM> as a result of an occurrence of some abnormality, such as an error in the process for updating the program of any of the in-vehicle devices or a defect in the program provided as the updated version of the program in any of the in-vehicle devices even when there is no error in the process for installing or activating the program of any of the in-vehicle devices. The control unit <NUM> specifies the in-vehicle device as an in-vehicle device that causes the inconsistency in the versions. As such, in the present embodiment, even in a case where the inconsistency in the versions occurs as a result of an occurrence of some abnormality in the in-vehicle device not only in the process for updating the program but also in the processes thereafter when, for example, the type of the in-vehicle device is a dual bank type and stores the program before the updating, it is possible to execute a return to the state before the updating where no abnormality occurs and where the consistency in the combination of the program versions is attained. As such, even when some abnormality occurs after the program updating, it is possible to certainly and quickly execute a return to a normal state where the operation is guaranteed without spending time and incurring costs on determining whether there is a defect in the program. Further, in each in-vehicle device, when some abnormality occurs, caused by or accompanied by the program updating, such as an error in program installation or activation, or a defect in the program, the control unit <NUM> may determine whether the in-vehicle device causes the inconsistency in the versions using one or more other methods, such as a result of self-diagnosis of the in-vehicle device and monitoring of the operation of the in-vehicle device by the control unit <NUM> in addition to the program version. The determination method is not limited thereto.

Although one example of the embodiment has been described above, the functions of the control unit <NUM> may be provided in one of the in-vehicle devices. For example, the functions may be implemented in respective programs of two or more in-vehicle devices, or in a program, which is separate from the program to be updated, of one in-vehicle device, from among a plurality of in-vehicle devices. In this manner, it is not necessary to provide a dedicated configuration for the functions of the control unit <NUM>. Further, when the functions of the control unit <NUM> are implemented in respective programs of two or more in-vehicle devices and the program of one of the in-vehicle devices is updated from among the plurality of in-vehicle devices, the other in-vehicle device can execute the functions of the control unit <NUM>. Alternatively, when the functions are implemented in a program, which is separate from the program to be updated, of one in-vehicle device and the program of the in-vehicle device is updated, the in-vehicle device can execute the functions of the control unit <NUM> without being hindered by the processing.

As above, according to the embodiment of the present invention, a software update apparatus confirms a consistency in a combination of program versions of a plurality of in-vehicle devices. Thus, by a program updating process, it is possible to execute transition to a state where the consistency in the versions of all the programs of the plurality of in-vehicle devices is attained and their operations are guaranteed.

The disclosed technology can be regarded as not only a software update apparatus, but also a network system including the software update apparatus, a method executed by a computer included in the software update apparatus, a program and a non-transitory computer-readable storage medium storing the program, and a vehicle including the software update apparatus.

Claim 1:
A software update apparatus (<NUM>) comprising:
a communication unit (<NUM>) configured to send a request for downloading update data to a center (<NUM>), the update data including update software or data for generating update software;
a storage unit (<NUM>) configured to store the downloaded update data; and
a control unit (<NUM>) configured to execute (S103), based on the update data, a control for installing, or installing and activating update software on one or more target electronic control units from among a plurality of electronic control units (<NUM>, <NUM>, <NUM>, <NUM>) connected to each other via an in-vehicle network,
wherein the control unit (<NUM>) is configured to acquire software versions of the plurality of electronic control units (<NUM>, <NUM>, <NUM>, <NUM>), and the control unit (<NUM>) is configured to return the updated software of a designated electronic control unit designated by a user to the software before the updating when the control unit (<NUM>) confirms that there is a consistency in the combination of the acquired software versions even if the control unit (<NUM>) returns the software version of the designated electronic control unit to the software before the updating.