Middleware device and method for smart cockpit based on Android system

By using the encryption and decryption mechanism of the intelligent cockpit middleware device, the problem of low data transmission security between the vehicle controller and ECU equipment is solved, thereby improving the security of data transmission.

CN115037463BActive Publication Date: 2024-10-11JINTU COMPUTING TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210612177.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2024-10-11
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

The data transmission between the vehicle controller and ECU in existing vehicles has low security and is easily attacked and tampered with, affecting the safety of vehicle operation.

Method used

A middleware device for an intelligent cockpit based on the Android system is provided, including a network communication module, a CAN bus interface module, and a control module. It ensures the security of data transmission by encrypting and decrypting control commands and feedback data.

Benefits of technology

Encrypted data transmission between the vehicle controller and the ECU device is achieved, preventing tampering and improving the security of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115037463B_ABST
    Figure CN115037463B_ABST
Patent Text Reader

Abstract

The present application discloses a middleware device and method for a smart cockpit based on an Android system, and belongs to the field of network security technology. The middleware device includes a control module, which is used to receive control instructions from a vehicle controller, decrypt the encrypted control data in the control instructions, obtain decrypted control data, and send the decrypted control data to the corresponding ECU device, so that the ECU device controls the vehicle to perform a target operation according to the decrypted control data; receive the execution feedback data sent by the ECU device after the vehicle performs the target operation, encrypt the execution feedback data, obtain encrypted execution feedback data, and send the encrypted execution feedback data to the vehicle controller, so that the vehicle controller monitors the vehicle according to the encrypted execution feedback data. The middleware device realizes the encrypted transmission of data between the vehicle controller and the ECU device, ensures that the data will not be attacked and tampered with during the transmission process, and improves the security of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security protection technology, and in particular to an Android-based middleware device and method for a smart cockpit. Background Art

[0002] With the development of intelligence and informatization, the electrical system of vehicles has become increasingly complex. At present, vehicles generally have dozens of ECU (electronic control unit) devices. The above-mentioned ECU devices are connected to the vehicle controller through the network. The ECU device controls the vehicle to perform target operations according to the control instructions issued by the vehicle controller, and the vehicle controller monitors the vehicle status according to the execution feedback data uploaded by the ECU device. However, the data transmitted between the vehicle controller and the ECU device of existing vehicles is vulnerable to attacks and tampering due to the lack of security monitoring, which in turn affects the safety of vehicle operation. In other words, the data transmission security between the vehicle controller and the ECU device of existing vehicles is low. Summary of the invention

[0003] The main purpose of this application is to provide a middleware device and method for an intelligent cockpit based on the Android system, aiming to solve the technical problem of low security of data transmission between the vehicle controller and the ECU device of existing vehicles.

[0004] To achieve the above-mentioned purpose, the present application provides a middleware device of an intelligent cockpit based on an Android system, comprising: a network communication module, a CAN bus interface module and a control module, wherein the control module is connected to the network communication module and the CAN bus interface module respectively;

[0005] The network communication module is used to establish a network connection between the middleware device and the vehicle controller;

[0006] The CAN bus interface module is used to connect the middleware device with one or more ECU devices via the CAN bus;

[0007] The control module is used to receive control instructions from the vehicle controller through the network communication module, wherein the control instructions include encrypted control data, decrypt the encrypted control data in the control instructions to obtain decrypted control data, and send the decrypted control data to the corresponding ECU device, so that the ECU device controls the vehicle to perform a target operation according to the decrypted control data; and receive execution feedback data sent by the ECU device after the vehicle performs a target operation through the CAN bus interface module, encrypt the execution feedback data to obtain encrypted execution feedback data, and send the encrypted execution feedback data to the vehicle controller, so that the vehicle controller monitors the vehicle according to the encrypted execution feedback data.

[0008] Optionally, the middleware device further includes a key storage unit, wherein the key storage unit includes a plurality of public-private key pairs I and a plurality of public-private key pairs II;

[0009] The plurality of public-private key pairs I correspond to the instruction types of the control instructions, respectively, so that the control module is used to obtain the public key I corresponding to the instruction type according to the instruction type of the control instruction, and decrypt the encrypted control data based on the public key I to obtain the decrypted control data;

[0010] The plurality of public-private key pairs II correspond to respective tokens used to characterize the identity of the ECU device, so that the control module is used to obtain the public key II corresponding to the token according to the token carried by the execution feedback data, and encrypt the execution feedback data based on the public key II to obtain encrypted execution feedback data.

