A dynamic encryption and decryption method based on iterative multi-generation model
By constructing an iterative multi-generation model library and establishing an independent codebook for each model state snapshot, the security and dynamism issues of a single generation model are solved, enabling a more secure and flexible encryption and decryption method, and enhancing the system's robustness and resistance to analysis.
Patent Information
- Application Number
- CN202610472996.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-10
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2046-04-10
AI Technical Summary
Existing neural network-based encryption schemes suffer from single point of failure risk, limited codebook size, and lack of dynamic update mechanisms, making it difficult to build more secure and flexible encryption and decryption methods.
An iterative multi-generative model library is constructed. By saving multiple model state snapshots during training and establishing an independent codebook for each snapshot, multi-model redundancy encryption is achieved. A dual randomness mechanism of model index and effective vector is used for encryption and decryption.
It enhances the robustness and fault tolerance of the encryption system, expands the size of the effective vector set in the latent space, improves the randomness and unpredictability of encryption, and effectively resists statistical analysis attacks.
Smart Images

Figure CN122093180B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security and data encryption technology, specifically to a dynamic encryption and decryption method based on an iterative multi-generation model. Background Technology
[0002] The security of modern encryption technologies primarily relies on the computational complexity of mathematical problems, such as classic encryption systems like RSA and ECC, which are based on number theory problems. However, with the rapid improvement of computing power, especially the development of quantum computing, these traditional encryption methods are facing unprecedented security challenges. Against this backdrop, neural network-based encryption technologies have gradually become a research hotspot. Generative neural networks can achieve encryption functions through complex mappings from latent space to data space, providing a new approach to overcoming the limitations of traditional encryption. These methods utilize the nonlinear transformations and distributed learning capabilities of neural networks, theoretically enabling the construction of more flexible and resistant encryption systems.
[0003] Currently, neural network-based encryption schemes typically employ a single, fixed generative model as the core for decryption. While this design possesses a degree of innovation, it suffers from significant security flaws: First, the system's security relies entirely on a single model and its corresponding codebook. Once the model parameters or codebook are compromised, the entire encryption system becomes completely ineffective, creating a serious "single point of failure" risk. Second, the latent space vector set provided by a single codebook is limited in size, restricting further enhancements to encryption randomness. Furthermore, the static model architecture lacks a dynamic update mechanism, making it difficult to cope with the evolution of security threats that may arise during long-term use. Although generative neural networks generate a series of progressively optimized intermediate models during training, these models possess similar mapping capabilities but exhibit diverse parameter distributions. However, current technologies have not effectively utilized this characteristic to enhance the system's dynamism and resistance to analysis. Therefore, how to overcome the limitations of a single model, fully leverage the iterative diversity during training, and construct more secure and flexible encryption and decryption methods has become a pressing issue in the current technological field. Summary of the Invention
[0004] To address the technical problems of single-generative model encryption schemes, such as single-point-of-failure risk, limited codebook size, and lack of dynamic update mechanism, this invention provides a dynamic encryption and decryption method based on iterative multi-generative models. This invention primarily utilizes the following: during the training of a generative neural network model, multiple model state snapshots are saved according to preset iteration nodes to construct an iterative model library; a corresponding codebook is established for each model state snapshot, forming a multi-codebook system; during encryption, a model index is assigned to each symbol in the plaintext sequence, and a valid vector in the corresponding codebook is found based on this index; the model index and the valid vector together constitute the ciphertext; during decryption, the corresponding model state snapshot is called according to the model index in the ciphertext, and the valid vector is input into the model to recover the plaintext. This achieves dual randomness in the encryption process through both "model selection" and "vector selection," enabling the same plaintext to generate ciphertext variants on a much larger scale than a single-model scheme, greatly enhancing its resistance to cryptanalysis attacks. Unlike encryption schemes that rely on a single fixed generation model to construct a single codebook, this invention obtains model state snapshots from multiple training stages during the same training process and establishes a corresponding codebook for each model state snapshot. This enables the encryption process to have a dual dynamic selection mechanism for both the model dimension and the latent space vector dimension, thus forming a multi-model redundant encryption system that differs from single-model static codebook schemes.
[0005] The technical means employed in this invention are as follows: A dynamic encryption and decryption method based on an iterative multi-generation model includes the following steps: Construct a decryption model, which includes a connected generative neural network and a classifier; The decryption model is trained using the target dataset. During the training process, several model state snapshots are saved according to preset iteration nodes to construct an iterative multi-generation model. The input of the state snapshot of any of the several models is the latent space, and the output is the plaintext space. Based on the aforementioned model state snapshots, an iterative model library is established; Based on each symbol in the plaintext space, a corresponding set of valid vectors is searched in the corresponding latent space. The set of valid vectors satisfies the following condition: any vector in the set of valid vectors can be correctly classified as a symbol in the plaintext space by the classifier with a confidence level higher than a preset threshold. Based on the correspondence between the symbols and the set of effective vectors, a codebook is established for the plurality of model state snapshots; A model index is assigned to each symbol in the plaintext sequence to be encrypted. The corresponding codebook is found based on the model index. A selection function is used to find the valid vector corresponding to the symbol in the corresponding codebook. The model index is then added to the valid vector. Based on the model index, the corresponding model state snapshot in the iterative model library is found, and the valid vector is input into the corresponding model state snapshot to obtain the recovered plaintext symbol.
[0006] Furthermore, the process of constructing the effective vector set includes: Randomly sample a vector in the latent space; Calculate the confidence score between the vector and the symbols in the plaintext space. When the confidence score is greater than a preset threshold, determine that the current vector is a valid vector and add the valid vector to the set of valid vectors.
[0007] Further, the model index is calculated based on the hash function, and the formula for calculating the model index is as follows:
[0008] in, For model indexing, K For encryption key, j The position number of the plaintext symbol within the plaintext sequence. The total number of iterative models is represented by , Hash is the hash function, and mod is the modulo operation.
[0009] Furthermore, the training process of the neural network employs an adversarial training strategy. The neural network is a generative adversarial network (GAN), which includes a generator and a discriminator. The minimax game objective function of the adversarial training strategy is:
[0010] in, For the true image distribution, It follows a standard normal distribution. For discriminator, For generator, These are the trainable network parameters for the generator. These are the trainable network parameters for the discriminator.
[0011] Furthermore, the selection function includes uniform random selection and deterministic pseudo-random selection based on an auxiliary key.
[0012] Furthermore, the method for obtaining the iterative generative model is as follows: during a single training process of the generative neural network, model state snapshots are saved in several different training stages according to a preset model saving strategy. Each model state snapshot contains the iterative generative model and its corresponding classifier for that training stage, thus constituting the iterative model library.
[0013] Furthermore, the model index is used to make a first-level selection among multiple model state snapshots and their corresponding codebooks, and the selection function is used to make a second-level selection within the set of valid vectors in the selected target codebook.
[0014] Furthermore, the search steps for effective vectors include: first, randomly generating candidate vectors in the latent space, and then performing local optimization on the candidate vectors to improve the search efficiency of effective vectors that meet the preset threshold conditions.
[0015] Compared with the prior art, the present invention has the following advantages: 1. This invention achieves a multi-model redundancy encryption system by saving multiple model state snapshots according to preset iteration nodes during the training process of generative neural network models, constructing an iterative model library, and establishing an independent codebook for each model state snapshot. Even if a single model parameter or corresponding codebook is cracked by an attacker, the system can still maintain normal encryption and decryption functions through other uncracked model state snapshots, thereby effectively overcoming the single point of failure risk brought by a single model and significantly improving the robustness and fault tolerance of the encryption system.
[0016] 2. This invention constructs a corresponding cryptographic book for each model state snapshot in the iterative model library, forming a multi-cryptographic book system. During encryption, it independently assigns a model index to each symbol in the plaintext sequence and selects an effective vector from the corresponding cryptographic book, thereby achieving a multiple expansion of the size of the set of effective vectors in the latent space. Compared with a single cryptographic book scheme, this invention can utilize the diversity of the latent space corresponding to multiple model state snapshots to significantly increase the size of the ciphertext space that can be mapped to the same plaintext symbol, thereby enhancing the randomness and unpredictability of the encryption process and effectively resisting statistical analysis attacks.
[0017] 3. This invention saves multiple intermediate model state snapshots generated during training and constructs them into a dynamically updatable iterative model library. During encryption, the model index and the effective vector are combined to form ciphertext. During decryption, the corresponding model state snapshot is called according to the model index in the ciphertext to decrypt it, thus realizing a dynamic update mechanism for the model pool.
[0018] Based on the above reasons, this invention can be widely applied in fields such as information security and data encryption. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1This is a flowchart illustrating a dynamic encryption and decryption method based on an iterative multi-generation model according to the present invention.
[0021] Figure 2 This is a schematic diagram illustrating the principle of the encryption and decryption method of the present invention. Detailed Implementation
[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0024] like Figure 1 As shown, this invention provides a dynamic encryption and decryption method based on an iterative multi-generation model, comprising the following steps: S1. Construct a decryption model, which includes interconnected generative neural networks and classifiers.
[0025] S2. Train the decryption model using the target dataset. During the training process, save several model state snapshots according to the preset iteration nodes to build an iterative multi-generation model. The input of the state snapshot of any of the several models is the latent space, and the output is the plaintext space.
[0026] The training process of the neural network employs an adversarial training strategy. The neural network is a generative adversarial network (GAN), which includes a generator and a discriminator. The minimax game objective function of the adversarial training strategy is:
[0027] in, For the true image distribution, It follows a standard normal distribution. For discriminator, For generator, These are the trainable network parameters for the generator. These are the trainable network parameters for the discriminator.
[0028] S3. Based on several model state snapshots, establish an iterative model library.
[0029] The purpose of this step is to obtain multiple generative neural network models and their corresponding classifiers from different training stages within the same training process, forming an iterative model library.
[0030] During the training of a generative neural network model, multiple model state snapshots are saved according to preset iteration nodes (such as specific training epochs or performance metric thresholds). Each snapshot contains a generative model and a classifier, forming an iterative model pair. Let the total number of snapshots be... An iterative model ( Then the iterative model library is represented as:
[0031] in, M For iterative model library, Representing the An iterative generative model, This is the high-precision classifier paired with it. All iterative models. Although they share the same network architecture and are trained using the same dataset, their model parameters differ due to being stored at different stages of the training process, leading to variations in their latent space. To data space mapping function There are differences. Each classifier After training or fine-tuning, it can identify the corresponding generative model with high confidence. Output data samples to plaintext symbol space .
[0032] plaintext symbol space P It can be defined as a set of finite elements such as numbers, letters, and specific image symbols, depending on the actual application scenario.
[0033] This step transforms a single training process into a resource library containing multiple differentiated decryption engines by capturing and solidifying multiple model snapshots along the training trajectory, laying the foundation for dynamic encryption that introduces the "model selection" dimension.
[0034] Furthermore, although the generated models corresponding to different model state snapshots originate from the same training process, their model parameters and the mapping relationship from the latent space to the plaintext space differ due to the different saving times. This results in differences in the effective vector set and codebook content corresponding to the same plaintext symbol under different model state snapshots, providing a foundation for realizing multi-model dynamic encryption.
[0035] S4. For each symbol in the plaintext space based on the model state snapshot, search for the corresponding set of valid vectors in the corresponding latent space. The set of valid vectors satisfies the following condition: any vector in the set of valid vectors can be correctly classified as a symbol in the plaintext space by the classifier with a confidence level higher than a preset threshold.
[0036] Specifically, the steps for constructing an effective vector set include: The first step is to randomly sample a vector from the latent space; The second step is to calculate the confidence level between the vector and the symbols in the plaintext space. When the confidence level is greater than a preset threshold... When the current vector is determined to be a valid vector, it is added to the set of valid vectors.
[0037] Furthermore, the search for effective vectors can employ a combination of random sampling and local optimization. That is, candidate vectors are first randomly generated in the latent space, and then the candidate vectors are locally adjusted to improve the search efficiency of effective vectors that meet the preset confidence threshold conditions.
[0038] For plaintext space Each symbol in In the Iterative Model The defined implicit space In the middle, search and construct an effective set of vectors. This set contains all models that can be passed. Generate classifier High confidence level identification as plaintext The latent space vector. Its mathematical definition is:
[0039] in, For the first The set of valid vectors corresponding to each model, where z is a vector in the latent space. The confidence score output by the classifier. This is the preset confidence threshold.
[0040] S5. Based on the correspondence between symbols and the set of valid vectors, a codebook is built for each model state snapshot.
[0041] For each iterative model Build a complete codebook The codebooks of all iterative models constitute the codebook set. These codebooks are independent of each other, and for the same plaintext... The set of effective vectors corresponding to different iterative models and Significant differences exist, with some overlap but not identical content, which provides a basis for dynamically selecting encryption, among which For the first The set of valid vectors corresponding to each model. Therefore, even for the same plaintext symbol, the ciphertext representations formed under different model state snapshots are different, thus further expanding the scale of the ciphertext space.
[0042] S6. Assign a model index to each symbol in the plaintext sequence to be encrypted, look up the corresponding cipherbook based on the model index, use a selection function to find the valid vector corresponding to the symbol in the corresponding cipherbook, and add the model index to the valid vector.
[0043] Given a plaintext sequence to be encrypted ,in The dynamic encryption process is as follows: Step 1: Calculate the model index based on the hash function. The formula for calculating the model index is:
[0044] in, For model indexing, K For encryption key, j This represents the position number of the plaintext symbol within the plaintext sequence. The total number of iterative models, Hash Here, `mod` is the hash function, and `mod` is the modulo operation. Based on the encryption key... Alternatively, a pre-defined strategy (e.g., uniformly random selection) may be used for each plaintext symbol in the sequence. Dynamically allocate an iterative model index Forming a model index sequence .
[0045] Step 2: Based on the model index Locate the corresponding codebook .
[0046] Step 3: In the codebook Search plaintext The corresponding set of valid vectors .
[0047] Step 4: Using a selection function From the set Select a latent space vector This serves as the ciphertext component of the plaintext.
[0048] Selection functions include uniform random selection and deterministic pseudo-random selection based on an auxiliary key.
[0049] The role of the model index is to determine the target model state snapshot and its corresponding codebook participating in the current encryption process. The role of the selection function is to select a specific valid vector within the determined target codebook. The two respectively complete the two-level dynamic selection of the model layer and the vector layer.
[0050] Ultimately, the ciphertext is composed of a model index sequence. and latent space vector sequence Together they constitute the output format. Or a fusion encoding of the two. This process achieves a ternary dynamic mapping of "plaintext-iterative model-latent space vector".
[0051] S7. Based on the model index, find the corresponding model state snapshot in the iterative model library, input the valid vector into the corresponding model state snapshot, and obtain the recovered plaintext symbol.
[0052] This step uses the iterative model index information in the ciphertext to decrypt the original plaintext using the corresponding iterative model.
[0053] Given ciphertext (containing a sequence of model indexes) and latent space vector sequence The decryption process is as follows: Step 1: Based on the model index From the iterative model library Load the corresponding generative model and classifier .
[0054] Step 2, Data Reconstruction: Reconstructing the latent space vectors The data samples are input into the corresponding neural network to obtain reconstructed data samples. .
[0055] Step 3, Symbol Recognition: Reconstructing the sample Input the data into the classifier to obtain the identified plaintext symbols. .
[0056] After traversing all ciphertext units, the decrypted plaintext sequence is obtained. Only by strictly using the iterative model specified during encryption. Only then can we guarantee This allows for correct decryption.
[0057] Example This embodiment provides a dynamic encryption and decryption method based on an iterative multi-generative model. It uses a Generative Adversarial Network (GAN) as the iterative model and MNIST handwritten digits (0-9) as the encrypted plaintext. A dynamic encryption system for handwritten digits based on the GAN iterative model is constructed. The embodiment comprehensively demonstrates the implementation process, technical details, and innovative effects of the method. The specific steps include: S1. Construct a decryption model, which includes interconnected neural networks and classifiers.
[0058] S2. Train the decryption model using a handwritten digit dataset. During the training process, save several model state snapshots according to preset iteration nodes. The input of each model state snapshot is the latent space, and the output is the plaintext space.
[0059] S3. Based on several model state snapshots, establish an iterative model library.
[0060] This embodiment uses a generative adversarial network (GAN) as the generative neural network model. A deep convolutional generative adversarial network (DCGAN) is trained using the MNIST handwritten digit dataset, with a total training epoch of 50,000. During training, the generator is saved after specific epochs (epochs 10,000, 20,000, 30,000, 40,000, and 50,000). A snapshot of the current parameters yields five iterative generative models: , , , , For each iteration, a model is generated. The generated samples are used to fine-tune a standard convolutional neural network classifier to obtain a dedicated classifier that is paired with it. All classifiers On the test set The generated images achieved a recognition accuracy of over 98%. This ultimately formed an iterative model library. The above-mentioned training rounds and model state snapshot saving nodes are only one implementation example. In other implementations, the total number of training rounds and model saving nodes can be flexibly set according to the task complexity, model convergence, or preset performance indicators.
[0061] S4. For each symbol in the plaintext space based on the model state snapshot, search for the corresponding set of valid vectors in the corresponding latent space. The set of valid vectors satisfies the following condition: any vector in the set of valid vectors can be correctly classified as a symbol in the plaintext space by the classifier with a confidence level higher than a preset threshold.
[0062] S5. Based on the correspondence between symbols and the set of valid vectors, a codebook is built for each model state snapshot.
[0063] An independent codebook is constructed for each of the five iterative models mentioned above. Taking the plaintext number "7" as an example, the construction process is as follows: For each iterative model In its 100-dimensional latent space (in GANs, the latent space is the random noise space), a gradient-guided optimization algorithm is used to search for the noise vector. , making And the identification confidence level is greater than 0.95. For each model We searched and collected approximately 800 valid noise vectors that met the criteria, forming a set. For plaintext space This process is performed on all numbers in the model, thus completing the codebook for each iterative model. The search method is a specific implementation combining random sampling and local optimization. It first randomly generates candidate noise vectors, then locally adjusts these candidate vectors using gradient guidance to improve the efficiency of searching for effective vectors that meet the confidence criteria.
[0064] S6. Assign a model index to each symbol in the plaintext sequence to be encrypted, find the corresponding codebook based on the iterative model index, use a selection function to find the valid vector corresponding to the symbol in the corresponding codebook, and add the model index to the valid vector.
[0065] Suppose we need to encrypt the plaintext number sequence "349". Set the encryption key. =="mySecretKey".
[0066] Step 1: Model Selection: A key-based deterministic selection strategy is adopted. For the first plaintext sequence... The symbol at each position, and its corresponding iterative model index. The calculation formula is: ,in For encryption key, This represents the position number of the plaintext symbol in the sequence. This indicates a connection, and Hash is a hash function. Here, represents the total number of iterative models, and `mod` is the modulo operation. The `+1` operation in the formula ensures the accuracy of the calculation result. It is between 1 and Integers between these ranges, thus precisely corresponding to the first iteration in the iterative model library. Model No.
[0067] For the plaintext number sequence "349" to be encrypted (where the position number is...) (1, 2, 3 in sequence) Total number of iterative models The model index is obtained through calculation. That is, use iterative model 2 for the number '3', iterative model 5 for '4', and iterative model 3 for '9'.
[0068] Step 2: Vector Selection and Encryption: After the model index is determined, vector selection is further performed within the codebook corresponding to the selected iterative model. The vector selection is accomplished by a selection function, which selects a latent space vector from the set of valid vectors corresponding to the target plaintext symbol as the ciphertext component. This vector selection constitutes the second layer of dynamic selection after model selection.
[0069] For the number '3': query the codebook of iterative model 2 Find its corresponding set of valid vectors And select a noise vector from the set according to the selection function. .
[0070] For the number '4': query the codebook of iterative model 5. Find its corresponding set of valid vectors And select a noise vector from the set according to the selection function. .
[0071] For the number '9': Query the codebook of Iterative Model 3 Find its corresponding set of valid vectors And select a noise vector from the set according to the selection function. .
[0072] Step 3: Ciphertext Output: The generated ciphertext can be represented as .
[0073] S7. Based on the model index, find the corresponding model state snapshot in the iterative model library, input the valid vector into the corresponding model state snapshot, and obtain the recovered plaintext symbol.
[0074] The recipient received the encrypted message Then, perform decryption: Step 1: Model matching: Read the model index in each ciphertext unit, which is 2, 5, and 3 in sequence.
[0075] Step 2: Loading and Decryption: right : Loading the iterative model library .calculate The generated image is obtained, and then... It was identified as the number '3'.
[0076] right :load .calculate ,Depend on It was identified as the number '4'.
[0077] right :load .calculate ,Depend on It was identified as the number '9'.
[0078] Step 3: Output plaintext: The recovered plaintext sequence is "349", which is consistent with the original plaintext.
[0079] In this embodiment, system security is built upon a union of five iterative models and their codebooks. Consider an attack scenario: an attacker somehow completely steals detailed information about iterative model 2, including the model's... and the codebook In traditional single-model encryption systems, this would lead to a complete system crash. But in this method: An attacker can only successfully decrypt ciphertext units encrypted using Iterative Model 2 (such as the first number in this embodiment).
[0080] For ciphertext units encrypted using other iterative models (such as Model 5 and Model 3), attackers cannot decrypt them correctly due to a lack of the corresponding model and codebook. Even if they attempt to use a known model... Go and handle or The result it generates cannot be... The high-confidence value indicates that the number is any valid digit, and decryption fails.
[0081] To completely crack this system, attackers would need to obtain all five iterative models and the codebook, which is far more difficult and costly than cracking a single model system.
[0082] This embodiment demonstrates that the present invention, through an iterative multi-model architecture, effectively achieves security redundancy and risk isolation, significantly enhancing the overall robustness of the encryption system in the face of partial information leakage.
[0083] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0084] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; 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 or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A dynamic encryption and decryption method based on an iterative multi-generation model, characterized in that, Includes the following steps: Construct a decryption model, which includes a connected generative neural network and a classifier; The decryption model is trained using the target dataset. During the training process, several model state snapshots are saved according to preset iteration nodes to construct an iterative multi-generation model. The input of any model state snapshot among the several model state snapshots is the latent space, and the output of any model state snapshot among the several model state snapshots is the plaintext space. Based on the aforementioned model state snapshots, an iterative model library is established; Based on each symbol in the plaintext space, a corresponding set of valid vectors is searched in the corresponding latent space. The set of valid vectors satisfies the following condition: any vector in the set of valid vectors can be correctly classified as a symbol in the plaintext space by the classifier with a confidence level higher than a preset threshold. Based on the correspondence between the symbols and the set of effective vectors, a codebook is established for the plurality of model state snapshots; A model index is assigned to each symbol in the plaintext sequence to be encrypted. The corresponding codebook is found based on the model index. A selection function is used to find the valid vector corresponding to the symbol in the corresponding codebook. The model index is then added to the valid vector. Based on the model index, the corresponding model state snapshot in the iterative model library is found, and the valid vector is input into the corresponding model state snapshot to obtain the recovered plaintext symbol.
2. The dynamic encryption and decryption method based on an iterative multi-generation model according to claim 1, characterized in that, The process of constructing the effective vector set includes: A vector is randomly sampled from the latent space; Calculate the confidence level between the vector and the symbols in the plaintext space. When the confidence level is greater than a preset threshold, determine that the current vector is a valid vector and add the valid vector to the set of valid vectors.
3. The dynamic encryption and decryption method based on an iterative multi-generation model according to claim 1, characterized in that, The model index is calculated based on the hash function, and the formula for calculating the model index is as follows: in, For model indexing, K For encryption key, j The position number of the plaintext symbol within the plaintext sequence. The total number of iterative models is represented by , Hash is the hash function, and mod is the modulo operation.
4. The dynamic encryption and decryption method based on an iterative multi-generation model according to claim 1, characterized in that, The training process of the generative neural network employs an adversarial training strategy. The generative neural network is a generative adversarial network (GAN), which includes a generator and a discriminator. The minimax game objective function of the adversarial training strategy is: in, For the true image distribution, It follows a standard normal distribution. For discriminator, For generator, These are the trainable network parameters for the generator. These are the trainable network parameters for the discriminator.
5. The dynamic encryption and decryption method based on an iterative multi-generation model according to claim 1, characterized in that, The selection functions include uniform random selection and deterministic pseudo-random selection based on an auxiliary key.
6. The dynamic encryption and decryption method based on an iterative multi-generation model according to claim 1, characterized in that, The method for obtaining the iterative multi-generative model is as follows: during a single training process of the decrypted model, model state snapshots are saved in several different training stages according to a preset model saving strategy. Each model state snapshot contains the generative neural network and its corresponding classifier in that training stage, and the iterative model library is established based on the several model state snapshots.
7. The dynamic encryption and decryption method based on an iterative multi-generation model according to claim 1, characterized in that, The model index is used to make a first-level selection among multiple model state snapshots and their corresponding codebooks, and the selection function is used to make a second-level selection within the set of valid vectors in the selected target codebook.
8. The dynamic encryption and decryption method based on an iterative multi-generation model according to claim 2, characterized in that, The search steps for effective vectors include: first, randomly generating candidate vectors in the latent space, and then performing local optimization on the candidate vectors to improve the search efficiency of effective vectors that meet the preset threshold conditions.
Citation Information
Patent Citations
Management control method and device for deep learning model
CN118860479A
Neural network model encryption method and apparatus, neural network model decryption method and apparatus, device, and medium
WO2025007525A1
