Device data encryption method, computer device, storage medium and program product

By using random key pool files, image data and radar data in the on-board ECU to generate key index files and target keys, encrypting the device data, the problem of low security of on-board ECU data in the prior art is solved, and data encryption and security improvements are achieved without hardware upgrades.

CN119740246AActive Publication Date: 2025-04-01FOSS (HANGZHOU) INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411801074.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-01
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

The prior art is difficult to effectively protect sensitive service data in vehicle-mounted ECUs without special hardware, resulting in low data security.

Method used

By responding to the encryption instruction, the random key pool file, original image data and original radar data of the current device are obtained, the key index file and the target key are generated, the device data is encrypted based on the target key, and the ciphertext data is obtained.

Benefits of technology

Without hardware upgrades, the security of equipment data is improved, the difficulty of third-party cracking is enhanced, and it is suitable for on-board ECUs that have been put into use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740246A_ABST
    Figure CN119740246A_ABST
Patent Text Reader

Abstract

The invention relates to an equipment data encryption method, computer equipment, a storage medium and a program product. The method comprises the steps of obtaining a random key pool file, original image data and original radar data of current equipment in response to an encryption instruction; 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 a plurality of bytes corresponding to the key index file in the random key pool file; and encrypting the device data of the current device based on the target key to obtain ciphertext data. By adopting the method, the equipment data security can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Nowadays, a lot of sensitive business data is stored in the vehicle's ECU (Electronic Control Unit), such as communication keys, autonomous driving model files, driving history trajectories, in-vehicle videos, etc. If the business data is illegally obtained, it will cause vehicle information security problems.

[0003] In order to prevent illegal access, traditional technologies require special hardware support to protect sensitive information. However, this solution cannot be applied to the in-vehicle ECUs that are already in use and do not have special hardware.

[0004] It can be seen that the existing technology still has the problem of low data security of the vehicle-mounted equipment that has been put into use. Summary of the invention

[0005] Based on this, 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 technical problems.

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

[0007] In response to the encryption instruction, a random key pool file, raw image data and raw radar data of the current device are obtained; the random key pool file is generated based on the raw image data and the raw radar data;

[0008] Generate a key index file based on the original image data and the original radar data;

[0009] Generate a target key based on a plurality of bytes in the random key pool file corresponding 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] Obtaining raw image data and raw radar data;

[0013] According to a preset number of equal divisions, the original image data and the original radar data are equally divided respectively to obtain a preset number of equally divided original image sub-data and original radar sub-data;

[0014] According to the equal division order, the preset equal division number of original image sub-data and original radar sub-data are grouped to obtain a preset equal division 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, generating a candidate key;

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

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

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

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

[0020] Placing a rotatable metal grid with a second preset size and preset pattern in front of the radar device;

[0021] Obtaining original image data based on the data collected by the image acquisition device at a preset time point;

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

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

[0024] Obtaining the number of bytes of the original image data, recorded as the first byte number;

[0025] Based on the first byte quantity and the preset equal division quantity, the original image data is truncated to obtain truncated image data;

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

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

[0028] Obtaining the number of bytes of the original radar data, recorded as the second number of bytes;

[0029] Based on the second byte quantity and the preset equal division quantity, truncating the original radar data to obtain truncated radar data;

[0030] Based on the preset number of equal divisions, the truncated radar data is equally divided to obtain a preset number of equal divisions of original radar sub-data.

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

[0032] Performing a hash operation based on the original image sub-data in the original sub-data pair to obtain first byte data;

[0033] Performing a hash operation based on the original radar sub-data in the original sub-data pair to obtain second byte data;

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

[0035] In one embodiment, the original image data includes first original image sub-data, the original radar data includes 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, a plurality of tuples are generated; the tuples include 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 binary groups, a key index file is obtained.

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

[0039] Based on each of the two-tuples, sequentially search for bytes in the random key pool file to obtain a plurality of index bytes;

[0040] Based on a plurality of the index bytes, the target key is determined.

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

[0042] Based on the multiple index bytes, a concatenated string is obtained;

[0043] A hash operation is performed based on the concatenated character string to determine the target key.

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

[0045] The ciphertext data is stored, and the target key and the device data are deleted.

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

[0047] Generate a target key based on the random key pool file, the raw image data and the raw radar data;

[0048] Decrypting the ciphertext data based on the target key to obtain device data;

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

[0050] generating an updated target key based on the updated random key pool file, the original image data, and the original radar data;

[0051] encrypting the device data based on the update target key;

[0052] The ciphertext data is stored, and the update target key and the device data are deleted.

[0053] In a second aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above method when executing the computer program.

[0054] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method described above when executed by a processor.

[0055] In a fourth aspect, the present application provides a computer program product, which implements the method described above when executed by a processor.

[0056] The above-mentioned device data encryption method, computer device, storage medium and program product obtain the random key pool file, original image data and original radar data of the current device by responding to the encryption instruction; 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 encrypting based on the target key to obtain ciphertext data, which can realize the encryption process of business data without upgrading the hardware of the device. Since the target key is generated based on the data collected by the sensor, it can effectively increase the difficulty of cracking by a third party, thereby achieving the effect of improving the security of device data. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 A diagram of an application environment of a device data encryption method in an embodiment;

