Device data encryption methods, computer equipment, storage media and software products

By generating a key index file and a target key to encrypt the data of the vehicle ECU device, the problem of low data security of the vehicle ECU device already in use is solved, and high-security encryption without hardware upgrades is achieved.

CN119740246BActive Publication Date: 2026-04-03FOSS (HANGZHOU) INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In existing technologies, the data security of in-vehicle ECU devices already in use is low, and they cannot effectively protect sensitive information, especially lacking special hardware support.

Method used

By acquiring the current device's random key pool file, raw image data, and raw radar data, a key index file is generated, and a target key is generated based on this data to encrypt the device data and generate ciphertext data.

Benefits of technology

It significantly improves device data security and increases the difficulty for third parties to crack the software without requiring hardware upgrades, and is suitable for most devices without hardware support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740246B_ABST
    Figure CN119740246B_ABST
Patent Text Reader

Abstract

This application relates to a device data encryption method, a computer device, a storage medium, and a program product. The method includes: in response to an encryption command, obtaining a random key pool file, original image data, and original radar data of the current device; the random key pool file is generated based on the original image data and the original radar data; generating a key index file based on the original image data and the original radar data; generating a target key based on multiple bytes in the random key pool file corresponding to the key index file; and encrypting the device data of the current device based on the target key to obtain ciphertext data. This method can improve device data security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information security technology, and in particular to a device data encryption method, computer equipment, storage medium, and program product. Background Technology

[0002] Today, vehicle ECUs (Electronic Control Units) store a lot of sensitive business data, such as communication keys, autonomous driving model files, driving history trajectories, and in-vehicle video recordings. If this business data is illegally obtained, it will cause automotive information security problems.

[0003] Traditional technologies require specialized hardware to protect sensitive information from unauthorized access. However, this approach is not applicable to already deployed vehicle ECUs that lack such specialized hardware.

[0004] It is evident that existing technologies still suffer from low data security in in-vehicle equipment already in use. Summary of the Invention

[0005] Therefore, it is necessary to provide a device data encryption method, computer device, storage medium, and program product that can improve the security of device data in response to the above-mentioned technical problems.

[0006] In a first aspect, this application provides a device data encryption method, the device data encryption method comprising:

[0007] In response to an encryption command, the device retrieves a random key pool file, raw image data, and raw radar data for the current device; the random key pool file is generated based on the raw image data and the raw radar data.

[0008] Based on the original image data and the original radar data, a key index file is generated;

[0009] A target key is generated based on multiple bytes in the random key pool file that correspond to the key index file.

[0010] The device data of the current device is encrypted based on the target key to obtain ciphertext data.

[0011] In one embodiment, generating the random key pool file includes:

[0012] Acquire raw image data and raw radar data;

[0013] The original image data and the original radar data are divided into equal parts according to a preset number of equal parts, resulting in a preset number of original image sub-data and original radar sub-data.

[0014] According to the order of equal division, the preset number of original image sub-data and original radar sub-data are grouped to obtain the preset number of original sub-data pairs; each original sub-data pair includes one original image sub-data and one original radar sub-data.

[0015] Based on each of the original sub-data pairs, a candidate key is generated;

[0016] The random key pool file is generated based on the multiple candidate keys.

[0017] In one embodiment, acquiring the raw image data and raw radar data includes:

[0018] Power on the image acquisition device and radar device of the current equipment;

[0019] A rotatable image of a first preset size and preset texture is placed in front of the image acquisition device;

[0020] A second, rotatable metal mesh of a preset size and preset pattern is placed in front of the radar device.

[0021] Based on the data collected by the image acquisition device at a preset time point, the original image data is obtained;

[0022] Based on the data collected by the radar device at preset time points, raw radar data is obtained.

[0023] In one embodiment, dividing the original image data into equal parts includes:

[0024] The number of bytes in the original image data is obtained and denoted as the first byte count;

[0025] Based on the first byte count and the preset number of equal divisions, the original image data is truncated to obtain truncated image data;

[0026] Based on the preset number of equal divisions, the cropped image data is divided into equal parts to obtain the preset number of original image sub-data.

[0027] In one embodiment, dividing the raw radar data into equal parts includes:

[0028] The number of bytes of the original radar data is recorded as the second byte count.

[0029] Based on the second byte count and the preset number of equal divisions, the original radar data is truncated to obtain truncated radar data;

[0030] Based on the preset number of equal divisions, the intercepted radar data is divided into equal parts to obtain the preset number of original radar sub-data.

[0031] In one embodiment, generating a candidate key based on each of the original sub-data pairs includes:

[0032] The first byte of data is obtained by performing a hash operation on the original image sub-data in the original sub-data pair.

[0033] The second byte of data is obtained by performing a hash operation on the original radar sub-data in the original sub-data pair.

[0034] The first byte of data and the second byte of data are concatenated to obtain the candidate key.

[0035] In one embodiment, the original image data includes a first original image sub-data, the original radar data includes a first original radar sub-data, and generating a key index file based on the original image data and the original radar data includes:

[0036] Based on the first original image sub-data and the first original radar sub-data, multiple tuples are generated; each tuple includes a first element and a second element; the first element is determined by the Nth byte in the first original image sub-data, and the second element is determined by the Nth byte in the first original radar sub-data; N is a positive integer less than or equal to the number of candidate keys in the random key pool file;

[0037] Based on the multiple tuples, a key index file is obtained.

[0038] In one embodiment, generating the target key based on multiple bytes in the random key pool file corresponding to the key index file includes:

[0039] Based on each of the two tuples, the bytes in the random key pool file are searched sequentially to obtain multiple index bytes;

[0040] The target key is determined based on multiple index bytes.

[0041] In one embodiment, determining the target key based on a plurality of the index bytes includes:

[0042] The concatenated string is obtained by combining multiple index bytes.

[0043] The target key is determined by performing a hash operation based on the concatenated string.

[0044] In one embodiment, after encrypting the device data of the current device based on the target key to obtain ciphertext data, the method further includes:

[0045] Store the encrypted data and delete the target key and the device data.

[0046] In one embodiment, after storing the ciphertext data and deleting the target key and the device data, the method further includes:

[0047] A target key is generated based on the random key pool file, the original image data, and the original radar data.

[0048] The encrypted data is decrypted based on the target key to obtain device data;

[0049] Update the original image data and the original radar data, and generate an updated random key pool file based on the original image data and the original radar data;

[0050] An updated target key is generated based on the updated random key pool file, the original image data, and the original radar data;

[0051] The device data is encrypted based on the updated target key;

