Password strength assessment method and device, server
By generating a feature vector generator to evaluate password strength, identify and eliminate weak passwords with attribute features, the problem of insufficient password security in existing technologies is solved, and the ability of passwords to resist guessing and security is improved.
Patent Information
- Application Number
- CN202210856590.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-20
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-07-20
AI Technical Summary
In existing technologies, methods for assessing password strength based on password length and character type cannot effectively identify and eliminate weak passwords of groups with certain attribute characteristics, resulting in reduced password resistance to guessing and insufficient security.
By acquiring multiple password sample sets with the same attribute features, word segmentation vectors and feature vectors are generated. The strength of the password to be evaluated is evaluated using a feature vector generator, and the evaluation results are output, eliminating weak passwords that are easy to guess.
Password security has been improved. Through feedback on the evaluation results, users can build stronger passwords, which enhances their ability to resist guessing and improves information security.
Smart Images

Figure CN115422527B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information security technology, and in particular to a password strength assessment method, apparatus, and server. Background Technology
[0002] With the increasing informatization of the internet, people's daily lives are becoming increasingly networked, and assets are becoming increasingly digitized. Identity authentication has gradually become a fundamental means of ensuring user information security. Identity authentication is the first line of defense in ensuring information system security, and passwords are the most widely used identity authentication method.
[0003] With the development of the Internet, on the one hand, more and more services require password protection, and on the other hand, the human brain has limited capacity, only able to remember 5 to 7 passwords, which forces some users to choose some weak passwords that are easy to remember.
[0004] In related technologies, the strength of a password is generally determined based on the password length and the evaluation rules for the types of characters it contains, and suggestions for building a strong password are output to the user based on the evaluation results. Summary of the Invention
[0005] This disclosure provides a password strength assessment method, apparatus, and server, which can eliminate weak passwords from groups with certain attribute characteristics to a certain extent, increase the password's resistance to guessing, and improve password security. The technical solution is as follows:
[0006] This disclosure provides at least one embodiment of a password strength assessment method, the method comprising:
[0007] Obtain a password sample set, which includes multiple password sample sets, each containing multiple password samples with the same attribute characteristics.
[0008] Each password sample in each of the password sample sets is encoded to generate multiple word segmentation vectors;
[0009] The feature vectors of the multiple password samples are generated using the multiple word segmentation vectors respectively, and a feature vector generator is generated based on the feature vectors of the multiple password samples.
[0010] Based on the multiple feature vectors corresponding to the multiple password sample sets, the password strength of the password to be evaluated is determined, and the evaluation result is output.
[0011] Optionally, each password sample in each of the password sample sets is encoded to generate multiple word segmentation vectors, including:
[0012] Each password sample in the password sample set is segmented and encoded using the bag-of-words model of the machine learning algorithm. Each password sample is segmented and encoded with a length of 1 to Z characters, where Z is an integer greater than 1.
[0013] The duplicate parts in the word segmentation encoding results of the password sample set are removed, and the word segmentation encoding results of all password samples in the password sample set are combined to form a word segmentation vector.
[0014] Optionally, feature vectors for the multiple password samples are generated using the multiple word segmentation vectors, including:
[0015] For each password sample in the password sample set, calculate the corresponding feature vector based on the word segmentation vector:
[0016] f ik =tf ik *iwf ik k = 0, 1, ..., m-1;
[0017] Among them, f ik The k-th dimension of the feature vector t refers to the k-th segmented element in the segmentation vector, N p,t N represents the total number of times t appears in the password sample p. p The total number of word segments in the password sample p;
[0018] W c W is the frequency of all word segments in the password sample set. c,t It is the frequency of t in the password sample set.
[0019] Optionally, based on multiple feature vectors corresponding to the multiple password sample sets, the password strength of the password to be evaluated is determined, including:
[0020] Calculate multiple feature vectors of the password to be evaluated based on the word segmentation vectors of the multiple password sample sets;
[0021] Calculate the cosine similarity between each feature vector of the password to be evaluated and each feature vector in the corresponding feature vector generator;
[0022] The calculated cosine similarities are sorted, and the top few closest similarities are taken to obtain the average similarity.
[0023] The password strength level of the password to be evaluated is determined based on the average similarity corresponding to the multiple feature vectors.
[0024] Optionally, the method further includes:
[0025] Before encoding each password sample in each of the password sample sets, the password sample sets are cleaned.
[0026] At least one embodiment of this disclosure provides a password strength assessment device, the device comprising:
[0027] The acquisition module is used to acquire a password sample set, which includes multiple password sample sets, each of which includes multiple password samples with the same attribute characteristics.
[0028] The word segmentation module is used to encode each password sample in each password sample set to generate multiple word segmentation vectors.
[0029] The feature vector generation module is used to generate feature vectors for the multiple password samples using the multiple word segmentation vectors respectively, and to generate a feature vector generator based on the feature vectors of the multiple password samples.
[0030] The evaluation module is used to determine the password strength of the password to be evaluated based on multiple feature vectors corresponding to the multiple password sample sets, and output the evaluation result.
[0031] Optionally, the word segmentation module is used for:
[0032] Each password sample in the password sample set is segmented and encoded using the bag-of-words model of the machine learning algorithm. Each password sample is segmented and encoded with a length of 1 to Z characters, where Z is an integer greater than 1.
[0033] The duplicate parts in the word segmentation encoding results of the password sample set are removed, and the word segmentation encoding results of all password samples in the password sample set are combined to form a word segmentation vector.
[0034] Optionally, the feature vector generation module is used to:
[0035] For each password sample in the password sample set, calculate the corresponding feature vector based on the word segmentation vector:
[0036] f ik =tf ik *iwf ik k = 0, 1, ..., m-1;
[0037] Among them, f ik The k-th dimension of the feature vector t refers to the k-th segmented element in the segmentation vector, N p,t N represents the total number of times t appears in the password sample p. p The total number of word segments in the password sample p;
[0038] W c W is the frequency of all word segments in the password sample set. c,t It is the frequency of t in the password sample set.
[0039] At least one embodiment of this disclosure provides a server, the server including a processor and a memory, the memory storing at least one line of program code, the program code being loaded and executed by the processor to implement the password strength assessment method as described above.
[0040] At least one embodiment of this disclosure provides a computer-readable storage medium storing at least one line of program code, which is loaded and executed by a processor to implement the password strength assessment method as described in any of the preceding claims.
[0041] The beneficial effects of the technical solutions provided in this disclosure are:
[0042] In this embodiment, multiple password sample sets are processed to generate multiple feature vectors. These feature vectors are then used to evaluate the strength of the password to be evaluated, thus outputting an evaluation result. Since the feature vectors integrate the features of multiple password samples with the same attribute characteristics, the evaluation result incorporates consideration of the group's characteristic information. Therefore, through the output and feedback of this evaluation result, weak passwords of groups with the same attribute characteristics can be eliminated to a certain extent, increasing the password's resistance to guessing and improving password security. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a flowchart of a password strength assessment method provided in an embodiment of this disclosure;
[0045] Figure 2 This is a flowchart of a password strength assessment method provided in an embodiment of this disclosure;
[0046] Figure 3 This is a word segmentation diagram provided in an embodiment of the present disclosure;
[0047] Figure 4 This is a schematic diagram of cosine similarity provided in an embodiment of this disclosure;
[0048] Figure 5This is a schematic diagram of the password strength assessment and determination device provided in the embodiments of this disclosure;
[0049] Figure 6 This is a schematic diagram of the strength determination device provided in the embodiments of this disclosure;
[0050] Figure 7 This is a schematic diagram of the structure of a password strength assessment device provided in an embodiment of this disclosure;
[0051] Figure 8 This is a structural block diagram of a server provided in an embodiment of this disclosure. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in further detail below with reference to the accompanying drawings.
[0053] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, but do not exclude other elements or objects.
[0054] Figure 1 This is a flowchart illustrating a password strength assessment method provided in an embodiment of this disclosure. This method can be executed by a server; see [link to relevant documentation]. Figure 1 The method includes the following steps.
[0055] 101: Obtain a sample set of passwords.
[0056] The password sample set includes multiple password sample sets, each containing multiple password samples with the same attribute characteristics.
[0057] In this embodiment of the disclosure, the attribute characteristics of the multiple password sample sets are different.
[0058] Here, the password is also known as the password. For example, when a user registers, they will enter a username and password. During the user setup process, the server can use the method provided in this disclosure to evaluate the strength of the user's password and provide feedback to the user in real time. When the user's password strength is strong or medium, the user is allowed to continue registering. When the user's password strength is weak or poor, the user is forced to change their password until the changed password strength is strong or medium.
[0059] In this embodiment of the disclosure, the password sample set can be obtained from a known database or sample library by filtering based on attribute features. Alternatively, the password sample set can be obtained by manually surveying users with the specified attribute features and then inputting it into the server.
[0060] In this embodiment of the disclosure, attribute characteristics refer to the group attribute characteristics of users using the password, and / or the attribute characteristics of the password usage scenario, such as occupation, gender, age, application name using the password, etc.
[0061] Passwords with the same attributes may share certain commonalities, which may reduce their resistance to guessing.
[0062] For example, when registering for a school website, teachers might use "laoshi" or "teacher" as the beginning of their password, which has low resistance to guessing. The purpose of this disclosure is to eliminate these passwords that are strongly associated with attribute characteristics and have low resistance to guessing.
[0063] 102: Encode each password sample in each of the password sample sets to generate multiple word segmentation vectors.
[0064] 103: Use the multiple word segmentation vectors to generate feature vectors for the multiple password samples respectively, and generate a feature vector generator based on the feature vectors of the multiple password samples.
[0065] Here, the feature vector generator can be a collection of multiple feature vectors.
[0066] 104: Based on the multiple feature vectors corresponding to the multiple password sample sets, determine the password strength of the password to be evaluated and output the evaluation result.
[0067] In this embodiment, multiple password sample sets are processed to generate multiple feature vectors. These feature vectors are then used to evaluate the strength of the password to be evaluated, thus outputting an evaluation result. Since the feature vectors integrate the features of multiple password samples with the same attribute characteristics, the evaluation result incorporates consideration of the group's characteristic information. Therefore, through the output and feedback of this evaluation result, weak passwords of groups with the same attribute characteristics can be eliminated to a certain extent, increasing the password's resistance to guessing and improving password security.
[0068] Figure 2 This is a flowchart illustrating a password strength assessment method provided in an embodiment of this disclosure. This method can be executed by a server; see [link to relevant documentation]. Figure 2 The method includes the following steps.
[0069] 201: Obtain a sample set of passwords.
[0070] The password sample set includes multiple password sample sets, each containing multiple password samples with the same attribute characteristics.
[0071] In this embodiment of the disclosure, the attribute characteristics of the multiple password sample sets are different.
[0072] Here, the password is also known as the password. For example, when a user registers, they will enter a username and password. During the user setup process, the server can use the method provided in this disclosure to evaluate the strength of the user's password and provide feedback to the user in real time. When the user's password strength is strong or medium, the user is allowed to continue registering. When the user's password strength is weak or poor, the user is forced to change their password until the changed password strength is strong or medium.
[0073] In this embodiment of the disclosure, the password sample set can be obtained from a known database or sample library by filtering based on attribute features. Alternatively, the password sample set can be obtained by manually surveying users with the specified attribute features and then inputting it into the server.
[0074] For example, first determine the group attributes, then collect passwords for that group based on those attributes, forming a password sample set S. Further, collect multiple password sample sets to generate a password sample set {S1, S2, ..., S}. n}
[0075] In this embodiment of the disclosure, attribute characteristics refer to the group attribute characteristics of users using the password, and / or the attribute characteristics of the password usage scenario, such as occupation, gender, age, application name using the password, etc.
[0076] Passwords with the same attributes may share certain commonalities, which may reduce their resistance to guessing.
[0077] For example, when registering for a school website, teachers might use "laoshi" or "teacher" as the beginning of their password, which has low resistance to guessing. The purpose of this disclosure is to eliminate these passwords that are strongly associated with attribute characteristics and have low resistance to guessing.
[0078] 202: Perform data cleaning on the password sample set.
[0079] Data cleaning is performed on the password sample set to remove invalid passwords, thus completing the data cleaning process.
[0080] Here, data cleaning can include removing blank lines, removing passwords with fewer than N (a positive integer) characters, etc. The value of N can be set as needed, for example, 5.
[0081] Password sample set {S1, S2, ..., S}n The password data in each password sample set S in the} are cleaned to generate a password sample set {S′1, S′2, ..., S′}. n}
[0082] 203: Each password sample in the password sample set is segmented and encoded using the Bag-of-Words (BOW) machine learning algorithm. Each password sample is segmented and encoded with a length of 1 to Z characters, where Z is an integer greater than 1.
[0083] It is worth noting that steps 203 to 205 only show the method for obtaining the feature vector of one password sample set. In fact, the feature vector is obtained by using this method for each password sample set in the password sample set.
[0084] The following explanation uses Z=5:
[0085] Each password sample p in the group password set S is processed by word segmentation and encoding. Assuming password sample p has m characters, it can be represented as c1c2...c m (m≥5). The word segmentation encoding process is as follows:
[0086] The password sample p is segmented into single characters, which can be divided into c1, c2, ..., c m .
[0087] The password sample p is segmented into two characters, which can be divided into c1c2, c2c3, ..., c m-1 c m .
[0088] The password sample p is segmented into 3 characters, which can be divided into c1c2c3, c2c3c4, ..., c m-2 c m-1 c m .
[0089] The password sample p is segmented into 4 characters, which can be divided into c1c2c3c4, c2c3c4c5, ..., c m-3 c m-2 c m-1 c m .
[0090] The password sample p is segmented into 5 characters, which can be divided into c1c2c3c4c5, ..., c m-4 c m-3 c m-2 c m-1 c m .
[0091] Each password sample in S' is segmented into words, and all unique segments of all password samples are combined into a segmentation vector. Each item in the segmentation vector is numbered sequentially from shortest to longest.
[0092] For example, given a password sample set of {"12345678", "pass1234"}, performing word segmentation on this password sample set yields the following word segmentation vector: Figure 3 As shown.
[0093] Process each password sample set S′ i The passwords in (i = 1, 2, ..., n) are used to obtain the word segmentation vector V for each password sample set. i (i = 1, 2, ..., n). Word segmentation vector V i Each item in the vector is numbered sequentially from shortest to longest, such as the word segmentation vector V. i If the dimension is m, then the elements in the word segmentation vector are numbered from 0 to m-1.
[0094] For example, see Figure 3 The left column of the table represents the elements after word segmentation, and the right column represents the element number.
[0095] 204: Remove duplicate parts from the word segmentation encoding results of the password sample set, and form a word segmentation vector from the word segmentation encoding results of all password samples in the password sample set.
[0096] 205: For each password sample in the password sample set, calculate the corresponding feature vector based on the word segmentation vector, and combine the feature vectors of each password sample into a feature vector generator.
[0097] The password sample set S′ is calculated using the Term Frequency-Inverse Word Frequency (TF-IWF) method. i The feature vector of each password sample in (i = 1, 2, ..., n).
[0098] Password sample set S′ i For each password sample p in (i = 1, 2, ..., n), based on the word segmentation vector V... i (i = 1, 2, ..., n) Calculate its eigenvector f i (i = 1, 2, ..., n), f i Dimensions and V i Same, that is, f i The dimension is m, and each dimension can be represented as f. ik (k = 0, 1, ..., m-1).
[0099] The formula (1) for calculating the corresponding feature vector based on the word segmentation vector is as follows:
[0100] f ik =tf ik *iwf ik , k=0,1,…,m-1; (1)
[0101] Among them, f ik The k-th dimension of the feature vector t refers to the k-th segmented element in the segmentation vector, N p,t N represents the total number of times t appears in the password sample p. p The total number of word segments in the password sample p;
[0102] W c W is the frequency of all word segments in the password sample set. c,t It is the frequency of t in the password sample set.
[0103] Calculate f0, f1, ..., f m-1 Obtain the password-based sample set S′ of p i The eigenvector f of (i = 1, 2, ..., n) i (i = 1, 2, ..., n).
[0104] Calculate the password sample set S′ i The feature vector f of all passwords in (i = 1, 2, ..., n) is used to generate the password sample set S′. i The feature vector F of (i = 1, 2, ..., n) i (i = 1, 2, ..., n).
[0105] 206: Calculate multiple feature vectors of the password to be evaluated based on the word segmentation vectors of the multiple password sample sets.
[0106] The password pn to be evaluated is determined based on the word segmentation vector V. i (i = 1, 2, ..., n) Calculate its based on the password sample set S′ i The eigenvector fn of (i = 1, 2, ..., n) i (i = 1, 2, ..., n).
[0107] That is, the password pn to be evaluated is first segmented, and then the password pn to be evaluated is calculated based on the password sample set S′ according to formula (1). i eigenvector fn i .
[0108] 207: Calculate the cosine similarity between each feature vector of the password to be evaluated and each feature vector in the corresponding feature vector generator.
[0109] Here, the feature vector and the corresponding feature vector generator of the password to be evaluated refer to the feature vector and feature vector generator of the password to be evaluated calculated based on the same password sample set.
[0110] fn i (i = 1, 2, ..., n) and the feature vector F i Calculate the cosine similarity cosine of each feature vector f in (i = 1, 2, ..., n). Calculation sample Figure 4 As shown, here fn i The eigenvector f is... Figure 4 Vectors a and b in the vectors.
[0111] 208: Sort the calculated cosine similarities, take the top few closest similarities and get the average similarity.
[0112] The calculated cosine similarities are sorted, and the improved K-Nearest Neighbor (KNN) algorithm is used to select the top 10 closest similarities and obtain their average similarity cosn. i (i = 1, 2, ..., n).
[0113] Here, the highest similarity indicates that the password to be evaluated is common in this group and has obvious characteristic attributes, making it easy for others to crack.
[0114] 209: Determine the password strength level of the password to be evaluated based on the average similarity corresponding to the multiple feature vectors.
[0115] In this embodiment of the disclosure, the step may include:
[0116] The password strength assessment and determination tool is used to determine the password strength of the password to be assessed in each password sample set.
[0117] Use a strength assessor to determine the strength level of the password to be evaluated.
[0118] like Figure 5 As shown, the average similarity cosn corresponding to multiple feature vectors is calculated. i (i = 1, 2, ..., n) are respectively passed through the password strength evaluation and determination device to obtain the password strength x of the password to be evaluated pn in each password sample set. i (i = 1, 2, ..., n).
[0119] See Figure 5When the average similarity is greater than the first threshold, the password strength is judged as poor; when the average similarity is not greater than the first threshold but greater than the second threshold, the password strength is judged as weak; when the average similarity is not greater than the second threshold but greater than the third threshold, the password strength is judged as medium; when the average similarity is not greater than the third threshold, the password strength is judged as strong. Where 1 > first threshold > second threshold > third threshold > 0.
[0120] Figure 5 In the above, the first threshold is 0.8, the second threshold is 0.6, and the third threshold is 0.4.
[0121] certainly Figure 5 The thresholds used to determine password strength are just examples; in other embodiments, the thresholds may also take other values.
[0122] in addition, Figure 5 The password strength is divided into four levels: strong, medium, weak, and poor. In other embodiments, the password strength can be divided into more or fewer levels.
[0123] like Figure 6 As shown, the password strength x of the password to be evaluated in each password sample set is... i (i = 1, 2, ..., n) are input into the strength determiner to calculate the level x of the password strength of the password to be evaluated.
[0124] See Figure 6 When the password strength includes "poor", the password strength level is determined to be "poor"; when the password strength does not include "poor" but includes "weak", the password strength level is determined to be "weak"; when the password strength does not include "poor" and "weak" but includes "medium", the password strength level is determined to be "medium"; when the password strength does not include "poor", "weak", and "medium", the password strength level is determined to be "strong".
[0125] This disclosure provides a password strength assessment method that improves the accuracy and authenticity of assessment results by identifying the inherent relationships between passwords from a password sample set. By providing users with feedback on the strength of their passwords within a group setting, users are better able to construct stronger passwords based on the assessment results, thus eliminating weak passwords to some extent, improving password security, and protecting user information security.
[0126] Figure 7 This is a schematic diagram of the structure of a password strength assessment device provided in an embodiment of this disclosure. See also... Figure 7 The password strength assessment device includes: an acquisition module 301, a word segmentation module 302, a feature vector generation module 303, and an assessment module 304.
[0127] The acquisition module 301 is used to acquire a password sample set, which includes multiple password sample sets, and the password sample sets include multiple password samples with the same attribute characteristics.
[0128] The word segmentation module 302 is used to encode each password sample in each password sample set to generate multiple word segmentation vectors.
[0129] The feature vector generation module 303 is used to generate feature vectors for the multiple password samples using the multiple word segmentation vectors respectively, and to generate a feature vector generator based on the feature vectors of the multiple password samples.
[0130] The evaluation module 304 is used to determine the password strength of the password to be evaluated based on the multiple feature vectors corresponding to the multiple password sample sets, and output the evaluation result.
[0131] Optionally, the word segmentation module 302 is used for:
[0132] Each password sample in the password sample set is segmented and encoded using the bag-of-words model of the machine learning algorithm. Each password sample is segmented and encoded with a length of 1 to Z characters, where Z is an integer greater than 1.
[0133] The duplicate parts in the word segmentation encoding results of the password sample set are removed, and the word segmentation encoding results of all password samples in the password sample set are combined to form a word segmentation vector.
[0134] Optionally, the feature vector generation module 303 is used for:
[0135] For each password sample in the password sample set, calculate the corresponding feature vector based on the word segmentation vector:
[0136] f ik =tf ik *iwf ik k = 0, 1, ..., m-1;
[0137] Among them, f ik The k-th dimension of the feature vector t refers to the k-th segmented element in the segmentation vector, N p,t N represents the total number of times t appears in the password sample p. p The total number of word segments in the password sample p;
[0138] W c W is the frequency of all word segments in the password sample set. c,t It is the frequency of t in the password sample set.
[0139] Optionally, the evaluation module 304 is used for:
[0140] Calculate multiple feature vectors of the password to be evaluated based on the word segmentation vectors of the multiple password sample sets;
[0141] Calculate the cosine similarity between each feature vector of the password to be evaluated and each feature vector in the corresponding feature vector generator;
[0142] The calculated cosine similarities are sorted, and the top few closest similarities are taken to obtain the average similarity.
[0143] The password strength level of the password to be evaluated is determined based on the average similarity corresponding to the multiple feature vectors.
[0144] Optionally, the acquisition module 301 is further configured to perform data cleaning on the password sample set before encoding each password sample in each password sample set.
[0145] It should be noted that the password strength assessment device provided in the above embodiments is only illustrated by the division of the above functional modules when performing password strength assessment. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the password strength assessment device and the password strength assessment method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0146] Figure 8 This is a structural block diagram of a server provided in an embodiment of this disclosure. Typically, a server includes a processor 601 and a memory 602.
[0147] Processor 601 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 601 may be implemented using at least one of the following hardware forms: DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). Processor 601 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state.
[0148] Memory 602 may include one or more computer-readable storage media, which may be non-transitory. Memory 602 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 602 is used to store at least one instruction, which is executed by processor 601 to implement the password strength evaluation method executed by the server provided in the method embodiments of this application.
[0149] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0150] The above description is merely an optional embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.
Claims
1. A password strength assessment method, characterized in that, The method includes: Obtain a password sample set, which includes multiple password sample sets, each containing multiple password samples with the same attribute characteristics. Each password sample in each of the password sample sets is encoded to generate multiple word segmentation vectors; The feature vectors of the multiple password samples are generated using the multiple word segmentation vectors respectively, and a feature vector generator is generated based on the feature vectors of the multiple password samples. Based on the multiple feature vectors corresponding to the multiple password sample sets, the password strength of the password to be evaluated is determined and the evaluation result is output. Specifically, the feature vectors of the multiple password samples are generated using the multiple word segmentation vectors, including: For each password sample in the password sample set, calculate the corresponding feature vector based on the word segmentation vector: ,k=0,1,…,m-1; in, The k-th dimension of the feature vector t refers to the k-th segmentation element in the segmentation vector. This represents the total number of times t appears in the password sample p. The total number of word segments in the password sample p; , It is the frequency of all word segments in the password sample set. It is the frequency of t in the password sample set; The m refers to the feature vector Dimensions.
2. The method according to claim 1, characterized in that, Each password sample in each of the password sample sets is encoded to generate multiple word segmentation vectors, including: Each password sample in the password sample set is segmented and encoded using the bag-of-words model of the machine learning algorithm. Each password sample is segmented and encoded with a length of 1 to Z characters, where Z is an integer greater than 1. The duplicate parts in the word segmentation encoding results of the password sample set are removed, and the word segmentation encoding results of all password samples in the password sample set are combined to form a word segmentation vector.
3. The method according to claim 1, characterized in that, Based on the multiple feature vectors corresponding to the multiple password sample sets, the password strength of the password to be evaluated is determined, including: Calculate multiple feature vectors of the password to be evaluated based on the word segmentation vectors of the multiple password sample sets; Calculate the cosine similarity between each feature vector of the password to be evaluated and each feature vector in the corresponding feature vector generator; The calculated cosine similarities are sorted, and the top few closest similarities are taken to obtain the average similarity. The password strength level of the password to be evaluated is determined based on the average similarity corresponding to the multiple feature vectors.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Before encoding each password sample in each of the password sample sets, the password sample sets are cleaned.
5. A password strength assessment device, characterized in that, The device includes: The acquisition module is used to acquire a password sample set, which includes multiple password sample sets, each of which includes multiple password samples with the same attribute characteristics. The word segmentation module is used to encode each password sample in each password sample set to generate multiple word segmentation vectors. The feature vector generation module is used to generate feature vectors for the multiple password samples using the multiple word segmentation vectors respectively, and to generate a feature vector generator based on the feature vectors of the multiple password samples. The evaluation module is used to determine the password strength of the password to be evaluated based on multiple feature vectors corresponding to the multiple password sample sets, and output the evaluation result. The feature vector generation module is used for: For each password sample in the password sample set, calculate the corresponding feature vector based on the word segmentation vector: ,k=0,1,…,m-1; in, The k-th dimension of the feature vector t refers to the k-th segmentation element in the segmentation vector. This represents the total number of times t appears in the password sample p. The total number of word segments in the password sample p; , It is the frequency of all word segments in the password sample set. It is the frequency of t in the password sample set; The m refers to the feature vector Dimensions.
6. The apparatus according to claim 5, characterized in that, The word segmentation module is used for: Each password sample in the password sample set is segmented and encoded using the bag-of-words model of the machine learning algorithm. Each password sample is segmented and encoded with a length of 1 to Z characters, where Z is an integer greater than 1. The duplicate parts in the word segmentation encoding results of the password sample set are removed, and the word segmentation encoding results of all password samples in the password sample set are combined to form a word segmentation vector.
7. A server, characterized in that, The server includes a processor and a memory, the memory storing at least one line of program code, which is loaded and executed by the processor to implement the password strength assessment method as described in any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one piece of program code, which is loaded and executed by a processor to implement the password strength assessment method as described in any one of claims 1 to 4.