Patent Description:
In order to fix software bugs or to introduce improvements in the software, the software stored in the memory device may have to be updated. Such software updates may for example be carried out in a wireless manner by means of an over-the-air, OTA, update. Also for other reasons, the software may be replaced or a new software may be stored. In this context, it is desirable to verify the corresponding data, in particular the data integrity of the corresponding data, transmitted from a server computer to the vehicle via a corresponding communication network.

A blockchain may be considered as a data structure comprising a list of records, which are also denoted as blocks or data blocks, that are linked together using cryptographic methods, in particular cryptographic hashes. For example, each block may contain a cryptographic hash of its preceding block to link those two blocks. In this iterative manner, the integrity of the preceding block may be confirmed step-by-step until an initial or genesis block of the blockchain is reached.

For the verification, consensus algorithms, for example a proof-of-work algorithm as introduced by <NPL>, may be used. Further relevant prior art are patent documents <CIT> and <CIT>.

It is an objective of the present invention, to provide a possibility for storing or updating software on an electronic circuit of a vehicle, which improves the data integrity of data transmitted from an external server computer to the electronic circuit to provide the software or software update.

The invention is based on the idea to receive a data block from an external server computer by the electronic circuit and to request the verification of the data block at a plurality of external computing nodes. Depending on the result of the verification, a software program is stored, which depends on the verified data block, and a switch request is transmitted to a processing circuit of the electronic circuit to execute the stored software program.

According to an aspect of the invention, an electronic circuit for a vehicle, for example a motor vehicle, is provided. The electronic circuit comprises at least one memory device, which stores a first software program and the electronic circuit comprises a processing circuit, which is configured to read the at least one memory device and to execute the first software program. The at least one memory device also stores a data structure, which comprises one or more linked records. The electronic circuit comprises a network interface for connecting the electronic circuit to a communication network. The electronic circuit comprises at least one control circuit, which is configured to receive a data block from an external server computer via the communication network and, in particular, via the network interface. The at least one control circuit is configured to transmit a respective verification request to verify the data block to each of a plurality of external computing nodes via the communication network and, in particular, via the network interface. The at least one control circuit is configured to receive respective verification responses from each of at least a fraction of the plurality of external computing nodes via the communication network and, in particular, via the network interface, for example in response to the transmission of the respective verification requests.

The at least one control circuit is configured to update the data structure depending on the received verification responses, wherein updating the data structure is carried out by attaching a further record to the data structure, the further record comprising the data block. The at least one control circuit is configured to store a second software program to the at least one memory device depending on the updated data structure, if, for example if and only if, the data block corresponds to a final data block. The at least one control circuit is configured to transmit a switch request to the processing circuit after storing the second software program to the at least one memory device. The processing circuit is configured to read the at least one memory device and execute the second software program in response to the switch request.

The processing circuit may for example execute the first software program prior to receiving the switch request, for example only until the switch request is received. For example, the second software program may correspond to an updated version of the first software program. The second software program may be transmitted via the communication network from the external server computer to the electronic circuit in terms of a plurality of data blocks including the data block described above. In particular, the functionality and features of the electronic circuit described above with respect to the data block, in particular receiving the data block, transmitting the verification requests, receiving the verification responses and updating the data structure, may be carried out analogously for all further data blocks of the plurality of data blocks representing the second software program as well.

One of the plurality of data blocks corresponds to the final data block. The information that it is the final data block is for example stored in the final data block itself. Therefore, the at least one control circuit may determine whether the data block corresponds to the final data block and, if this is the case, determine that the updated data structure is a final version of the data structure, which corresponds to the second software program. If it is found that the data block is not the final data block, said steps may be carried out repeatedly for all of the further data blocks of the plurality of data blocks until the final data block is received and verified and the final version of the data structure is achieved accordingly.

The second software program may be identical to the final version of the data structure or the at least one control circuit may be configured to generate the second software program depending on the final version of the updated data structure and store it accordingly to the at least one memory device.

The plurality of external computing nodes may for example correspond to a plurality of further vehicles or, more specifically, to respective further electronic circuits of the plurality of further vehicles. Each of the further electronic circuits of the plurality of further vehicles may be implemented in the same way as described for the electronic circuit according to the invention.

The verification requests transmitted to the plurality of external computing nodes may for example comprise the data block itself. Consequently, each of the plurality of external computing nodes is able to carry out a verification algorithm to determine whether the data block is valid or not. The result of this verification algorithm, which may also be denoted as a corresponding vote of the external computing node, may be positive or negative and, in some implementations, also may comprise a weighting factor depending for example on a confidence level of the respective external computing node or other properties of the respective external computing node.