[0052] Store the encrypted data, and delete the updated target key and the device data.

[0053] Secondly, this application provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described above.

[0054] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.

[0055] Fourthly, this application provides a computer program product that, when executed by a processor, implements the method described above.

[0056] The aforementioned device data encryption method, computer equipment, storage medium, and program product, in response to an encryption command, acquire a random key pool file, original image data, and original radar data of the current device. The random key pool file is generated based on the original image data and the original radar data. A key index file is generated based on the original image data and the original radar data. A target key is generated based on multiple bytes in the random key pool file corresponding to the key index file. The device data of the current device is encrypted based on the target key to obtain ciphertext data. This method enables the encryption of business data without requiring hardware upgrades. Since the target key is generated based on data collected by sensors, it effectively increases the difficulty for third parties to crack the encryption, thereby improving the security of device data. Attached Figure Description

[0057] Figure 1 This is a diagram illustrating the application environment of a device data encryption method in one embodiment;

[0058] Figure 2 This is a flowchart illustrating a device data encryption method in one embodiment;

[0059] Figure 3 This is a schematic diagram illustrating the process of acquiring raw image sub-data and raw radar sub-data in one embodiment;

[0060] Figure 4 This is a schematic diagram of the process for generating a random key pool file in one embodiment.

[0061] Figure 5 This is a schematic diagram of the process for generating a key index file in one embodiment;

[0062] Figure 6 This is a schematic diagram of the process for generating the target key in one embodiment;

[0063] Figure 7 This is a structural block diagram of a device data encryption device in one embodiment;

[0064] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0066] The device data encryption method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, it is understood that the device data encryption in this application can be limited to, but is not limited to, device data encryption of vehicle electronic control units (ECUs), and can also be applied to data encryption of other terminals. Terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated on server 104 or placed on the cloud or other network servers. In response to an encryption command, terminal 102 obtains the current device's random key pool file, original image data, and original radar data; the random key pool file is generated based on the original image data and the original radar data; a key index file is generated based on the original image data and the original radar data; a target key is generated based on multiple bytes in the random key pool file corresponding to the key index file; and the device data of the current device is encrypted based on the target key to obtain ciphertext data. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0067] In one embodiment, such as Figure 2 As shown, a device data encryption method is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps:

[0068] In step S100, in response to the encryption command, the random key pool file, raw image data, and raw radar data of the current device are obtained.

[0069] The random key pool file can be a pre-generated set of random keys stored in a protected storage location, and these random keys can be used for subsequent encryption operations. In this embodiment, the random key pool file is generated based on the original image data and the original radar data.

[0070] Raw image data can be unprocessed raw data from vehicle cameras or other visual sensors, such as one or more frames of unprocessed real-time images or video streams. Raw radar data can be unprocessed raw data from radar sensors used to detect the surrounding environment, such as information about the position and speed of surrounding objects.

[0071] The acquisition of raw image data and raw radar data can be performed simultaneously or sequentially. The raw image data and raw radar data can be acquired during the current operation of the equipment or data acquired by other equipment.

[0072] In this embodiment, the raw image data and raw radar data refer to the raw data used to generate the target key. To ensure that the target key remains the same over a period of time for encryption and decryption, the current device can continuously use the same raw image data and raw radar data to generate the same target key. Furthermore, the current device can also periodically update the target key, i.e., by re-acquiring the raw radar data and raw image data, and obtaining a new target key using the new raw radar data, raw image data, and a random key pool file.

[0073] The random key pool file is generated using raw image data and raw radar data because raw image data and raw radar data depend on the acquisition environment. Even data acquired under the same environment may have slight differences. Therefore, using this to generate the random key pool file ensures that each device's random key pool file is unique. Thus, the initial random key pool file can also be generated by using external devices to collect multiple sets of raw image data and raw radar data under different environmental conditions, sequentially generating random key pool files, and then sequentially allocating and storing each set of random key pool files, raw image data, and raw radar data to each device. Other data acquisition methods that can ensure the randomness and unpredictability of each device's random key pool file are also possible, but this embodiment does not limit this approach.

[0074] For example, the generation of a random key pool file can be achieved by splitting the original image data and original radar data separately, generating a candidate key for each part of the data, and generating a random key pool file containing multiple candidate keys; alternatively, feature information can be extracted from the original image data and original radar data separately. The feature information may include, but is not limited to, key points in the image (such as edges, corners, etc.), radar reflection signal strength, dynamic changes, etc. After obtaining the feature information, the two types of feature information are fused to form a set of comprehensive feature vectors that can reflect the current environmental state. The fusion method can be direct merging or extraction and integration using a machine learning model. Then, a key pool generator is used to generate a random key pool file based on the comprehensive feature vector; other methods for generating random key pool files based on original image data and original radar data may also be used, which are not limited in this embodiment.

[0075] Furthermore, during the operation of the equipment, a new random key pool file can be generated based on the original image data and original radar data collected by the equipment, thereby realizing the updating of the random key pool file.

[0076] Step S200: Generate a key index file based on the original image data and the original radar data.

[0077] The key index file is used to indicate how to select one or more keys from the random key pool file to generate the target key, and may include selection rules for one or more keys.

[0078] Based on the original image data and original radar data, a key index file is generated. This can be achieved by processing the original image data and original radar data according to preset rules, extracting data from specific locations in the original image data and original radar data, and using this data to randomly generate one or more key index information. This allows for the selection of multiple bytes corresponding to each key index information from a random key pool file.

[0079] For example, partial data can be extracted from the original image data to generate index information to index multiple candidate keys, and partial data can be extracted from the original radar data to generate index information to index the bytes to be selected in each candidate key.

[0080] Step S300: Generate a target key based on multiple bytes in the random key pool file that correspond to the key index file.

[0081] The key index file includes index information corresponding to multiple bytes. This index information allows for the search and extraction of corresponding bytes from the random key pool file. The obtained bytes can be a complete or partial candidate key. By retrieving multiple bytes from the random key pool file using the key index file, and then generating the target key, the extraction of bytes from the random key pool file makes it difficult for a third party to obtain the complete target key when analyzing the current device. Compared to hardcoding the key into the current device, this significantly increases the difficulty for a third party to analyze the current device and obtain the target key.

[0082] Generating the target key can be achieved by concatenating and post-processing multiple bytes. Furthermore, the concatenation can be based on the order of bytes in the random key pool file or the order of bytes in the key index file. Post-processing can be implemented using a secure key generation algorithm.

[0083] Step S400: Encrypt the device data of the current device based on the target key to obtain ciphertext data.