[0011] Optionally, the control module is also used to update the public-private key pair I when the number of times the public-private key pair I is used meets a first number threshold, and send the updated private key I to the vehicle controller; and to update the public-private key pair II when the number of times the public-private key pair II is used meets a second number threshold, and send the updated private key II to the vehicle controller.

[0012] In addition, to achieve the above purpose, the present application also provides a middleware method for a smart cockpit based on an Android system, comprising the following steps:

[0013] Receiving a control instruction from a vehicle controller, wherein the control instruction includes encrypted control data;

[0014] decrypting the encrypted control data in the control instruction to obtain decrypted control data;

[0015] sending the decrypted control data to a corresponding ECU device so that the ECU device controls the vehicle to perform a target operation according to the decrypted control data; and

[0016] Receiving execution feedback data sent by the ECU device after the vehicle executes the target operation;

[0017] Encrypting the execution feedback data to obtain encrypted execution feedback data;

[0018] The encrypted execution feedback data is sent to the vehicle controller, so that the vehicle controller monitors the vehicle according to the encrypted execution feedback data.

[0019] Optionally, the step of decrypting the encrypted control data in the control instruction to obtain decrypted control data includes:

[0020] According to the instruction type of the control instruction, obtaining a public key I corresponding to the instruction type;

[0021] The encrypted control data is decrypted based on the public key I to obtain decrypted control data.

[0022] Optionally, the step of decrypting the encrypted control data based on the public key I to obtain decrypted control data includes:

[0023] Decrypting the encrypted control data based on the public key I to obtain decrypted data;

[0024] According to a preset authentication rule, the decrypted data is divided into verification data and decryption control data; and the step of sending the decrypted control data to a corresponding ECU device comprises:

[0025] When the verification data is consistent with the benchmark data, the decryption control data is sent to the corresponding ECU device.

[0026] Optionally, the step of dividing the decrypted data into verification data and decryption control data according to a preset authentication rule comprises:

[0027] When the first character of the decrypted data is an odd number, the first character of the decrypted data is removed to obtain first data, the first N characters encoded as odd numbers in the first data are extracted as verification data, and the characters in the first data except the verification data are used as decryption control data;

[0028] When the first character of the decrypted data is an even number, the first character of the decrypted data is removed to obtain the first data, the first N characters encoded as even numbers in the first data are extracted as verification data, and the characters in the first data except the verification data are used as decryption control data.

[0029] Optionally, the step of encrypting the execution feedback data to obtain encrypted execution feedback data includes:

[0030] According to the token carried by the execution feedback data, obtaining a public key II corresponding to the token;

[0031] The execution feedback data is encrypted based on the public key II to obtain encrypted execution feedback data.

[0032] Optionally, after the step of decrypting the encrypted control data based on the public key I to obtain the decrypted control data, the method further includes:

[0033] When the number of times the public key I is used meets a first number threshold, the public key I and its corresponding private key I are updated, and the updated private key I is sent to the vehicle controller.

[0034] Optionally, after the step of encrypting the execution feedback data based on the public key II to obtain the encrypted execution feedback data, the method further includes:

[0035] When the number of times the public-private key pair II is used meets a second number threshold, the public key II and its corresponding private key II are updated, and the updated private key II is sent to the vehicle controller.

[0036] The present application discloses a middleware device and method for a smart cockpit based on an Android system, which is compared with the low security of data transmission between the vehicle controller and the ECU device in the prior art. The control module included in the middleware device is used to receive control instructions from the vehicle controller through the network communication module, wherein the control instructions include encrypted control data, decrypt the encrypted control data in the control instructions, obtain decrypted control data, and send the decrypted control data to the corresponding ECU device, so that the ECU device controls the vehicle to perform the target operation according to the decrypted control data; and receive the execution feedback data sent by the ECU device after the vehicle performs the target operation through the CAN bus interface module, encrypt the execution feedback data, obtain encrypted execution feedback data, and send the encrypted execution feedback data to the vehicle controller, so that the vehicle controller monitors the vehicle according to the encrypted execution feedback data. In other words, the middleware device realizes the encrypted transmission of data between the vehicle controller and the ECU device, ensures that the data will not be attacked and tampered with during the transmission process, and improves the security of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0039] Figure 1 This is a functional module diagram of an embodiment of a middleware device for a smart cockpit based on an Android system of the present application;