In particular, the verification responses comprise the result of the verification algorithm carried out by the respective external computing node or, in other words, the respective vote of the respective external computing node.

The at least one control circuit may determine whether a predefined verification condition is fulfilled by all of the received verification responses. The verification condition may for example be fulfilled, if a certain number of positive votes is receive, wherein the different weights of the external computing nodes may be considered when counting the positive votes, if applicable.

If the verification condition is fulfilled, the data block may be considered as verified. Consequently, if the verification condition is fulfilled, for example if and only if the verification is fulfilled, the data structure is updated as described above. On the other hand, if the verification condition is not fulfilled, the at least one control circuit may discard the data block and not attach it as a further record to the data structure.

By means of the electronic circuit according to the invention, the second software program may be received via the communication network, which may for example be a wireless or partly wireless communication network, in a way, which ensures a high level of data integrity of the transmitted data. This is achieved by implementing the described verification process involving the plurality of external computing nodes.

In particular, the concept of the blockchain technology or of a distributed ledger technology may be exploited on the level of the electronic circuit to ensure the high level of data integrity. The algorithms and methods for data verification that may be used by the at least one control circuit and the plurality of external computing nodes may per se be known for example from other applications of the blockchain technology. For example, the at least one control circuit and the external computing nodes may exchange and generate the verification requests and verification responses according to a known consensus algorithm such as for example a proof-of-work, POW, algorithm.

The invention is, however, not exhausted by using the blockchain technology. Rather, by combining the distributed verification process with the subsequent generation of the switch signal and execution of the second software program in response to that, a secure transition from the first to the second software program is achieved.

Furthermore, in the electronic circuit according to the invention, the at least one control circuit and its functionality are separated from the processing circuit, which may for example be a central processing circuit, CPU, of the electronic circuit. Consequently, an increased processing load of the processing circuit due to receiving and verifying the data corresponding to the second software program is avoided. In consequence, the processing circuit may use its full capabilities to execute the first software program while the second software program is being received from the external server computer and verified accordingly.

According to several implementations, the at least one control circuit comprises a hardwired configuration, which encodes a functionality of the at least one control circuit to transmit the verification requests and/or to receive the verification responses.

In other words, the functionality to transmit the verification requests and/or to receive the verification responses is implemented solely in hardware in such implementations.

By implementing said functionality by means of the hardwired configuration rather than by means of software of the at least one control circuit or the processing circuit, the robustness of the verification process may be significantly increased. Furthermore, the effort for programming software when developing a new generation or new version of the electronic circuit may be reduced. Therein, it may in particular be exploited that known standard algorithms for distributed verification of data blocks as for example in the blockchain technology may be used generically.

According to several implementations, the hardwired configuration or a further hardwired configuration of the at least one control circuit encodes a functionality to update the data structure and/or to determine whether the data block corresponds to the final data block.

In this way, the robustness of the update process is further improved.

According to several implementations, the at least one control circuit comprises a data block verification unit, which is configured to transmit the verification requests and to receive the verification responses.

In some implementations, the data block verification circuit may also be configured to update the data structure depending on the received verification responses and/or to store the second software program to the at least one memory device.

For example, the data block verification circuit may comprise the hardwired configuration and/or the further hardwired configuration.

According to several implementations, the at least one control circuit comprises a graphics processing circuit, GPU, or a co-processor or a field-programmable gate array, FPGA.

In particular, the GPU, co-processor or FPGA may contain the data block verification circuit and/or the hardwired configuration and/or the further hardwired configuration.

According to several implementations, the data structure corresponds to a blockchain data structure and an initial record of the one or more linked records corresponds to a genesis data block of the blockchain data structure.

For example, the genesis data block may additionally be stored separately from the data structure, for example in a secured storage location of the electronic circuit. In particular, the genesis data block may be stored previously to the electronic circuit in the secured storage location, for example when manufacturing or delivering the vehicle.

For example, each record of the data structure may have an associated hash value, which results from applying a predefined hash function to the respective record. Furthermore, each record may comprise the respective hash of the preceding record in its header. Consequently, the subsequent records may be linked by means of their hash values.

According to several implementations, the at least one control circuit is configured to generate the verification requests and transmit the verification requests according to a predefined consensus algorithm, in particular according to a proof-of-work algorithm.