[0084] Device data refers to sensitive data within the current device that needs to be encrypted. For example, device data may include communication keys used for communication and interaction with other devices, autonomous driving model files, driving history trajectories, in-vehicle video recordings, and other business data. For instance, when a communication key needs to be encrypted as device data, a target key is generated using the current device's random key pool file, raw image data, and raw radar data. This target key is then used to encrypt the communication key, resulting in ciphertext data.

[0085] Encryption using a selected target key ensures that ciphertext data can only be decrypted if the target key is correct. Device data can be encrypted using a symmetric encryption algorithm with the target key to obtain ciphertext data.

[0086] Furthermore, when device data is needed, a target key can be generated from the current device's random key pool file, raw image data, and raw radar data. The encrypted data can then be decrypted using this target key to obtain the device data, which can then be used and further processed.

[0087] This embodiment provides a device data encryption method that, in response to an encryption command, obtains a random key pool file, original image data, and original radar data of the current device. The random key pool file is generated based on the original image data and the original radar data. A key index file is generated based on the original image data and the original radar data. A target key is generated based on multiple bytes in the random key pool file corresponding to the key index file. The device data of the current device is encrypted using the target key to obtain ciphertext data. This method enables the encryption of business data without requiring hardware upgrades or relying on special hardware, and is applicable to most devices without hardware support. Since the target key is generated based on data collected by sensors, it effectively increases the difficulty for third parties to crack the encryption, thereby improving the security of device data.

[0088] In one embodiment, generating the random key pool file includes:

[0089] Acquire raw image data and raw radar data;

[0090] The original image data and the original radar data are divided into equal parts according to a preset number of equal parts, resulting in a preset number of original image sub-data and original radar sub-data.

[0091] According to the order of equal division, the preset number of original image sub-data and original radar sub-data are grouped to obtain the preset number of original sub-data pairs; each original sub-data pair includes one original image sub-data and one original radar sub-data.

[0092] Based on each of the original sub-data pairs, a candidate key is generated;

[0093] The random key pool file is generated based on the multiple candidate keys.

[0094] The acquisition of raw image data and raw radar data can be done by obtaining them from a protected storage location or by obtaining the raw image data and raw radar data acquired by the image acquisition device and the radar device at the current moment.

[0095] The preset number of equal divisions can be a value set by the operator or user, or it can be set according to the required number of candidate keys. Dividing the data according to the preset number of equal divisions can be done by dividing the data into bytes as the smallest unit, or by dividing the data based on regions in the original image data and original radar data to obtain multiple original image sub-data and original radar sub-data in multiple equally divided regions; alternatively, it can be divided based on the number of frames in the original image data and original radar data to obtain multiple original image sub-data and original radar sub-data with the same number of frames.

[0096] For example, if the preset number of divisions is 4, the original image data can be divided into 4 parts based on the number of bytes in the original image data, and the original radar data can be divided into 4 parts based on the number of bytes in the original radar data. Alternatively, the image region corresponding to the original image data can be divided into 4 image regions, and the corresponding original image data can be extracted based on each image region. The image radar corresponding to the original radar data can be divided into 4 scanning regions, and the corresponding original radar data can be extracted based on each scanning region. Alternatively, the original image data can be divided into 4 equal frames based on the number of frames, and the corresponding original image data and original radar data can be extracted sequentially based on the number of frames.

[0097] The division order can be the data traversal order during the division process. According to the division order, the preset number of original image sub-data and original radar sub-data are grouped to obtain the preset number of original sub-data pairs. This can be achieved by grouping original image sub-data and original radar sub-data with the same sequence number into one group, thus obtaining multiple sub-data pairs.

[0098] Based on each of the original sub-data pairs, a candidate key is generated. This can be achieved by processing the original image sub-data and original radar sub-data in each original sub-data pair using a preset algorithm, such as a hash function, to obtain the candidate key. For example, the original image sub-data and original radar sub-data can be concatenated, and a hash function can be used to process the concatenated data according to its order to obtain the candidate key. Alternatively, one or more operations can be performed on the original image sub-data and original radar sub-data separately, and the results can be concatenated to obtain the target key.

[0099] The random key pool file is generated based on multiple candidate keys. This can be achieved by writing each generated candidate key into a pre-created empty file to obtain the random key pool file.

[0100] This embodiment provides a device data encryption method that combines different types of input data, divides them into multiple parts, and then reassembles them. This method can significantly increase the unpredictability of the generated key, making it difficult for an attacker to deduce the complete key even if they obtain a part of the information. It does not require additional dedicated security hardware support and is suitable for traditional vehicle ECUs that have already been deployed, thereby improving the security of device data.

[0101] In one embodiment, acquiring the raw image data and raw radar data includes:

[0102] Power on the image acquisition device and radar device of the current equipment;

[0103] A rotatable image of a first preset size and preset texture is placed in front of the image acquisition device;

[0104] A second, rotatable metal mesh of a preset size and preset pattern is placed in front of the radar device.

[0105] Based on the data collected by the image acquisition device at a preset time point, the original image data is obtained;

[0106] Based on the data collected by the radar device at preset time points, raw radar data is obtained.

[0107] In this process, the image acquisition device and radar device of the current equipment are powered on to ensure that they are powered on and in working order.

[0108] To ensure that each device generates a target key based on unique raw image and radar data, this can be achieved by changing the acquisition environment. In this embodiment, by setting a rotatable image and a metal mesh, the image and radar data acquired at each moment are different, thus achieving a one-device-one-key effect.

[0109] For an image acquisition device, a physical image of a first preset size and containing a preset texture can be placed within the acquisition field of view. A stepper motor can be installed on the back or other location of the image to control the image to rotate regularly or irregularly around an axis. The preset texture can be selected according to actual needs; for example, a black and white stripe pattern spaced at preset intervals can be selected, or any random and suitable pattern can be selected. Furthermore, the pattern position should be set to ensure that its proportion in the image acquisition device's frame is not less than a preset ratio, thereby ensuring that the pattern has a sufficiently dominant role in the randomness of the original image data.

[0110] For radar devices, a solid metal mesh of a second preset size and with a preset texture can be placed within the radar's field of view. A stepper motor can be mounted on the back or other location of this metal mesh to control its regular or irregular rotation around an axis. The preset texture can be selected according to actual needs. Furthermore, the mesh's position should be set such that its proportion in the radar's point cloud image is not less than a preset percentage, thereby ensuring that the mesh has a sufficiently dominant role in the randomness of the original radar data.