[0058] Figure 2 It is a schematic diagram of a flow chart of a device data encryption method in one embodiment;

[0059] Figure 3 A schematic diagram of a process for obtaining original image sub-data and original radar sub-data in one embodiment;

[0060] Figure 4 A schematic diagram of a process for generating a random key pool file in one embodiment;

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

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

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

[0064] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0066] The device data encryption method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. It can be understood that the device data of the present application can be not limited to the device data encryption of the vehicle-mounted electronic control unit ECU, but can also be applied to the data encryption of other terminals. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. In response to the encryption instruction, the terminal 102 obtains the random key pool file, the original image data and the 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; based on the original image data and the original radar data, a key index file is generated; based on the multiple bytes corresponding to the key index file in the random key pool file, a target key is generated; based on the target key, the device data of the current device is encrypted to obtain ciphertext data. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0067] In one embodiment, Figure 2 As shown, a device data encryption method is provided, which is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included:

[0068] Step S100, in response to the encryption instruction, obtaining the random key pool file, original image data and original radar data of the current device.

[0069] The random key pool file may be a random key set that is pre-generated and stored in a protected storage location, and the random key may 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 may be unprocessed raw data from a vehicle camera or other visual sensor, such as one or more unprocessed frames of real-time images or video streams. Raw radar data may be unprocessed raw data from a radar sensor for detecting the surrounding environment, such as information about the position and speed of surrounding objects.

[0071] The collection of the original image data and the original radar data may be performed simultaneously or sequentially. The original image data and the original radar data may be collected during the use of the current device or may be data collected by other devices.

[0072] The original image data and original radar data referred to in this embodiment are original data used to generate the target key. In order to ensure that the target key is the same over a period of time for encryption and decryption, the current device can continue to use the same original image data and original radar data to generate the same target key. Furthermore, the current device can also periodically update the target key, that is, by re-collecting the original radar data and the original image data, and obtaining a new target key through the new original radar data, the original image data and the random key pool file.

[0073] The reason for using raw image data and raw radar data to generate a random key pool file is that raw image data and raw radar data depend on the collection environment. Even data collected under the same environment may have slight differences. Therefore, by using this method to generate a random key pool file, it can be ensured that the random key pool file of each device is unique. Therefore, the initial random key pool file generation can also be performed by collecting multiple groups of raw image data and raw radar data under different environmental conditions through an external device, generating random key pool files in sequence, and distributing and storing each group of random key pool files, raw image data, and raw radar data in sequence to each device. It can also be other data collection methods that can ensure the randomness and unpredictability of the random key pool file of each device, which is not limited in this embodiment.

[0074] Exemplarily, the generation of the random key pool file can be that after splitting the original image data and the original radar data respectively, a candidate key is generated for each part of the data, and a random key pool file containing multiple candidate keys is generated; it can also be that feature information is extracted from the original image data and the original radar data respectively, and the feature information may include but is not limited to key points in the image (such as edges, corners, etc.), radar reflection signal intensity, dynamic changes, etc.; after obtaining the feature information, the two 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 it can also be extraction and integration using a machine learning model, and then a random key pool file is generated using a key pool generator (Key Pool Generator) for the comprehensive feature vector; it can also be other random key pool file generation methods based on original image data and original radar data, which are not limited in this embodiment.

[0075] Furthermore, during the operation of the device, a new random key pool file can be generated according to the original image data and original radar data collected by the device, thereby realizing the update 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 for generating a target key, and may include one or more key selection rules.

[0078] Based on the original image data and the original radar data, a key index file is generated. The original image data and the original radar data are processed according to preset rules, and data at specific positions in the original image data and the original radar data are extracted to randomly generate one or more key index information, so that corresponding multiple bytes in the random key pool file can be selected according to each key index information.

[0079] Exemplarily, part of the data may be extracted from the original image data to generate index information to index multiple candidate keys, and part of the data may be extracted from the original radar data to generate index information to index the bytes required to be selected in each candidate key.

[0080] Step S300: Generate a target key based on a plurality of bytes in the random key pool file corresponding to the key index file.

[0081] The key index file includes index information corresponding to multiple bytes. The corresponding bytes in the random key pool file can be found and extracted through the index information. The bytes obtained can be complete or partial candidate keys. Multiple bytes in the random key pool file are obtained through the key index file to generate the target key. The bytes in the random key pool file are extracted through the key index file, making it difficult for a third party to obtain the complete target key when analyzing the current device. Compared with hard coding in the current device, it can increase the difficulty for a third party to analyze the current device and obtain the target key.

[0082] Generating a target key may be to concatenate and post-process multiple bytes to obtain the target key. Further, the concatenation may be based on the order of the multiple bytes in the random key pool file, or may be based on the order of the indexes in the key index file. Post-processing may 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] Among them, device data refers to sensitive data that needs to be encrypted in the current device. For example, device data may include business data such as communication keys used for communication and interaction with other devices, autonomous driving model files, driving history trajectories, and in-car videos. For example, when the communication key needs to be encrypted as device data, the target key is generated through the random key pool file, original image data, and original radar data of the current device, and the communication key is encrypted by the target key to obtain ciphertext data.