[0040] Figure 2This is a signaling interaction diagram between the middleware device of this application and the vehicle controller and ECU equipment;

[0041] Figure 3 This is a flow chart of the first embodiment of the middleware method for the smart cockpit based on the Android system of this application;

[0042] Figure 4 This is a flow chart of the second embodiment of the middleware method for the smart cockpit based on the Android system of this application.

[0043] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0045] The present application embodiment provides a middleware device for a smart cockpit based on an Android system. Figure 1 and Figure 2 , Figure 1 This is a functional module diagram of the first embodiment of the middleware device for the smart cockpit based on the Android system of this application. Figure 2 This is a signaling interaction diagram between the middleware device of this application and the vehicle controller and ECU equipment.

[0046] In this embodiment, the middleware device of the smart cockpit based on the Android system includes: a network communication module 10, a CAN bus interface module 20 and a control module 30, and the control module is connected to the network communication module and the CAN bus interface module respectively.

[0047] The network communication module is used for network connection between the middleware device and the vehicle controller.

[0048] In this embodiment, the network used by the network communication module may be a cellular network, a local area network, or the like.

[0049] The CAN bus interface module is used to connect the middleware device to one or more ECU devices via the CAN bus.

[0050] It should be noted that the CAN bus interface module includes multiple CAN bus interfaces, and each CAN bus interface is connected to one or more ECU devices through a CAN bus. For example, when the CAN bus is a powertrain CAN bus, the powertrain CAN bus can be connected to the engine control module, electronic airbag, battery management system and electronic parking system; when the CAN bus is a chassis control CAN bus, the chassis control CAN bus can be connected to the anti-lock braking system, the body electronic stability system and the electronic steering power system; when the CAN bus is a body control CAN bus, the body control CAN bus can be connected to the air conditioner, 360-degree surround view, engine anti-theft system, tire pressure monitoring system and body control system (sunroof, windows, wipers, turn signals, fog lights); when the CAN bus is an entertainment system CAN bus, the entertainment system CAN bus can be connected to the vehicle entertainment system and the instrument cluster; when the CAN bus is a diagnostic control CAN bus, the diagnostic control CAN bus is only connected to one ECU device.

[0051] The control module is used to receive control instructions from the vehicle controller through the network communication module, wherein the control instructions include encrypted control data, decrypt the encrypted control data in the control instructions to obtain decrypted control data, and send the decrypted control data to the corresponding ECU device, so that the ECU device controls the vehicle to perform a target operation according to the decrypted control data; and receive execution feedback data sent by the ECU device after the vehicle performs a target operation through the CAN bus interface module, encrypt the execution feedback data to obtain encrypted execution feedback data, and send the encrypted execution feedback data to the vehicle controller, so that the vehicle controller monitors the vehicle according to the encrypted execution feedback data.

[0052] It should be noted that, in this embodiment, the processor in the control module is an Android system processor.

[0053] Furthermore, the middleware device also includes a key storage unit 40, which includes a plurality of public-private key pairs I and a plurality of public-private key pairs II.

[0054] Among them, several public-private key pairs I correspond to the instruction type of the control instruction respectively, so that the control module is used to obtain the public key I corresponding to the instruction type according to the instruction type of the control instruction, and decrypt the encrypted control data based on the public key I to obtain the decrypted control data.

[0055] In this embodiment, the instruction type of the control instruction includes operation control instruction, entertainment control instruction, brake control instruction and body control instruction, etc. Each type of control instruction has its corresponding public-private key pair I. When the middleware device is connected to the vehicle controller, the private key I in the public-private key pair I is sent to the vehicle controller by the middleware device in the form of private key I-instruction type. In the vehicle control, when the vehicle controller generates a control instruction, according to the instruction type of the control instruction, the corresponding private key I is selected to encrypt the control data in the control instruction to obtain encrypted control data, and the encrypted control data is used to replace the original control data in the control instruction.

[0056] In this embodiment, the encrypted control data is decrypted based on the public key I to obtain the decrypted control data, including:

[0057] Decrypt the encrypted control data based on public key I to obtain decrypted data;

[0058] According to preset authentication rules, the decrypted data is divided into verification data and decryption control data.