[0111] Based on the data collected by the image acquisition device at a preset time point, the original image data is obtained. This can be image data collected at the preset time point, or image data collected within a preset time period starting from the preset time point, which can be used as the original image data.

[0112] Based on the data collected by the radar device at a preset time point, the original radar data is obtained. This data can be either scan data collected at the preset time point or scan data collected within a preset duration starting from the preset time point, and can be used as the original radar data.

[0113] This embodiment provides a device data encryption method that introduces a rotatable object with a specific texture / structure through physical means, making each collected data highly variable. This helps generate more unpredictable candidate keys, increases the complexity and randomness of the underlying data used to generate the keys, thereby enhancing the security of the encryption system and improving the security of device data.

[0114] It is understandable that when dividing the original data into equal parts according to a preset number of bytes, the number of bytes in the original data may not be an integer multiple of the preset number of bytes, thus failing to achieve the desired equal division result. Therefore, in one embodiment, dividing the original image data into equal parts includes:

[0115] The number of bytes in the original image data is obtained and denoted as the first byte count;

[0116] Based on the first byte count and the preset number of equal divisions, the original image data is truncated to obtain truncated image data;

[0117] Based on the preset number of equal divisions, the cropped image data is divided into equal parts to obtain the preset number of original image sub-data.

[0118] The first byte count can be the total number of bytes in the original image data.

[0119] Based on the first byte count and the preset number of equal divisions, the original image data can be truncated. This can be achieved by performing a modulo operation on the first byte count according to the preset number of equal divisions to determine the redundant bytes in the original image data, thereby truncating the original image data. Truncating the original image data can involve removing either the beginning or the end of the original image data.

[0120] After the original image data is truncated, the number of bytes of the truncated image data will be an integer multiple of the preset number of equal divisions, thus obtaining the preset number of original image sub-data, ensuring the consistency of each original image sub-data.

[0121] Similarly, when dividing the original data into equal parts according to a preset number of equal parts, the first frame number of the original image data can be obtained; based on the first frame number and the preset number of equal parts, the original image data is truncated to obtain truncated image data.

[0122] This embodiment provides a device data encryption method that, by truncating and equally dividing the original image data, can retain as much of the original data content as possible while meeting the data segmentation requirements, thereby improving the stability and consistency of the device data encryption method.

[0123] In one embodiment, dividing the raw radar data into equal parts includes:

[0124] The number of bytes of the original radar data is obtained and denoted as the first byte count;

[0125] Based on the second byte count and the preset number of equal divisions, the original radar data is truncated to obtain truncated radar data;

[0126] Based on the preset number of equal divisions, the intercepted radar data is divided into equal parts to obtain the preset number of original radar sub-data.

[0127] The number of bytes in the second byte can be the number of bytes in the original radar data after statistical analysis.

[0128] Based on the second byte count and the preset number of equal divisions, the original radar data can be truncated. This can be achieved by performing a modulo operation on the second byte count according to the preset number of equal divisions to determine the redundant bytes in the original radar data, thereby truncating the original radar data. Truncation of the original radar data can be performed by removing either the header or the tail data.

[0129] After the original radar data is truncated, the number of bytes of the truncated radar data will be an integer multiple of the preset number of equal divisions, thus obtaining the preset number of original radar sub-data, ensuring the consistency of each original radar sub-data.

[0130] Similarly, when the original data is divided into equal parts according to the preset number of equal parts, the second frame number of the original radar data can be obtained; based on the second frame number and the preset number of equal parts, the original radar data is truncated to obtain truncated radar data.

[0131] This embodiment provides a device data encryption method that, by truncating and equally dividing the original radar data, can retain as much of the original data content as possible while meeting the data segmentation requirements, thereby improving the stability and consistency of the device data encryption method.

[0132] In one embodiment, generating a candidate key based on each of the original sub-data pairs includes:

[0133] The first byte of data is obtained by performing a hash operation on the original image sub-data in the original sub-data pair.

[0134] The second byte of data is obtained by performing a hash operation on the original radar sub-data in the original sub-data pair.

[0135] The first byte of data and the second byte of data are concatenated to obtain the candidate key.

[0136] The process of hashing the original image sub-data can be achieved by selecting a secure hash algorithm, taking the original image sub-data as input, and performing the hash operation to obtain a first byte of data of a fixed length.

[0137] The original radar sub-data can be hashed by selecting a secure hash algorithm, taking the original radar sub-data as input, and performing the hash operation to obtain a fixed-length second byte of data.

[0138] Concatenating the first byte of data and the second byte of data can be done by joining the first byte of data and the second byte of data together to obtain a candidate key.

[0139] This embodiment provides a device data encryption method that, through the irreversibility of hash functions and the diversity of data, can significantly enhance the security of the encryption system and achieve the effect of improving device data security.

[0140] In one embodiment, the original image data includes a first original image sub-data, the original radar data includes a first original radar sub-data, and generating a key index file based on the original image data and the original radar data includes:

[0141] Based on the first original image sub-data and the first original radar sub-data, multiple tuples are generated;

[0142] Based on the multiple tuples, a key index file is obtained.

[0143] The first original image sub-data can be any one of the original image data, and the first original radar sub-data can be any one of the original image data. Furthermore, the first original image sub-data and the first original radar sub-data can be determined according to a pre-set sequence number.

[0144] In this embodiment, a key index file may be generated based on the first original image sub-data and the first original radar sub-data. The key index file may be in the form of an index list, including multiple tuples. In this embodiment, the number of candidate keys in the random key pool file may be the same as the number of bytes of a single candidate key.

[0145] Each tuple includes a first element and a second element. The first element is determined by the Nth byte in the first original image sub-data and points to the corresponding candidate key. The second element is determined by the Nth byte in the first original radar sub-data and can be used to point to the corresponding byte within the candidate key. N is a positive integer less than or equal to the number of candidate keys in the random key pool file.

[0146] For example, when the number of candidate keys in the random key pool file is 32, 32 tuples can be generated. For example, in the first tuple, the first element is determined based on the first byte in the first original image sub-data, and the second element is determined based on the first byte in the first original radar sub-data; in the second tuple, the first element is determined based on the second byte in the first original image sub-data, and the second element is determined based on the second byte in the first original radar sub-data, and so on.

[0147] Furthermore, the first element can be the modulo result of the decimal integer value of the Nth byte in the first original radar sub-data and the number of candidate keys, and the second element can be the modulo result of the decimal integer value of the Nth byte in the first original radar sub-data and the number of candidate keys.