[0085] Encryption through the selected target key can ensure that the ciphertext data can only be decrypted when the target key is correct. To encrypt device data, the target key can be used to encrypt the device data using a symmetric encryption algorithm to obtain ciphertext data.

[0086] Furthermore, when the device data needs to be used, the target key can be generated through the random key pool file, original image data and original radar data of the current device, and the ciphertext data can be decrypted through the target key to obtain the device data, so that the device data can be used and further processed.

[0087] The present embodiment provides a device data encryption method, which obtains the random key pool file, original image data and original radar data of the current device by responding to the encryption instruction; 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 a plurality of 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, which can realize the encryption process of business data without hardware upgrade of the device, that is, without relying on special hardware, and can be applied to most devices without hardware support. Since the target key is generated based on the data collected by the sensor, it can effectively increase the difficulty of cracking by a third party, thereby achieving the effect of improving the security of device data.

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

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

[0090] According to a preset number of equal divisions, the original image data and the original radar data are equally divided respectively to obtain a preset number of equally divided original image sub-data and original radar sub-data;

[0091] According to the equal division order, the preset equal division number of original image sub-data and original radar sub-data are grouped to obtain a preset equal division 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, generating a candidate key;

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

[0094] The original image data and the original radar data may be obtained from a protected storage location, or the original image data and the original radar data collected by the image acquisition device and the radar device at the current moment may be obtained.

[0095] The preset number of equal divisions may be a value set by an operator or user, or may be set according to the number of candidate keys required. The equal division according to the preset number of equal divisions may be performed with bytes as the smallest unit, or may be performed according to regions in the original image data and the original radar data to obtain original image sub-data and original radar sub-data in multiple equally divided regions; or may be performed according to the number of frames of the original image data and the original radar data to obtain multiple original image sub-data and original radar sub-data with the same number of frames.

[0096] Exemplarily, if the preset number of equal divisions is 4, the original image data can be equally divided into 4 parts according to the number of bytes of the original image data, and the original radar sub-data can be equally divided into 4 parts according to the number of bytes of the original radar data; the image area corresponding to the original image data can also be equally divided into 4 image areas, and the corresponding original image sub-data can be extracted from each image area, and the image radar corresponding to the original radar data can be equally divided into 4 scanning areas, and the corresponding original radar sub-data can be extracted from each scanning area; the original image data can also be equally divided into 4 equal frames according to the number of frames, and the corresponding original image sub-data and original radar sub-data can be extracted in sequence according to the number of frames.

[0097] The equal division order may be a data traversal order in the equal division process. According to the equal division order, the preset equal division number of original image sub-data and original radar sub-data are grouped to obtain the preset equal division number of original sub-data pairs, which may be to group the original image sub-data and original radar sub-data with the same sequence number into one group, thereby obtaining multiple sub-data pairs.

[0098] Based on each of the original sub-data pairs, the candidate key is generated, which can be obtained by processing the original image sub-data and the original radar sub-data in each original sub-data pair with a preset algorithm, such as a hash function, etc. Exemplarily, the original image sub-data and the original radar sub-data can be spliced, and the hash function can be used to perform calculation processing according to the order after splicing to obtain the candidate key. Exemplarily, the original image sub-data and the original radar sub-data can also be respectively calculated one or more times, and the obtained results can be spliced ​​to obtain the target key.

[0099] The random key pool file is generated based on the plurality of candidate keys, and each generated candidate key may be written into a pre-created empty file to obtain the random key pool file.

[0100] A device data encryption method provided in this embodiment combines different types of input data and divides it into multiple parts and then reassembles it. This method can significantly increase the unpredictability of key generation, making it difficult for an attacker to infer the complete key even if he obtains a certain part of the information. However, it does not require additional dedicated security hardware support and is suitable for already deployed traditional vehicle-mounted ECUs, which can achieve the effect of improving device data security.

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

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

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

[0104] Placing a rotatable metal grid with a second preset size and preset pattern in front of the radar device;

[0105] Obtaining original image data based on the data collected by the image acquisition device at a preset time point;

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

[0107] The image acquisition device and the radar device of the current device are powered on to ensure that the image acquisition device and the radar device are powered on and in working condition.

[0108] In order to realize that each device generates a target key based on unique original image data and original radar data, this can be achieved by changing the acquisition environment. In this embodiment, by setting a rotatable image and metal grid, the image data and radar data collected at each moment are different, thereby achieving a one-machine-one-key effect.

[0109] For the image acquisition device, a physical image of a first preset size and containing preset patterns may be placed within the acquisition field of view of the image acquisition device. A stepper motor may be installed on the back or other position of the image to control the image to rotate regularly or irregularly along the axis. The preset patterns may be selected according to actual needs. For example, a black and white stripe pattern with a preset interval may be selected, or any random appropriate pattern may be selected. Furthermore, the setting of the pattern position shall satisfy that its proportion in the image acquisition device screen is not less than the preset proportion, so as to ensure that the pattern has a sufficient dominant role in the randomness of the original image data.