Such consensus algorithms as the proof-of-work algorithm are known per se in the context of blockchain technology.

Analogously, the plurality of external computing nodes may generate and transmit the verification responses according to the same consensus algorithm.

According to several implementations, the network interface is designed as a network interface for wireless data communication.

In other words, the communication network is a wireless communication network or radio communication network. In such implementations, the invention is particularly beneficial since data transmission via wireless communication networks may be particularly prone to tampering or attacks.

According to several implementations, the at least one memory device comprises a non-volatile memory, which stores the first software program.

For example, the at least one control circuit may store the second software program also to the non-volatile memory.

For example, the at least one memory device may comprise a further memory storing the data structure and, in particular, the updated data structure. The non-volatile memory and the further memory may for example be physically separated from each other.

According to several implementations, the electronic circuit comprises a microcontroller or a system-on-a-chip, SoC, which contains the processing circuit and the at least one control circuit.

In some implementations, the microcontroller or SoC may contain further components of the electronic circuit, such as the at least one memory device, the non-volatile memory, the further memory, and/or the network interface or the microcontroller or SoC may contain the whole electronic circuit.

According to several implementations, the at least one control circuit is configured to transmit a backup request to the processing circuit after storing the second software program and the processing circuit is configured to store a backup of the first software program to the at least one memory device in response to the backup request.

According to several implementations, the at least one control circuit is configured to receive a further data block and a further verification request to verify the further data block from one of the plurality of external computing nodes via the communication network. The at least one control circuit is configured to verify the further block data in response to the further verification request according to the consensus algorithm and to transmit a further verification response to the one of the plurality of external computing nodes depending on the result of the verification of the further data block.

In such implementations, the electronic circuit also acts as an instance for verification itself. In other words, the role of the external computing nodes may be described as the role of miners in the context of blockchain technology. In respective implementations, also the electronic circuit itself acts as a miner.

For example, said functionalities of receiving the further data block and the further verification request, verifying the further data block and transmitting the further verification response may for example be encoded by the hardwired configuration as well.

The processing circuit and the at least one control circuit of the electronic circuit may also be denotes as respective computing units. A computing unit may in particular be understood as a data processing device, which comprises processing circuitry. The computing unit can therefore in particular process data to perform computing operations. This may also include operations to perform indexed accesses to a data structure, for example a look-up table, LUT.

In particular, the computing unit may include one or more computers, one or more microcontrollers, and/or one or more integrated circuits, for example, one or more application-specific integrated circuits, ASIC, one or more field-programmable gate arrays, FPGA, and/or one or more systems on a chip, SoC. The computing unit may also include one or more processors, for example one or more microprocessors, one or more central processing units, CPU, one or more graphics processing units, GPU, and/or one or more signal processors, in particular one or more digital signal processors, DSP. The computing unit may also include a physical or a virtual cluster of computers or other of said units.

In various embodiments, the computing unit includes one or more hardware and/or software interfaces and/or one or more memory units.

A memory unit may be implemented as a volatile data memory, for example a dynamic random access memory, DRAM, or a static random access memory, SRAM, or as a non-volatile data memory, for example a read-only memory, ROM, a programmable read-only memory, PROM, an erasable programmable read-only memory, EPROM, an electrically erasable programmable read-only memory, EEPROM, a flash memory or flash EEPROM, a ferroelectric random access memory, FRAM, a magnetoresistive random access memory, MRAM, or a phase-change random access memory, PCRAM.

According to a further aspect of the invention, an electronic control unit, ECU, for a vehicle is provided, wherein the ECU comprises the electronic control circuit according to an implementation of the invention.

According to a further aspect of the invention, a method for operating an electronic circuit of a vehicle is provided. The method comprises storing a first software program and a data structure comprising one or more linked records to at least one memory device of the electronic circuit and executing the first software program by a processing circuit of the electronic circuit. The method comprises receiving a data block from an external server computer by at least one control circuit of the electronic circuit via a communication network. The method comprises transmitting a respective verification request to verify the data block to each of a plurality of external computing nodes, in particular by the at least one control circuit via the communication network and to receive respective verification responses from each of at least a fraction of the plurality of external computing nodes via the communication network by the at least one control circuit.

The method comprises updating the data structure depending on the received verification responses by attaching a further record, which comprises the data block, to the data structure by the at least one control circuit, storing a second software program to the at least one memory device depending on the updated data structure by the at least one control circuit, if the data block corresponds to a final data block, and transmitting a switch request by the at least one control circuit to the processing circuit after storing the second software program. The method comprises executing the second software program in response to the switch request by the processing circuit.