[0148] This embodiment provides a device data encryption method that uses tuples to guide key selection. This method increases the flexibility and complexity of the key generation process. Each tuple is based on specific bytes of the original image and radar data, which makes the generated key different each time, thereby improving security and increasing the unpredictability of the key, thus achieving the effect of improving device data security.

[0149] In one embodiment, generating the target key based on multiple bytes in the random key pool file corresponding to the key index file includes:

[0150] Based on each of the two tuples, the bytes in the random key pool file are searched sequentially to obtain multiple index bytes;

[0151] The target key is determined based on multiple index bytes.

[0152] This can be done by searching based on the first and second elements of a tuple. The first element is used to find the corresponding candidate key in the random key pool file, and the second element is used to find the corresponding byte in the candidate key. Thus, multiple index bytes can be obtained by querying multiple tuples.

[0153] The target key is determined based on multiple index bytes. This can be achieved by concatenating multiple bytes according to the order of the tuples, or by concatenating them according to the traversal order of each byte in the random key pool file.

[0154] The device data encryption method provided in this embodiment can improve the security of device data because the target key is composed of bytes at multiple different positions in a random key pool file, and these positions are dynamically determined by the original image and radar data.

[0155] In one embodiment, determining the target key based on a plurality of the index bytes includes:

[0156] The concatenated string is obtained by combining multiple index bytes.

[0157] The target key is determined by performing a hash operation based on the concatenated string.

[0158] The concatenated string is determined based on multiple index bytes. This can be achieved by concatenating multiple bytes according to the order of the tuples, or by concatenating each byte according to the traversal order in the random key pool file.

[0159] The target key is determined by performing a hash operation on the concatenated string. This can be achieved using a one-way encryption algorithm that converts data of arbitrary length into a fixed-length output to obtain the target key.

[0160] This embodiment provides a device data encryption method that obtains a concatenated string by concatenating multiple index bytes; and determines the target key by performing a hash operation on the concatenated string, thereby generating a highly unique and secure target key to improve device data security.

[0161] In one embodiment, after encrypting the device data of the current device based on the target key to obtain ciphertext data, the method further includes:

[0162] Store the encrypted data and delete the target key and the device data.

[0163] This involves selecting a secure and reliable storage location to store the encrypted data. This could be the internal memory of the vehicle's ECU, an external storage device, or a cloud storage service, and then writing the encrypted data to the selected storage medium. To ensure data integrity and security, security features provided by the file system, such as access control and access auditing, can be used.

[0164] Deleting the target key and the device data can be done by deleting the target key and device data from memory, to ensure that third parties cannot obtain the target key by reading memory, thereby preventing data leakage and effectively protecting sensitive data in the vehicle ECU.

[0165] This embodiment provides a device data encryption method that, by storing the ciphertext data and deleting the target key and the device data, can prevent third parties from obtaining the target key by reading memory, thereby improving the security of device data.

[0166] In one embodiment, after storing the ciphertext data and deleting the target key and the device data, the method further includes:

[0167] A target key is generated based on the random key pool file, the original image data, and the original radar data.

[0168] The encrypted data is decrypted based on the target key to obtain device data;

[0169] Update the original image data and the original radar data, and generate an updated random key pool file based on the original image data and the original radar data;

[0170] An updated target key is generated based on the updated random key pool file, the original image data, and the original radar data;

[0171] The device data is encrypted based on the updated target key;

[0172] Store the encrypted data, and delete the updated target key and the device data.

[0173] In this embodiment, a data encryption method for updating original image data and original radar data is provided. By updating the original image data and original radar data, a random key pool file and a corresponding key index list are regenerated, which can prevent data leakage caused by the data remaining unchanged for a long time.

[0174] The target key is generated based on the random key pool file, the original image data, and the original radar data. This can be done using the target key generation method employed in any of the above embodiments, which will not be elaborated upon in this embodiment.

[0175] Since the encrypted data is obtained by symmetric encryption of the device data using the target key, the device data can be obtained by decryption using the target key if the target key is correct.

[0176] The original image data and the original radar data are updated, and an updated random key pool file is generated based on the original image data and the original radar data. This can be done by regenerating the original image data and the original radar data in the same format and generating the updated random key pool file according to the method used in any of the above embodiments.

[0177] Based on the updated random key pool file, the original image data, and the original radar data, an updated target key is generated. This can be achieved by using the same target key generation method as the original method, which generates the target key corresponding to the updated data. Based on this updated target key, the device data is then re-encrypted to obtain new ciphertext data.

[0178] This embodiment provides a device data encryption method that significantly improves system security by updating the original image data, the original radar data, and the target key. Even if the previous key is leaked, the updated key prevents attackers from accessing the latest encrypted data, ensuring that the data is always under the latest encryption protection and thus improving device data security.

[0179] To more clearly illustrate the technical solution of this application, a detailed embodiment is also provided.

[0180] In one embodiment, a device data encryption method is provided, comprising the following steps:

[0181] I. Key Initialization Phase

[0182] The main task of this stage is for the intelligent driving system to collect and store raw image data (picdata) from cameras and raw radar data (radata) from radar. Then, the raw image data (picdata) and raw radar data (radata) are modified multiple times to generate a random key pool file (KPF). The specific process is as follows:

[0183] Step S1.1: Read and store raw image data (picdata) and raw radar data (radata): After the vehicle's intelligent driving system is activated, a request to obtain a frame of raw data is sent to the camera and radar. The returned data is then stored in flash memory. To improve the randomness of the raw image data (picdata) and raw radar data (radata) in a fixed environment, in scenarios with fixed external environments such as production lines or repair workshops, external random factors need to be provided to the camera and radar. Specifically, this could involve placing a rotatable device with 50cm x 50cm black and white stripes spaced 2cm apart in front of the camera. By adjusting the distance from the camera, the stripe pattern should occupy at least 50% of the camera's image, while the stripe device rotates around its central axis at a speed of one revolution per minute. Similarly, a 50cm x 50cm metal grid with a 1cm grid spacing should be placed in front of the radar, ensuring that the grid occupies at least 50% of the point cloud image, and rotating at a speed of one revolution per minute.

[0184] Step S1.2: Initialize a 32-order binary byte matrix 32Smatrix in the ECU memory.

[0185] Step S1.3, as follows Figure 3As shown, the original image data picdata is divided into 32 equal parts, denoted as original image subdata picdata[1], original image subdata picdata[2], ..., original image subdata picdata

[32] , including the following steps:

[0186] Step S1.3.1: Calculate the original image data picdata in bytes to determine the number of bytes in the original image data, denoted as piclength.

