Data transmission method, device, equipment and medium

By allocating encryption seeds to the vehicle gateway and electronic control unit, generating a target key to encrypt and decrypt the vehicle data, the security risks of vehicle data when connecting to the diagnostic equipment are solved, and high security transmission of vehicle data is achieved.

CN119232375APending Publication Date: 2024-12-31LAUNCH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411581913.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Vehicle data has security risks when communication is directly connected to the vehicle's internal ECU. How to improve the security of vehicle data is an urgent problem.

Method used

By randomly allocating encryption seeds to the gateway and its electronic control units connected to the vehicle bus, the target key is generated to encrypt and decrypt the interactive data, ensuring that only the vehicle gateway and electronic control units can parse the data and prevent third-party equipment from identifying and parsing.

Benefits of technology

It effectively improves the security of vehicle data, prevents illegal equipment from being connected to the vehicle bus and analyzes interactive data, and ensures the security of vehicle information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232375A_ABST
    Figure CN119232375A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and device, equipment and a medium, and the method comprises the steps: randomly distributing encryption seeds for a gateway and each electronic control unit connected with a vehicle bus, and obtaining an encryption seed set; sending the encryption seed set to each electronic control unit, so that the electronic control unit obtains an encryption seed of the electronic control unit from the encryption seed set as a target encryption seed when receiving target data, generates a target key based on the target encryption seed, and sends the target key to the electronic control unit; decrypting the target data by using the target key to obtain decrypted data; wherein the target data is data obtained by generating the target secret key by the data sender by using the target encryption seed and encrypting interaction data by using the target secret key. Therefore, the safety of the vehicle data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data security technology, and in particular to a data transmission method, device, equipment and medium. Background Art

[0002] With the development of Internet of Vehicles technology, more and more data interactions occur in vehicle-mounted units, and the security of data interactions is becoming more and more concerned. At present, some diagnostic equipment can be directly connected to the vehicle's internal ECU (Electronic Control Unit) communication bus to communicate with the ECU, which poses a security risk to vehicle data. Therefore, how to improve the security of vehicle data is an urgent problem to be solved. Summary of the invention

[0003] In view of this, the purpose of this application is to provide a data transmission method, device, equipment and medium, which can improve the security of vehicle data. The specific scheme is as follows:

[0004] In a first aspect, the present application discloses a data transmission method, which is applied to a gateway, comprising:

[0005] Randomly assign encryption seeds to the gateway itself and each electronic control unit connected to the vehicle bus to obtain an encryption seed set;

[0006] Sending the encryption seed set to each of the electronic control units, so that when the electronic control unit receives the target data, it obtains the encryption seed of the electronic control unit itself from the encryption seed set as a target encryption seed, generates a target key based on the target encryption seed, and uses the target key to decrypt the target data to obtain decrypted data;

[0007] The target data is data obtained by the data sender generating the target key using the target encryption seed and encrypting the interactive data using the target key.

[0008] Optionally, also include:

[0009] Acquire interactive data sent by the diagnostic device to a target electronic control unit, wherein the target electronic control unit is any electronic control unit among the electronic control units connected to the vehicle bus;

[0010] Acquire the encryption seed of the target electronic control unit from the encryption seed set to obtain a target encryption seed;

[0011] generating a target key based on the target encryption seed;

[0012] Encrypting the interactive data using the target key to obtain target data;

[0013] The target data is sent to the target electronic control unit.

[0014] Optionally, before acquiring the interactive data sent by the diagnostic device to the target electronic control unit, the method further includes:

[0015] authenticating the diagnostic device;

[0016] If the identity authentication is passed, the step of obtaining the interaction data sent by the diagnostic device to the target electronic control unit is triggered.

[0017] Optionally, generating a target key based on the target encryption seed includes:

[0018] Select a target key generation algorithm from a list of preset key generation algorithms;

[0019] Sending first identification information of the target key generation algorithm to a target electronic control unit;

[0020] When confirmation information corresponding to the first identification information sent by the target electronic control unit is received, the target key generation algorithm is used to generate a target key based on the target encryption seed.

[0021] Optionally, the encrypting the interaction data by using the target key includes:

[0022] Select the target encryption algorithm from the preset encryption algorithm list;

[0023] Sending second identification information of the target encryption algorithm to a target electronic control unit;