[0110] For a radar device, a solid metal grid of a second preset size and containing preset patterns may be placed within the radar device's acquisition field of view. A stepper motor may be installed on the back or other positions of the metal grid to control the metal grid to rotate regularly or irregularly along the axis. The preset patterns may be selected according to actual needs. Furthermore, the grid position should be set so that its proportion in the point cloud image of the radar device is not less than a preset proportion, thereby ensuring that the grid has a sufficient 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, which 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, as the original image data.

[0112] Based on the data collected by the radar device at the preset time point, the original radar data is obtained, which can be the scanning data collected at the preset time point, or the scanning data collected within a preset time period starting from the preset time point, as the original radar data.

[0113] A device data encryption method provided in this embodiment introduces a rotatable object with a specific texture / structure through physical means, so that the data collected each time is highly variable, which helps to generate more unpredictable candidate keys, enhances the complexity and randomness of the basic data used to generate the key, thereby enhancing the security of the encryption system and achieving the effect of improving the security of device data.

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

[0115] Obtaining the number of bytes of the original image data, recorded as the first byte number;

[0116] Based on the first byte quantity and the preset equal division quantity, the original image data is truncated to obtain truncated image data;

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

[0118] The first byte number may be the counted number of bytes of the original image data.

[0119] Based on the first byte quantity and the preset equal division quantity, the original image data is truncated, which may be to perform a modulo operation on the first byte quantity according to the preset equal division quantity to determine redundant byte data in the original image data, thereby truncating the original image data. The original image data is truncated, which may be to truncate the header data of the original image data or to truncate the tail data of the original image data.

[0120] After the original image data is truncated, the number of bytes of the truncated image data will satisfy an integral multiple of the preset number of equal divisions, and the preset number of equal divisions of original image sub-data can be obtained, ensuring the consistency of each original image sub-data.

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

[0122] A device data encryption method provided in this embodiment can retain the content of the original data as much as possible while meeting the data segmentation requirements by truncating the original image data and then dividing it into equal parts, thereby achieving the effect of improving the stability and consistency of the device data encryption method.

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

[0124] Obtaining the number of bytes of the original radar data, recorded as the first byte number;

[0125] Based on the second byte quantity and the preset equal division quantity, truncating the original radar data to obtain truncated radar data;

[0126] Based on the preset number of equal divisions, the truncated radar data is equally divided to obtain a preset number of equal divisions of original radar sub-data.

[0127] The second number of bytes may be the counted number of bytes of the original radar data.

[0128] Based on the second byte quantity and the preset equal division quantity, the original radar data is truncated, which may be to perform a modulo operation on the second byte quantity according to the preset equal division quantity to determine redundant byte data in the original radar data, thereby truncating the original radar data. The original radar data is truncated, which may be to truncate the header data of the original radar data or to truncate the tail data of the original radar data.

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

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

[0131] The present embodiment provides a device data encryption method, which can retain the content of the original data as much as possible while meeting the data segmentation requirements by truncating the original radar data and then dividing it into equal parts, thereby achieving the effect of 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] Performing a hash operation based on the original image sub-data in the original sub-data pair to obtain first byte data;

[0134] Performing a hash operation based on the original radar sub-data in the original sub-data pair to obtain second byte data;

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

[0136] The hash operation is performed on the original image sub-data by selecting a secure hash algorithm, taking the original image sub-data as input, and performing a hash operation to obtain first byte data of a fixed length.

[0137] The hash operation is performed on the original radar sub-data, and a secure hash algorithm may be selected, and the original radar sub-data is taken as input, and the hash operation is performed to obtain the second byte data of a fixed length.

[0138] The first byte data and the second byte data are concatenated, which may be connecting the first byte data and the second byte data to obtain a candidate key.

[0139] The device data encryption method provided in this embodiment can significantly enhance the security of the encryption system through the irreversibility of the hash function and data diversity, thereby achieving the effect of improving the security of device data.

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

[0141] generating a plurality of 2-tuples based on the first original image sub-data and the first original radar sub-data;

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

[0143] The first original image sub-data may be any original image sub-data in the original image data, and the first original radar sub-data may be any original image sub-data in the original radar data. Further, the first original image sub-data and the first original radar sub-data may be determined according to a preset sequence number.

[0144] In this embodiment, a key index file may be generated according to 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 a plurality of tuples. In this embodiment, in the random key pool file, the number of candidate keys 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, wherein the first element is determined by the Nth byte in the first original image sub-data and is used to point to the corresponding candidate key, and the second element is determined by the Nth byte in the first original radar sub-data and can be used to point to the byte at the corresponding position in 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] Exemplarily, when the number of candidate keys in the random key pool file is 32, 32 tuples can be generated. Exemplarily, 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] Further, the first element may be a 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 may be a 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] The present embodiment provides a device data encryption method that uses a binary group to guide the selection of a key. This method increases the flexibility and complexity of the key generation process. Each binary group is based on specific bytes of the original image and radar data, which makes the key generated each time different, thereby improving security and increasing the unpredictability of the key, thereby achieving the effect of improving the security of device data.

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