[0187] Step S1.3.2: Calculate the remainder when the original image data picdata is divided by 32, i.e., picremainder = piclengthmode32.

[0188] Step S1.3.3: In order to ensure that the original image data picdata is divisible by 32, remove picremainder bytes of data from the original image data picdata to obtain the truncated image data, and then divide it into 32 blocks, denoted as original image subdata picdata[1], original image subdata picdata[2], ..., original image subdata picdata

[32] .

[0189] Step S1.4, the original radar data is divided into 32 parts, denoted as original radar sub-data data[1], original radar sub-data data[2], ..., original radar sub-data data

[32] , including the following steps:

[0190] Step S1.4.1: Calculate the original radar data (radata) in bytes to determine the number of bytes in the original radar data, denoted as radlength.

[0191] Step S1.4.2: Calculate the remainder when the original radar data (radata) is divided by 32, i.e., radremainder = radlengthmode32.

[0192] Step S1.4.3, in order to ensure that the original radar data ratadata is divisible by 32, remove the pcipremainder bytes of data from the original radar data ratadata to obtain the truncated radar data, and then divide it into 32 blocks, denoted as original radar sub-data ratadata[1], original radar sub-data ratadata2]..., original radar sub-data ratadata

[32] .

[0193] Step S1.5, as follows Figure 4As shown, the binary byte matrix 32Smartix is ​​assigned values. This step involves performing the following operations on the original image sub-data picdata[1] to original image sub-data picdata

[32] and the original radar sub-data radata[1] to original radar sub-data radata

[32] from step 1.3, and assigning them to the binary byte matrix 32Smartix. The steps are as follows:

[0194] Step S1.5.1: The first 16 bytes of the first row of the binary byte matrix 32Smartix are equal to hash(picdata[1]), and the last 16 bytes are equal to hash(radata[1]).

[0195] In step S1.5.2, the first 16 bytes of the second row of the binary byte matrix 32Smartix are equal to hash(picdata[2]), and the last 16 bytes are equal to hash(radata[2]).

[0196] The subsequent steps follow the same pattern, completing the assignment of values ​​to the binary byte matrix 32Smartix, and obtaining the random key pool file.

[0197] II. Key WK Generation Stage

[0198] The main task of this stage is to generate the target key WK (WorkKey) for later encryption through the first raw radar sub-data (radata)[1], the first raw image sub-data (picdata)[1], and the binary byte matrix 32Smatrix generated in step 1 using a multi-dimensional key deriver (MDKD). The detailed process of the multi-dimensional key deriver MDKD is as follows:

[0199] Step S2.1: Generate 32 tuples using the first raw radar sub-data (radata) [1] and the first raw image sub-data (picdata) [1], such as... Figure 5 As shown, it includes the following steps:

[0200] Step S2.1.1: Take the first byte of the first original radar sub-data radata[1], convert the byte into an unsigned integer denoted as Sunit1, and then calculate sI-1 = Sunit1 mode 32, and so on to calculate sI-32.

[0201] Step S2.1.2: Take the first byte of the first original image sub-data picdata[1], convert the byte into an unsigned integer denoted as Dunit1, and then calculate DI-1 = Dunit1 mode 32, and so on to calculate DI-32.

[0202] In step S2.1.3, using sI-n calculated in step S2.1.1 as the first element and DI-n calculated in step S2.1.2 as the second element, 32 tuples (sI-1, DI-1)...(sI-32, DI-32) are generated and denoted as the key index file IndexBinarySet for later calculations.

[0203] Step S2.2, as follows Figure 6 As shown, using the key index file IndexBinarySet as the index, the contents of the corresponding bytes are read sequentially from the binary byte matrix 32Smartix generated in step S1, and concatenated one by one to generate a concatenated string prebinarystring of length n.

[0204] Step S2.3: The target key WK is obtained by performing a hash operation on the concatenated string prebinarystring, where WK = hash(prebinarystring).

[0205] III. Business Data Encryption Phase

[0206] The main task of the business encryption phase is to use the WK generated in the key generation phase as the target key to encrypt the business data (textdata) into ciphertext data (encryptedata). Then, the ciphertext data (encryptedata) is stored in the ECU's storage, and the target key WK is deleted to prevent memory dump attacks by attackers, as well as the business data (textdata). In this embodiment, the business data is the device data.

[0207] IV. Business Data Decryption Phase

[0208] The main task of the business encryption / decryption section is to use the WK generated in the key generation stage as the key to decrypt the encrypted data into business data and delete the WK to prevent attackers from performing memory dump attacks.

[0209] V. Key WK Update Phase

[0210] Step 5.1: Using the key initialization phase, key WK generation phase, and business data decryption phase, the business data textdata is decrypted.

[0211] Step 5.2: Update the original image data picdata and original radar data radata in 1.1, recalculate the processes of steps S1 and S2, and generate a new target key WK.

[0212] Step 5.3: Perform the business data encryption phase using the new target key WK.

[0213] In one specific embodiment, the device data encryption method is applied to an autonomous driving system. Before installation on the vehicle, the autonomous driving system (ADS) needs to inject SecOC. SecOC uses a communication key SecocKey for communication, and it is required that SecocKey not be stored in plaintext. Therefore, the steps of the key initialization stage and the key WK generation stage can be executed. When SecocKey is injected into the ADS on the production line, the ADS system uses the generated WK as the encryption key to encrypt SecocKey, generating ciphertext data EncryptoSecocKey, which is stored in the ADS's internal flash memory. Simultaneously, WK and intermediate process data are cleared from memory. When the ADS needs to use SecocKey, the target key WK can be calculated temporarily using the same method as in the key WK generation stage. Using the AES-256 decryption algorithm, with WK as the key and EncryptoSecocKey as the ciphertext, SecocKey is decrypted, and WK and process data are deleted. The ADS system uses SecocKey for normal business operations, performing a complete operation and supporting the deletion of SecocKey.