[0059] In this embodiment, the private key I and the public key I may be a key pair of a symmetric encryption algorithm. That is, in this embodiment, a symmetric encryption algorithm is used to encrypt and decrypt the control data in the control instruction.

[0060] Specifically, according to the preset authentication rules, the decrypted data is divided into verification data and decryption control data, including:

[0061] When the first character of the decrypted data is an odd number, the first character of the decrypted data is removed to obtain the first data, the first N characters encoded as odd numbers in the first data are extracted as verification data, and the characters in the first data except the verification data are used as decryption control data;

[0062] When the first character of the decrypted data is an even number, the first character of the decrypted data is removed to obtain the first data, the first N characters encoded as even numbers in the first data are extracted as verification data, and the characters in the first data except the verification data are used as decryption control data.

[0063] In this embodiment, the decrypted control data is sent to the corresponding ECU device, including:

[0064] When the verification data is consistent with the benchmark data, the decrypted control data is sent to the corresponding ECU device.

[0065] Furthermore, when the verification data is inconsistent with the benchmark data, it means that the control data in the control instruction has been tampered with during the transmission process. At this time, the middleware device sends an anti-virus instruction and a resend instruction to the vehicle controller. The anti-virus instruction is used to control the vehicle controller to perform an anti-virus operation on the communication network between the vehicle controller and the middleware device, and the resend instruction is used to control the vehicle controller to resend the control instruction after performing an anti-virus operation on the communication network.

[0066] Among them, several public-private key pairs II correspond to tokens used to characterize the identity of the ECU device, so that the control module is used to obtain the public key II corresponding to the token according to the token carried by the execution feedback data, and encrypt the execution feedback data based on the public key II to obtain encrypted execution feedback data.

[0067] In this embodiment, different ECU devices have their corresponding tokens for representing identities, and each token has its corresponding public-private key pair II. When the middleware device is connected to the vehicle controller, the private key II in the public-private key pair II is sent to the vehicle controller by the middleware device in the form of private key II-token. When the ECU device controls the vehicle to perform the target operation according to the decrypted control data, it generates execution feedback data and uploads the execution feedback data to the control module of the middleware device. The control module selects the corresponding public key II according to the token of the ECU device that uploaded the execution feedback data to encrypt the execution feedback data, obtain the encrypted execution feedback data, and associate the encrypted execution feedback data with the token and send it to the vehicle controller.

[0068] After receiving the encrypted execution feedback data, the vehicle controller selects the corresponding private key II according to its associated token to decrypt the encrypted execution feedback data, obtains the execution feedback data, and monitors the vehicle status based on the execution feedback data.

[0069] In this embodiment, the private key II and the public key II may be a key pair of a symmetric encryption algorithm. That is, in this embodiment, a symmetric encryption algorithm is used to encrypt and decrypt the execution feedback data.

[0070] Furthermore, the control module is also used to update the public-private key pair I when the number of times the public-private key pair I is used meets a first number threshold, and send the updated private key I to the vehicle controller; and to update the public-private key pair II when the number of times the public-private key pair II is used meets a second number threshold, and send the updated private key II to the vehicle controller.

[0071] In this embodiment, the control module also includes a key library, which includes 64 keys generated by permutation and combination of 64 characters corresponding to Base64 encoding (based on 64 printable characters to represent binary data), and each key includes 64 characters corresponding to Base64 encoding. Since the control data in the control instruction is encrypted and decrypted by a symmetric encryption algorithm, when the number of times the public-private key pair I is used meets the first number threshold, a group of keys can be randomly selected from the key library as the public key I and private key I in the public-private key pair I. Similarly, since the execution feedback data is encrypted and decrypted by a symmetric encryption algorithm, when the number of times the public-private key pair II is used meets the second number threshold, a group of keys can be randomly selected from the key library as the public key II and private key II in the public-private key pair II. It should be noted that the public key I and private key I in the public-private key pair I are different from the public key II and private key II in the public-private key pair II.

[0072] Compared with the prior art, the data transmission security between the vehicle controller and the ECU device of the vehicle is low. The middleware device receives the control instruction from the vehicle controller, decrypts the encrypted control data in the control instruction, obtains the decrypted control data, and sends the decrypted control data to the corresponding ECU device, so that the ECU device controls the vehicle to perform the target operation according to the decrypted control data; and receives the execution feedback data sent by the ECU device after the vehicle performs the target operation through the CAN bus interface module, encrypts the execution feedback data, obtains the encrypted execution feedback data, and sends the encrypted execution feedback data to the vehicle controller, so that the vehicle controller monitors the vehicle according to the encrypted execution feedback data. In other words, the middleware device realizes the encrypted transmission of data between the vehicle controller and the ECU device, ensures that the data will not be attacked and tampered with during the transmission process, and improves the data transmission security.