[0024] When the confirmation information corresponding to the second identification information sent by the target electronic control unit is received, the target encryption algorithm is used and the target key is used to encrypt the interactive data.

[0025] Optionally, selecting a target encryption algorithm from a preset encryption algorithm list includes:

[0026] Randomly select a target encryption algorithm from a list of preset encryption algorithms;

[0027] Or, based on the timing algorithm replacement information, a target encryption algorithm is selected from a preset encryption algorithm list, wherein the timing algorithm replacement information includes identification information of the encryption algorithm adopted in the current period.

[0028] Optionally, sending the encrypted seed set to each of the electronic control units includes:

[0029] Establishing a mapping relationship table of the encrypted seeds in the encrypted seed set and the identifiers of the gateway and the electronic control unit;

[0030] The mapping relationship table is sent to each of the electronic control units.

[0031] In a second aspect, the present application discloses a data transmission device, which is applied to a gateway, comprising:

[0032] An encryption seed distribution module is used to randomly distribute encryption seeds to the gateway itself and each electronic control unit connected to the vehicle bus to obtain an encryption seed set;

[0033] an encryption seed sending module, used for sending the encryption seed set to each of the electronic control units, so that when the electronic control unit receives the target data, it obtains the encryption seed of the electronic control unit itself from the encryption seed set as a target encryption seed, generates a target key based on the target encryption seed, and uses the target key to decrypt the target data to obtain decrypted data;

[0034] The target data is data obtained by the data sender generating the target key using the target encryption seed and encrypting the interactive data using the target key.

[0035] In a third aspect, the present application discloses an electronic device, including a memory and a processor, wherein:

[0036] The memory is used to store the computer program;

[0037] The processor is used to execute the computer program to implement the aforementioned data transmission method.

[0038] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned data transmission method when executed by a processor.

[0039] It can be seen from the above scheme that the present application provides a data transmission method, including: randomly assigning encryption seeds to the gateway itself and each electronic control unit connected to the vehicle bus to obtain an encryption seed set; sending the encryption seed set to each of the electronic control units, so that when the electronic control unit receives the target data, it obtains the encryption seed of the electronic control unit itself from the encryption seed set as the target encryption seed, generates a target key based on the target encryption seed, and uses the target key to decrypt the target data to obtain decrypted data; wherein, the target data is the data sender using the target encryption seed to generate the target key, and uses the target key to encrypt the interactive data.

[0040] It can be seen that the beneficial effects of the present application are: the gateway randomly assigns encryption seeds to itself and the electronic control unit connected to the vehicle bus. When transmitting data, the gateway and the electronic control unit use the encryption seed of the receiver to generate a target key, and use the target key to encrypt the interaction data. After the receiver receives the encrypted data, it uses its own encryption seed to generate a target key and decrypts the encrypted data. In this way, it is ensured that only the vehicle gateway and each electronic control unit can parse the data interaction on the vehicle bus. Even if other devices are connected to the vehicle bus, they cannot parse and identify the interaction data, which can improve the security of vehicle data.

[0041] Correspondingly, a data transmission device, equipment and readable storage medium provided by the present application also have the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] 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, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0043] Figure 1 A flow chart of a data transmission method provided in an embodiment of the present application;

[0044] Figure 2 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;

[0045] Figure 3 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] See also Figure 1 As shown, the embodiment of the present application discloses a data transmission method, which is applied to a gateway, including:

[0048] Step S11: Randomly assign encryption seeds to the gateway itself and each electronic control unit connected to the vehicle bus to obtain an encryption seed set.

[0049] Among them, the vehicle bus is the bus inside the vehicle for information exchange between various ECUs. Using a specific communication protocol, various sensors, actuators and electronic control units on the vehicle are connected through the data bus to achieve real-time data transmission and sharing. The electronic control unit can be understood as a microcomputer installed in the vehicle, which is used to control and monitor various operating and performance parameters. The gateway is responsible for protocol conversion and data exchange between different types of networks.

[0050] In this embodiment, the encryption seed can be understood as the starting value for generating a key, which can be a random number or a piece of random data, which is unpredictable and unique. A secure random number generator (such as a pseudo-random number generator PRNG or a cryptographically secure pseudo-random number generator CSPRNG) can be used to generate the encryption seed. The generator can generate high-quality random numbers to ensure the unpredictability and security of the encryption seed.