[0150] Based on each of the two-tuples, sequentially search for bytes in the random key pool file to obtain a plurality of index bytes;

[0151] Based on a plurality of the index bytes, the target key is determined.

[0152] Among them, the search can be based on the first element and the second element of the binary group, the corresponding candidate key in the random key pool file is searched through the first element, and the corresponding byte in the candidate key is searched through the second element, so as to obtain multiple index bytes based on multiple binary group queries.

[0153] Based on the multiple index bytes, the target key is determined, and the target key can be obtained by splicing the multiple bytes according to the arrangement order of the binary group or by splicing the bytes 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 the 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 the plurality of index bytes comprises:

[0156] Based on the multiple index bytes, a concatenated string is obtained;

[0157] A hash operation is performed based on the concatenated character string to determine the target key.

[0158] The concatenated string is determined based on the multiple index bytes, which can be obtained by concatenating the multiple bytes in the order of arrangement of the binary group or by concatenating the bytes in the traversal order of each byte in the random key pool file.

[0159] The target key is determined by performing a hash operation based on the concatenated character string. The target key may be obtained by converting data of any length into an output of a fixed length using a one-way encryption algorithm using a hash operation.

[0160] A device data encryption method provided in this embodiment obtains a concatenated string by splicing based on multiple index bytes; performs a hash operation based on the concatenated string to determine the target key, thereby generating a highly unique and secure target key, thereby achieving the effect of improving the security of device data.

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

[0162] The ciphertext data is stored, and the target key and the device data are deleted.

[0163] Among them, a secure and reliable storage location can be determined to save the encrypted data. This can be the internal memory of the vehicle ECU, an external storage device or a cloud storage service, and the encrypted data is written to the selected storage medium. To ensure data integrity and security, the security features provided by the file system can be used, such as permission control and access auditing.

[0164] Deleting the target key and the device data may be deleting the target key and the device data in the memory to ensure that a third party does not obtain the target key by reading the memory, thereby preventing data leakage and effectively protecting sensitive data in the vehicle-mounted ECU.

[0165] The device data encryption method provided in this embodiment can prevent a third party from obtaining the target key by reading the memory, thereby improving the security of the device data by storing the ciphertext data and deleting the target key and the device data.

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

[0167] Generate a target key based on the random key pool file, the raw image data and the raw radar data;

[0168] Decrypting the ciphertext data based on the target key to obtain device data;

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

[0170] generating an updated target key based on the updated random key pool file, the original image data, and the original radar data;

[0171] encrypting the device data based on the update target key;

[0172] The ciphertext data is stored, and the update target key and the device data are deleted.