[0214] This embodiment provides a device data encryption method that, in response to an encryption command, obtains a random key pool file, original image data, and original radar data of the current device. The random key pool file is generated based on the original image data and the original radar data. A key index file is generated based on the original image data and the original radar data. A target key is generated based on multiple bytes in the random key pool file corresponding to the key index file. The device data of the current device is encrypted based on the target key to obtain ciphertext data. This method enables the encryption of business data without requiring hardware upgrades to the device. Since the target key is generated based on data collected by sensors, it can... This method effectively increases the difficulty for third parties to crack the code, thereby improving device data security. By combining different types of input data, dividing them into multiple parts, and then recombining them, this method significantly increases the unpredictability of the generated key. Even if an attacker obtains a portion of the information, it is difficult to deduce the complete key, yet no additional dedicated security hardware is required. It is suitable for already deployed traditional automotive ECUs and can effectively improve device data security. By introducing rotatable objects with specific textures / structures through physical means, the data collected each time becomes highly variable. This helps generate more unpredictable candidate keys, increasing the complexity and randomness of the underlying data used to generate the key, thus enhancing security. The encryption system enhances the security of device data. By truncating and dividing the original image data into equal parts, the original data content can be preserved as much as possible while meeting the data segmentation requirements, thus improving the stability and consistency of the device data encryption method. Similarly, by truncating and dividing the original radar data into equal parts, the original data content can be preserved as much as possible while meeting the data segmentation requirements, thus improving the stability and consistency of the device data encryption method. The irreversibility of hash functions and data diversity significantly enhance the security of the encryption system, thereby improving device data security. Using tuples to guide key selection further enhances the security of the encryption system. The increased flexibility and complexity of the key generation process, with each tuple based on specific bytes of the original image and radar data, ensures that each generated key is unique, thereby enhancing security and unpredictability, and ultimately improving device data security. By concatenating multiple index bytes to obtain a concatenated string, and performing a hash operation on this string to determine the target key, a highly unique and secure target key can be generated, further enhancing device data security. Storing the ciphertext data and deleting both the target key and the device data prevents third parties from obtaining the target key by reading memory, thus further improving device data security.By updating the original image data, the original radar data, and the target key, system security can be significantly improved. Even if the previous key is leaked, the updated key prevents attackers from accessing the latest encrypted data, ensuring that the data is always under the latest encryption protection, thus enhancing device data security.

[0215] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0216] Based on the same inventive concept, this application also provides a device data encryption apparatus for implementing the device data encryption method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more device data encryption apparatus embodiments provided below can be found in the limitations of the device data encryption method described above, and will not be repeated here.

[0217] In one embodiment, such as Figure 7 As shown, a device data encryption apparatus is provided, comprising: an acquisition module, a generation module, a key module, and an encryption module, wherein:

[0218] The acquisition module is used to acquire, in response to an encryption command, a random key pool file, raw image data, and raw radar data of the current device; the random key pool file is generated based on the raw image data and the raw radar data.

[0219] An indexing module is used to generate a key index file based on the original image data and the original radar data;

[0220] The key module is used to generate a target key based on multiple bytes in the random key pool file that correspond to the key index file;

[0221] The encryption module is used to encrypt the device data of the current device based on the target key to obtain ciphertext data.

[0222] In one embodiment, generating the random key pool file includes:

[0223] Acquire raw image data and raw radar data;

[0224] The original image data and the original radar data are divided into equal parts according to a preset number of equal parts, resulting in a preset number of original image sub-data and original radar sub-data.

[0225] According to the order of equal division, the preset number of original image sub-data and original radar sub-data are grouped to obtain the preset number of original sub-data pairs; each original sub-data pair includes one original image sub-data and one original radar sub-data.

[0226] Based on each of the original sub-data pairs, a candidate key is generated;

[0227] The random key pool file is generated based on the multiple candidate keys.

[0228] In one embodiment, the acquisition module is further configured to:

[0229] Power on the image acquisition device and radar device of the current equipment;

[0230] A rotatable image of a first preset size and preset texture is placed in front of the image acquisition device;

[0231] A second, rotatable metal mesh of a preset size and preset pattern is placed in front of the radar device.

[0232] Based on the data collected by the image acquisition device at a preset time point, the original image data is obtained;

[0233] Based on the data collected by the radar device at preset time points, raw radar data is obtained.

[0234] In one embodiment, the acquisition module is further configured to:

[0235] The number of bytes in the original image data is obtained and denoted as the first byte count;

[0236] Based on the first byte count and the preset number of equal divisions, the original image data is truncated to obtain truncated image data;

[0237] Based on the preset number of equal divisions, the cropped image data is divided into equal parts to obtain the preset number of original image sub-data.

[0238] In one embodiment, the acquisition module is further configured to:

[0239] The number of bytes of the original radar data is recorded as the second byte count.

[0240] Based on the second byte count and the preset number of equal divisions, the original radar data is truncated to obtain truncated radar data;

[0241] Based on the preset number of equal divisions, the intercepted radar data is divided into equal parts to obtain the preset number of original radar sub-data.

[0242] In one embodiment, the acquisition module is further configured to:

[0243] The first byte of data is obtained by performing a hash operation on the original image sub-data in the original sub-data pair.

[0244] The second byte of data is obtained by performing a hash operation on the original radar sub-data in the original sub-data pair.

[0245] The first byte of data and the second byte of data are concatenated to obtain the candidate key.

[0246] In one embodiment, the raw image data includes a first raw image sub-data, the raw radar data includes a first raw radar sub-data, and the indexing module is further configured to:

[0247] Based on the first original image sub-data and the first original radar sub-data, multiple tuples are generated; each tuple includes a first element and a second element; the first element is determined by the Nth byte in the first original image sub-data, and the second element is determined by the Nth byte in the first original radar sub-data; N is a positive integer less than or equal to the number of candidate keys in the random key pool file;

[0248] Based on the multiple tuples, a key index file is obtained.

[0249] In one embodiment, the key module is further configured to:

[0250] Based on each of the two tuples, the bytes in the random key pool file are searched sequentially to obtain multiple index bytes;

[0251] The target key is determined based on multiple index bytes.

[0252] In one embodiment, the key module is further configured to:

[0253] The concatenated string is obtained by combining multiple index bytes.

[0254] The target key is determined by performing a hash operation based on the concatenated string.

[0255] In one embodiment, the encryption module is further configured to:

[0256] Store the encrypted data and delete the target key and the device data.

[0257] In one embodiment, the encryption module is further configured to:

[0258] A target key is generated based on the random key pool file, the original image data, and the original radar data.

[0259] The encrypted data is decrypted based on the target key to obtain device data;

[0260] Update the original image data and the original radar data, and generate an updated random key pool file based on the original image data and the original radar data;

[0261] An updated target key is generated based on the updated random key pool file, the original image data, and the original radar data;

[0262] The device data is encrypted based on the updated target key;

[0263] Store the encrypted data, and delete the updated target key and the device data.

[0264] Each module in the aforementioned data encryption device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0265] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores random key pool files, raw image data, and raw radar data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a device data encryption method.

[0266] Those skilled in the art will understand that Figure 8The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0267] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the device data encryption method of any of the above embodiments.