[0073] The present application also provides a middleware method for a smart cockpit based on an Android system. Figure 3 , Figure 3 This is a flow chart of the first embodiment of the middleware method for the smart cockpit based on the Android system of this application.

[0074] In this embodiment, the middleware method of the smart cockpit based on the Android system includes the following steps:

[0075] Step S10: receiving a control instruction from a vehicle controller, wherein the control instruction includes encrypted control data.

[0076] Step S20: decrypt the encrypted control data in the control instruction to obtain decrypted control data.

[0077] Specifically, the step of decrypting the encrypted control data in the control instruction to obtain the decrypted control data includes:

[0078] Step S201, decrypting the encrypted control data based on public key I to obtain decrypted data;

[0079] Step S202: According to preset authentication rules, the decrypted data is divided into verification data and decryption control data.

[0080] In this embodiment, the instruction types of the control instructions include operation control instructions, entertainment control instructions, brake control instructions, and body control instructions, etc. Each type of control instruction has its corresponding public-private key pair I. When the middleware device is connected to the vehicle controller, the private key I in the public-private key pair I is sent to the vehicle controller by the middleware device in the form of private key I-instruction type. In the vehicle controller, after the vehicle controller generates a control instruction, according to the instruction type of the control instruction, the corresponding private key I is selected to encrypt the control data in the control instruction to obtain encrypted control data, and the encrypted control data is used to replace the original control data in the control instruction.

[0081] Specifically, according to the preset authentication rules, the steps of dividing the decrypted data into verification data and decryption control data include:

[0082] When the first character of the decrypted data is an odd number, the first character of the decrypted data is removed to obtain the first data, the first N characters encoded as odd numbers in the first data are extracted as verification data, and the characters in the first data except the verification data are used as decryption control data;

[0083] When the first character of the decrypted data is an even number, the first character of the decrypted data is removed to obtain the first data, the first N characters encoded as even numbers in the first data are extracted as verification data, and the characters in the first data except the verification data are used as decryption control data.

[0084] In this embodiment, the private key I and the public key I may be a key pair of a symmetric encryption algorithm. That is, in this embodiment, a symmetric encryption algorithm is used to encrypt and decrypt the control data in the control instruction.

[0085] Step S30: Send the decrypted control data to a corresponding ECU device, so that the ECU device controls the vehicle to perform a target operation according to the decrypted control data.

[0086] In this embodiment, when the verification data is consistent with the benchmark data, the decrypted control data is sent to the corresponding ECU device.

[0087] Furthermore, when the verification data is inconsistent with the benchmark data, it means that the control data in the control instruction has been tampered with during the transmission process. At this time, the middleware device sends an anti-virus instruction and a resend instruction to the vehicle controller. The anti-virus instruction is used to control the vehicle controller to perform an anti-virus operation on the communication network between the vehicle controller and the middleware device, and the resend instruction is used to control the vehicle controller to resend the control instruction after performing an anti-virus operation on the communication network.

[0088] In this embodiment, the ECU equipment includes: engine control module, electronic airbag, battery management system, electronic parking system, anti-lock braking system, body electronic stability system, electronic steering system, air conditioning, 360-degree surround view, engine anti-theft system, tire pressure monitoring system, body control system (sunroof, windows, wipers, turn signals, fog lights), vehicle entertainment system and instrument cluster, etc.

[0089] Furthermore, after the step of decrypting the encrypted control data based on the public key I to obtain the decrypted control data, the method further includes:

[0090] When the number of times the public key I is used meets a first number threshold, the public key I and its corresponding private key I are updated, and the updated private key I is sent to the vehicle controller.

[0091] In this embodiment, the control module further includes a key library, which includes 64 keys generated by permuting and combining 64 characters corresponding to Base64 encoding (based on 64 printable characters to represent binary data), and each key includes 64 characters corresponding to Base64 encoding. Since the control data in the control instruction is encrypted and decrypted using a symmetric encryption algorithm, when the number of times the public-private key pair I is used meets the first number threshold, a group of keys can be randomly selected from the key library as the public key I and the private key I in the public-private key pair I.

