Password generation method, device and computer readable storage medium
Through the deep learning model, the information and position weight of the character vector are calculated, and the password probability vector is generated, which solves the problem of large deviation between password generation and actual passwords in the prior art, improves the accuracy of password generation, and extracts character associations in user information feature.
Patent Information
- Application Number
- CN202010617519.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-30
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2040-06-30
AI Technical Summary
Existing password generation methods are difficult to capture long-distance dependencies and semantic features in user information, resulting in large deviations from the generated passwords.
Through the pre-constructed deep learning model, calculate the information weight and position weight of character vectors, calculate the association relationship between characters, generate password probability vectors and output passwords, and use the self-attention mechanism to extract the correlation characteristics of characters and characters, and improve password generation Accuracy.
The problem of large deviation between password generation and actual passwords in the prior art is effectively solved, the accuracy of password generation is improved, and the correlation characteristics of characters and characters in user information can be extracted more deeply.
Smart Images

Figure CN113869036B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of identity authentication, and in particular to a password generation method, device and computer-readable storage medium. Background Art
[0002] Passwords are currently the most important form of identity authentication. Due to the user's preference for password construction, password reuse, and the use of personal information, passwords are easily cracked. There are currently many methods for generating targeted passwords. For example, using user information and corresponding passwords as training data, first parsing, splitting, and summarizing user information, splitting all data into single characters, and then using a convolutional neural network (CNN) model to generate passwords based on user information. The generated passwords are then compared with the real passwords, and the CNN model is trained based on the comparison results.
[0003] This method requires the CNN model to convert the original input into a fixed-length vector representation by sliding a fixed-length window and adding pooling. It can only capture local features in user information and is difficult to learn the long-distance dependency between two characters. At the same time, due to the different semantics of character vectors in different contexts, the above method has semantic confusion. As a result, there is a large deviation between the password generated by the model and the actual password. Summary of the invention
[0004] The embodiments of the present invention provide a password generation method, device and computer-readable storage medium to solve the problem that the existing generated password has a large deviation from the actual password.
[0005] To solve the above technical problems, the present invention is achieved as follows:
[0006] In a first aspect, an embodiment of the present invention provides a password generation method, comprising:
[0007] Get user information;
[0008] Preprocessing the user information to obtain multiple character vectors;
[0009] Calculating the information weight and the position weight of each of the character vectors through a pre-built deep learning model, and calculating the first association relationship between each of the character vectors based on the information weight and the position weight;
[0010] Outputting a password probability vector corresponding to the user information according to the first association relationship;
[0011] An output password is generated according to the password probability vector.
[0012] Optionally, generating an output password according to the password probability vector includes:
[0013] Obtaining an output position of the output password;
[0014] dividing the output position into a first output position and a second output position;
[0015] Obtaining a character corresponding to a password probability vector having a probability equal to a first preset probability in the password probability vector as an output password at the first output position;
[0016] Obtaining a character corresponding to a password probability vector having a probability equal to a second preset probability in the password probability vector as an output password at the second output position;
[0017] generating the output password based on the output password of the first output location and the output password of the second output location;
[0018] The first preset probability is not equal to the second preset probability.
[0019] Optionally, before calculating the information weight and the position weight of each of the character vectors by using a pre-built deep learning model, and calculating the first association relationship between each of the character vectors based on the information weight and the position weight, the method further includes:
[0020] User information samples and user password samples are obtained as training sets to train the deep learning model.
[0021] Optionally, after obtaining the user information samples and the user password samples as a training set and training the deep learning model, the method further includes:
[0022] Obtaining an output password probability vector during the deep learning model training, and calculating a loss value between the output password probability vector and an actual password probability vector;
[0023] The parameters of the deep learning model are adjusted according to the loss value to optimize the deep learning model.
[0024] Optionally, preprocessing the user information to obtain a plurality of character vectors includes:
[0025] generating a user information sequence according to the user information;
[0026] Filtering the user information sequence according to a preset length threshold;
[0027] Converting the user information sequence into a user information digital sequence;
[0028] The user information digital sequence is converted into the multiple character vectors.
[0029] In a second aspect, an embodiment of the present invention provides a password generating device, comprising:
[0030] Acquisition module, used to obtain user information;
[0031] A preprocessing module, used for preprocessing the user information to obtain multiple character vectors;
[0032] A calculation module, used to calculate the information weight and position weight of each of the character vectors through a pre-built deep learning model, and calculate a first association relationship between each of the character vectors based on the information weight and the position weight;
[0033] An output module, configured to output a password probability vector corresponding to the user information according to the first association relationship;
[0034] A password generation module is used to generate an output password according to the password probability vector.
[0035] In a third aspect, an embodiment of the present invention provides a password generation device, including a transceiver and a processor;
[0036] The processor is configured to:
[0037] Get user information;
[0038] Preprocessing the user information to obtain multiple character vectors;
[0039] Calculating the information weight and the position weight of each of the character vectors through a pre-built deep learning model, and calculating the first association relationship between each of the character vectors based on the information weight and the position weight;
[0040] Outputting a password probability vector corresponding to the user information according to the first association relationship;
[0041] A password probability vector that meets a preset password probability condition is selected from the password probability vectors to generate an output password.
[0042] In a fourth aspect, an embodiment of the present invention provides a password generation device, comprising a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the password generation method described in the first aspect when executing the computer program.
[0043] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps in the password generation method as described in the first aspect.
[0044] In an embodiment of the present invention, user information is first converted into a character vector, and the information weight and position weight of each character vector are calculated through a pre-built deep learning model, and the first association relationship between each character vector is calculated based on the information weight and the position weight; and a password probability vector corresponding to the user information is output according to the first association relationship to further generate an output password; wherein the first association relationship reflects the association between each character vector, can distinguish characters in different context environments, and solves the problem that the existing character vector can only use the same vector to represent the same character in different contexts, so that the association features between characters in the user information can be more deeply extracted, thereby improving the accuracy of password generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0046] Figure 1 is a flow chart of a password generation method provided by an embodiment of the present invention;
[0047] Figure 2 is a preprocessing flow chart of a password generation method provided by an embodiment of the present invention;
[0048] Figure 3 It is a schematic diagram of data filtering of a password generation method provided by an embodiment of the present invention;
[0049] Figure 4 It is a flowchart of converting a user information digital sequence into a character vector in a password generation method provided by an embodiment of the present invention;
[0050] Figure 5 This is a flow chart of information weight calculation of a user information character vector of a password generation method provided by an embodiment of the present invention;
[0051] Figure 6 It is a schematic diagram of a training deep learning model for a password generation method provided by an embodiment of the present invention;
[0052] Figure 7 It is a module schematic diagram of a password generating device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] In the embodiments of the present invention, a password generation method, device and computer-readable storage medium are proposed to solve the existing problem of reducing the accuracy of password generation.
[0055] See also Figure 1 , Figure 1 is a flow chart of a password generation method provided by an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0056] Step 101: Obtain user information.
[0057] In this embodiment, various types of user information are generated based on the original data table, wherein the original data table can be obtained from various public websites or collected through questionnaires. Specifically, the user information includes, for example, the user's email address, mobile phone number, date of birth, or other information related to the user's identity.
[0058] It should be noted that the user mentioned in this embodiment refers to an object that needs to be authenticated, for example, an individual who needs to be authenticated through a password, and the user information is the user's personal information.
[0059] Step 102: pre-process the user information to obtain multiple character vectors.
[0060] In this embodiment, the preprocessing includes data type conversion and filtering processing, through which user information that originally had problems such as disordered sorting, too long or too short length, etc. can be better implemented in subsequent analysis steps in the form of character vectors.
[0061] Step 103: Calculate the information weight and position weight of each character vector through a pre-built deep learning model, and calculate the first association relationship between each character vector based on the information weight and the position weight.
[0062] Step 104: Output a password probability vector corresponding to the user information according to the first association relationship.
[0063] In this implementation, the first association relationship reflects the degree of association between the characters, and can distinguish characters in different contexts, thus solving the problem that the existing character vector can only use the same vector to represent the same character in different contexts.
[0064] Step 105: Generate an output password according to the password probability vector.
[0065] In the above steps, the user information is first converted into a character vector, the information weight and position weight of each character vector are calculated through a pre-built deep learning model, and the first association relationship between each character vector is calculated based on the information weight and the position weight, wherein the first association relationship reflects the association degree between each character, and can distinguish characters in different contexts, thereby solving the problem that the existing character vector can only use the same vector to represent the same character in different contexts, thereby being able to more deeply extract the association features between characters in the user information and improve the accuracy of generated passwords.
[0066] Optionally, before calculating the information weight and position weight of each character vector by using the pre-built deep learning model, and calculating the first association relationship between each character vector based on the information weight and the position weight, the password generation method further includes:
[0067] Obtain user information samples and user password samples as training sets to train the deep learning model.
[0068] It should be noted that the training of the deep learning model can be performed offline or online. For better explanation, in this embodiment, the method of pre-training the deep learning model offline is adopted.
[0069] Specifically, when training a deep learning model, it is implemented through the following steps.
[0070] First, the obtained user information samples and user password samples are preprocessed. In this embodiment, the user information samples and user password samples are converted into multiple character vectors after preprocessing, so that the user information samples and user password samples can be analyzed more conveniently.
[0071] It should be noted that in this embodiment, the method of preprocessing the user information sample and the user password sample is substantially the same, the difference being that when preprocessing the user information sample, the information weight of the user information sample is also calculated, while when preprocessing the user password sample, the information weight is not calculated. Here, only the preprocessing of the user information sample is described, and the preprocessing of the user password sample is not described in detail.
[0072] like Figure 2 As shown, specifically, the specific preprocessing process of step 102, preprocessing the user information to obtain multiple character vectors, is as follows.
[0073] Step 1021, obtain user information sample.
[0074] Step 1022: Generate a user information sequence.
[0075] In this implementation, in order to facilitate connecting different information samples in a more orderly manner, the separator symbol "|" is used to splice different information into a sequence, for example, the user information sequence sample = "email|mobile phone number|birthday|website domain name|nickname|surname|name". It should be noted that the embodiments of the present invention do not limit the specific separator symbols used, and here, only examples are given. As a convertible implementation, in other feasible embodiments, other types of separator symbols can also be used, as long as they can achieve the separation effect.
[0076] Step 1023: Filter the user information sequence according to a preset length threshold.
[0077] like Figure 3 As shown, in this embodiment, an upper length threshold and a lower length threshold are set. User information sequences whose length exceeds the upper length threshold and user information sequences whose length is less than the lower length threshold are discarded, and user information whose length is between the upper length threshold and the lower length threshold is retained. If the user information has default information, it is replaced by a substitution symbol "''". It should be noted that the embodiment of the present invention does not limit the specific substitution symbols used, and here, it is only used as an example. As a convertible embodiment, in other feasible embodiments, other types of substitution symbols can also be used, as long as they can achieve the substitution effect.
[0078] Step 1024: Convert the user information sequence into a user information digital sequence.
[0079] In this step, all user information sequences are split according to characters, and all characters are sorted according to the descending rule of their frequency of occurrence, and a digital number is set for each character. The smaller the character number, the greater the frequency of occurrence. The digital number corresponding to the character with the highest frequency of occurrence is 0, and the digital number corresponding to the character with the lowest frequency of occurrence is the value of the total number of characters - 1.
[0080] In this embodiment, the characters with the highest frequency of occurrence can be quickly obtained by sorting them according to a decreasing rule, and the importance of the characters can be further obtained. As a convertible embodiment, in other feasible embodiments, the characters can also be sorted according to an increasing rule according to the frequency of occurrence.
[0081] According to the digital number of each character, each character is converted into a number to obtain the user information digital sequence.
[0082] Step 1025: Convert the user information digital sequence into multiple character vectors.
[0083] like Figure 4 As shown, in this embodiment, the user information digital sequence is converted into multiple character vectors through the embedding matrix as follows.
[0084] Step 1031, input user information sequence.
[0085] Step 1032: Convert to a one-hot vector.
[0086] Specifically, assuming that the total number of characters in the dictionary is s and the length of the user information digital sequence is l, the user information digital sequence is converted into a one-hot vector of size l dimensions s, that is, a vector in which all positions are 0 except for 1 in the numbered position in the dictionary. It should be noted that the dictionary in this embodiment is obtained in a pre-constructed form, for example, the number of all non-repeating characters in the user information sample and the user password sample as the training data set is selected as the length of the dictionary, which also includes separators and filler symbols, and each element in the dictionary is a key-value pair, in which the key is a digital number and the value is a character. The dimension of the set character vector is set to d, and a weight matrix of size sxd is randomly initialized.
[0087] Step 1033: Perform matrix multiplication with the weight matrix to obtain the user information character vector.
[0088] Specifically, the dimension of the character vector is compressed after matrix multiplication with the weight matrix, that is, the conversion of the user information digital sequence into a character vector matrix of size lxd is completed. In this character vector matrix, each row represents a character, and the dimension of each character vector represents the probability of the character appearing at the same time as other characters.
[0089] In this implementation manner, the user password character vector of the user password sample can be obtained in the same manner as above.
[0090] Furthermore, a transformer model is used to learn the association between the user information character vector and the user password character vector. In this embodiment, a self-attention mechanism is introduced in learning the above-mentioned association degree, through which the current node can be helped to pay attention not only to the current word, but also to the contextual semantics of the word, so as to more deeply extract the association features between characters, user information and passwords, and improve the guessing accuracy.
[0091] Step 1034: Add information weight to the user information character vector.
[0092] Step 1035: Add a position weight to the user information character vector.
[0093] Specifically, assuming that the number of user information character vectors is l, the length is d, and the dimension is d, then an information weight matrix of size lxd is created. Each row of the matrix represents the information category information carried by the character at the corresponding position. In order not to affect the original contextual features of the character vector, the weights of different columns in each row of the information weight matrix are set to the same value, that is, the information weight carried by each dimension of the user information character vector is equal.
[0094] like Figure 5 As shown, the information weight of the above-mentioned calculation of the user information character vector is as follows.
[0095] Step 10341: Calculate the correlation value between the user information sample and the password sample.
[0096] The correlation between each type of user information sample and password sample is calculated in advance, and the correlation is expressed as a numerical value between 0 and 1, which is called the correlation value.
[0097] Step 10342: Create an information weight matrix of the same dimension based on the input dimension.
[0098] Step 10343: Initialize the information weight matrix based on the association value.
[0099] The range of user information characters is determined according to the average length of each type of information, and then the associated value is used as the initial value of the information weight matrix.
[0100] Step 10344: Add information weight to the user information character vector.
[0101] Step 10345: Use the back propagation algorithm to optimize the information weight.
[0102] It should be noted that the calculation of the position weight of the user information character vector is after adding the information weight. The user information character vector with the added information weight is received as input, and the user information sequence position vector is calculated using the position calculation method of the transformer model. The position information of the user information character vector can be obtained by adding the position vector to the user information character vector or the character vector of the password.
[0103] It should be noted that, in this embodiment, the calculation of the position weight of the password character vector is consistent with the above method, which will not be described in detail here.
[0104] Specifically, the position vector calculation formula is as follows.
[0105]
[0106]
[0107] In the formula, pos refers to the position of the current word in the sentence, and i refers to the index of each value in the vector.d mo d e l refers to the dimension of the vector;
[0108] like Figure 6 As shown, further, the user information character vector is used as the input of the Encoder component in the transformer model, and the password character vector is used as the input of the Encoder component in the transformer model. The Encoder component extracts the input semantic features in depth, uses the self-attention mechanism to learn multiple semantic expressions, and outputs a matrix, which represents the enhanced semantic vector of the input character. The Decoder component extracts the input semantic features in depth, passes the output matrix of the Encoder into the Decoder, uses the self-attention mechanism to learn the associated features of the input sequence and the output sequence, and obtains a deep learning model based on the associated features. The output of the deep learning model is a password probability vector corresponding to the input user information.
[0109] Optionally, the trained deep learning model may also be optimized, and the specific optimization steps are as follows.
[0110] Obtain the output password probability vector during deep learning model training, and calculate the loss value between the output password probability vector and the actual password probability vector.
[0111] In this embodiment, the cross entropy function is specifically used to calculate the loss value between the output password probability vector and the actual password probability vector. Then, the parameters of the deep learning model are adjusted according to the loss value to optimize the deep learning model. Specifically, the back propagation algorithm can be used to calculate the derivatives of the network layer of the above-mentioned information weight matrix and the deep learning model during neural network training, thereby optimizing the parameters of each layer of the deep learning model. By optimizing the parameters of each layer of the deep learning model, the accuracy of the output can be improved.
[0112] Furthermore, the acquired user information is processed into a character vector and then input into the deep learning model trained through the above steps. The deep learning model outputs a set of password probability vectors corresponding to the input user information, where the number of vectors is the set password length threshold and the dimension of each vector is the same as the dictionary size.
[0113] In this embodiment, the input user information is analyzed by a trained deep learning model. During the analysis, the information weights between the characters in the user information are taken into consideration, which can better express the semantics of the characters in different user information.
[0114] It should be noted that the dictionary in this embodiment is a key-value data container. By searching and matching the output password probability vector in the dictionary based on the preset password probability condition, the output password can be obtained. The specific process of generating the password is as follows.
[0115] Optionally, select the password probability vectors that meet the preset password probability condition in the password probability vector to generate the output password. The specific steps are as follows.
[0116] First, obtain the output positions of the output password. If the length threshold of the password is L, the number of output positions of the output password is L. At each output position, select w from the total probability of the output combination. Suppose the total number of characters in the dictionary is s, and the output length of the model is L.
[0117] Divide the output positions into the first output position and the second output position.
[0118] Obtain the characters corresponding to the password probability vectors with probabilities equal to the first preset probability in the password probability vector as the output password of the first output position.
[0119] That is, select the first q positions of the output positions, where 0 < q < L. For the first q positions, use the beam-search algorithm to select the top w character combinations with the highest total probability as the output of this position, and enter the calculation of the next position. w represents the number of selected probabilities.
[0120] Obtain the characters corresponding to the password probability vectors with probabilities equal to the second preset probability in the password probability vector as the output password of the second output position.
[0121] That is, select the last p positions of the output positions, where q < p < L. For the last p positions, select the top w*I character combinations of the probability values, where 0 < w*I < s, w represents the number of selected probabilities, and I is a natural number. w*I means dividing the selected character combinations into I groups according to the probability size, with w values in each group, and sequentially select the character combinations in each group as the output of the corresponding position.
[0122] That is, in this embodiment, the first position includes the first q positions and the L-th position, the second position includes the last p positions, the first preset probability is the probability with the highest total probability value, and the second preset probability is the probability of the top w*I characters of the probability value, which can be the probability with the second highest value. It should be noted that the L-th output position is the first position, that is, for the L-th position, use the beam-search algorithm to select the top w character combinations with the highest total probability as the output of this position.
[0123] Then, generate the output password based on the output password of the first output position and the output password of the second output position.
[0124] It should be noted that, in this embodiment, a relatively front position or a relatively rear position of the output position is selected to distinguish the first position from the second position. As a convertible implementation, in other feasible embodiments, adjacent positions can also be selected as the distinction between the first position and the second position. For example, the output position first regards two adjacent positions as a group of positions in sequence, regards one position in the same group of positions as the first position, and the other position as the second position, and each first position is set at intervals. Alternatively, other transformations can be made to the first position and the second position. However, no matter what kind of transformation is made, it is necessary to satisfy that the first preset probability of the first position is not equal to the second preset probability of the second position.
[0125] In this embodiment, by dividing the first position and the second position, and further using different first probabilities and second probabilities for the first position and the second position respectively to determine the passwords of the corresponding positions, a batch of passwords with a higher predicted probability can be generated, which increases the number of output passwords while ensuring that the generated passwords have a higher predicted probability.
[0126] like Figure 7 As shown, the password generating device 200 of the embodiment of the present invention includes:
[0127] Acquisition module 201, used to acquire user information;
[0128] A preprocessing module 202, used for preprocessing the user information to obtain a plurality of character vectors;
[0129] A calculation module 203, configured to calculate the information weight and the position weight of each of the character vectors through a pre-built deep learning model, and calculate a first association relationship between each of the character vectors based on the information weight and the position weight;
[0130] An output module 204, configured to output a password probability vector corresponding to the user information according to the first association relationship;
[0131] The password generation module 205 is used to generate an output password according to the password probability vector.
[0132] Optionally, the password generating device further includes a deep learning model training module, which is used to obtain user information samples and user password samples as training sets to train a deep learning model.
[0133] Optionally, the password generation device further includes an optimization module, which is used to obtain an output password probability vector during deep learning model training, and calculate a loss value between the output password probability vector and the actual password probability vector;
[0134] The parameters of the deep learning model are adjusted according to the loss value to optimize the deep learning model.
[0135] Optionally, the preprocessing module 202 includes:
[0136] A user information sequence generation module, used to generate a user information sequence according to the user information;
[0137] A data length filtering module, used to filter the user information sequence according to a preset length threshold;
[0138] A data type conversion module, used for converting the user information sequence into a user information digital sequence;
[0139] The character vector generating module is used to convert the user information digital sequence into the multiple character vectors.
[0140] Optionally, the calculation module 203 includes:
[0141] A weight calculation module, used to calculate the information weight and position weight of each character vector through the deep learning model;
[0142] The first association relationship calculation module is used to calculate the first association relationship between each of the character vectors according to the information weight and the position weight.
[0143] Optionally, the password generation module 205 is specifically used to select a password probability vector that meets a preset password probability condition from the password probability vectors to generate an output password, and the password generation module 205 specifically includes:
[0144] An output position acquisition module, used to acquire the output position of the output password;
[0145] A division module, used for dividing the output position into a first output position and a second output position;
[0146] A first password output module, used to obtain a character corresponding to a password probability vector having a probability equal to a first preset probability in the password probability vector as an output password of the first output position;
[0147] A second password output module, used to obtain the character corresponding to the password probability vector having a probability equal to a second preset probability in the password probability vector as the output password of the second output position;
[0148] A password output module is used to generate the output password based on the output password of the first output position and the output password of the second output position; wherein the first preset probability is not equal to the second preset probability.
[0149] It should be noted that the device provided in the embodiment of the present invention is a device capable of executing the above-mentioned password generation method, so all implementation methods in the above-mentioned password generation method embodiment are applicable to the device and can achieve the same or similar beneficial effects.
[0150] The embodiment of the present invention also provides a password generating device, including a transceiver and a processor;
[0151] The processor is configured to:
[0152] Get user information;
[0153] Preprocessing the user information to obtain multiple character vectors;
[0154] Calculating the information weight and the position weight of each of the character vectors through a pre-built deep learning model, and calculating the first association relationship between each of the character vectors based on the information weight and the position weight;
[0155] Outputting a password probability vector corresponding to the user information according to the first association relationship;
[0156] A password probability vector that meets a preset password probability condition is selected from the password probability vectors to generate an output password.
[0157] Optionally, before calculating the first association relationship between the character vectors by using a pre-built deep learning model, the processor is further configured to:
[0158] User information samples and user password samples are obtained as training sets to train the deep learning model.
[0159] Obtaining an output password probability vector during the deep learning model training, and calculating a loss value between the output password probability vector and an actual password probability vector;
[0160] The parameters of the deep learning model are adjusted according to the loss value to optimize the deep learning model.
[0161] Optionally, the processor performs preprocessing on the user information to obtain a plurality of character vectors, for implementing:
[0162] generating a user information sequence according to the user information;
[0163] Filtering the user information sequence according to a preset length threshold;
[0164] Converting the user information sequence into a user information digital sequence;
[0165] The user information digital sequence is converted into the multiple character vectors.
[0166] Specifically, user information includes, for example, the user's email address, mobile phone number, date of birth, or other information related to the user's identity.
[0167] Optionally, the processor generates an output password according to the password probability vector to implement:
[0168] A password probability vector that meets a preset password probability condition is selected from the password probability vectors to generate an output password.
[0169] Specifically used to achieve:
[0170] Obtaining an output position of the output password;
[0171] dividing the output position into a first output position and a second output position;
[0172] Obtaining a character corresponding to a password probability vector having a probability equal to a first preset probability in the password probability vector as an output password at the first output position;
[0173] Obtaining a character corresponding to a password probability vector having a probability equal to a second preset probability in the password probability vector as an output password at the second output position;
[0174] generating the output password based on the output password of the first output location and the output password of the second output location;
[0175] The first preset probability is not equal to the second preset probability.
[0176] An embodiment of the present invention further provides a password generating device, comprising a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the various processes in the password generating method embodiment as described above are implemented, and the same technical effect can be achieved. To avoid repetition, they will not be described here.
[0177] The embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each process in the password generation method embodiment described above is implemented. The same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0178] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0179] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A device that specifies functions in one or more processes and / or one or more blocks.
[0180] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable storage medium produce a paper product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0181] These computer program instructions may also be loaded onto a computer or other programmable data processing device to cause the computer or other programmable device to execute a series of operating steps to produce a computer-implemented process, thereby providing instructions executed on the computer or other programmable device for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0182] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary personnel in this technical field, several improvements and modifications can be made without departing from the principles described in the present invention. These improvements and modifications are also within the scope of protection of the present invention.
Claims
1. A password generation method, characterized in that: include: Get user information; Preprocessing the user information to obtain multiple character vectors; Calculating the information weight and the position weight of each of the character vectors through a pre-built deep learning model, and calculating the first association relationship between each of the character vectors based on the information weight and the position weight; Outputting a password probability vector corresponding to the user information according to the first association relationship; generating an output password according to the password probability vector; The multiple character vectors of the user information constitute a user information character vector, and calculating the information weight of the user information character vector includes: Calculating the correlation value between the user information sample and the password sample; Create an information weight matrix of the same dimension based on the input dimension; Initializing the information weight matrix based on the association value; Adding information weight to the user information character vector; The information weights are optimized using a back-propagation algorithm.
2. The password generation method according to claim 1, characterized in that: Generating an output password according to the password probability vector comprises: Obtaining an output position of the output password; dividing the output position into a first output position and a second output position; Obtaining a character corresponding to a password probability vector having a probability equal to a first preset probability in the password probability vector as an output password at the first output position; Obtaining a character corresponding to a password probability vector having a probability equal to a second preset probability in the password probability vector as an output password at the second output position; generating the output password based on the output password of the first output location and the output password of the second output location; The first preset probability is not equal to the second preset probability.
3. The password generation method according to claim 1, characterized in that: Before calculating the information weight and the position weight of each of the character vectors by using the pre-built deep learning model, and calculating the first association relationship between each of the character vectors based on the information weight and the position weight, the method further includes: User information samples and user password samples are obtained as training sets to train the deep learning model.
4. The password generation method according to claim 3, characterized in that: After obtaining the user information samples and the user password samples as training sets and training the deep learning model, the method further includes: Obtaining an output password probability vector during the deep learning model training, and calculating a loss value between the output password probability vector and an actual password probability vector; The parameters of the deep learning model are adjusted according to the loss value to optimize the deep learning model.
5. The password generation method according to claim 1, characterized in that: The preprocessing of the user information to obtain a plurality of character vectors comprises: generating a user information sequence according to the user information; Filtering the user information sequence according to a preset length threshold; Converting the user information sequence into a user information digital sequence; The user information digital sequence is converted into the multiple character vectors.
6. A password generating device, characterized in that: include: Acquisition module, used to obtain user information; A preprocessing module, used for preprocessing the user information to obtain multiple character vectors; A calculation module, used to calculate the information weight and position weight of each of the character vectors through a pre-built deep learning model, and calculate a first association relationship between each of the character vectors based on the information weight and the position weight; An output module, configured to output a password probability vector corresponding to the user information according to the first association relationship; A password generation module, used to generate an output password according to the password probability vector; The multiple character vectors of the user information constitute a user information character vector, and calculating the information weight of the user information character vector includes: Calculating the correlation value between the user information sample and the password sample; Create an information weight matrix of the same dimension based on the input dimension; Initializing the information weight matrix based on the association value; Adding information weight to the user information character vector; The information weights are optimized using a back-propagation algorithm.
7. A password generating device, characterized in that: including a transceiver and a processor; The processor is configured to: Get user information; Preprocessing the user information to obtain multiple character vectors; Calculating the information weight and the position weight of each of the character vectors through a pre-built deep learning model, and calculating the first association relationship between each of the character vectors based on the information weight and the position weight; Outputting a password probability vector corresponding to the user information according to the first association relationship; Selecting a password probability vector that meets a preset password probability condition from the password probability vectors to generate an output password; The multiple character vectors of the user information constitute a user information character vector, and calculating the information weight of the user information character vector includes: Calculating the correlation value between the user information sample and the password sample; Create an information weight matrix of the same dimension based on the input dimension; Initializing the information weight matrix based on the association value; Adding information weight to the user information character vector; The information weights are optimized using a back-propagation algorithm.
8. A password generating device, comprising a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the password generation method according to any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the password generation method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Password attribute analysis method based on neural network
CN104573142A
User password guessing system based on deep learning
CN107122479A