Transmission method and device of configuration file of vehicle, storage medium and vehicle
By encrypting the initial configuration data stream and decrypting it for use on the vehicle side, the problem of low security during vehicle configuration file transmission is solved, the secure transmission and storage of the configuration file is realized, and the confidentiality and integrity of the data are ensured. .
Patent Information
- Application Number
- CN202410822111.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-10-01
AI Technical Summary
In the existing technology, the security of vehicle configuration files during transmission is low, and the risk of leakage of configuration files during transmission cannot be effectively solved.
By encrypting the initial configuration data stream, converting it into a target configuration file and delivering it to the vehicle, the vehicle then decrypts it for configuration operations, and encrypts and stores the decrypted configuration file after the transmission is completed to ensure file security. sex and integrity.
It effectively improves the security of vehicle configuration files during transmission, prevents leakage and attacks of configuration files during transmission, and ensures data confidentiality and integrity.
Smart Images

Figure CN118740825A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of file transmission, and in particular to a method, device, storage medium and vehicle for transmitting a configuration file of a vehicle. Background Art
[0002] At present, with the rapid development of the Internet of Vehicles, in order to better serve users and provide a highly reliable and safe driving experience, the security of data file transmission between the cloud and vehicle systems is very important, because these systems involve a large amount of sensitive data. Such as user personal information, vehicle data, road condition information, etc. If these data are attacked or leaked during transmission, it will cause serious damage to users and systems. Therefore, the cloud and vehicle systems need to continuously improve security in data file transmission to ensure the safety and reliability of data files.
[0003] In the related technology, configuration files are usually obtained from the cloud and distributed through access control, without considering the configuration file encryption scenario. After the access rights are controlled, the configuration files can still be obtained, resulting in the security risk of configuration file leakage. Secondly, after the access configuration file is sent to the adapted vehicle, it is synchronized through the vehicle communication network, and the file security storage scenario is not considered. Therefore, the existing technology has the technical problem of insecure file transmission between the cloud and the vehicle.
[0004] In view of the above-mentioned existence, the technical problem of low security of vehicle configuration files during transmission has been solved, but no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a method, an apparatus, a storage medium and a vehicle for transmitting a configuration file of a vehicle, so as to at least solve the technical problem that the configuration file of the vehicle has low security during transmission.
[0006] According to one aspect of an embodiment of the present invention, a method for transmitting a configuration file of a vehicle is provided. The method may include: in response to a vehicle receiving a target configuration data stream, converting the target configuration data stream into a target configuration file, wherein the target configuration data stream is obtained by converting a configuration file to be transmitted into an initial configuration data stream by the cloud, and encrypting the initial configuration data stream, the configuration file is used to perform configuration operations on the vehicle, and the initial configuration data stream is used to indicate a data stream that the vehicle needs to receive; decrypting the target configuration file to obtain a decrypted configuration file; and controlling the vehicle to perform configuration operations based on the decrypted configuration file.
[0007] Optionally, in response to the vehicle receiving the target configuration data stream, converting the target configuration data stream into a target configuration file includes: writing the target configuration data stream into a blank configuration file to obtain the target configuration file.
[0008] Optionally, decrypting the target configuration file to obtain the decrypted configuration file includes: obtaining a decryption key; and decrypting the target configuration file using the decryption key to obtain the decrypted configuration file.
[0009] Optionally, based on the decrypted configuration file, controlling the vehicle to perform a configuration operation includes: extracting operation information from the decrypted configuration file, wherein the operation information is used to indicate a type of operation that the vehicle needs to perform; and controlling the vehicle to perform the configuration operation according to the operation information.
[0010] Optionally, after controlling the vehicle to perform configuration operations based on the decrypted configuration file, the method further includes: obtaining an encryption key used to encrypt the decrypted configuration file; encrypting the decrypted configuration file using the stored encryption key to obtain a stored encrypted file, wherein the decrypted file includes the decrypted configuration file; and uploading the stored encrypted file to the cloud.
[0011] Optionally, a method for transmitting a configuration file of a vehicle includes: obtaining a configuration file to be transmitted, wherein the configuration file is used to perform configuration operations on the vehicle; converting the configuration file into an initial configuration data stream, wherein the initial configuration data stream is used to indicate a data stream that the vehicle needs to receive; encrypting the initial configuration data stream to obtain a target configuration data stream; and sending the target configuration data stream to the vehicle, wherein the target configuration data stream is converted by the vehicle into a target configuration file, the target configuration file is decoded by the vehicle to obtain a decrypted configuration file, and the decrypted configuration file is used to control the vehicle to perform configuration operations.
[0012] Optionally, encrypting the initial configuration data stream to obtain the target configuration data stream includes: obtaining an encryption key used to encrypt the initial configuration data stream; and encrypting the initial configuration data stream based on the encryption key to obtain the target configuration data stream.
[0013] Optionally, converting the configuration file into an initial configuration data stream includes: converting the configuration file in blocks to obtain the initial configuration data stream.
[0014] According to another aspect of an embodiment of the present invention, a transmission device for a vehicle configuration file is also provided. The device may include: a conversion unit, for converting a target configuration data stream into a target configuration file in response to the vehicle receiving a target configuration data stream, wherein the target configuration data stream is obtained by converting the configuration file to be transmitted into an initial configuration data stream by the cloud, and encrypting the initial configuration data stream, the configuration file is used to perform configuration operations on the vehicle, and the initial configuration data stream is used to indicate the data stream that the vehicle needs to receive; a decryption unit, for decrypting the target configuration file to obtain a decrypted configuration file; and a control unit, for controlling the vehicle to perform configuration operations based on the decrypted configuration file.
[0015] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, the computer-readable storage medium including a stored program, wherein when the program is executed by a processor, the device where the storage medium is located is controlled to execute the method for transmitting the vehicle configuration file in the embodiment of the present invention.
[0016] According to another aspect of an embodiment of the present invention, a processor is further provided. The processor is used to run a program, wherein when the program is run, the method for transmitting a configuration file of a vehicle in an embodiment of the present invention is executed.
[0017] According to another aspect of an embodiment of the present invention, a vehicle is further provided, wherein the vehicle is used to execute the method for transmitting a configuration file of a vehicle according to an embodiment of the present invention.
[0018] In an embodiment of the present invention, in response to the vehicle receiving a target configuration data stream, the target configuration data stream is converted into a target configuration file, wherein the target configuration data stream is obtained by converting the configuration file to be transmitted into an initial configuration data stream by the cloud, and encrypting the initial configuration data stream, the configuration file is used to perform configuration operations on the vehicle, and the initial configuration data stream is used to indicate the data stream that the vehicle needs to receive; the target configuration file is decrypted to obtain a decrypted configuration file; based on the decrypted configuration file, the vehicle is controlled to perform configuration operations. That is to say, in an embodiment of the present invention, by encrypting the initial configuration data stream and sending it to the vehicle, the vehicle converts the target configuration data stream into a target configuration file, and encrypting the data during the data transmission process, the configuration file is avoided from being attacked or leaked during the transmission process, thereby solving the technical problem of low security of the vehicle's configuration file during the transmission process, and achieving the technical effect of improving the security of the vehicle's configuration file during the transmission process. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0020] Figure 1 is a flow chart of a method for transmitting a configuration file of a vehicle according to an embodiment of the present invention;
[0021] Figure 2 is a flow chart of a data stream configuration file encryption and decryption transmission method according to an embodiment of the present invention;
[0022] Figure 3 is a schematic diagram of a device for transmitting a configuration file of a vehicle according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, functional component or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, functional components or devices.
[0025] Example 1
[0026] According to an embodiment of the present invention, an embodiment of a method for transmitting a configuration file of a vehicle is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical sequence is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0027] Figure 1 is a flow chart of a method for transmitting a configuration file of a vehicle according to an embodiment of the present invention. Figure 1 As shown, the method may include the following steps:
[0028] Step S101 : in response to a vehicle receiving a target configuration data stream, converting the target configuration data stream into a target configuration file.
[0029] In the technical solution provided in the above step S101 of the present invention, the target configuration data stream is obtained by converting the configuration file to be transmitted into the initial configuration data stream by the cloud, and encrypting the initial configuration data stream. The configuration file is used to configure the vehicle, and the initial configuration data stream is used to indicate the data stream that the vehicle needs to receive.
[0030] In this embodiment, when the vehicle receives the target configuration data stream, the target configuration data stream is converted into a target configuration file.
[0031] Optionally, the target configuration data stream is converted into a target configuration file using a file conversion algorithm. This is only an illustrative example and does not limit the specific method of converting the target configuration data stream into the target configuration file.
[0032] Step S102, decrypt the target configuration file to obtain a decrypted configuration file.
[0033] In the technical solution provided in the above step S102 of the present invention, after the target configuration data stream is converted into a target configuration file in step S101, the target configuration file is decrypted to obtain a decrypted configuration file.
[0034] In this embodiment, the target configuration file is decrypted to obtain a decrypted configuration file. For example, the target configuration file is decrypted using a decryption key. This is only an example and does not limit the specific method of decrypting the target configuration file to obtain the decrypted configuration file.
[0035] For example, the decryption key in the security component is called to decrypt the target configuration file, wherein the security component is used to indicate the component that stores the decryption key agreed upon in advance between the cloud and the vehicle.
[0036] Optionally, by decrypting the configuration file, more precise configuration operations can be performed to optimize vehicle performance. In addition, decrypting the configuration file can also help identify possible problems and risks, and make timely adjustments and improvements to ensure the safety and reliability of the vehicle. By decrypting the configuration file, you can better control the vehicle's configuration, improve the vehicle's performance and efficiency, and provide users with a better driving experience.
[0037] Step S103: Based on the decrypted configuration file, control the vehicle to perform configuration operations.
[0038] In the technical solution provided in the above step S103 of the present invention, after the decrypted configuration file is obtained in step S102, the vehicle is controlled to perform configuration operations according to the decrypted configuration file.
[0039] In this embodiment, the vehicle is controlled to perform configuration operations according to the decrypted configuration file. For example, the vehicle is controlled to perform configuration operations according to the operation information in the decrypted configuration file. This is only an example and does not limit the specific manner of controlling the vehicle to perform configuration operations.
[0040] Optionally, by decrypting the configuration file to extract the operation information, the accuracy of the vehicle configuration operation can be ensured to avoid the occurrence of human errors.
[0041] It should be noted that the above embodiment can be executed by a transmission device of a vehicle configuration file.
[0042] In the above steps S101 to S103 of the present invention, in response to the vehicle receiving the target configuration data stream, the target configuration data stream is converted into a target configuration file, wherein the target configuration data stream is obtained by converting the configuration file to be transmitted into an initial configuration data stream by the cloud, and the initial configuration data stream is encrypted, the configuration file is used to configure the vehicle, and the initial configuration data stream is used to indicate the data stream that the vehicle needs to receive; the target configuration file is decrypted to obtain a decrypted configuration file; based on the decrypted configuration file, the vehicle is controlled to perform configuration operations. That is to say, in an embodiment of the present invention, by encrypting the initial configuration data stream and sending it to the vehicle, the vehicle converts the target configuration data stream into the target configuration file, and encrypting the data during the data transmission process, the configuration file is avoided from being attacked or leaked during the transmission process, thereby solving the technical problem of low security of the vehicle's configuration file during the transmission process, and achieving the technical effect of improving the security of the vehicle's configuration file during the transmission process.
[0043] The above method of this embodiment is further introduced below.
[0044] As an optional embodiment, in response to the vehicle receiving the target configuration stream, the target configuration data stream is converted into a target configuration file, including: writing the target configuration data stream into a blank configuration file to obtain the target configuration file.
[0045] In this embodiment, the target configuration data stream is input into the file conversion algorithm, and the file conversion algorithm writes the target configuration stream into a blank configuration file to obtain the target configuration file.
[0046] For example, the target configuration data stream is converted into the target configuration file by using the file conversion algorithm by reading the target configuration data stream, parsing the data stream, building the target configuration file, and writing the configuration file.
[0047] As an optional implementation manner, decrypting the target configuration file to obtain the decrypted configuration file includes: obtaining a decryption key; and decrypting the target configuration file using the decryption key to obtain the decrypted configuration file.
[0048] In this embodiment, a decryption key is obtained; the target configuration file is decrypted using the decryption key to obtain a decrypted configuration file.
[0049] For example, the decryption key in the security component is called to decrypt the target configuration file, wherein the security component is used to indicate the component that stores the decryption key agreed upon in advance between the cloud and the vehicle.
[0050] As an optional implementation method, controlling a vehicle to perform a configuration operation based on a decrypted configuration file includes: extracting operation information from the decrypted configuration file, wherein the operation information is used to indicate a type of operation that the vehicle needs to perform; and controlling the vehicle to perform the configuration operation according to the operation information.
[0051] In this embodiment, operation information is extracted from the decrypted configuration file, and the vehicle is controlled to perform configuration operations according to the operation information.
[0052] Optionally, by decrypting the configuration file to extract the operation information, the accuracy of the vehicle configuration operation can be ensured to avoid the occurrence of human errors.
[0053] As an optional implementation manner, after controlling the vehicle to perform configuration operations based on the decrypted configuration file, the method also includes: obtaining an encryption key used to encrypt the decrypted configuration file; encrypting the decrypted configuration file using the stored encryption key to obtain a stored encrypted file, wherein the decrypted file includes the decrypted configuration file; and uploading the stored encrypted file to the cloud.
[0054] In this embodiment, an encryption key for encrypting the decrypted configuration file is obtained; the decrypted configuration file is encrypted using the obtained encryption key to obtain a stored encrypted file. For example, the decrypted configuration file is encrypted by calling the stored encryption key in the security component to obtain a stored encrypted file. This is only an illustrative example and does not limit the specific method for obtaining the stored encrypted file.
[0055] Optionally, the decrypted configuration file is encrypted and stored to ensure confidentiality and security of the decrypted configuration file and prevent leakage of the decrypted configuration file.
[0056] As an optional implementation manner, a method for transmitting a configuration file of a vehicle includes: obtaining a configuration file to be transmitted, wherein the configuration file is used to perform configuration operations on the vehicle; converting the configuration file into an initial configuration data stream, wherein the initial configuration data stream is used to indicate a data stream that the vehicle needs to receive; encrypting the initial configuration data stream to obtain a target configuration data stream; and sending the target configuration data stream to the vehicle, wherein the target configuration data stream is converted by the vehicle into a target configuration file, the target configuration file is decoded by the vehicle to obtain a decrypted configuration file, and the decrypted configuration file is used to control the vehicle to perform configuration operations.
[0057] In this embodiment, the configuration file to be transmitted is obtained, for example, from the cloud. This is only an illustrative example and does not limit the specific method of obtaining the configuration file to be transmitted.
[0058] For example, the configuration file to be transmitted can be obtained from the cloud through a configuration management tool.
[0059] Optionally, after the configuration file to be transmitted is obtained, the configuration file is converted into an initial configuration data stream, that is, the obtained configuration file to be transmitted is converted into a file data stream.
[0060] For example, the acquired configuration file to be transmitted is converted into a file data stream through a conversion algorithm.
[0061] Optionally, the initial configuration data stream is encrypted to obtain a target configuration data stream, and after the target configuration data stream is obtained, the target configuration data stream is sent to the vehicle.
[0062] As an optional implementation manner, encrypting the initial configuration data stream to obtain the target configuration data stream includes: obtaining an encryption key for encrypting the initial configuration data stream; and encrypting the initial configuration data stream based on the encryption key to obtain the target configuration data stream.
[0063] In this embodiment, an encryption key is obtained; according to the encryption key, the initial configuration data stream is encrypted to obtain the target configuration data stream. For example, the encryption key is obtained from the security component, which is only an illustrative example and does not limit the specific method of obtaining the encryption key.
[0064] For example, the encryption key in the security component is called to encrypt the initial configuration data stream, where the security component is used to indicate the component that stores the encryption key that is pre-agreed between the cloud and the vehicle.
[0065] Optionally, an encryption key is a confidential string or number used to encrypt and decrypt data. It is a critical component used to protect the security of data, ensuring that only authorized users can access and read encrypted data. An encryption key is usually a randomly generated string, and the length and complexity depends on the requirements of the encryption algorithm.
[0066] As an optional implementation manner, converting the configuration file into an initial configuration data stream includes: converting the configuration file in blocks to obtain the initial configuration data stream.
[0067] In this embodiment, a file conversion algorithm is used to convert the target configuration data stream into a target configuration file.
[0068] For example, the target configuration data stream is converted into the target configuration file by using the file conversion algorithm by reading the target configuration data stream, parsing the data stream, building the target configuration file, and writing the configuration file.
[0069] It should be noted that the above embodiment can be executed by a transmission device of a vehicle configuration file.
[0070] In this embodiment, in response to the vehicle receiving the target configuration data stream, the target configuration data stream is converted into a target configuration file, wherein the target configuration data stream is obtained by converting the configuration file to be transmitted into an initial configuration data stream by the cloud, and encrypting the initial configuration data stream, the configuration file is used to configure the vehicle, and the initial configuration data stream is used to indicate the data stream that the vehicle needs to receive; the target configuration file is decrypted to obtain a decrypted configuration file; based on the decrypted configuration file, the vehicle is controlled to perform configuration operations. That is to say, in the embodiment of the present invention, by encrypting the initial configuration data stream and sending it to the vehicle, the vehicle converts the target configuration data stream into the target configuration file, and encrypting the data during the data transmission process, the configuration file is avoided from being attacked or leaked during the transmission process, thereby solving the technical problem of low security of the vehicle's configuration file during the transmission process, and achieving the technical effect of improving the security of the vehicle's configuration file during the transmission process.
[0071] Example 2
[0072] The technical solution of the embodiment of the present invention is illustrated below in conjunction with preferred implementation modes.
[0073] At present, with the rapid development of the Internet of Vehicles, in order to better serve users and provide a highly reliable and safe driving experience, the security of data file transmission between the cloud and vehicle systems is very important, because these systems involve a large amount of sensitive data. Such as user personal information, vehicle data, road condition information, etc. If these data are attacked or leaked during transmission, it will cause serious damage to users and systems. Therefore, the cloud and vehicle systems need to continuously improve security in data file transmission to ensure the safety and reliability of data files.
[0074] In the related art, configuration files are usually obtained from the cloud and distributed through access control, without considering the configuration file encryption scenario. Even after the access rights are controlled, the configuration files can still be obtained, resulting in a security risk of configuration file leakage. Secondly, after the access configuration file is sent to the adapted vehicle, it is synchronized through the vehicle communication network, and the file security storage scenario is not considered. Therefore, the prior art has the technical problem of unsafe file transmission between the cloud and the vehicle. In order to solve the above-mentioned technical problem of low security of the vehicle configuration file during transmission, no effective solution has been proposed so far.
[0075] However, the embodiment of the present invention proposes a data stream configuration file encryption and decryption transmission method, which sends the configuration file data stream in encrypted form. After receiving the data stream configuration file, the vehicle end converts the data stream into a file form, which can only be used after the component decrypts the file. At the same time, after the configuration file is synchronized with the controller, the file is encrypted and stored to ensure the security and integrity of the file. This solves the technical problem of low security of the vehicle configuration file during transmission, and achieves the technical effect of improving the security of the vehicle configuration file during transmission.
[0076] The embodiments of the present invention are further described below.
[0077] Figure 2 is a flow chart of a data stream configuration file encryption and decryption transmission method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0078] Step S201, obtaining a configuration file from the cloud.
[0079] In this embodiment, the configuration file is obtained from the cloud.
[0080] Optionally, to obtain configuration files from the cloud, you can usually do so in the following ways: Use cloud storage services: Store configuration files in cloud storage services, and then access and download configuration files to your local computer through APIs (Application Programming Interface) or SDKs (Software Development Kits). Use cloud databases: Store configuration files in cloud databases, and then obtain configuration file data through corresponding database connection tools or SDKs. Use specific tools or services of cloud service providers: Some cloud service providers may provide specific tools or services to manage and obtain configuration files. You can choose the appropriate method to obtain configuration files based on the specific situation.
[0081] Step S202: convert the configuration file into a data stream.
[0082] In this embodiment, the configuration file obtained in step S201 is converted into a data stream.
[0083] Optionally, there are multiple ways to convert the configuration file into a data stream. Here are some common methods:
[0084] Alternatively, use streaming reading: You can use a file reading stream to read the contents of a configuration file and convert it into a data stream. For example, in Java you can use FileInputStream to read the file contents and then convert it into a data stream.
[0085] Alternatively, use the built-in functions of the programming language: Many programming languages provide built-in functions for reading file contents, which can directly convert the configuration file into a data stream. For example, in Python, you can use the open function to open a file and read its contents.
[0086] Optionally, use a third-party library: There are some third-party libraries specifically designed for processing configuration files, which can help convert configuration files into data streams. For example, in Java, you can use the Apache Commons Configuration library to process configuration files.
[0087] Alternatively, manual processing: If none of the above methods are applicable, you can also manually read the contents of the configuration file and convert it into a data stream. This method may be more tedious and complicated, but it may be the only option in some special cases.
[0088] Step S203: encrypt the data stream.
[0089] In this embodiment, the data stream processed in step S202 is encrypted, for example, using AES256 for encryption.
[0090] Optionally, ES256 is a symmetric encryption algorithm that uses a 256-bit key length and is one of the most commonly used encryption algorithms. When encrypting a data stream, the AES256 algorithm can be used to protect the confidentiality of the data.
[0091] Optionally, the process of performing AES256 encryption processing on the data stream may be the following method.
[0092] Optionally, generate a key: First, you need to generate a 256-bit key, which will be used to encrypt and decrypt data. The key can be generated by a random number generator. Among them, the key of this solution is in the security component, and the data stream can be encrypted using the security component.
[0093] Optionally, after the key is generated, an initialization vector is generated. Initialization Vector (IV) Generation: In Advanced Encryption Standard (AES) encryption, the initialization vector is a random number of fixed length used to increase the security of encryption. When encrypting a data stream, a random initialization vector needs to be generated.
[0094] Optionally, after generating the initial vector, block encryption is performed: when performing data stream encryption, the data stream needs to be divided into blocks of a fixed size, and then each block is encrypted. The AES256 algorithm uses a block cipher for encryption, and the size of each block is 128 bits (16 bytes).
[0095] Optionally, after block encryption is completed, select an encryption mode: When encrypting a data stream, you need to select a suitable encryption mode. Common encryption modes include ECB (Electronic Codebook), CBC (Cipher Block Chaining), CFB (Cipher Feedback), OFB (Output Feedback) and CTR (Counter Mode). Among them, CBC mode is one of the most commonly used encryption modes, which can provide higher security.
[0096] Optionally, an encryption operation is performed according to the encryption mode: an encryption operation is performed on each data block using the AES256 algorithm to convert the plaintext into ciphertext. The encryption operation includes steps such as round key addition (AddRoundKey), byte substitution (SubBytes), row shift (ShiftRows) and column confusion (MixColumns).
[0097] Optionally, process the last block: If the length of the data stream is not an integer multiple of the block size, padding is required for the last block. Common padding methods include PKCS#7 padding and Zero padding.
[0098] Optionally, after processing the last block, ciphertext output is performed: the encrypted data blocks are output in sequence to obtain a final ciphertext data stream.
[0099] Through the above steps, the data stream can be encrypted using the AES256 algorithm to ensure the confidentiality and security of the data. When decrypting, the same key and initial vector need to be used for decryption operations to restore the ciphertext to a plaintext data stream.
[0100] Alternatively, ECB is the simplest encryption mode, which divides the plaintext into blocks of equal length, and then encrypts each block independently. This means that if the plaintext content of two blocks is the same, their ciphertext will also be the same, which may cause some security issues.
[0101] Optionally, CBC is a symmetric encryption mode that divides the plaintext into fixed-size blocks, and pads each block before encryption. Each block is XORed with the previous encrypted block before encryption. Therefore, the encryption of each block depends on the ciphertext of the previous block, which can increase the security of the encryption.
[0102] Optionally, in CBC mode, an initialization vector (IV) is required to increase the randomness of the encryption. The IV is XORed with the first plaintext block before encryption. When decrypting, the same IV is needed to decrypt the first ciphertext block.
[0103] Alternatively, although CBC mode is a more secure encryption mode, it does not support parallel encryption and decryption operations because the encryption of each block depends on the ciphertext of the previous block. In addition, if the IV is leaked or an error occurs during the encryption process, the security of the entire encryption process may be affected. Therefore, when using CBC mode, you need to pay attention to protecting the security of the IV and ensure that no errors occur during the encryption process.
[0104] Optionally, CFB is an encryption mode that uses the previous ciphertext block as input to encrypt the current plaintext block. In CFB mode, the output of the encryption algorithm is XORed with the plaintext block and then outputs the ciphertext block. This encryption mode can make the encryption and decryption process more flexible because it can support data blocks of different sizes and does not require padding. CFB mode can also provide message integrity and confidentiality because each ciphertext block is dependent on the previous ciphertext block. CFB mode is often used for data stream encryption and implementing stream ciphers.
[0105] Alternatively, the advantages of CFB mode: 1. It can implement block encryption, without the need to encrypt or decrypt the entire message, thereby improving efficiency. 2. It can implement real-time encryption, and can output partial ciphertext even when the plaintext input is incomplete. 3. Compared with other encryption modes, CFB mode is easier to parallelize, so it can increase the speed of encryption.
[0106] Alternatively, the disadvantages of CFB mode are: 1. CFB mode encrypts plaintext in groups, which may expose the correlation between plaintexts and reduce security. 2. The ciphertext length of CFB mode is the same as the plaintext length, and the message length will not be expanded or compressed, which may leak some information. 3. If the key is leaked or the attacker obtains the correspondence between part of the ciphertext and plaintext, it is possible to obtain more plaintext information by analyzing the ciphertext.
[0107] Optionally, OFB mode is an encryption mode, commonly used in block cipher algorithms such as AES or DES. In OFB mode, the encryption key is input into a feedback function to generate a pseudo-random key stream, and then the plaintext and the pseudo-random key stream are XORed to generate the ciphertext.
[0108] Alternatively, the advantages of OFB mode include: 1. Parallel encryption and decryption: Since the pseudo-random key stream does not depend on the previous ciphertext block, multiple blocks can be encrypted and decrypted in parallel. 2. Simple implementation: The implementation of OFB mode is relatively simple, requiring only the implementation of a feedback function and an XOR operation.
[0109] Alternatively, the disadvantages of OFB mode include: 1. Inability to provide integrity protection: Since OFB mode does not use MAC or digital signature to verify the integrity of the ciphertext, it may be vulnerable to tampering attacks. 2. Inability to provide authentication: OFB mode only provides encryption, not authentication, and therefore may be vulnerable to forgery attacks.
[0110] Alternatively, OFB mode is a simple and efficient encryption mode suitable for application scenarios that require high-speed encryption and decryption, but requires additional measures to ensure data integrity and authentication.
[0111] Optionally, CTR mode is a stream cipher mode that divides the plaintext into fixed-length blocks, then uses a counter and key generator to generate a key stream, and then XORs the plaintext and the key stream to obtain the ciphertext. CTR mode has parallelism and randomness, so it is efficient when encrypting large amounts of data and is not affected by plaintext repetition attacks.
[0112] Optionally, the advantages of CTR mode include: 1. Parallelism: multiple data blocks can be encrypted or decrypted at the same time, which improves the encryption speed. 2. Randomness: each data block uses a different counter value, resulting in randomness in the generated ciphertext, which increases security.
[0113] Alternatively, the disadvantages of the CTR mode include: 1. It is necessary to ensure that each counter value is used only once, otherwise the ciphertext will be leaked. 2. The management and update of the counter value is relatively complicated, and it is necessary to ensure that the counter value will not be repeated or tampered with.
[0114] Optionally, the CTR mode is an efficient and secure encryption mode suitable for encryption of large amounts of data and scenarios requiring high-speed encryption.
[0115] Optionally, CTR is an encryption mode used in encryption block cipher algorithms. CTR mode divides the plaintext into fixed-length blocks, then uses a counter to generate a key stream, performs an XOR operation on each key stream and the corresponding plaintext block, and finally obtains the ciphertext.
[0116] Optionally, the advantage of CTR mode is that encryption and decryption operations can be performed in parallel, without waiting for the encryption of the previous block to be completed before the next block can be encrypted. CTR mode also does not require padding operations, and even if the plaintext length is not an integer multiple of the block length, it will not affect the encryption process.
[0117] Optionally, the security of CTR mode relies on the uniqueness and unpredictability of the counter. If the same counter value is used multiple times, it may cause duplication of the key stream, thereby reducing the security of the encryption. Therefore, when using CTR mode, it is necessary to ensure the uniqueness and unpredictability of the counter value.
[0118] Step S204, sending the encrypted data stream to the vehicle end.
[0119] In this embodiment, the encrypted data stream in step S203 is sent to the vehicle end.
[0120] Optionally, data streams are sent down through the cloud to ensure the security of configuration files, prevent files from being obtained after the communication is attacked, and prevent other attacks on the vehicle and the cloud. Data stream conversion and encryption can effectively improve security.
[0121] Optionally, sending the encrypted data stream to the vehicle has the following effects: 1. Higher data security: The encrypted data stream can improve the security of the data and prevent the data from being maliciously tampered with or stolen during transmission. 2. Prevent information leakage: The encrypted data stream can effectively prevent the illegal acquisition of vehicle information during transmission, and protect the privacy and personal information security of the vehicle owner. 3. Prevent hacker attacks: The encrypted data stream can effectively prevent hackers from attacking the vehicle system and protect the security and stability of the vehicle system. 4. Comply with regulatory requirements: The encrypted data stream complies with the requirements of relevant regulations on data security, which is conducive to vehicle manufacturers and operators to comply with regulations and reduce legal risks. 5. Improve user trust: The encrypted data stream can improve users' trust in vehicle systems and services, and enhance users' trust in vehicle brands and companies.
[0122] Step S205: the vehicle side converts the received data stream into a file.
[0123] In this embodiment, the vehicle end converts the received data stream into a file, that is, performs stream-file conversion.
[0124] Optionally, the vehicle side may convert the received data stream into a file in the following steps.
[0125] Optionally, the data stream is received first: the vehicle side receives the data stream through the network or other means.
[0126] Optionally, after receiving the data stream, the data stream is processed: the vehicle side processes the received data stream, such as parsing the data, filtering the data, and other operations.
[0127] Optionally, convert the processed data stream into a file: the vehicle side converts the processed data stream into a file format, which can be a text file, image file, video file, etc.
[0128] Step S206: calling the security component to decrypt the file.
[0129] In this embodiment, the security component is called to decrypt the file. The security component is a security component configured on the cloud and the vehicle. The security component contains the communication protocol and key agreed upon by the cloud and the vehicle.
[0130] Optionally, to call a security component to decrypt a file, you first need to determine the interface and method of the security component to be used. Usually, the security component provides some methods for decrypting files, and these methods can be called to implement the file decryption operation. The specific steps are as follows: 1. Import the relevant library or package of the security component. 2. Create an instance of the security component. 3. Call the decryption method of the security component and pass in parameters such as the file path and key to be decrypted. 4. Get the decrypted file content and save it to the specified location.
[0131] Step S207: the vehicle performs configuration operations according to the decrypted file.
[0132] In this embodiment, the vehicle side performs configuration operations according to the decrypted file content, for example, performs configuration operations according to the configuration content extracted from the decrypted file.
[0133] Optionally, by decrypting the configuration file, more precise configuration operations can be performed to optimize vehicle performance. In addition, decrypting the configuration file can also help identify possible problems and risks, and make timely adjustments and improvements to ensure the safety and reliability of the vehicle. By decrypting the configuration file, you can better control the vehicle's configuration, improve the vehicle's performance and efficiency, and provide users with a better driving experience.
[0134] Step S208, encrypt the decrypted file again and store it securely.
[0135] In this embodiment, the decrypted file is encrypted again by calling the security component and stored, thereby ensuring the confidentiality and security of the configuration file and preventing the configuration file from being leaked.
[0136] Optionally, the file data stream is converted in the cloud and encrypted and sent, and the vehicle performs stream file conversion, decoding, decryption, and encrypted storage processing. Compared with access permission control, it can effectively protect the confidentiality and security of files from sending them to using and storing them.
[0137] Optionally, the security of the file can be increased by calling the security component again for encryption to prevent unauthorized access and theft. Prevent tampering: The re-encrypted file can prevent the file content from being tampered with, ensuring the integrity and reliability of the file. Meet compliance requirements: Some industries or regulations require that stored files must be encrypted and protected. Re-encryption can ensure compliance with relevant compliance requirements. Prevent data leakage: Re-encryption can effectively prevent the leakage of sensitive data and protect personal privacy and confidential information from being leaked. Increase the security level: Multi-layer encryption can increase the security level, improve the security of the file, and reduce the risk of attack. Improve data protection capabilities: The re-encrypted file can increase data protection capabilities and ensure the security of data during transmission and storage.
[0138] In this embodiment, the configuration file data stream is sent in encrypted form. After receiving the data stream configuration file, the vehicle end converts the data stream into a file form, which can be used only after the file is decrypted by the component. At the same time, after the configuration file is synchronized with the controller, the file is encrypted and stored to ensure the security and integrity of the file, thereby solving the technical problem of low security of the vehicle configuration file during transmission and achieving the technical effect of improving the security of the vehicle configuration file during transmission.
[0139] Example 3
[0140] According to an embodiment of the present invention, a device for transmitting a configuration file of a vehicle is also provided. It should be noted that the device for transmitting a configuration file of a vehicle can be used to execute the method for transmitting a configuration file of a vehicle in Embodiment 1.
[0141] Figure 3 FIG. 1 is a schematic diagram of a transmission device for a vehicle configuration file according to an embodiment of the present invention. Figure 3 As shown, the transmission device 300 for the vehicle configuration file may include: a conversion unit 301 , a decryption unit 302 and a control unit 303 .
[0142] The conversion unit 301 is used to convert the target configuration data stream into a target configuration file in response to the vehicle receiving the target configuration data stream, wherein the target configuration data stream is obtained by converting the configuration file to be transmitted by the cloud into an initial configuration data stream and encrypting the initial configuration data stream, the configuration file is used to configure the vehicle, and the initial configuration data stream is used to indicate the data stream that the vehicle needs to receive.
[0143] The decryption unit 302 is used to decrypt the target configuration file to obtain a decrypted configuration file.
[0144] The control unit 303 is used to control the vehicle to perform configuration operations based on the decrypted configuration file.
[0145] Optionally, the conversion unit 301 may include: a first input module, configured to write the target configuration data stream into a blank configuration file to obtain a target configuration file.
[0146] Optionally, the decryption unit 302 may include: a first acquisition module, configured to acquire a decryption key; and a decryption module, configured to decrypt the target configuration file using the decryption key to obtain a decrypted configuration file.
[0147] Optionally, the control unit 303 may include: an extraction module, used to extract operation information from the decrypted configuration file, wherein the operation information is used to indicate the type of operation that the vehicle needs to perform; and a control module, used to control the vehicle to perform the configuration operation according to the operation information.
[0148] Optionally, the transmission device 300 of the vehicle configuration file may further include: a first acquisition unit, used to obtain an encryption key used to encrypt the decrypted configuration file; an encryption unit, used to encrypt the decrypted configuration file using the stored encryption key to obtain a stored encrypted file, wherein the decrypted file includes the decrypted configuration file; and an upload unit, used to upload the stored encrypted file to the cloud.
[0149] Optionally, the transmission device 300 of the vehicle configuration file may further include: a second acquisition unit, used to acquire the configuration file to be transmitted, wherein the configuration file is used to perform configuration operations on the vehicle; a second conversion unit, used to convert the configuration file into an initial configuration data stream, wherein the initial configuration data stream is used to indicate a data stream that the vehicle needs to receive; an encryption unit, used to encrypt the initial configuration data stream to obtain a target configuration data stream; a sending unit, used to send the target configuration data stream to the vehicle, wherein the target configuration data stream is converted by the vehicle into a target configuration file, the target configuration file is decoded by the vehicle to obtain a decrypted configuration file, and the decrypted configuration file is used to control the vehicle to perform configuration operations.
[0150] Optionally, the encryption unit may include: a second acquisition module, used to acquire an encryption key used to encrypt the initial configuration data stream; an encryption module, used to encrypt the initial configuration data stream based on the encryption key to obtain a target configuration data stream.
[0151] Optionally, the second conversion unit includes: a second input module, used to convert the configuration file in blocks to obtain an initial configuration data stream.
[0152] In this embodiment, in response to the vehicle receiving the target configuration data stream, the target configuration data stream is converted into a target configuration file, wherein the target configuration data stream is obtained by converting the configuration file to be transmitted into an initial configuration data stream by the cloud, and encrypting the initial configuration data stream, the configuration file is used to configure the vehicle, and the initial configuration data stream is used to indicate the data stream that the vehicle needs to receive; the target configuration file is decrypted to obtain a decrypted configuration file; based on the decrypted configuration file, the vehicle is controlled to perform configuration operations. That is to say, in the embodiment of the present invention, by encrypting the initial configuration data stream and sending it to the vehicle, the vehicle converts the target configuration data stream into the target configuration file, and encrypting the data during the data transmission process, the configuration file is avoided from being attacked or leaked during the transmission process, thereby solving the technical problem of low security of the vehicle's configuration file during the transmission process, and achieving the technical effect of improving the security of the vehicle's configuration file during the transmission process.
[0153] Example 4
[0154] According to an embodiment of the present invention, a computer-readable storage medium is further provided. The storage medium includes a stored program, wherein the program executes the method for transmitting a configuration file of a vehicle in Embodiment 1.
[0155] Example 5
[0156] According to an embodiment of the present invention, a processor is further provided. The processor is used to run a program. When the program is run, the method for transmitting a configuration file of a vehicle in Embodiment 1 is executed.
[0157] According to an embodiment of the present invention, a vehicle is further provided. The vehicle is used to execute the method for transmitting a configuration file of the vehicle in embodiment 1.
[0158] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0159] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0160] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0161] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0162] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0163] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent functional component, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software functional component, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program codes.
[0164] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for transmitting a vehicle configuration file, characterized in that: include: In response to the vehicle receiving the target configuration data stream, converting the target configuration data stream into a target configuration file, wherein the target configuration data stream is obtained by converting the configuration file to be transmitted into an initial configuration data stream by the cloud, and encrypting the initial configuration data stream, the configuration file is used to configure the vehicle, and the initial configuration data stream is used to indicate the data stream that the vehicle needs to receive; Decrypting the target configuration file to obtain a decrypted configuration file; Based on the decrypted configuration file, the vehicle is controlled to perform a configuration operation.
2. The method according to claim 1, characterized in that In response to the vehicle receiving the target configuration data stream, converting the target configuration data stream into a target configuration file includes: The target configuration data stream is written into a blank configuration file to obtain the target configuration file.
3. The method according to claim 1, characterized in that Decrypt the target configuration file to obtain a decrypted configuration file, including: Get the decryption key; The target configuration file is decrypted using the decryption key to obtain the decrypted configuration file.
4. The method according to claim 1, characterized in that Based on the decrypted configuration file, controlling the vehicle to perform configuration operations includes: Extracting operation information from the decrypted configuration file, wherein the operation information is used to indicate a type of operation that the vehicle needs to perform; According to the operation information, the vehicle is controlled to perform the configuration operation.
5. The method according to claim 1, characterized in that After controlling the vehicle to perform a configuration operation based on the decrypted configuration file, the method further includes: Obtaining an encryption key used to encrypt the decryption configuration file; Encrypting the decryption configuration file using the encryption key to obtain a storage encrypted file, wherein the decryption file includes the decryption configuration file; The stored encrypted file is uploaded to the cloud.
6. A method for transmitting a vehicle configuration file, characterized in that: include: Obtaining a configuration file to be transmitted, wherein the configuration file is used to perform configuration operations on the vehicle; Converting the configuration file into an initial configuration data stream, wherein the initial configuration data stream is used to indicate a data stream that the vehicle needs to receive; Encrypting the initial configuration data stream to obtain a target configuration data stream; The target configuration data stream is sent to the vehicle, wherein the target configuration data stream is converted by the vehicle into a target configuration file, the target configuration file is decoded by the vehicle to obtain a decrypted configuration file, and the decrypted configuration file is used to control the vehicle to perform configuration operations.
7. The method according to claim 6, characterized in that The initial configuration data stream is encrypted to obtain a target configuration data stream, including: Obtaining an encryption key for encrypting the initial configuration data stream; The initial configuration data stream is encrypted based on the encryption key to obtain the target configuration data stream.
8. The method according to claim 6, characterized in that Converting the configuration file into an initial configuration data stream includes: The configuration file is converted into blocks to obtain the initial configuration data stream.
9. A transmission device for a vehicle configuration file, characterized in that: include: a conversion unit, configured to convert the target configuration data stream into a target configuration file in response to the vehicle receiving the target configuration data stream, wherein the target configuration data stream is obtained by converting the configuration file to be transmitted into an initial configuration data stream by the cloud and encrypting the initial configuration data stream, the configuration file is used to configure the vehicle, and the initial configuration data stream is used to indicate a data stream that the vehicle needs to receive; A decryption unit, used to decrypt the target configuration file to obtain a decrypted configuration file; A control unit is used to control the vehicle to perform configuration operations based on the decrypted configuration file.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed by a processor, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 8.
11. A processor, characterized in that: The processor is used to run a program, wherein the program executes the method according to any one of claims 1 to 8 when running.
12. A vehicle, characterized in that: The vehicle is used to perform the method according to any one of claims 1 to 8.
Citation Information
Cited By
System for managing vehicle safety monitoring function based on cloud
CN119172168A
