Private password guessing model training method, system, equipment and medium
By standardizing the training password set and injecting noise into the training method, the privacy leakage problem in the training of multi-task privacy password guessing models is solved, and the privacy protection and task performance of the model are improved while preserving semantic importance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
- Filing Date
- 2025-11-26
- Publication Date
- 2026-05-01
AI Technical Summary
Existing multi-task privacy password guessing models struggle to balance performance and privacy protection across tasks during training. In particular, they pose a risk of privacy leakage when sharing password data structure information. Furthermore, existing privacy mechanisms are not optimized for the characteristics of password data and lack cross-task knowledge sharing and adaptability.
The training password set is standardized, and a shared representation network is used to extract cross-task common password features. Noise is injected to protect privacy. The training is combined with a task-specific sub-network, and the noise variance and sampling probability are dynamically adjusted to preserve semantic importance. A structure-aware differential privacy mechanism and dynamic task weighting are used for multi-task training.
This approach effectively prevents privacy leakage while preserving key password structure features, significantly reduces the privacy leakage index, improves the stability and performance of multi-task training, reduces interference between tasks, and enhances the model's privacy protection and task performance.
Smart Images

Figure CN121959546A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, and in particular to a method, system, device and medium for training a privacy password guessing model. Background Technology
[0002] In recent years, password guessing techniques based on deep generative models (such as GANs and Transformers) have significantly improved the quality of password generation. However, these models typically require training on large amounts of plaintext password data in a centralized environment, posing a serious risk of privacy breaches. With the introduction of privacy regulations such as GDPR (General Data Protection Regulation) and cybersecurity laws, directly using real user passwords for training has become unacceptable from both ethical and legal perspectives. To address this, academia has proposed privacy protection schemes such as federated learning and homomorphic encryption, distributing model training among multiple parties or encrypting the data. However, these methods have significant drawbacks: huge computational overhead and high communication / latency, leading to difficulties in system deployment; since participants can only share gradients or encrypted information, model performance often degrades, making it difficult to obtain globally effective features; moreover, existing privacy mechanisms are mainly designed for scenarios such as images or natural language, without being optimized for the characteristics of password data, and lack task-specific protection strategies. Furthermore, in real-world password security assessment scenarios, multiple related tasks (such as password generation, password recovery, and strength assessment) often coexist. These tasks have different objectives but share underlying password structure patterns. However, existing technologies mostly focus on a single task, neglecting cross-task knowledge sharing and adaptability, making it difficult to balance the performance and privacy protection of each task. Therefore, how to effectively protect user privacy while sharing password data structure information and avoid the leakage of sensitive information through shared features is an urgent problem to be solved. Summary of the Invention
[0003] The purpose of this invention is to propose a method, system, device, and medium for training a privacy password guessing model, in order to solve the problem that the training process of existing multi-task privacy password guessing models is difficult to balance the performance of each task and privacy protection.
[0004] The privacy password guessing model training method of the present invention includes: Obtain a training password set, which includes multiple training passwords for training, and standardize the training passwords. In each training round, the training commands are sampled to obtain a sub-training set; Cross-task general password features are extracted from the sub-training set using a shared representation network; Noise is injected into the shared representation network, and the variance of the injected noise is determined based on the depth of the shared representation network and the dominant character type of the sample, so as to preserve semantic importance as much as possible while protecting privacy. The training model is obtained by training a task-specific subnetwork.
[0005] Optionally, after standardizing the training password, the method further includes: quantifying the complexity of the standardized training password. The step of sampling the training password to obtain a sub-training set in each training round includes: The sampling probability is allocated according to the complexity of each training command, and as the number of training rounds increases, the sampling tendency gradually shifts from favoring simple samples to sampling more evenly. Sampling is performed based on the sampling probability.
[0006] Optionally, the quantification of complexity evaluation for the standardized training commands includes: Determine the Shannon entropy of the training password; The length and character diversity of the training password were determined; The complexity assessment quantification score is obtained by weighting and summing the Shannon entropy, the character diversity, and the length of the training password based on adjustable normalized weights.
[0007] Optionally, the relationship between the variance of the injected noise and the depth of the shared representation network and the dominant character type of the sample includes: The closer to the output layer, the smaller the variance of the injected noise; The higher the importance of a character category, the smaller the variance of the injected noise.
[0008] Optionally, the noise injection into the shared representation network includes any of the following: Noise is injected only into the active layer of the shared representation network; Noise is injected into the activation layer and gradient of the shared representation network.
[0009] Optionally, before injecting noise into the shared representation network, the method further includes: An assessment of the impact of noise on overall differential privacy guarantees; If noise is injected only into the activation layer, it needs to be proven that this operation is equivalent to protecting a certain operator of sensitive information with a Gaussian mechanism and can be synthesized into the population; If noise is injected into the activation layer and gradient, the overall privacy loss is a result of the combinatorial theorem.
[0010] Optionally, the step of training the model through a task-specific sub-network includes: When there are multiple training tasks, the password strength is calculated for each task, and the password strength reflects the complexity or difficulty of the task. For tasks that are more complex or difficult, allocate a higher proportion of training time.
[0011] On the other hand, the present invention also provides a privacy password guessing model training device, comprising: The data acquisition unit is configured to acquire a training password set, which includes multiple training passwords for training, and to standardize the training passwords. The data sampling unit is configured to sample the training password in each training round to obtain a sub-training set; A shared representation unit is configured to extract cross-task general password features from the sub-training set through a shared representation network; The noise injection unit is configured to inject noise into the shared representation network, the variance of which is determined based on the depth of the shared representation network and the dominant character type of the sample, in order to preserve semantic importance as much as possible while protecting privacy. The task training unit is configured to be trained through a task-specific subnetwork to obtain a training model.
[0012] On the other hand, the present invention also provides a privacy password guessing model training device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the steps of the privacy password guessing model training method described above.
[0013] On the other hand, the present invention also provides a computer-readable storage medium having stored thereon computer program instructions, which, when executed by a processor, implement the steps of the privacy password guessing model training method as described above.
[0014] The privacy-preserving password guessing model training method of this invention determines customized noise based on the depth of the shared representation network and the dominant character type of the sample when injecting noise, so as to preserve semantic importance as much as possible while protecting privacy. The resulting noisy shared representation can be shared by multiple tasks simultaneously, enabling multi-task training, and the privacy leakage index is significantly lower than that of traditional multi-task models. It effectively prevents privacy leakage while preserving the structural features of key passwords. Attached Figure Description
[0015] Figure 1 A schematic diagram illustrating the basic process of training a privacy password guessing model provided for an embodiment; Figure 2 A schematic diagram of the architecture of the privacy password guessing model training method provided in the embodiment; Figure 3 A schematic diagram of the structure of the privacy password guessing model training device provided in the embodiment; Figure 4 This is a schematic diagram of the structure of the privacy password guessing model training device provided in the embodiment. Detailed Implementation
[0016] 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.
[0017] 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.
[0018] Example 1: This embodiment provides a method for training a privacy password guessing model, such as... Figure 1 As shown, the method includes, but is not limited to, the following steps: S101. Obtain the training password set, which includes multiple training passwords for training. Standardize the training passwords. In this embodiment, the standardization of the training password can be at the character level. During this process, the training password undergoes unified character-level encoding, and invisible / invalid characters are removed. It should be understood that the training password in this embodiment refers to a privacy password used for training.
[0019] S102. In each training round, the training commands are sampled to obtain a sub-training set; During training, multiple rounds of training can be conducted, with the training commands being resampled in each round. Therefore, each round of training may use a different subset of training data. Furthermore, as training progresses, the sampling strategy for each round can dynamically change with the number of rounds, emphasizing different aspects in the early and later stages of training.
[0020] S103. Extract cross-task general password features from the sub-training set using a shared representation network; S104. Inject noise into the shared representation network; In this embodiment, the variance of the injected noise is determined based on the depth of the shared representation network and the dominant character type of the samples, in order to preserve semantic importance as much as possible while protecting privacy. The dominant character type reflects the main types of characters that constitute the training password, including but not limited to special characters, uppercase letters, lowercase letters, numbers, etc.
[0021] S105. Train the model using a task-specific sub-network to obtain the training model; The privacy-preserving password guessing model training method in this embodiment determines customized noise based on the depth of the shared representation network and the dominant character type of the sample when injecting noise, so as to preserve semantic importance as much as possible while protecting privacy. This effectively prevents privacy leakage while retaining key password structural features. In this embodiment, the noisy shared representation obtained in the aforementioned steps can be shared by multiple tasks simultaneously, i.e., multi-task training is possible. In some implementations, the privacy leakage index of this method is significantly lower than that of traditional multi-task models.
[0022] In some implementations, after standardizing the training commands, the method further includes: quantifying the complexity of the standardized training commands. In each training round, the training commands are sampled to obtain a subset of the training set, including: The sampling probability is allocated according to the complexity of each training command, and as the number of training rounds increases, the sampling tendency gradually shifts from favoring simple samples to sampling more evenly. Sampling is performed based on the sampling probability.
[0023] In this embodiment, a small subset of training data is formed for each round of training, and sampling ensures that the data varies with each training iteration. By scheduling samples according to their complexity from easy to difficult, the perturbation of high-noise-sensitive layers in the early stages of training can be reduced, convergence stability can be improved, and shared layers can be helped to learn general, low-complexity patterns preferentially.
[0024] In some implementations, the quantification of complexity assessment for standardized training commands includes: The Shannon entropy for determining the training commands; Determine the length and character diversity of the training commands; A weighted summation of Shannon entropy, character diversity, and training password length is performed using adjustable normalized weights to obtain a quantitative score for complexity evaluation.
[0025] This embodiment proposes a complexity metric for privacy passwords, which can assess the complexity of training passwords through Shannon entropy, character diversity, and password length. It should be understood that the adjustable normalized weights can be dynamically adjusted as needed. In practical applications, prior values (initial weight values) can be configured for each element first, and continuously calibrated and optimized during the training and development process.
[0026] In some implementations, the relationship between the variance of the injected noise and the depth of the shared representation network and the dominant character type of the sample includes: The closer to the output layer, the smaller the variance of the injected noise; The higher the importance of a character category, the smaller the variance of the injected noise.
[0027] In this embodiment, the closer to the output layer can be referred to as the closer to the top layer, and vice versa, the closer to the bottom layer (closer to the input). Typically, activations at the bottom layer (closer to the input) consist mostly of local n-gram patterns, which can tolerate greater noise; while representations closer to the output contain higher semantic information. In this embodiment, less noise is applied to preserve more semantics. This can be achieved by segmenting the noise variance or configuring related functions.
[0028] In some implementations, injecting noise into the shared representation network includes any of the following: Noise is injected only into the activation layer of the shared representation network; Noise is injected into the activation layers and gradients of the shared representation network.
[0029] In this embodiment, Gaussian noise can be injected only into the internal activations of the shared representation network, or Gaussian noise can be injected into some gradients. However, regardless of where Gaussian noise is injected, its variance is simultaneously modulated by the network depth and the dominant character type.
[0030] In some implementations, before injecting noise into the shared representation network, the following steps are also included: An assessment of the impact of noise on overall differential privacy guarantees; If noise is injected only into the activation layer, it needs to be proven that this operation is equivalent to protecting a certain operator of sensitive information with a Gaussian mechanism and can be synthesized into the population; If noise is injected into the activation layer and gradient, the overall privacy loss is a result of the combinatorial theorem.
[0031] In some implementations, training the model using a task-specific subnetwork includes: When there are multiple training tasks, the password strength is calculated for each task, and the password strength reflects the complexity or difficulty of the task. For tasks that are more complex or difficult, allocate a higher proportion of training time.
[0032] In practical applications, training multiple tasks can be performed by configuring a total loss function for each task. Within the total loss function, a corresponding weight decay coefficient is set for each task to adjust the training weight. In this embodiment, the training intensity can be determined by quantifying the aforementioned complexity; that is, the higher the complexity of the sampled training commands, the higher the complexity or difficulty of the training task. In some implementations, the complexity or difficulty of the training task can also be determined based on the results of the training task that evaluates the command strength. This approach allows tasks with higher complexity / difficulty to receive a higher training weight, thereby avoiding weakening the learning of complex tasks in multi-task training. Through dynamic task weighting, the method in this embodiment can effectively mitigate mutual interference between different tasks.
[0033] The following specific example further illustrates the training method of the privacy password guessing model in this embodiment.
[0034] The privacy-preserving password guessing model training method proposed in this example adopts a shared-private multi-task learning architecture. Its overall framework structure can be found in [link to documentation]. Figure 2 This approach architecture ensures effective feature sharing among multiple tasks while employing a privacy protection and training stabilization mechanism specifically designed for password data, achieving a controllable trade-off between the strength of privacy protection and task performance.
[0035] The overall data flow and modules include: input preprocessing → Complexity-Aware Sampling (CACL) → Shared Representation Network (Embedding + Conv Encoder + FFN) → Structure-Aware Differential Privacy (SADP, noise injection) → Task-Specific Sub-Network (Generation / Recovery / Intensity Estimation) → Intensity-Aware Weighted Loss (SATW) → Optimization and Update (including gradient pruning and differential privacy noise / accounting). This overall design ensures that the shared layers learn a general password structure pattern, and also reduces the risk of leakage and improves training stability and generalization ability by complementaryly adding structure protection and sequential learning to the shared layers and sampling layers. In this example, the training process includes, but is not limited to, the following: 1. Input preprocessing The input preprocessing steps include the following data preprocessing and complexity quantification work, which aims to provide input for complexity-aware sampling. These steps include the following processes: 1.1 Character Standardization and Classification: First, the training passwords are standardized at the character level (unified encoding, removal of invisible characters, etc.). A set of character classes is defined. Each training command Mapped to character sequences And record the proportion and dominant category of each type. .
[0036] 1.2 Entropy Calculation (Information Content): The Shannon entropy is calculated using the following formula (Equation 1), where... For characters exist The number of times it appears in for The character set.
[0037] Formula 1: 1.3 Length and Character Diversity: Let Character type number 1.4 Complexity Evaluation Quantification Score: The calculation formula can be Equation 2 below, where is the adjustable normalized weight.
[0038] Formula 2: In Equation 2, For adjustable normalized weights, as an example, the suggested prior values for adjustable normalized weights can be: Consistent with the discretization strategy used in the experiments, it can be calibrated on the development set. The quantization score for evaluating complexity can also serve as the underlying quantization for strength / complexity.
[0039] 1.5 Intensity Label: As before, the intensity label is represented by the following formula 3, with adjustable normalized weights configured according to the prior values.
[0040] Formula 3: In this example, For the weak, For the middle, This discretization is strong. It can also be used for task weight initialization or sample stratification.
[0041] 2. Complexity Awareness Course Learning (CACL) – Sample Scheduling and Temperature Scheduling Mechanisms The goal of this step is to reduce the perturbation of high-noise-sensitive layers in the early stages of training by scheduling samples in order of increasing complexity, thereby improving convergence stability and helping shared layers to learn general low-complexity patterns preferentially.
[0042] 2.1 Sampling Probability and Temperature Scheduling Each sample in the dataset is assigned a sampling probability according to its complexity. In this example, the sampling probability is assigned using Equation 4 below.
[0043] Formula 4: In Equation 4, For the temperature in training round t, in this example, temperature scheduling is recommended to be monotonically increasing (from biased towards simple samples to near uniform). Equations 5 and 6 below illustrate three alternative methods for temperature scheduling: linear scheduling, exponential scheduling, and sigmoid.
[0044] Equation 5 (Linear Scheduling): Equation 6 (Exponential Scheduling): Equation 7 (Smooth Transition): 2.2 Sample Sampling Implementation In this process, the training set D is input, and temperature scheduling is performed. Complexity per sample .
[0045] In each training round, the following process will be performed: 2.21 Calculation The sampling distribution P is obtained by normalizing the training set D.
[0046] 2.22 Sampling is performed according to the sampling distribution P to form a subset of the training set in one training session; Within each sub-training set, samples can still be mixed according to task type to ensure multi-task updates.
[0047] 3. Shared representation network 3.1 Overall Network Structure Shared representation network Responsible for extracting cross-task common password features, this example adopts a lightweight architecture of character-level embedding → multi-scale one-dimensional convolutional encoder → pooling and fully connected (FFN) to meet the requirements of efficient modeling of short sequences (typical length 8–20).
[0048] The mathematical representation of the shared representation network in this example is as follows: Embedding layer: per character → Embedded Vector ; Convolutional coding: If using Each convolutional channel and different kernel lengths ,but Multi-scale convolution followed by concatenation ; Pooling and Fully Connected Networks (FFN): Pooling can use global averaging or self-attention pooling, while FFN consists of one or two fully connected layers plus nonlinear transformations, with shared output representations.
[0049] For example, a recommended configuration is as follows: Embedding Dimensions ; Convolutional layers: The first layer has 128 channels and a kernel length of 3; the second layer has 256 channels and a kernel length of 5.
[0050] FFN output dimension .
[0051] Activation: ReLU; Normalization: LayerNorm is used after convolution and before FFN to improve training stability.
[0052] 4. Mechanism and numerical design of Structure-Aware Differential Privacy (SADP) The structure-aware differential privacy module is the core privacy module of this invention. Its design idea is to inject Gaussian noise into the internal activations (or partial gradients) of the shared representation, but the variance of the noise is simultaneously modulated by the network depth and the dominant character type of the sample, so as to preserve semantic importance as much as possible while protecting privacy (e.g., feature preservation of digit sequences and stronger hiding of special characters). 4.1 Noise injection at the activation level Noise is injected into the activation of layer (1) of the shared representation network. The noise can be expressed as Equation 8: Formula 8: In equation 8 above: The hierarchical reference noise scale (which can increase or decrease with each level, depending on the information density). Modulation coefficients for character categories (e.g.) , This indicates the dominant character category of sample x.
[0053] 4.2 Hierarchical Noise Dispatch Strategy In this example, there is a deep dependency between the variance of the noise and the shared representation network: typically, the activations at the bottom layer (closer to the input) contain mostly local n-gram patterns and can tolerate larger noise; while the representations closer to the output contain higher semantic information and should be subject to smaller noise.
[0054] Therefore, it can be defined . or This depends on the addition / reduction strategy. Alternatively, it can be set in segments, for example, separately for the embedding layer and the shared layer. As an example, the embedding layer uses... The shared layer adopts .
[0055] 4.3 Character Category Coefficient For example, the importance of character categories is often ranked as follows: special characters > uppercase > lowercase > numbers. In practical applications, the order of importance of different character categories can be adjusted according to the task requirements.
[0056] In this example, the character category coefficients are configured as 1.5, 1.0, 0.8, and 0.6, respectively, following the order of special characters > uppercase > lowercase > numbers. However, these character category coefficients can be further tuned using a development set (e.g., grid-search or Bayesian optimization) while preserving privacy and performance goals.
[0057] 4.4 Noise Addition The impact of activation-level noise in SADP on overall differential privacy guarantees needs to be evaluated through privacy accounting: if noise is injected only at the activation layer, it must be proven that this operation is equivalent to Gaussian protection of some operator for sensitive information and can be synthesized into the overall system. If DP-SGD (which adds noise to the gradient and performs pruning) is used simultaneously, the overall privacy loss is the result of the combinatorial theorem.
[0058] Common practices are as follows: For DP-SGD, set the gradient clipping threshold (C) and the noise multiplier. Each time the noise is updated, Use RDP / Moments Accountant to calculate the final result. (Given) ).
[0059] If activation-level noise is used, the sensitivity of the noise's effect on a single sample needs to be estimated (e.g., first cropping / scaling the activation to limit sensitivity), and then selecting according to the Gaussian mechanism formula. The Gaussian mechanism formula is shown in Equation 9 below.
[0060] Formula 9: In equation 9 above, To improve the L2 flexibility of the corresponding query function (which needs to be limited / pruned in activation injection scenarios).
[0061] 5. Task-specific subnetworks and loss functions The system supports multiple tasks. In this example, there are 3 tasks, including the following three tasks: Task 1: Generative Password Guessing Structure: Transformer decoder (2 layers, 128 dimensions, 4 heads).
[0062] Loss: Character-level cross-entropy, the loss function is as follows (Equation 10).
[0063] Formula 10: Task 2: Recover the masked password Structure: Bi-GRU encoder (128-dimensional hidden states) or model with Masked-Attention.
[0064] Loss: Cross-entropy is calculated only at the masked positions, and the loss function is as follows (Equation 11).
[0065] Formula 11: Task 3: Password Strength Assessment Structure: CNN encoding + pooling + fully connected classifier (64 dimensions).
[0066] Loss: Multi-class cross-entropy .
[0067] The total loss function for each task is as follows: Equation 12, where Dynamic calculations are performed using an intensity-aware task weighting module. This is the weight decay coefficient.
[0068] Formula 12: 6. Intensity-Aware Task Weighted (SATW) The main purpose of this section is to realize dynamic weight calculation and stabilization.
[0069] 6.1 Basic Formula For task (t), calculate the average password strength over its current batch or moving average. This process can utilize the intensity function or the normalized value of the complexity evaluation quantization from the aforementioned examples.
[0070] Then the weights are calculated using the following formula 13, where Scaling hyperparameters for characterizing weight sensitivity ( >0, the larger the value, the more significant the weighting difference.
[0071] Formula 13: This example demonstrates how tasks with higher complexity / difficulty receive a higher proportion of training weight, thus avoiding the weakening of learning complex tasks in multi-task training.
[0072] 6.2 Stabilization Strategy Moving Average: Smoothed using the Exponential Moving Average (EMA) , In this example, .
[0073] Upper / lower bound pruning: To prevent the weight of a certain task from approaching 0 or 1, upper / lower bound pruning can be performed. Set the lower bound And then renormalize.
[0074] Weight regularization: Entropy regularization terms can be added. The weight distribution should not be too sharp.
[0075] In this example, by introducing a structure-aware differential privacy mechanism, customized noise is injected into different layers of the shared representation network and different dominant character types, effectively preventing privacy leakage while preserving key password structural features. The privacy leakage index of this method is significantly lower than that of traditional multi-task models, demonstrating stronger privacy protection. Furthermore, this example's method significantly outperforms models without privacy mechanisms in generative password guessing and password recovery tasks. Experimental results show that, compared to the baseline, this example's method reduces the perplexity of the language model in generative tasks by approximately 7.3% and improves the accuracy of masked password recovery by approximately 3.8%. Additionally, through dynamic task weighting, this invention effectively mitigates mutual interference between different tasks. In some implementations of this example, the task conflict index (TC) decreased by 26.06%, indicating a smoother multi-task training process and enhanced complementarity among tasks. The learning mechanism in this example also reduces the noise impact of complex samples in the early stages of training, accelerating training convergence. Combined with a lightweight noise injection method, it avoids the high computational overhead of schemes such as homomorphic encryption, making it easier to deploy in practice. In other words, it achieves enhanced privacy protection without significantly reducing model performance, achieving a good balance between privacy and task performance, while significantly reducing training conflicts during multi-task training through dynamic optimization.
[0076] This embodiment also provides a privacy password guessing model training device 100, such as Figure 3 As shown, it includes a data acquisition unit 101, a data sampling unit 102, a shared representation unit 103, a noise injection unit 104, and a task training unit 105.
[0077] The data acquisition unit 101 is configured to acquire a training password set, which includes multiple training passwords for training, and to standardize the training passwords.
[0078] The data sampling unit 102 is configured to sample the training commands in each training round to obtain a sub-training set.
[0079] The shared representation unit 103 is configured to extract cross-task general password features from a sub-training set through a shared representation network.
[0080] The noise injection unit 104 is configured to inject noise into the shared representation network. The variance of the injected noise is determined based on the depth of the shared representation network and the dominant character type of the sample, so as to preserve semantic importance as much as possible while protecting privacy.
[0081] Task training unit 105 is configured to be trained via a task-specific subnetwork to obtain a training model.
[0082] This embodiment also provides a privacy password guessing model training device, such as... Figure 4 As shown, it includes: Processor 41; Memory 42 is used to store executable instructions of processor 41; The processor 41 is configured to call the instructions stored in the memory 42 to execute the steps of the privacy password guessing model training method described above in this embodiment.
[0083] This embodiment also provides a computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the steps of the privacy password guessing model training method described above in this embodiment.
[0084] Furthermore, although exemplary embodiments have been described herein, their scope includes any and all embodiments based on this disclosure that have equivalents, modifications, omissions, combinations (e.g., schemes involving intersections of various embodiments), adaptations, or changes. They are not limited to the examples described in this specification or during the implementation of this application, and such examples are to be interpreted as non-exclusive.
[0085] The above description is intended to be illustrative and not restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. Other embodiments can be used by those skilled in the art when reading the above description.
[0086] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for training a privacy password guessing model, characterized in that, include: Obtain a training password set, which includes multiple training passwords for training, and standardize the training passwords. In each training round, the training commands are sampled to obtain a sub-training set; Cross-task general password features are extracted from the sub-training set using a shared representation network; Noise is injected into the shared representation network, and the variance of the injected noise is determined based on the depth of the shared representation network and the dominant character type of the sample, so as to preserve semantic importance as much as possible while protecting privacy. The training model is obtained by training a task-specific subnetwork.
2. The method for training a privacy password guessing model as described in claim 1, characterized in that, After standardizing the training password, the method further includes: quantifying the complexity of the standardized training password. The step of sampling the training password to obtain a sub-training set in each training round includes: The sampling probability is allocated according to the complexity of each training command, and as the number of training rounds increases, the sampling tendency gradually shifts from favoring simple samples to sampling more evenly. Sampling is performed based on the sampling probability.
3. The method for training a privacy password guessing model as described in claim 2, characterized in that, The process of quantifying the complexity of the standardized training commands includes: Determine the Shannon entropy of the training password; The length and character diversity of the training password were determined; The complexity assessment quantification score is obtained by weighting and summing the Shannon entropy, the character diversity, and the length of the training password based on adjustable normalized weights.
4. The method for training a privacy password guessing model as described in claim 1, characterized in that, The relationship between the variance of the injected noise and the depth of the shared representation network and the dominant character type of the sample includes: The closer to the output layer, the smaller the variance of the injected noise; The higher the importance of a character category, the smaller the variance of the injected noise.
5. The method for training a privacy password guessing model as described in claim 4, characterized in that, The noise injected into the shared representation network includes any of the following: Noise is injected only into the active layer of the shared representation network; Noise is injected into the activation layer and gradient of the shared representation network.
6. The method for training a privacy password guessing model as described in claim 5, characterized in that, Before injecting noise into the shared representation network, the method further includes: An assessment of the impact of noise on overall differential privacy guarantees; If noise is injected only into the activation layer, it needs to be proven that this operation is equivalent to protecting a certain operator of sensitive information with a Gaussian mechanism and can be synthesized into the population; If noise is injected into the activation layer and gradient, the overall privacy loss is a result of the combinatorial theorem.
7. The method for training a privacy password guessing model as described in claim 1, characterized in that, The step of training the model through a task-specific sub-network includes: When there are multiple training tasks, the password strength is calculated for each task, and the password strength reflects the complexity or difficulty of the task. For tasks that are more complex or difficult, allocate a higher proportion of training time.
8. A training device for a privacy password guessing model, characterized in that, include: The data acquisition unit is configured to acquire a training password set, which includes multiple training passwords for training, and to standardize the training passwords. The data sampling unit is configured to sample the training password in each training round to obtain a sub-training set; A shared representation unit is configured to extract cross-task general password features from the sub-training set through a shared representation network; The noise injection unit is configured to inject noise into the shared representation network, the variance of which is determined based on the depth of the shared representation network and the dominant character type of the sample, in order to preserve semantic importance as much as possible while protecting privacy. The task training unit is configured to be trained through a task-specific subnetwork to obtain a training model.
9. A privacy password guessing model training device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the steps of the privacy password guessing model training method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores computer program instructions, which, when executed by a processor, implement the steps of the privacy password guessing model training method according to any one of claims 1-7.