Neural network model encryption and storage method and system based on clock encryption lock
By separating the storage of the neural network model in the host device and the clock encryption lock, and using a hardware encryption module and a custom algorithm for encrypted communication, the problem of limited real-time performance and vulnerability to cracking of neural network models in existing technologies is solved, thus achieving high-security model protection.
Patent Information
- Application Number
- CN202211293170.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2042-10-21
AI Technical Summary
Existing neural network models suffer from limitations in real-time performance and are easily cracked, resulting in low security.
A clock-based encryption lock approach is adopted to store the neural network model in two parts: the first part is stored in the host device and the second part is stored in the clock encryption lock. Encryption and communication are performed through a hardware encryption module and a one-time password verification method. Seed data and a custom algorithm are used for data transmission to achieve physical isolation between the key and the model.
It improves the security and real-time performance of the model in scenarios without network connectivity, prevents key leakage and model cracking, enhances communication security, and prevents replay attacks.
Smart Images

Figure CN115659293B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence systems and information technology processing, specifically to a method and system for encrypting and storing neural network models based on clock-based encryption locks. Background Technology
[0002] Neural network models, as core technologies for artificial intelligence computation and enterprises, should be properly preserved and utilized. The training and generation process of neural network models requires massive amounts of data in specific domains as training resources, which determines that trained deep learning models possess high commercial value and knowledge attributes, and must be included in the intellectual property rights of their owners. Technically, there is an urgent need to protect neural network models from illegal copying, redistribution, or misuse. 2. Currently, there are many frameworks for developing neural network models, such as TensorFlow, PyTorch, Caffe, ONNX, etc., and each framework uses different file formats for generating neural network models. However, they can be broadly categorized into at least three types: network description files, which store information about the neural network topology and operator algorithms; weight parameter files, which store information such as the weights and biases of operators in each layer of the model; and quantized model files, which are generated after the neural network model has undergone int4 / int8 / int16 quantization on different architecture platforms.
[0003] Existing neural network model encryption techniques: In the first scenario, the model file is stored, loaded, and used for inference operations on a remote server. After authentication by the server, the terminal device transmits the detection data to the remote server, which then returns the inference and recognition results. The neural network model is not stored on the terminal device. For example, the existing invention patent application CN114118392A, titled "Hypothetical Lock Module, Method Supporting Artificial Intelligence, and Electronic Device," describes a hyppothetical lock module comprising: an access channel configured to connect to the electronic device; and a neural network processor configured to receive first input information from the electronic device via the access channel and generate output information based on the first input information using a neural network. In this first scenario, the neural network model is stored on a remote server. While this physical isolation protects the model from external access, its use is limited by the requirement that the terminal device must connect to the remote server via a public network, making it unusable in areas without network connectivity. Furthermore, network data transmission itself consumes significant time, reducing the system's real-time performance. In the second scenario, the encrypted model files and keys, either fully or partially, are stored on a local device. Before using the model for inference operations, the local device loads the encrypted model and keys for decryption. Then, data is collected on the local device, and the neural network computing unit performs inference operations to obtain the results. In this second scenario, the neural network model is deployed and runs on the terminal device side (including embedded Linux systems, mobile phones, cameras, tablets, AI computing boxes, computers, and other smart devices). Although the system's real-time performance is improved and a network connection is not required, storing the encrypted model and decryption key together on the terminal device is as insecure as keeping a lock and key together. For example, if the key file is hidden as a system file, anyone with system access or who has hacked the system to obtain root or admin privileges can retrieve the key file. If the key is compiled into an executable program, it can also be obtained by decompiling and viewing the data or text sections. The encrypted model, being a system file, is also easily retrieved, posing a risk of being cracked. The third scenario involves a network model file that is not encrypted itself. Instead, a dataset with specific features (like water ripples) or encryption is used during model training. When deploying the model, the same data with the same features (like water ripples) or encryption as the training dataset must be used as input; otherwise, the correct result cannot be identified. The model owner uses the features of the input data or the encryption key as a method to protect the system. For example, the existing invention patent document CN108830092A, "A Neural Network Model Encryption Protection System and Method Involving Random Data Encryption," includes an encryption module. Within this module, a data partitioning module converts the original input data into a two-dimensional structure and divides it into multiple sub-blocks to be processed. A password generation module generates passwords with the same structure as each sub-block. A password embedding module embeds each password into the corresponding sub-block in a superimposed manner. A data reconstruction module reconstructs each password-embedded sub-block into a two-dimensional structure based on the previous sub-block partitioning method, generating encrypted input data. In this type of prior art, the network model file itself is not encrypted; instead, a dataset with specific features or encryption is used during model training. When deploying the model, the same data with the same features as the training dataset or encryption must be used as input; otherwise, the correct result cannot be identified. This method effectively protects the model's weight parameters, but it lacks encryption protection for the network's description file. Network description files typically use structured data storage formats such as protobuf, JSON, or XML text files. The exposed network topology and operator description information can be used to reconstruct the model structure, and then unencrypted datasets can be used to train the model and generate new model files, posing a risk of being cracked. Furthermore, the need for special processing (such as watermarking) or encryption of the input data before each inference operation reduces the system's operational efficiency.
[0004] In summary, existing technologies suffer from limitations in real-time performance and are easily cracked, resulting in low security. Summary of the Invention
[0005] The technical problem to be solved by this invention is how to solve the technical problem of low security caused by the limitation of real-time performance and the vulnerability to cracking in the prior art.
[0006] This invention solves the above-mentioned technical problems by employing the following technical solution: a neural network model encryption and storage method based on a clock-based encryption lock, comprising: S1. Train the neural network model f using a pre-set dataset; S2. Obtain key generation data and generate the first key accordingly; S3. Obtain and use the first key to encrypt and process product and model data, and generate a second key accordingly; S4. Use the second key to encrypt the preset part of the neural network model f, and generate the encrypted file E(f) and the encrypted table table accordingly. S5. Split the encrypted file E(f) to obtain the first part of the encrypted file E1 and the second part of the encrypted file E2, and record the splitting data in the encryption table table. S6. Write the second key to the hardware encryption lock in one direction, and store the host device's unique identifier and host-defined string to the clock encryption lock. Create an encryption module in the hardware encryption lock and the clock encryption lock to perform login verification using a one-shot password verification method. S7. Obtain seed data and preset encryption logic to encrypt data communication. Step S7 includes: S71. Randomly generate seed data using a dongle; S72. Process the seed data using a pre-set third key generation algorithm to generate a third key; S73. According to the symmetric encryption algorithm, the second key is encrypted and transmitted using the third key; S74. The host device encryption module generates the same third key based on the same seed data, and decrypts the encrypted ciphertext to obtain the decrypted second key.
[0007] This invention stores the model's key in a clock-based encryption lock, achieving physical isolation between the key and the encryption model. The key has the property of being written to the encryption lock in one direction only and cannot be read from outside the encryption lock, thus improving communication security.
[0008] This invention uses a hardware encryption dongle device with a clock, creates an encryption module inside the dongle, and uses a one-shot password verification method, without using the dongle administrator password to log in, preventing the dongle administrator login password from being leaked through eavesdropping or software interception. Data communication is encrypted using seed data and a custom algorithm, which improves the security of the verification operation.
[0009] The host encryption module of the present invention can generate the same third key based on the same seed and a custom algorithm, decrypt the encrypted ciphertext to obtain the second key, and then use the third key to encrypt the second key for transmission, which can prevent software interception and eavesdropping from causing leakage.
[0010] In a more specific technical solution, step S1 includes: S11. Design the initial model; S12. Train the initial model using the pre-set dataset to obtain the neural network model f.
[0011] In a more specific technical solution, step S2 includes: S21. Obtain key generation data, wherein the key generation data includes: random number, time data and production equipment information; S22. Process random numbers, time data, and production equipment information to generate the first key.
[0012] In a more specific technical solution, the product and model data in step S3 includes: product ID, neural network model hash value, and neural network model random number.
[0013] In a more specific technical solution, step S5 includes: S51. Store the first part of the encrypted file E1 and the encrypted table table to the preset host device; S52. Use the file ID to distinguish the second part of the encrypted file E2; S53. Store the second part of the encrypted file E2 to the clock encryption lock.
[0014] Compared with the existing technology where neural network models are deployed and run on the terminal device side, this invention divides the encrypted model into two parts: the first part is stored in the host device and the second part is stored in the clock encryption lock. This patent can be used to protect the model in scenarios without network connection, and the model files stored on both devices are incomplete, which increases the difficulty of cracking.
[0015] In a more specific technical solution, in step S52, the number of files in the second part of the encrypted file E2 includes: a single file and no fewer than two files.
[0016] Compared with the existing technology where the network model file itself is not encrypted, this invention can encrypt all or part of the model file, and only requires decryption once to load and run the model.
[0017] In a more specific technical solution, step S6 includes: S61. Combine the host device's unique identifier, host-defined string, and time information to obtain host device data and store it in the clock encryption lock; S61. Using the One-shot password verification method, the host encryption module and the clock encryption lock encryption module are used to perform hash operations using the same rules to obtain the hash operation result; S62. The hash calculation result is sent to the encryption module of the encryption lock using the encryption module of the host device for login verification and to add time information.
[0018] This invention performs hash calculations and uses the host device's encryption module to send the calculation results to the encryption lock's encryption module for login verification. Adding time information can prevent replay attacks.
[0019] Compared with the prior art which stores the neural network model on a remote server, this invention stores the model's key in a clock encryption lock, achieving physical isolation between the key and the encrypted model. This patent can be used to protect the model even in scenarios without a network connection.
[0020] In a more specific technical solution, the hash operation in step S61 uses algorithms including SHA-256 and MD5.
[0021] In a more specific technical solution, the symmetric encryption algorithm in step S73 includes: AES, 3DES, RC5, or the Chinese national standard SM4.
[0022] In a more specific technical solution, the neural network model encryption and storage system based on clock-locked encryption includes: The model training module is used to train a neural network model f using a pre-set dataset; The first key generation module is used to acquire key generation data and generate the first key accordingly. The second key generation module is used to obtain and use the first key to encrypt and process product and model data, thereby generating the second key. The second key generation module is connected to the model training module and the first key generation module. The encrypted data processing module is used to encrypt the preset part of the neural network model f using the second key, thereby generating an encrypted file E(f) and an encrypted table. The encrypted data processing module is connected to the model training module and the second key generation module. The encrypted file splitting module is used to split the encrypted file E(f) to obtain the first part of the encrypted file E1 and the second part of the encrypted file E2, and record the splitting data in the encrypted table. The encrypted file splitting module is connected to the encrypted data processing module. The One-shot verification module is used to write the second key to the hardware encryption lock in one direction, and to store the host device's unique host identifier and host-defined string to the clock encryption lock. An encryption module is created on the hardware encryption lock and the clock encryption lock to perform login verification using a one-time One-shot password verification method. The One-shot verification module is connected to the second key generation module. A communication encryption module is used to obtain seed data and preset encryption logic to encrypt data communication. The communication encryption module is connected to the second key generation module. The communication encryption module includes: The seed generation module is used to randomly generate seed data using a dongle; The third key generation module is used to process seed data using a preset third key generation algorithm to generate a third key. The third key generation module is connected to the seed generation module. The encrypted transmission module is used to encrypt the second key using a third key according to a symmetric encryption algorithm. The encrypted transmission module is connected to the third key generation module. The second key decryption module is used to generate the same third key based on the same seed data using the host device encryption module, so as to decrypt the encrypted ciphertext and obtain the decrypted second key. The second key decryption module is connected to the encrypted transmission module and the third key generation module.
[0023] Compared with existing technologies, this invention has the following advantages: This invention stores the model's key in a clock-based encryption lock, achieving physical isolation between the key and the encryption model. The key has the property that it can only be written to the encryption lock in one direction and cannot be read from outside the encryption lock, thus improving communication security.
[0024] This invention uses a hardware encryption dongle device with a clock, creates an encryption module inside the dongle, and uses a one-shot password verification method, without using the dongle administrator password to log in, preventing the dongle administrator login password from being leaked through eavesdropping or software interception. Data communication is encrypted using seed data and a custom algorithm, which improves the security of the verification operation.
[0025] The host encryption module of the present invention can generate the same third key based on the same seed and a custom algorithm, decrypt the encrypted ciphertext to obtain the second key, and then use the third key to encrypt the second key for transmission, which can prevent software interception and eavesdropping from causing leakage.
[0026] Compared with the existing technology where neural network models are deployed and run on the terminal device side, this invention divides the encrypted model into two parts: the first part is stored in the host device and the second part is stored in the clock encryption lock. This patent can be used to protect the model in scenarios without network connection, and the model files stored on both devices are incomplete, which increases the difficulty of cracking.
[0027] Compared with the existing technology where the network model file itself is not encrypted, this invention can encrypt all or part of the model file, and only requires decryption once to load and run the model.
[0028] This invention performs hash calculations and uses the host device's encryption module to send the calculation results to the encryption lock's encryption module for login verification. Adding time information can prevent replay attacks.
[0029] Compared to existing technologies that store neural network models on remote servers, this invention stores the model's key in a clock-based encryption lock, achieving physical isolation between the key and the encrypted model. This allows for model protection even in scenarios without a network connection. This invention solves the technical problems of existing technologies, such as limitations in real-time performance and susceptibility to cracking, leading to low security. Attached Figure Description
[0030] Figure 1 This is a schematic diagram of the basic steps of the encryption and storage method of the neural network model based on the clock encryption lock according to Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the basic structure of the neural network model encryption and storage system based on a clock-locked encryption lock according to Embodiment 1 of the present invention; Figure 3 This is a schematic diagram illustrating the deployment process of the neural network model encryption and storage system based on a clock-locked encryption lock according to Embodiment 1 of the present invention. Figure 4 This is a schematic diagram illustrating the communication timing between the host device and the clock encryption lock, as well as an example of the communication messages between the host device and the encryption lock in Embodiment 1 of the present invention. Figure 5 This is a schematic diagram of the data processing flow of the encryption module inside the encryption lock in Embodiment 1 of the present invention. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] Example 1 Cracking a dongle primarily involves using software and hardware to eavesdrop on the communication between the host and the USB dongle, thereby obtaining the dongle's administrator password and the communication content. Obtaining the administrator password allows for the copying of sensitive files and data from inside the dongle's hardware, while obtaining the communication content allows for software interception and modification of the communication, disguising the dongle as a system dongle.
[0033] like Figure 1 As shown, in response to various current methods for cracking encryption locks, the neural network model encryption and storage method based on a clock encryption lock provided by this invention includes the following basic steps: S1. Divide the encrypted model into two parts. The first part is stored in the host device, and the second part is stored in the clock encryption lock. The second part can be one or multiple files. When storing, use the file ID to distinguish them, and record the split details in the encryption table. S2. Storing the model's key in a clock-based encryption lock achieves physical isolation between the key and the encryption model. The key has the property that it can only be written to the encryption lock in one direction and cannot be read from outside the encryption lock. S3. Use a hardware dongle device with a clock, create an encryption module inside the dongle, use a one-shot password verification method, do not use the dongle administrator password to log in, and use seed data and custom algorithms for encryption in data communication.
[0034] like Figure 2 As shown, the neural network model encryption and storage system based on a clock-locked encryption lock provided by this invention includes: In this embodiment, host device 1 includes AI application 11, and AI application 11 includes host device encryption module 111. In this embodiment, the clock encryption lock 2 includes an encryption module 21 within the lock. In this embodiment, the clock encryption lock 2 can be connected to the host device 1 via, for example, a USB connection to achieve bidirectional data transmission.
[0035] like Figure 3 As shown, in this embodiment, the deployment process of the neural network model encryption and storage system based on clock encryption lock of the present invention includes the following steps: S1' First, after designing the model, a neural network model f is generated through training using the dataset; S2': Generate the first key using random numbers, time, and production equipment information; S3': Use the first key to encrypt the product ID, neural network model hash value, and random number to generate the second key; S4'. Use the second key to encrypt all or part of the neural network model to generate an encrypted file E(f) and an encrypted table table; S5': Split E(f) into two parts, E1 and E2. E1 and the encryption table are stored in the host device, and E2 is stored in the clock encryption lock. S6' Store the second key in the hardware dongle, and store the host device's unique identifier and a custom string in the dongle.
[0036] like Figure 4 As shown, in this embodiment, the communication timing between the host device 1 and the clock encryption lock 2 includes: The host device encryption module 111 acquires the time and sends it to the encryption module 21 inside the encryption lock. The encryption module 21 inside the encryption lock acquires the time sent by the host device encryption module 111 and returns the time to the host device encryption module 111. The host device encryption module 111 obtains the second part of the encryption model and sends it to the encryption module 21 inside the encryption lock. The encryption module 21 inside the encryption lock processes the second part of the encryption model according to the password and command, and returns the second part of the encryption model to the host device encryption module 111. The host device encryption module 111 acquires the time and sends it to the encryption module 21 inside the encryption lock. The encryption module 21 inside the encryption lock acquires the time sent by the host device encryption module 111 and returns the time to the host device encryption module 111. The host device encryption module 111 obtains the key and sends it to the encryption module 21 inside the encryption lock. The encryption module 21 of the encryption lock obtains and returns the seed and ciphertext to the host device encryption module 111 based on the key sent by the host device encryption module 111.
[0037] like Figure 5 As shown, the data processing flow in the encryption module 22 within the encryption lock of the present invention includes: S51', Receive data; S52', Read hardware identifier storage area, Read custom character area, Get current lock time; S53': Hash operations are performed using the same rules and algorithms as the host; S54', Determine the calculation result; S55', Verification failed; S56' Verification successful; S57' Command parsing to determine whether to obtain the key; S58' If yes, then determine to obtain the key and generate the seed, generate the third key, encrypt the second key with the third key, and send the ciphertext and seed to the host; S59' If not, determine whether to obtain the model, read the second part of the encrypted model, and send it to the host device.
[0038] In this embodiment, the one-shot password verification method uses the same hashing rules (SHA-256 or MD5) between the host device encryption module and the encryption module within the clock encryption lock. For example, it combines a unique hardware device identifier (one or more hardware identifiers can be selected: hard drive serial number, chip serial number, CPU ID, motherboard UUID, MAC address, IMEI, operating system ID, or device serial number, etc.) with a custom string and time information (year, month, day, hour, minute, second), then performs a hash operation. The host device encryption module sends the result to the encryption module within the encryption lock for login verification. Adding time information prevents replay attacks. In practice, if the password expires due to time expiration, the host device encryption module only needs to retry. The host device encryption module can obtain the lock's internal time information through the API interface provided by the clock encryption lock.
[0039] In this embodiment, the encryption method for data transmission between the host and the encryption lock involves the encryption lock randomly generating seed data with a length greater than or equal to one byte. A third key is generated using the seed and a custom algorithm. This third key is then used to encrypt the second key during transmission. The encryption method employs a symmetric encryption algorithm (e.g., AES, 3DES, RC5, or the Chinese national standard SM4). The specific method of the custom algorithm is not limited; common techniques include scrambling, salting, arithmetic operations, XOR, and bit shifting. A symmetric encryption algorithm can also be superimposed. The host's encryption module can generate the same third key based on the same seed and the custom algorithm, and decrypt the encrypted ciphertext to obtain the second key. Using the third key to encrypt the second key during transmission prevents software interception and eavesdropping from causing leaks. In this embodiment, the neural network model is encrypted using the AES algorithm. The second key is 32 bytes long, and the seed is a 32-bit random number. The private algorithm uses (1) performing a bitwise XOR operation, (2) swapping the positions of adjacent bytes, and (3) using the first 16 bytes as the key to encrypt the last 16 bytes of data. The algorithm uses 3DES. A 32-byte third key is generated through the above process. The second key is added to the 32-byte random number to become 64-bit data. The third key is used to encrypt the data to form 64-bit ciphertext.
[0040] In summary, this invention stores the model's key in a clock-based encryption lock, achieving physical isolation between the key and the encryption model. The key has the property of being written to the encryption lock in a one-way direction and cannot be read from outside the encryption lock, thus improving communication security.
[0041] This invention uses a hardware encryption dongle device with a clock, creates an encryption module inside the dongle, and uses a one-shot password verification method, without using the dongle administrator password to log in, preventing the dongle administrator login password from being leaked through eavesdropping or software interception. Data communication is encrypted using seed data and a custom algorithm, which improves the security of the verification operation.
[0042] The host encryption module of the present invention can generate the same third key based on the same seed and a custom algorithm, decrypt the encrypted ciphertext to obtain the second key, and then use the third key to encrypt the second key for transmission, which can prevent software interception and eavesdropping from causing leakage.
[0043] Compared with the existing technology where neural network models are deployed and run on the terminal device side, this invention divides the encrypted model into two parts: the first part is stored in the host device and the second part is stored in the clock encryption lock. This patent can be used to protect the model in scenarios without network connection, and the model files stored on both devices are incomplete, which increases the difficulty of cracking.
[0044] Compared with the existing technology where the network model file itself is not encrypted, this invention can encrypt all or part of the model file, and only requires decryption once to load and run the model.
[0045] This invention performs hash calculations and uses the host device's encryption module to send the calculation results to the encryption lock's encryption module for login verification. Adding time information can prevent replay attacks.
[0046] Compared to existing technologies that store neural network models on remote servers, this invention stores the model's key in a clock-based encryption lock, achieving physical isolation between the key and the encrypted model. This allows for model protection even in scenarios without a network connection. This invention solves the technical problems of existing technologies, such as limitations in real-time performance and susceptibility to cracking, leading to low security.
[0047] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for encrypting and storing a neural network model based on a clock-based encryption lock, characterized in that, The method includes: S1. Train the neural network model f using a pre-set dataset; S2. Obtain key generation data and generate the first key accordingly; S3. Obtain and use the first key to encrypt and process product and model data, and generate a second key accordingly; S4. Use the second key to encrypt the preset part of the neural network model f, and generate the encrypted file E(f) and the encrypted table table accordingly. S5. Split the encrypted file E(f) to obtain the first part of the encrypted file E1 and the second part of the encrypted file E2, and record the splitting data in the encryption table table. S6. Write the second key to the hardware encryption lock in one direction, and store the host unique identifier of the pre-set host device and the host custom string to the clock encryption lock. Create an encryption module in the hardware encryption lock and the clock encryption lock to perform login verification using a one-shot password verification method. S6 includes: S61. Combine the host unique identifier of the preset host device, the host custom string, and the time information to obtain host device data and store it in the clock encryption lock; S62. Using the One-shot password verification method, the host encryption module and the clock encryption lock encryption module are used to perform hash operations according to the same rules to obtain the hash operation result; The same rules include: Combine the unique identifier of the hardware device, a custom string, and time information; S63. The host encryption module sends the hash operation result to the clock encryption lock encryption module to perform login verification and add the time information; S7. Obtain seed data and pre-set encryption logic to encrypt data communication. S7 includes: S71. Randomly generate seed data using a dongle; S72. Process the seed data using a pre-set third key generation algorithm to generate a third key; S73. According to the symmetric encryption algorithm, the second key is encrypted and transmitted using the third key; S74. The host encryption module generates the same third key based on the same seed data, and decrypts the encrypted ciphertext to obtain the decrypted second key.
2. The method for encrypting and storing a neural network model based on a clock-based encryption lock according to claim 1, characterized in that, Step S1 includes: S11. Design the initial model; S12. Train the initial model using the preset dataset to obtain the neural network model f.
3. The method for encrypting and storing a neural network model based on a clock-based encryption lock according to claim 1, characterized in that, Step S2 includes: S21. Obtain key generation data, wherein the key generation data includes: random number, time data and production equipment information; S22. Process the random number, the time data, and the production equipment information to generate a first key.
4. The method for encrypting and storing a neural network model based on a clock-based encryption lock according to claim 1, characterized in that, The product and model data in step S3 includes: product ID, neural network model hash value, and neural network model random number.
5. The method for encrypting and storing a neural network model based on a clock-based encryption lock according to claim 1, characterized in that, Step S5 includes: S51. Store the first part of the encrypted file E1 and the encrypted table to a preset host device; S52. Distinguish the second part of the encrypted file E2 by the file ID; S53. Store the second part of the encrypted file E2 to the clock encryption lock.
6. The method for encrypting and storing a neural network model based on a clock-based encryption lock according to claim 5, characterized in that, In step S52, the number of files in the second part of the encrypted file E2 includes: a single file and at least two files.
7. The method for encrypting and storing a neural network model based on a clock-based encryption lock according to claim 1, characterized in that, The hash operation in S62 uses algorithms including SHA-256 and MD5.
8. The method for encrypting and storing a neural network model based on a clock-based encryption lock according to claim 1, characterized in that, The symmetric encryption algorithm in step S73 includes: AES, 3DES, RC5, or the Chinese national standard SM4.
9. A neural network model encryption and storage system based on a clock-locked encryption lock, used to execute the neural network model encryption and storage method based on a clock-locked encryption lock as described in any one of claims 1 to 8, characterized in that, The system includes: The model training module is used to train a neural network model f using a pre-set dataset; The first key generation module is used to acquire key generation data and generate the first key accordingly. The second key generation module is used to obtain and use the first key to encrypt and process product and model data, thereby generating a second key. The second key generation module is connected to the model training module and the first key generation module. An encrypted data processing module is used to encrypt a preset portion of the neural network model f using the second key, thereby generating an encrypted file E(f) and an encrypted table. The encrypted data processing module is connected to the model training module and the second key generation module. An encrypted file splitting module is used to split the encrypted file E(f) to obtain a first part of the encrypted file E1 and a second part of the encrypted file E2, and to record the splitting data in the encrypted table. The encrypted file splitting module is connected to the encrypted data processing module. The One-shot verification module is used to unidirectionally write the second key to the hardware encryption lock and store the host unique identifier and host custom string of the preset host device to the clock encryption lock. An encryption module is created on the hardware encryption lock and the clock encryption lock to perform login verification using a one-time One-shot password verification method. The One-shot verification module is connected to the second key generation module. A communication encryption module is used to obtain seed data and preset encryption logic to encrypt data communication. The communication encryption module is connected to the second key generation module. The communication encryption module includes: A seed generation module is used to randomly generate the seed data using a dongle; The third key generation module is used to process the seed data using a preset third key generation algorithm to generate a third key. The third key generation module is connected to the seed generation module. An encrypted transmission module is used to encrypt and transmit the second key using the third key according to a symmetric encryption algorithm; the encrypted transmission module is connected to the third key generation module. The second key decryption module is used to generate the same third key based on the same seed data using the host encryption module, so as to decrypt the encrypted ciphertext to obtain the decrypted second key. The second key decryption module is connected to the encrypted transmission module and the third key generation module.
Citation Information
Patent Citations
Neural network model encryption protection system and method related to data random encryption
CN108830092A
Encryption lock type module, method for supporting artificial intelligence and electronic device
CN114118392A
Data encryption transmission method
CN108650277A
Software and hardware combined license authorization method and software and hardware combined license authorization device
CN111611552A