[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 long-term unchanged relevant data.

[0174] The target key is generated based on the random key pool file, the original image data and the original radar data. The target key generation method adopted in any of the above embodiments may be adopted, which will not be described in detail in this embodiment.

[0175] Since the ciphertext data is obtained by symmetrically encrypting the device data with the target key, if the target key is correct, the device data can be decrypted with the target key.

[0176] Updating the original image data and the original radar data, and generating an updated random key pool file based on the original image data and the original radar data may be regenerating the original image data and the original radar data in the same format, and generating an updated random key pool file according to the method adopted in any of the above embodiments.

[0177] An updated target key is generated based on the updated random key pool file, the original image data and the original radar data. The updated target key can be generated based on the updated random key pool file, the original image data and the original radar data in accordance with a target key generation method that is the same as that used to generate the target key with the original random key pool file, the original image data and the original radar data, to generate an updated target key corresponding to the updated data, and based on the updated target key, the device data is re-encrypted to obtain new ciphertext data.

[0178] The device data encryption method provided in this embodiment can significantly improve the security of the system 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 the attacker from accessing the latest encrypted data, ensuring that the data is always under the latest encryption protection, thereby achieving the effect of improving the security of device data.

[0179] In order to more clearly illustrate the technical solution of the present application, the present application also provides a detailed embodiment.

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

[0181] 1. Key initialization phase

[0182] The main work of this stage is that the intelligent driving system collects and stores the original image data picdata from the camera and the original radar data radata from the radar, and then performs multiple changes on the original image data picdata and the original radar data radata to generate a random key pool file (Key Pool File, KPF). The specific process is as follows:

[0183] Step S1.1, read and store the original image data picdata and the original radar data radata: after the vehicle-mounted intelligent driving is started, a request for obtaining a frame of original data is sent to the camera and radar, and the data is stored in the flash after it is returned. In order to improve the randomness of the original image data picdata and the original radar data radata in a fixed environment, based on the scenes with fixed external environments such as production lines or maintenance workshops, it is necessary to provide external random factors to the camera and radar. Specifically, a rotatable device with a size of 50 cm × 50 cm black and white stripes and a stripe interval of 2 cm can be placed in front of the camera. By adjusting the distance from the camera, it is ensured that the stripe pattern occupies no less than 50% of the camera's screen, and the stripe device rotates around the central axis at a speed of one circle per minute. Similarly, a 50 cm × 50 cm metal grid is placed in front of the radar, with a grid spacing of 1 cm, and it is also ensured that the grid occupies no less than 50% of the point cloud map, and rotates at a speed of one circle per minute.

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

[0185] Step S1.3, such as Figure 3As shown, the original image data picdata is divided into 32 equal parts, recorded as original image sub-data picdata[1], original image sub-data picdata[2]..., original image sub-data picdata

[32] , including the following steps:

[0186] Step S1.3.1, calculate the length of the original image data picdata in bytes, and determine the number of bytes of the original image data, recorded as piclength.

[0187] Step S1.3.2, calculate the remainder when the original image data picdata is divided by 32, that is, picremainder=piclengthmode32.

[0188] Step S1.3.3, in order to ensure that the original image data picdata can be divided evenly by 32, picremainder bytes of data are truncated from the original image data picdata to obtain truncated image data, which is then divided into 32 equal blocks, recorded as original image sub-data picdata[1], original image sub-data picdata[2]..., original image sub-data picdata

[32] .

[0189] Step S1.4, dividing the original radar data radata into 32 equal parts and recording them as original radar sub-data radata[1], original radar sub-data radata[2] ..., original radar sub-data radata

[32] , including the following steps:

[0190] Step S1.4.1, calculate the length of the original radar data radata in bytes, and determine the number of bytes of the original radar data, recorded as radlength.

[0191] Step S1.4.2, calculate the remainder of the original radar data radata divided by 32, that is, radremainder=radlengthmode32.

[0192] Step S1.4.3, in order to ensure that the original radar data radata is divisible by 32, picremainder bytes of data are truncated from the original radar data radata to obtain truncated radar data, which is then divided into 32 equal blocks, recorded as original radar sub-data radata[1], original radar sub-data radata[2]..., original radar sub-data radata

[32] .

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

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

[32] in step 1.3 and assigning them to the binary byte matrix 32Smartix, including the following steps:

[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] 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 are similar to those in the previous step, and the assignment of the binary byte matrix 32Smartix is ​​completed to obtain the random key pool file.

[0197] 2. Key WK Generation Phase

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

[0199] Step S2.1, using the first original radar sub-data radata[1] and the first original image sub-data picdata[1] to generate 32 tuples, such as Figure 5 As shown, the following steps are included:

[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 recorded as Sunit1, 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 recorded as Dunit1, then calculate DI-1=Dunit1 mode 32, and so on to calculate DI-32.

[0202] Step S2.1.3, use 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, generate 32 tuples (sI-1, DI-1)...(sI-32, DI-32) and record them as the key index file IndexBinarySet for subsequent calculations.

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

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

[0205] 3. Business Data Encryption Phase

[0206] The main work of the business encryption phase is to use the WK generated in the key WK generation phase as the target secret key to encrypt the business data (textdata) into ciphertext data (encryptedata), and then store the ciphertext data encryptedata in the storage of the ECU, and delete the target key WK to prevent the attacker from memory dump attacks and business data textdata. The business data in this embodiment is the device data.

[0207] 4. Business Data Decryption Phase

[0208] The main task of the business encryption and decryption segment is to use the WK generated in the key WK generation phase as the secret key to decrypt the ciphertext data (encryptedata) into business data (textdata), and delete WK to prevent memory dump attacks by attackers.

[0209] 5. Key WK Update Phase

[0210] Step 5.1, using the key initialization phase, key WK generation phase and business data decryption phase, decrypt the business data textdata;

[0211] Step 5.2, update the original image data picdata and original radar data radata in 1.1, recalculate the process of step S1 and step S2, and generate a new target key WK.

[0212] Step 5.3, use the new target key WK to perform the business data encryption phase.

[0213] In a specific embodiment, the device data encryption method is applied to an autonomous driving system, wherein the autonomous driving system (ADS) needs to be injected with SecOC before loading, and SecOC uses the communication key SecocKey for communication, and it is required that SecocKey must not be stored in plain text. Then, the steps of the key initialization phase and the key WK generation phase can be performed, and when the SecocKey is injected into the ADS on the production line, the ADS system uses the generated WK as the encryption key to encrypt SecocKey, encrypts SecocKey to generate ciphertext data EncryptoSecocKey, and stores it in the internal flash of the ADS, while clearing WK ​​and intermediate process data in the memory. When the ADS needs to use SecocKey, the target key WK can be calculated at zero time in the same way as in the key WK generation phase, and the AES-256 decryption algorithm can be used, with WK as the key and EncryptoSecocKey as the ciphertext, to decrypt and obtain Secockey, and at the same time delete WK and process data. The ADS system uses SecocKey for normal business, and the execution is complete and supports the deletion of SecocKey.

[0214] The present embodiment provides a device data encryption method, which obtains a random key pool file, original image data and original radar data of the current device in response to an encryption instruction; 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 a plurality of 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, and the encryption process of the business data can be implemented without upgrading the hardware of the device. Since the target key is generated based on the data collected by the sensor, it can be It effectively increases the difficulty of cracking by third parties, thereby improving the security of device data. By combining different types of input data and splitting it into multiple parts and then reorganizing it, this method can significantly increase the unpredictability of key generation, making it difficult for attackers to infer the complete key even if they obtain a certain part of the information. However, it does not require additional dedicated security hardware support and is suitable for deployed traditional vehicle ECUs, which can improve the security of device data. By introducing rotatable objects with specific textures / structures through physical means, the data collected each time is highly variable, which helps to generate more unpredictable candidate keys, enhances the complexity and randomness of the basic data used to generate keys, and thus enhances The security of the encryption system is improved, thereby achieving the effect of improving the security of device data; by cutting off the original image data and then dividing it into equal parts, the content of the original data can be retained as much as possible while meeting the needs of data segmentation, thereby achieving the effect of improving the stability and consistency of the device data encryption method; by cutting off the original radar data and then dividing it into equal parts, the content of the original data can be retained as much as possible while meeting the needs of data segmentation, thereby achieving the effect of improving the stability and consistency of the device data encryption method; through the irreversibility of the hash function and the data diversity, the security of the encryption system can be significantly enhanced, thereby achieving the effect of improving the security of device data; by using a binary group to guide the selection of the key, this method increases The flexibility and complexity of the key generation process are increased. Each binary group is based on the specific bytes of the original image and radar data, which makes the key generated each time different, thereby improving security and the unpredictability of the key, thereby improving the security of device data; by splicing based on multiple index bytes to obtain a spliced ​​string; performing a hash operation based on the spliced ​​string to determine the target key, a highly unique and secure target key can be generated, thereby improving the security of device data; by storing the ciphertext data and deleting the target key and the device data, a third party can be prevented from obtaining the target key by reading the memory, thereby improving the security of device data;By updating the original image data and the original radar data and target key, the security of the system can be significantly improved. Even if the previous key is leaked, the updated key prevents the attacker from accessing the latest encrypted data, ensuring that the data is always under the latest encryption protection, thereby improving the data security of the device. ;

[0215] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0216] Based on the same inventive concept, the embodiment of the present application also provides a device data encryption device for implementing the device data encryption method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more device data encryption device embodiments provided below can refer to the limitations on the device data encryption method above, and will not be repeated here.

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

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

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

[0220] A key module, used for generating a target key based on a plurality of bytes in the random key pool file corresponding 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] Obtaining raw image data and raw radar data;