[0092] The present application also provides a middleware method for a smart cockpit based on an Android system. Figure 4 , Figure 4 This is a flow chart of the second embodiment of the middleware method for the smart cockpit based on the Android system of this application.

[0093] In this implementation, the smart cockpit is based on the middleware method of the Android system, including the following steps:

[0094] Step S01: receiving execution feedback data sent by the ECU device after the vehicle executes a target operation.

[0095] Step S02: Encrypt the execution feedback data to obtain encrypted execution feedback data.

[0096] Specifically, the step of encrypting the execution feedback data to obtain encrypted execution feedback data includes:

[0097] Step S021, according to the token carried by the execution feedback data, obtaining the public key II corresponding to the token;

[0098] Step S022: Encrypt the execution feedback data based on the public key II to obtain encrypted execution feedback data.

[0099] In this embodiment, different ECU devices have their corresponding tokens for representing identities, and each token has its corresponding public-private key pair II. When the middleware device is connected to the vehicle controller, the private key II in the public-private key pair II is sent to the vehicle controller by the middleware device in the form of private key II-token. When the ECU device controls the vehicle to perform the target operation according to the decrypted control data, it generates execution feedback data and uploads the execution feedback data to the control module of the middleware device. The control module selects the corresponding public key II according to the token of the ECU device that uploaded the execution feedback data to encrypt the execution feedback data, obtain the encrypted execution feedback data, and associate the encrypted execution feedback data with the token and send it to the vehicle controller.

[0100] Step S03: sending the encrypted execution feedback data to the vehicle controller, so that the vehicle controller monitors the vehicle according to the encrypted execution feedback data.

[0101] In this embodiment, after receiving the encrypted execution feedback data, the vehicle controller selects the corresponding private key II according to its associated token to decrypt the encrypted execution feedback data, obtains the execution feedback data, and monitors the vehicle status based on the execution feedback data.

[0102] In this embodiment, the private key II and the public key II may be a key pair of a symmetric encryption algorithm. That is, in this embodiment, a symmetric encryption algorithm is used to encrypt and decrypt the execution feedback data.

[0103] Further, after the step of encrypting the execution feedback data based on the public key II to obtain the encrypted execution feedback data, the method further includes:

[0104] When the number of times the public-private key pair II is used meets a second number threshold, the public key II and its corresponding private key II are updated, and the updated private key II is sent to the vehicle controller.

[0105] In this embodiment, the control module also includes a key library, which includes 64 keys generated by permutation and combination of 64 characters corresponding to Base64 encoding (based on 64 printable characters to represent binary data), and each key includes 64 characters corresponding to Base64 encoding. Since the execution feedback data is encrypted and decrypted using a symmetric encryption algorithm, when the number of uses of the public-private key pair II meets the second number threshold, a group of keys can be randomly selected from the key library as the public key II and private key II in the public-private key pair II. It should be noted that the public key I and private key I in the public-private key pair I in the first embodiment of the middleware method of the smart cockpit based on the Android system are different from the public key II and private key II in the public-private key pair II in this embodiment.

[0106] Compared with the prior art, the data transmission security between the vehicle controller and the ECU device of the vehicle is low. The middleware device receives the control instruction from the vehicle controller, decrypts the encrypted control data in the control instruction, obtains the decrypted control data, and sends the decrypted control data to the corresponding ECU device, so that the ECU device controls the vehicle to perform the target operation according to the decrypted control data; and receives the execution feedback data sent by the ECU device after the vehicle performs the target operation through the CAN bus interface module, encrypts the execution feedback data, obtains the encrypted execution feedback data, and sends the encrypted execution feedback data to the vehicle controller, so that the vehicle controller monitors the vehicle according to the encrypted execution feedback data. In other words, the middleware device realizes the encrypted transmission of data between the vehicle controller and the ECU device, ensures that the data will not be attacked and tampered with during the transmission process, and improves the data transmission security.