[0051] In this embodiment, when the preset encryption seed allocation condition is met, encryption seeds can be randomly allocated to the gateway itself and each electronic control unit connected to the vehicle bus to obtain an encryption seed set. In an optional embodiment, the preset encryption seed allocation condition can be the gateway power-on. In another optional embodiment, the preset encryption seed allocation condition can be a timing condition, that is, encryption seeds are randomly allocated to the gateway itself and each electronic control unit connected to the vehicle bus at a fixed time to obtain an encryption seed set. In this way, the encryption seed set can be continuously updated to avoid leakage of the encryption seed set, thereby improving the security of vehicle data.

[0052] Step S12: sending the encryption seed set to each of the electronic control units, so that when the electronic control unit receives the target data, it obtains the encryption seed of the electronic control unit itself from the encryption seed set as the target encryption seed, generates a target key based on the target encryption seed, and uses the target key to decrypt the target data to obtain decrypted data;

[0053] The target data is data obtained by the data sender generating the target key using the target encryption seed and encrypting the interactive data using the target key.

[0054] In an optional implementation, a mapping relationship table of the encryption seed set and the identifiers of the gateway and the electronic control unit can be established; the mapping relationship table is sent to each of the electronic control units. The identifier is a unique identifier. This embodiment can obtain the corresponding encryption seed based on the identifier in the mapping relationship table.

[0055] This embodiment can generate a random number sequence based on the encryption seed, that is, obtain a random number sequence of sufficient length, and then convert it into a key of fixed length. A preset cryptographic algorithm can be used to derive the key, such as a key derivation function KDF.

[0056] In this embodiment, the data senders include the gateway and the electronic control unit. Other devices do not have an encrypted seed set and cannot obtain the interaction data between the gateway and the electronic control unit or between the electronic control units.

[0057] Furthermore, this embodiment can obtain interactive data sent by the diagnostic device to a target electronic control unit, wherein the target electronic control unit is any electronic control unit among the electronic control units connected to the vehicle bus; obtain the encryption seed of the target electronic control unit from the encryption seed set to obtain a target encryption seed; generate a target key based on the target encryption seed; encrypt the interactive data using the target key to obtain target data; and send the target data to the target electronic control unit.

[0058] That is, when the gateway sends data to any electronic control unit, it first obtains the encryption seed of the electronic control unit from the encryption seed set, generates a target key, encrypts the data and sends it. It is understandable that when the gateway receives the target data, it can also obtain the gateway's own encryption seed from the encryption seed set as the target encryption seed, generate a target key based on the target encryption seed, and use the target key to decrypt the target data to obtain decrypted data. The data interaction between electronic control units can refer to the data interaction process between the gateway and the electronic control unit.

[0059] In an optional implementation, before obtaining the interactive data sent by the diagnostic device to the target electronic control unit, the diagnostic device may also be authenticated; if the authentication is passed, the step of obtaining the interactive data sent by the diagnostic device to the target electronic control unit is triggered. That is, in this embodiment, the third-party device needs to interact with the electronic control unit through the gateway, and only the device that has passed the authentication can interact with the electronic control unit through the gateway, thereby ensuring the security of vehicle data.

[0060] In an optional implementation, a user name and password for the diagnostic device can be obtained, and the diagnostic device is authenticated based on the user name and password, for example, a user name and password consistent with the user name and password are stored with the gateway. A digital certificate sent by the diagnostic device can be received, and the diagnostic device is authenticated based on the digital certificate. The signature of the digital certificate can be verified using the public key of the CA (i.e., the digital certificate authority). If the signature verification is successful, it means that the certificate is issued by the CA and the certificate is within the validity period, thereby confirming the authenticity of the identity of the diagnostic device.

[0061] In this way, before using the diagnostic equipment to diagnose the vehicle, the vehicle gateway needs to authenticate the diagnostic equipment, and only after passing the authentication can the diagnostic interaction with the ECU on the vehicle's internal bus be carried out through the vehicle gateway. This can prevent third-party illegal devices from diagnosing the vehicle and obtaining vehicle information. The diagnostic equipment cannot bypass the vehicle gateway and directly connect to the internal ECU communication bus to communicate with the ECU, avoiding vehicle safety risks.