[0224] According to a preset number of equal divisions, the original image data and the original radar data are equally divided respectively to obtain a preset number of equally divided original image sub-data and original radar sub-data;

[0225] According to the equal division order, the preset equal division number of original image sub-data and original radar sub-data are grouped to obtain a preset equal division 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, generating a candidate key;

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

[0228] In one embodiment, the acquisition module is further used for:

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

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

[0231] Placing a rotatable metal grid with a second preset size and preset pattern in front of the radar device;

[0232] Obtaining original image data based on the data collected by the image acquisition device at a preset time point;

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

[0234] In one embodiment, the acquisition module is further used for:

[0235] Obtaining the number of bytes of the original image data, recorded as the first byte number;

[0236] Based on the first byte quantity and the preset equal division quantity, the original image data is truncated to obtain truncated image data;

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

[0238] In one embodiment, the acquisition module is further used for:

[0239] Obtaining the number of bytes of the original radar data, recorded as the second number of bytes;

[0240] Based on the second byte quantity and the preset equal division quantity, truncating the original radar data to obtain truncated radar data;

[0241] Based on the preset number of equal divisions, the truncated radar data is equally divided to obtain a preset number of equal divisions of original radar sub-data.

[0242] In one embodiment, the acquisition module is further used for:

[0243] Performing a hash operation based on the original image sub-data in the original sub-data pair to obtain first byte data;

[0244] Performing a hash operation based on the original radar sub-data in the original sub-data pair to obtain second byte data;

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

[0246] In one embodiment, the original image data includes first original image sub-data, the original radar data includes first original 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, a plurality of tuples are generated; the tuples include 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 binary groups, a key index file is obtained.

[0249] In one embodiment, the key module is further used for:

[0250] Based on each of the two-tuples, sequentially search for bytes in the random key pool file to obtain a plurality of index bytes;

[0251] Based on a plurality of the index bytes, the target key is determined.

[0252] In one embodiment, the key module is further used for:

[0253] Based on the multiple index bytes, a concatenated string is obtained;

[0254] A hash operation is performed based on the concatenated character string to determine the target key.

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

[0256] The ciphertext data is stored, and the target key and the device data are deleted.

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

[0258] Generate a target key based on the random key pool file, the raw image data and the raw radar data;

[0259] Decrypting the ciphertext data based on the target key to obtain device data;

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

[0261] generating an updated target key based on the updated random key pool file, the original image data, and the original radar data;

[0262] encrypting the device data based on the update target key;

[0263] The ciphertext data is stored, and the update target key and the device data are deleted.