[0107] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0108] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0109] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0110] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A middleware device for smart cockpit based on Android system, It is characterized in that The middleware device comprises: a network communication module, a CAN bus interface module and a control module, wherein the control module is connected to the network communication module and the CAN bus interface module respectively; The network communication module is used to establish a network connection between the middleware device and the vehicle controller; The CAN bus interface module is used to connect the middleware device with one or more ECU devices via the CAN bus; The control module is used to receive control instructions from the vehicle controller through the network communication module, wherein the control instructions include encrypted control data, decrypt the encrypted control data in the control instructions to obtain decrypted control data, and send the decrypted control data to the corresponding ECU device, so that the ECU device controls the vehicle to perform a target operation according to the decrypted control data; and receive execution feedback data sent by the ECU device after the vehicle performs a target operation through the CAN bus interface module, encrypt the execution feedback data to obtain encrypted execution feedback data, and send the encrypted execution feedback data to the vehicle controller, so that the vehicle controller monitors the vehicle according to the encrypted execution feedback data; The middleware device further comprises a key storage unit, wherein the key storage unit comprises a plurality of public-private key pairs I and a plurality of public-private key pairs II; The plurality of public-private key pairs I correspond to the instruction types of the control instructions, respectively, so that the control module is used to obtain the public key I corresponding to the instruction type according to the instruction type of the control instruction, and decrypt the encrypted control data based on the public key I to obtain the decrypted control data; The plurality of public-private key pairs II correspond to respective tokens used to characterize the identity of the ECU device, so that the control module is used to obtain the public key II corresponding to the token according to the token carried by the execution feedback data, and encrypt the execution feedback data based on the public key II to obtain encrypted execution feedback data.

2. In the middleware device of the smart cockpit based on the Android system as described in claim 1, the control module is also used to update the public-private key pair I when the number of times the public-private key pair I is used meets a first number threshold, and send the updated private key I to the vehicle controller; and when the number of times the public-private key pair II is used meets a second number threshold, update the public-private key pair II and send the updated private key II to the vehicle controller.

3. A middleware method for smart cockpit based on Android system, It is characterized in that The middleware method of the smart cockpit based on the Android system comprises the following steps: Receiving a control instruction from a vehicle controller, wherein the control instruction includes encrypted control data; According to the instruction type of the control instruction, obtaining a public key I corresponding to the instruction type; Decrypting the encrypted control data based on the public key I to obtain decrypted control data; sending the decrypted control data to a corresponding ECU device so that the ECU device controls the vehicle to perform a target operation according to the decrypted control data; and Receiving execution feedback data sent by the ECU device after the vehicle executes the target operation; According to the token carried by the execution feedback data, obtaining a public key II corresponding to the token; Encrypting the execution feedback data based on the public key II to obtain encrypted execution feedback data; The encrypted execution feedback data is sent to the vehicle controller, so that the vehicle controller monitors the vehicle according to the encrypted execution feedback data.

4. The middleware method of the smart cockpit based on the Android system as claimed in claim 3, It is characterized in that The step of decrypting the encrypted control data based on the public key I to obtain the decrypted control data comprises: Decrypting the encrypted control data based on the public key I to obtain decrypted data; According to a preset authentication rule, the decrypted data is divided into verification data and decryption control data; and the step of sending the decrypted control data to a corresponding ECU device comprises: When the verification data is consistent with the benchmark data, the decryption control data is sent to the corresponding ECU device.

5. The middleware method of the smart cockpit based on the Android system as claimed in claim 4, It is characterized in that The step of dividing the decrypted data into verification data and decryption control data according to a preset authentication rule comprises: When the first character of the decrypted data is an odd number, the first character of the decrypted data is removed to obtain first data, the first N characters encoded as odd numbers in the first data are extracted as verification data, and the characters in the first data except the verification data are used as decryption control data; When the first character of the decrypted data is an even number, the first character of the decrypted data is removed to obtain the first data, the first N characters encoded as even numbers in the first data are extracted as verification data, and the characters in the first data except the verification data are used as decryption control data.

6. The middleware method of the smart cockpit based on the Android system as claimed in claim 3 or 4, It is characterized in that After the step of decrypting the encrypted control data based on the public key I to obtain the decrypted control data, the method further includes: When the number of times the public key I is used meets a first number threshold, the public key I and its corresponding private key I are updated, and the updated private key I is sent to the vehicle controller.

7. The middleware method of the smart cockpit based on the Android system as claimed in claim 6, It is characterized in that After the step of encrypting the execution feedback data based on the public key II to obtain the encrypted execution feedback data, the method further includes: When the number of times the public key II is used meets a second number threshold, the public key II and its corresponding private key II are updated, and the updated private key II is sent to the vehicle controller.