[0062] In an optional embodiment, a target key generation algorithm can be selected from a preset key generation algorithm list; the first identification information of the target key generation algorithm is sent to a target electronic control unit; when a confirmation message corresponding to the first identification information sent by the target electronic control unit is received, the target key generation algorithm is used to generate a target key based on the target encryption seed. That is, in an embodiment of the present application, both the gateway and the electronic control unit include multiple key generation algorithms, and the key generation algorithm to be used can be negotiated. The target key generation algorithm can be randomly selected from a preset key generation algorithm list; or, based on timing algorithm replacement information, the target key generation algorithm can be selected from a preset key generation algorithm list, wherein the timing algorithm replacement information includes identification information of the key generation algorithm used in the current time period. In another optional embodiment, the preset password generation algorithm is a default algorithm, and the gateway and the electronic control unit do not need to negotiate when interacting.

[0063] In this embodiment, a target encryption algorithm can be selected from a preset encryption algorithm list; the second identification information of the target encryption algorithm is sent to the target electronic control unit; when the confirmation information corresponding to the second identification information sent by the target electronic control unit is received, the target encryption algorithm is used, and the target key is used to encrypt the interactive data. That is, in the embodiment of the present application, the gateway and the electronic control unit both contain multiple encryption algorithms, and the encryption algorithm used can be negotiated.

[0064] In an optional implementation, the target encryption algorithm may be randomly selected from a preset encryption algorithm list. In another optional implementation, the target encryption algorithm may be selected from a preset encryption algorithm list based on timing algorithm replacement information, wherein the timing algorithm replacement information includes identification information of the encryption algorithm used in the current period. That is, the encryption algorithm used may be replaced at regular intervals. Both ends of the communication keep the replaced encryption algorithm consistent.

[0065] In another optional implementation, the preset encryption algorithm is a default algorithm, and the gateway and the electronic control unit do not need to negotiate when interacting.

[0066] It can be seen that in the embodiment of the present application, the gateway randomly assigns encryption seeds to itself and the electronic control unit connected to the vehicle bus. When transmitting data, the gateway and the electronic control unit use the encryption seed of the receiver to generate a target key, and use the target key to encrypt the interaction data. After the receiver receives the encrypted data, it uses its own encryption seed to generate a target key and decrypts the encrypted data. In this way, it is ensured that only the vehicle gateway and each electronic control unit can parse the data interaction on the vehicle bus. Even if other devices are connected to the vehicle bus, they cannot parse and identify the interaction data, which can improve the security of vehicle data.

[0067] In an optional implementation, the gateway stores a list of IDs (i.e., identifications) of all ECUs on the bus. The ID of an ECU is unique, and the ID can be used to determine which ECU it is. Each time the vehicle turns on the ignition switch, the gateway is powered on, and the gateway randomly assigns an encryption seed to each ECU (including the gateway itself), and then sends the IDs of all ECUs and the corresponding encryption seed list to the vehicle bus, which each ECU receives and stores. The sending format is {(ECU1's ID: ECU1's encryption seed), (ECU2's ID: ECU2's encryption seed)....}. When the gateway communicates with the ECU or between ECUs, an encryption and decryption process is required to ensure the security of data transmission. For example, when the gateway sends data to the engine ECU, the gateway first queries the encryption seed of the engine ECU, and then calculates the encryption seed into a key according to the unified algorithm agreed upon by all ECUs. The unified algorithm is the same in all ECUs. The key is calculated by the algorithm instead of being generated directly by the gateway to prevent the key from being stolen when it is transmitted on the bus. Then the gateway uses the key to symmetrically encrypt the data to be sent according to the agreed symmetric encryption algorithm. Symmetric encryption algorithms include AES (Advanced Encryption Standard), DES (Data Encryption Standard), SM4, etc. All ECUs agree to use the same symmetric encryption algorithm. After data encryption, the gateway transmits the encrypted data to the engine ECU through the bus. After the engine ECU receives the encrypted data from the gateway, it uses the encryption seed of this system and the agreed unified algorithm to calculate the key, and then uses the key and the agreed symmetric encryption algorithm to decrypt the encrypted data, and then obtain the actual source data sent by the gateway.

[0068] In the same way, when the gateway transmits data to the ECU or between ECUs, the data on the bus is encrypted, and only the ECUs on the bus can decrypt it. After the third-party device is connected to the internal bus, the data sent cannot be recognized by other ECUs, and the third party cannot decrypt the data on the bus. Therefore, it is required that the third-party device can only communicate with the vehicle's ECU through the gateway, so as to protect the security of vehicle information.