According to several implementations, the first software program is executed by the processing circuit while the data packet is received by the at least one control circuit.

Further implementations of the method according to the invention follow directly from the various embodiments of the electronic circuit according to the invention and vice versa. In particular, individual features and corresponding explanations as well as advantages relating to the various implementations of the electronic circuit according to the invention can be transferred analogously to corresponding implementations of the method according to the invention. In particular, the electronic circuit according to the invention is designed or programmed to carry out the method according to the invention. In particular, the electronic circuit according to the invention carries out the method according to the invention.

If it is mentioned in the present disclosure that a component of the electronic circuit according to the invention, in particular the processing unit or the at least one control circuit of the electronic circuit, is adapted, configured or designed et cetera, to perform or realize a certain function, to achieve a certain effect or to serve a certain purpose, this can be understood such that the component, beyond being usable or suitable for this function, effect or purpose in principle or theoretically, is concretely and actually capable of executing or realizing the function, achieving the effect or serving the purpose by a corresponding adaptation, programming, physical design and so on.

For use cases or use situations which may arise in the method and which are not explicitly described here, it may be provided that, in accordance with the method, an error message and/or a prompt for user feedback is output and/or a default setting and/or a predetermined initial state is set.

In the following, the invention will be explained in detail with reference to specific exemplary implementations and respective schematic drawings. In the drawings, identical or functionally identical elements may be denoted by the same reference signs. The description of identical or functionally identical elements is not necessarily repeated with respect to different figures.

<FIG> shows schematically a vehicle <NUM>, for example a passenger car, which comprises an exemplary implementation of an electronic circuit <NUM> according to the invention. For example, the electronic circuit <NUM> may be part of an electronic control unit, ECU, <NUM> of the vehicle <NUM>.

The electronic circuit <NUM> may for example be implemented as a microcontroller or an SoC of the ECU <NUM>. Depending on the actual implementation, the ECU <NUM> and, in consequence, the electronic circuit <NUM>, may be used for different purposes, for example as a part of an electronic vehicle guidance system, such as an advanced driver assistance system, ADAS, or an autonomous driving system, ADS, and/or in order to control a sensor device <NUM>, an actuator or a motor of the vehicle <NUM> et cetera.

<FIG> shows schematically a block diagram of an exemplary implementation of the electronic circuit <NUM> for use in a vehicle as described with respect to <FIG>.

The electronic circuit <NUM> comprises a network interface <NUM> for connecting the electronic circuit <NUM> to a communication network, for example a wireless communication network. Therein, the electronic circuit <NUM> may for example access the communication network directly by means of the network interface <NUM> or via an additional device (not shown) of the vehicle <NUM>. The network interface <NUM> may then for example communicate with the additional device in a wired or wireless manner.

The electronic circuit <NUM> comprises a memory <NUM>, which is for example a non-volatile memory and which stores a first software program, and a further memory <NUM>, which stores a data structure, in particular a blockchain data structure, comprising one or more linked records. An initial record of the one or more linked records corresponds to a genesis data block of the blockchain data structure. The genesis may for example also be stored in a secured storage area <NUM> of the electronic circuit <NUM>.

The electronic circuit <NUM> further comprises a processing circuit <NUM>, which may for example be a CPU of the electronic circuit <NUM>. The processing circuit <NUM> is configured to execute the first software program upon reading the memory <NUM>.

The electronic circuit <NUM> comprises at least one control circuit <NUM>, <NUM>, which is configured to receive a data block from an external server computer (not shown) via the communication network and the network interface <NUM>. The at least one control circuit <NUM>, <NUM> is configured to transmit a respective verification request according to a predefined consensus algorithm, for example a proof-of-work, POW, algorithm, to verify the data block to each of a plurality of external computing nodes (not shown), such as further vehicles, via the communication network and the network interface <NUM>. In response to the verification requests, the at least one control circuit <NUM>, <NUM> may receive respective verification responses from the external computing nodes or a fraction of them via the communication network and the network interface <NUM>.

The at least one control circuit <NUM>, <NUM> may contain for example a data block verification circuit <NUM>, which may also be denoted as data block verification accelerator, for implementing the respective parts of the consensus algorithm, in particular for transmitting the verification requests and receiving the verification responses. This functionality may for example be hardwired in the data block verification circuit <NUM>.