[0264] Each module in the above-mentioned device data encryption device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module above.

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

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

[0267] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the device data encryption method of any of the above embodiments is implemented:

[0268] In response to the encryption instruction, a random key pool file, raw image data and raw radar data of the current device are obtained; the random key pool file is generated based on the raw image data and the raw radar data;

[0269] Generate a key index file based on the original image data and the original radar data;

[0270] Generate a target key based on a plurality of bytes in the random key pool file corresponding 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, on which a computer program is stored. When the computer program is executed by a processor, the device data encryption method of any of the above embodiments is implemented:

[0273] In response to the encryption instruction, a random key pool file, raw image data and raw radar data of the current device are obtained; the random key pool file is generated based on the raw image data and the raw radar data;

[0274] Generate a key index file based on the original image data and the original radar data;

[0275] Generate a target key based on a plurality of bytes in the random key pool file corresponding 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. When the computer program is executed by a processor, the device data encryption method of any of the above embodiments is implemented:

[0278] In response to the encryption instruction, a random key pool file, raw image data and raw radar data of the current device are obtained; the random key pool file is generated based on the raw image data and the raw radar data;

[0279] Generate a key index file based on the original image data and the original radar data;

[0280] Generate a target key based on a plurality of bytes in the random key pool file corresponding 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, stored data, displayed data, 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 can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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), magnetoresistive 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0284] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A device data encryption method, characterized in that: The device data encryption method comprises: In response to the encryption instruction, a random key pool file, raw image data and raw radar data of the current device are obtained; the random key pool file is generated based on the raw image data and the raw radar data; Generate a key index file based on the original image data and the original radar data; Generate a target key based on a plurality of 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.

2. The device data encryption method according to claim 1, characterized in that: Generating the random key pool file includes: Obtaining raw image data and raw radar data; According to a preset number of equal divisions, the original image data and the original radar data are equally divided respectively to obtain a preset number of equally divided original image sub-data and original radar sub-data; According to the equal division order, the preset equal division number of original image sub-data and original radar sub-data are grouped to obtain a preset equal division 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, generating a candidate key; The random key pool file is generated based on the plurality of candidate keys.

3. The device data encryption method according to claim 2, characterized in that: The obtaining of raw image data and raw radar data comprises: Power on the image acquisition device and radar device of the current device; Placing a rotatable image of a first preset size and preset texture in front of the image acquisition device; Placing a rotatable metal grid with a second preset size and preset pattern in front of the radar device; Obtaining original image data based on the data collected by the image acquisition device at a preset time point; Based on the data collected by the radar device at a preset time point, raw radar data is obtained.

4. The device data encryption method according to claim 2, characterized in that: The step of equally dividing the original image data comprises: Obtaining the number of bytes of the original image data, recorded as the first byte number; Based on the first byte quantity and the preset equal division quantity, the original image data is truncated to obtain truncated image data; Based on the preset number of equal divisions, the cut image data is equally divided to obtain the preset number of equal divisions 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: Obtaining the number of bytes of the original radar data, recorded as the second number of bytes; Based on the second byte quantity and the preset equal division quantity, truncating the original radar data to obtain truncated radar data; Based on the preset number of equal divisions, the truncated radar data is equally divided to obtain a preset number of equal divisions of original radar sub-data.

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

7. The device data encryption method according to claim 1, characterized in that: The original image data includes first original image sub-data, the original radar data includes 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, a plurality of tuples are generated; the tuples include 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 binary groups, a key index file is obtained.

8. The device data encryption method according to claim 7, characterized in that: The generating the target key based on the multiple bytes in the random key pool file corresponding to the key index file comprises: Based on each of the two-tuples, sequentially search for bytes in the random key pool file to obtain a plurality of index bytes; Based on a plurality of the index bytes, the target key is determined.

9. The device data encryption method according to claim 8, characterized in that: The determining the target key based on the plurality of index bytes comprises: Based on the multiple index bytes, a concatenated string is obtained; A hash operation is performed based on the concatenated character string to determine the target key.

10. The device data encryption method according to claim 1, characterized in that: The step of encrypting the device data of the current device based on the target key to obtain the ciphertext data further includes: The ciphertext data is stored, and the target key and the device data are deleted.

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 method further includes: Generate a target key based on the random key pool file, the raw image data and the raw radar data; Decrypting the ciphertext data based on the target key to obtain device data; updating the original image data and the original radar data, and generating an updated random key pool file based on the original image data and the original radar data; generating an updated target key based on the updated random key pool file, the original image data, and the original radar data; encrypting the device data based on the update target key; The ciphertext data is stored, and the update target key and the device data are deleted.

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, the method according to any one of claims 1 to 11 is implemented.

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

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

Citation Information

Patent Citations

  • Block chain transaction processing method and device, computer equipment and storage medium

    CN114170014A

  • Camera-radar sensor fusion using local attention mechanism

    US20230213643A1

  • Communication key configuration method and apparatus

    WO2022171177A1

  • Coherent image encryption

    WO2023066698A1

  • Autonomous vehicle environmental perception software management

    WO2023141702A1