[0069] In order to protect the information security of the vehicle's internal bus, the gateway of this embodiment will randomly assign an encryption seed to each ECU on the bus each time the vehicle is powered on, and finally generate an encryption seed list of all ECUs. The gateway sends the list to all ECUs for storage. When the ECU sends or replies data, it first calculates the key according to the algorithm agreed upon by the vehicle through the encryption seed of the target ECU, symmetrically encrypts the data to be sent through the key, and then sends it out. After the gateway or other ECU receives the encrypted data, it also queries the encryption seed of this system in the list and calculates the key according to the agreed algorithm, decrypts the data to obtain the source data. In this way, it can be ensured that only the vehicle gateway and each ECU can parse the data interaction on the vehicle's internal bus. Even if other diagnostic equipment is connected to the internal bus, they are all ciphertexts that cannot be parsed and identified, thereby protecting the security of vehicle information.

[0070] See also Figure 2 As shown, the embodiment of the present application discloses a data transmission device, which is applied to a gateway, including:

[0071] The encryption seed distribution module 11 is used to randomly distribute encryption seeds to the gateway itself and each electronic control unit connected to the vehicle bus to obtain an encryption seed set;

[0072] The encryption seed sending module 12 is used to send the encryption seed set to each of the electronic control units, so that when the electronic control unit receives the target data, it obtains the encryption seed of the electronic control unit itself from the encryption seed set as the target encryption seed, generates a target key based on the target encryption seed, and uses the target key to decrypt the target data to obtain decrypted data;

[0073] The target data is data obtained by the data sender generating the target key using the target encryption seed and encrypting the interactive data using the target key.

[0074] Furthermore, the device also includes:

[0075] An interactive data acquisition module, used to acquire interactive data sent by the diagnostic device to a target electronic control unit, wherein the target electronic control unit is any electronic control unit among the electronic control units connected to the vehicle bus;

[0076] An encryption seed acquisition module, used to acquire the encryption seed of the target electronic control unit from the encryption seed set to obtain a target encryption seed;

[0077] A target key generation module, used to generate a target key based on the target encryption seed;

[0078] An interactive data encryption module, used to encrypt the interactive data using the target key to obtain target data;

[0079] The target data sending module is used to send the target data to the target electronic control unit.

[0080] Furthermore, the device also includes:

[0081] An identity verification module is used to verify the identity of the diagnostic device.

[0082] Correspondingly, the interactive data acquisition module is used to obtain the interactive data sent by the diagnostic device to the target electronic control unit when the identity authentication module determines that the diagnostic device has passed the identity authentication.

[0083] Optionally, the target key generation module may specifically include:

[0084] A target key generation algorithm selection submodule is used to select a target key generation algorithm from a preset key generation algorithm list;

[0085] A first identification information sending submodule, used to send the first identification information of the target key generation algorithm to a target electronic control unit;

[0086] The target key generation submodule is used to generate a target key based on the target encryption seed using the target key generation algorithm when receiving confirmation information corresponding to the first identification information sent by the target electronic control unit.

[0087] The interactive data encryption module may specifically include:

[0088] A target encryption algorithm selection submodule is used to select a target encryption algorithm from a preset encryption algorithm list;

[0089] A second identification information sending submodule, used to send the second identification information of the target encryption algorithm to a target electronic control unit;

[0090] The interactive data encryption submodule is used to encrypt the interactive data using the target encryption algorithm and the target key when receiving confirmation information corresponding to the second identification information sent by the target electronic control unit.

[0091] In an optional implementation, the target encryption algorithm selection submodule is specifically used to randomly select a target encryption algorithm from a preset encryption algorithm list.

[0092] In another optional implementation, the target encryption algorithm selection submodule is specifically used to select a target encryption algorithm from a preset encryption algorithm list based on timing algorithm replacement information, wherein the timing algorithm replacement information includes identification information of the encryption algorithm used in the current time period.

[0093] It can be seen that in the embodiment of the present application, the gateway randomly assigns encryption seeds to itself and the electronic control unit connected to the vehicle bus. When transmitting data, the gateway and the electronic control unit use the encryption seed of the receiver to generate a target key, and use the target key to encrypt the interaction data. After the receiver receives the encrypted data, it uses its own encryption seed to generate a target key and decrypts the encrypted data. In this way, it is ensured that only the vehicle gateway and each electronic control unit can parse the data interaction on the vehicle bus. Even if other devices are connected to the vehicle bus, they cannot parse and identify the interaction data, which can improve the security of vehicle data.