[0268] In response to an encryption command, the device retrieves a random key pool file, raw image data, and raw radar data for the current device; the random key pool file is generated based on the raw image data and the raw radar data.

[0269] Based on the original image data and the original radar data, a key index file is generated;

[0270] A target key is generated based on multiple bytes in the random key pool file that correspond to the key index file.

[0271] The device data of the current device is encrypted based on the target key to obtain ciphertext data.

[0272] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the device data encryption method of any of the above embodiments:

[0273] In response to an encryption command, the device retrieves a random key pool file, raw image data, and raw radar data for the current device; the random key pool file is generated based on the raw image data and the raw radar data.

[0274] Based on the original image data and the original radar data, a key index file is generated;

[0275] A target key is generated based on multiple bytes in the random key pool file that correspond to the key index file.

[0276] The device data of the current device is encrypted based on the target key to obtain ciphertext data.

[0277] In one embodiment, a computer program product is provided, wherein when the computer program is executed by a processor, it implements the device data encryption method of any of the above embodiments:

[0278] In response to an encryption command, the device retrieves a random key pool file, raw image data, and raw radar data for the current device; the random key pool file is generated based on the raw image data and the raw radar data.

[0279] Based on the original image data and the original radar data, a key index file is generated;

[0280] A target key is generated based on multiple bytes in the random key pool file that correspond to the key index file.

[0281] The device data of the current device is encrypted based on the target key to obtain ciphertext data.

[0282] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0283] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0284] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0285] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for encrypting device data, characterized in that, The device data encryption method includes: In response to an encryption command, the system obtains the current device's random key pool file, raw image data, and raw radar data; the random key pool file is generated based on the raw image data and the raw radar data; the generation of the random key pool file includes: splitting the raw image data and the raw radar data into data segments, generating a candidate key for each segment of data, and generating a random key pool file containing multiple candidate keys; Based on the original image data and the original radar data, a key index file is generated, including: extracting partial data from the original image data to generate index information to index multiple candidate keys, and extracting partial data from the original radar data to generate index information to index the bytes to be selected in each candidate key; A target key is generated based on multiple bytes in the random key pool file that correspond to the key index file. The device data of the current device is encrypted based on the target key to obtain ciphertext data.

2. The device data encryption method according to claim 1, characterized in that, Generating the random key pool file includes: Acquire raw image data and raw radar data; The original image data and the original radar data are divided into equal parts according to a preset number of equal parts, resulting in a preset number of original image sub-data and original radar sub-data. According to the order of equal division, the preset number of original image sub-data and original radar sub-data are grouped to obtain the preset number of original sub-data pairs; each original sub-data pair includes one original image sub-data and one original radar sub-data. Based on each of the original sub-data pairs, a candidate key is generated; The random key pool file is generated based on the multiple candidate keys.

3. The device data encryption method according to claim 2, characterized in that, The acquisition of raw image data and raw radar data includes: Power on the image acquisition device and radar device of the current equipment; A rotatable image of a first preset size and preset texture is placed in front of the image acquisition device; A second, rotatable metal mesh of a preset size and preset pattern is placed in front of the radar device. Based on the data collected by the image acquisition device at a preset time point, the original image data is obtained; Based on the data collected by the radar device at preset time points, raw radar data is obtained.

4. The device data encryption method according to claim 2, characterized in that, Dividing the original image data into equal parts includes: The number of bytes in the original image data is obtained and denoted as the first byte count; Based on the first byte count and the preset number of equal divisions, the original image data is truncated to obtain truncated image data; Based on the preset number of equal divisions, the cropped image data is divided into equal parts to obtain the preset number of original image sub-data.

5. The device data encryption method according to claim 2, characterized in that, Dividing the raw radar data into equal parts includes: The number of bytes of the original radar data is recorded as the second byte count. Based on the second byte count and the preset number of equal divisions, the original radar data is truncated to obtain truncated radar data; Based on the preset number of equal divisions, the intercepted radar data is divided into equal parts to obtain the preset number of original radar sub-data.

6. The device data encryption method according to claim 2, characterized in that, The process of generating candidate keys based on each of the original sub-data pairs includes: The first byte of data is obtained by performing a hash operation on the original image sub-data in the original sub-data pair. The second byte of data is obtained by performing a hash operation on the original radar sub-data in the original sub-data pair. The first byte of data and the second byte of data are concatenated to obtain the candidate key.

7. The device data encryption method according to claim 1, characterized in that, The original image data includes a first original image sub-data, the original radar data includes a first original radar sub-data, and generating a key index file based on the original image data and the original radar data includes: Based on the first original image sub-data and the first original radar sub-data, multiple tuples are generated; each tuple includes a first element and a second element; the first element is determined by the Nth byte in the first original image sub-data, and the second element includes the Nth byte in the first original radar sub-data; N is a positive integer less than or equal to the number of candidate keys in the random key pool file; Based on the multiple tuples, a key index file is obtained.

8. The device data encryption method according to claim 7, characterized in that, The step of generating the target key based on multiple bytes in the random key pool file corresponding to the key index file includes: Based on each of the two tuples, the bytes in the random key pool file are searched sequentially to obtain multiple index bytes; The target key is determined based on multiple index bytes.

9. The device data encryption method according to claim 8, characterized in that, Determining the target key based on multiple index bytes includes: The concatenated string is obtained by combining multiple index bytes. The target key is determined by performing a hash operation based on the concatenated string.

10. The device data encryption method according to claim 1, characterized in that, After encrypting the device data of the current device based on the target key to obtain ciphertext data, the process further includes: Store the encrypted data and delete the target key and the device data.

11. The device data encryption method according to claim 10, characterized in that, After storing the ciphertext data and deleting the target key and the device data, the process further includes: Generating a target key based on the random key pool file, the original image data, and the original radar data includes: generating a key index file based on the original image data and the original radar data; generating a target key based on multiple bytes in the random key pool file corresponding to the key index file; and using the same original image data and original radar data to generate the same target key. The encrypted data is decrypted based on the target key to obtain device data; Update the original image data and the original radar data, and generate an updated random key pool file based on the original image data and the original radar data; An updated target key is generated based on the updated random key pool file, the original image data, and the original radar data; The device data is encrypted based on the updated target key; Store the encrypted data, and delete the updated target key and the device data.

12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 11.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 11.

14. A computer program product, characterized in that, When the computer program product is executed by a processor, it implements the method of any one of claims 1 to 11.

Citation Information

Patent Citations

  • Camera-radar sensor fusion using local attention mechanism

    US20230213643A1

  • Signal processing device, and signal processing method

    WO2023171623A1