The at least one control circuit <NUM>, <NUM> may also comprise an OTA sequence control unit <NUM>, which is configured to coordinate and control the receiving of the data block. Therein OTA stands for over-the-air.

The at least one control circuit <NUM>, <NUM> is configured to update the data structure depending on the received verification responses, in particular if the received verification responses indicate that a predefined verification condition is fulfilled. In order to update the data structure, the at least one control circuit <NUM>, <NUM> attaches a further record to the data structure, wherein the further data structure comprises the data block or consists of the data block.

In case the data block corresponds to a final data block, the at least one control circuit <NUM>, <NUM> stores a second software program to the memory device <NUM> depending on the updated data structure and transmits a switch request to the processing circuit <NUM> afterwards. Then, the processing circuit <NUM> may execute the second software program in response to the switch request. The switch request may for example be transmitted via an interfacing unit <NUM> of the electronic circuit <NUM>.

For example, the at least one control circuit <NUM>, <NUM> may be part of a hardware component <NUM> of the electronic circuit <NUM>. The hardware component <NUM> may also comprise the interfacing unit <NUM>, the secured storage area <NUM>, the network interface <NUM> and/or the further memory <NUM>. The hardware component <NUM> may for example be implemented as a hardware peripheral of the microcontroller or SoC in respective implementations, for example as a GPU, a co-processor or an FPGA.

Furthermore, in some implementations, the electronic circuit <NUM> may also comprise a hardware security module <NUM>.

<FIG> shows a flow diagram of an exemplary implementation of a method according to the invention.

In step S1 of the method, the genesis block may be stored to the electronic circuit <NUM>, for example the secured storage area <NUM>. This may for example be done by a vehicle manufacturer of the vehicle <NUM>. In step S2, a supplier of the second software program may initiate an update transaction by pushing a corresponding request to the external server computer and the supplier may share a file representing the second software program, for example a hex-file, to the external server computer in step S3. In step S4, the file may be signed by the external server computer.

Then, for each of a plurality of data blocks, steps S5 and S6 are carried out. In the respective step S5, the external server computer provides the corresponding data block to the vehicle <NUM> and in the respective step S6, the at least one control circuit <NUM>, <NUM> transmits the verification request and receives the verification responses and updates the data structure accordingly as described. If the final data block has been received, the at least one control circuit <NUM>, <NUM> stores the second software program in the corresponding step S6 as described.

In step S7, the at least one control circuit <NUM>, <NUM> may transmit a backup request to the processing circuit <NUM>, for example via the interfacing unit <NUM>. The processing circuit <NUM> may then store a backup of the first software program to the memory <NUM>. In step S8, the at least one control circuit <NUM>, <NUM> transmits the switch request and the processing circuit <NUM> may then execute the second software program.

As described, in particular with respect to the figures, the invention allows in several implementations to create a standardized method for flashing software to an electronic circuit, such as a microcontroller or an SoC, over-the-air using a blockchain platform.

Claim 1:
Electronic circuit (<NUM>) for a vehicle (<NUM>), wherein
- the electronic circuit (<NUM>) comprises at least one memory device (<NUM>, <NUM>), which stores a first software program and a data structure comprising one or more linked records, and a processing circuit (<NUM>), which is configured to execute the first software program;
- the electronic circuit (<NUM>) comprises a network interface (<NUM>) for connecting the electronic circuit (<NUM>) to a communication network and at least one control circuit (<NUM>, <NUM>), which is configured to receive a data block from an external server computer via the communication network;
- the at least one control circuit (<NUM>, <NUM>) is configured to transmit a respective verification request to verify the data block to each of a plurality of external computing nodes via the communication network and to receive respective verification responses from at least a fraction of the plurality of external computing nodes via the communication network;
- the at least one control circuit (<NUM>, <NUM>) is configured to update the data structure depending on the received verification responses by attaching a further record, which comprises the data block, to the data structure;
- the least one control circuit (<NUM>, <NUM>) is configured to determine whether the data block corresponds to the final data block and, if this is the case, determine that the updated data structure is a final version of the data structure, which corresponds to a second software program and store the second software program accordingly to the at least one memory device (<NUM>,<NUM>);
- the at least one control circuit (<NUM>, <NUM>) is configured to transmit a switch request to the processing circuit (<NUM>) after storing the second software program; and
- the processing circuit (<NUM>) is configured to execute the second software program in response to the switch request.