[0094] See also Figure 3 As shown, an embodiment of the present application discloses an electronic device 20, including a processor 21 and a memory 22; wherein the memory 22 is used to store a computer program; the processor 21 is used to execute the computer program, and the data transmission method disclosed in the above embodiment.

[0095] For the specific process of the above data transmission method, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be described in detail here.

[0096] Furthermore, the memory 22 as a carrier for storing resources may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the storage method may be temporary storage or permanent storage.

[0097] In addition, the electronic device 20 also includes a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26; wherein the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input / output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0098] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the data transmission method disclosed in the aforementioned embodiment.

[0099] For the specific process of the above data transmission method, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be described in detail here.

[0100] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0101] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0102] The above is a detailed introduction to a data transmission method, device, equipment and medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data transmission method, characterized in that: Applied to gateways, including: Randomly assign encryption seeds to the gateway itself and each electronic control unit connected to the vehicle bus to obtain an encryption seed set; Sending the encryption seed set to each of the electronic control units, so that when the electronic control unit receives the target data, it obtains the encryption seed of the electronic control unit itself from the encryption seed set as a target encryption seed, generates a target key based on the target encryption seed, and uses the target key to decrypt the target data to obtain decrypted data; The target data is data obtained by the data sender generating the target key using the target encryption seed and encrypting the interactive data using the target key.

2. The data transmission method according to claim 1, characterized in that: Also includes: Acquire interactive data sent by the diagnostic device to a target electronic control unit, wherein the target electronic control unit is any electronic control unit among the electronic control units connected to the vehicle bus; Acquire the encryption seed of the target electronic control unit from the encryption seed set to obtain a target encryption seed; generating a target key based on the target encryption seed; Encrypting the interactive data using the target key to obtain target data; The target data is sent to the target electronic control unit.

3. The data transmission method according to claim 2, characterized in that: Before acquiring the interactive data sent by the diagnostic device to the target electronic control unit, the method further includes: authenticating the diagnostic device; If the identity authentication is passed, the step of obtaining the interaction data sent by the diagnostic device to the target electronic control unit is triggered.

4. The data transmission method according to claim 2, characterized in that: The generating a target key based on the target encryption seed comprises: Select a target key generation algorithm from a list of preset key generation algorithms; Sending first identification information of the target key generation algorithm to a target electronic control unit; When confirmation information corresponding to the first identification information sent by the target electronic control unit is received, the target key generation algorithm is used to generate a target key based on the target encryption seed.

5. The data transmission method according to claim 2, characterized in that: The step of encrypting the interactive data by using the target key includes: Select the target encryption algorithm from the preset encryption algorithm list; Sending second identification information of the target encryption algorithm to a target electronic control unit; When the confirmation information corresponding to the second identification information sent by the target electronic control unit is received, the target encryption algorithm is used and the target key is used to encrypt the interactive data.

6. The data transmission method according to claim 5, characterized in that: The step of selecting a target encryption algorithm from a preset encryption algorithm list includes: Randomly select a target encryption algorithm from a list of preset encryption algorithms; Or, based on the timing algorithm replacement information, a target encryption algorithm is selected from a preset encryption algorithm list, wherein the timing algorithm replacement information includes identification information of the encryption algorithm adopted in the current period.

7. The data transmission method according to any one of claims 1 to 6, characterized in that: The step of sending the encrypted seed set to each of the electronic control units comprises: Establishing a mapping relationship table of the encrypted seeds in the encrypted seed set and the identifiers of the gateway and the electronic control unit; The mapping relationship table is sent to each of the electronic control units.

8. A data transmission device, characterized in that: Applied to gateways, including: An encryption seed distribution module is used to randomly distribute encryption seeds to the gateway itself and each electronic control unit connected to the vehicle bus to obtain an encryption seed set; an encryption seed sending module, used for sending the encryption seed set to each of the electronic control units, so that when the electronic control unit receives the target data, it obtains the encryption seed of the electronic control unit itself from the encryption seed set as a target encryption seed, generates a target key based on the target encryption seed, and uses the target key to decrypt the target data to obtain decrypted data; The target data is data obtained by the data sender generating the target key using the target encryption seed and encrypting the interactive data using the target key.

9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store the computer program; The processor is used to execute the computer program to implement the data transmission method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 7 is implemented.