A weak password detection method and device

By extracting and matching the target information string in user's personal information and the same type of continuous string of the password to be detected, calculating the proportion of the characters and giving weights, judging the password strength and weakness, the existing technology cannot detect users using individuals. The problem of weak passwords set by information improves password security.

CN117852017BActive Publication Date: 2024-11-19CHINA HUANENG GRP CO LTD BEIJING TENDERING BRANCH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311686903.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-08
Publication Date
2024-11-19
Estimated Expiration
2043-12-08

AI Technical Summary

Technical Problem

The prior art cannot effectively detect weak passwords set by users using personal information, resulting in the information security problem not being effectively solved.

Method used

By obtaining the user's personal information and the password to be detected, extracting the target information string and the same type of continuous string, performing consistency matching, calculating the proportion of characters and giving weights, calculating the strength and weakness reference coefficient, and determining whether the password is weak or not password.

Benefits of technology

Improve password security, can detect weak passwords set by users using personal information, and remind users to replace new passwords, thereby improving information security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117852017B_ABST
    Figure CN117852017B_ABST
Patent Text Reader

Abstract

The present invention discloses a weak password detection method and device, which includes: obtaining the user's personal information and the password to be detected; extracting the target information string in each item of the user's personal information and the same type of continuous string of the password to be detected; matching the target information string with the same type of continuous string to obtain a consistent string and an inconsistent string; respectively calculating the character quantity ratio of the consistent string and the inconsistent string; respectively assigning corresponding weights to the character quantity ratio of the consistent string and the inconsistent string, and calculating the strength reference coefficient of the password to be detected; determining whether the password to be detected is a weak password according to the strength reference coefficient of the password to be detected. The present invention detects whether the password set by the user is set by the user using his own information, and judges the strength of the password to be detected according to the proportion of the user information in the password, thereby reminding the user of the level of password security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer network security, and in particular to a weak password detection method and device. Background Art

[0002] At present, with the continuous development of computer technology, computer applications are becoming more and more widespread, and there are more and more operations that can be performed on computers. Some of these operations may involve user information. In order to ensure information security, various passwords are usually required. If the password set is a weak password, it is easy to be guessed or cracked by others. Therefore, if the password we use is a weak password, all the information and data stored in our computer will face the possibility of being stolen, which will cause corresponding losses to users, which is very dangerous.

[0003] In the prior art, a method based on regular expressions is usually used to detect passwords. Specifically, the password can be detected according to simple rules such as the length of the password to be detected and the character type used (such as uppercase letters, lowercase letters, numbers, or symbols), and then the password to be detected can be evaluated to see if it is a weak password. However, the password detection rule is too simple, and a mechanical test is performed based on artificially set rules, which has large limitations. Some users often use the identity information of people who are close to them to set passwords. In this case, the weak passwords set cannot be detected by the prior art, and the security of the user's password cannot be further improved. In this case, if the user continues to use the weak password, there will still be information security issues. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a weak password detection method, comprising:

[0005] Obtain the user's personal information and password to be tested;

[0006] Extracting the target information character string and the same type of continuous character string of the password to be detected from each item of the user's personal information;

[0007] Match the target information character string with the same type of continuous character strings for consistency, to obtain a consistent character string and an inconsistent character string;

[0008] Calculate the character count ratios of the consistent character string and the inconsistent character string respectively;

[0009] Assign corresponding weights to the character count ratios of the consistent character string and the inconsistent character string, respectively, and calculate a strength reference coefficient of the password to be detected;

[0010] Determine whether the password to be detected is a weak password according to the strength reference coefficient of the password to be detected.

[0011] Furthermore, the step of extracting the target information character string and the same type of continuous character string of the password to be detected from each item of personal information of the user includes:

[0012] For each item of personal information of the user obtained, target information characters are extracted from the personal information, and the target information characters are arranged and combined according to a preset format of the personal information to obtain at least one target information character string corresponding to the personal information of the user.

[0013] Furthermore, the matching of the target information character string with the same type of continuous character string to obtain a consistent character string and an inconsistent character string includes:

[0014] Matching the target information character string with the same type continuous character string one by one to obtain two types of same type continuous character strings, namely, the same type continuous character string with consistency and the same type continuous character string with inconsistency;

[0015] The same type of continuous character strings with consistency are named consistent character strings, and the same type of continuous character strings without consistency are named inconsistent character strings.

[0016] Furthermore, the calculating of the character quantity ratios of the same type of consecutive character strings with consistency and the same type of consecutive character strings without consistency respectively includes:

[0017] Obtaining the number of characters in the password to be detected;

[0018] Calculate the number of characters in the consistent string and the number of characters in the inconsistent string respectively;

[0019] The number of characters in the consistent character string is compared with the number of characters in the password to be detected to obtain a first ratio, and the number of characters in the inconsistent character string is compared to obtain a second ratio.

[0020] Furthermore, the method of assigning corresponding weights to the character quantity ratios of the consistent character string and the inconsistent character string, and calculating the strength reference coefficient of the password to be detected includes:

[0021] Calculate the number of consistent strings and the number of inconsistent strings respectively;

[0022] According to the relationship between the number of consistent character strings and the number of inconsistent character strings and the corresponding preset number of character strings, respectively obtaining a first weight and a second weight corresponding to the first ratio and the second ratio;

[0023] The first weight is assigned to the first ratio, and the second weight is assigned to the second ratio, and a strength reference coefficient of the password to be detected is calculated.

[0024] Furthermore, the calculation formula of the strength reference coefficient of the password to be detected is as follows:

[0025] Z=a*X+b*Y,

[0026] Among them, Z is the strength reference coefficient of the password to be detected, a is the first weight, X is the first ratio, b is the second weight, and Y is the second ratio.

[0027] Further, the determining whether the password to be detected is a weak password according to the strength reference coefficient of the password to be detected includes:

[0028] The strength reference coefficient of the password to be detected is compared with a preset strength reference coefficient. If the strength reference coefficient of the password to be detected is lower than the preset strength reference coefficient, the password to be detected is a weak password.

[0029] Furthermore, when it is determined that the password to be detected is a weak password, a prompt message is sent to the user to prompt the user to change a new password.

[0030] The present invention also provides a weak password detection device, comprising:

[0031] The acquisition module is used to obtain the user's personal information and the password to be tested;

[0032] An extraction module, used to extract a target information character string and a continuous character string of the same type as the password to be detected from each item of personal information of the user;

[0033] A matching module, used for matching the target information character string with the same type of continuous character strings to obtain a consistent character string and an inconsistent character string;

[0034] A calculation module, used to calculate the character quantity ratios of the consistent character string and the inconsistent character string respectively;

[0035] Assign corresponding weights to the character count ratios of the consistent character string and the inconsistent character string, respectively, and calculate a strength reference coefficient of the password to be detected;

[0036] The confirmation module is used to determine whether the password to be detected is a weak password according to the strength reference coefficient of the password to be detected.

[0037] Compared with the prior art, the weak password detection method and device of the embodiment of the present invention have the following beneficial effects:

[0038] The present invention detects whether the password set by the user is set by the user using his own information. Because the security of the password containing the user's personal information is relatively weak, it is also necessary to further judge the strength of the password to be tested based on the proportion of user information in the password, thereby reminding the user whether the password is safe, which is conducive to helping the user improve the security of the password setting. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a schematic diagram of a process for detecting a weak password in an embodiment of the present invention;

[0040] Figure 2 It is a schematic diagram of the composition of a weak password detection device in an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0042] In the description of the present application, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0043] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0044] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0045] like Figure 1As shown, in an embodiment of the present application, a weak password detection method is provided, including: step S100: obtaining the user's personal information and the password to be detected; step S200: extracting the target information character string in each item of the user's personal information and the same type of continuous character string of the password to be detected; step S300: matching the target information character string with the same type of continuous character string for consistency to obtain a consistent character string and an inconsistent character string; step S400: respectively calculating the character quantity ratio of the consistent character string and the inconsistent character string; step S500: respectively assigning corresponding weights to the character quantity ratio of the consistent character string and the inconsistent character string, and calculating the strength reference coefficient of the password to be detected; step S600: determining whether the password to be detected is a weak password according to the strength reference coefficient of the password to be detected.

[0046] Furthermore, the present invention detects whether the password set by the user is set by the user using his own information. Because the security of the password containing the user's personal information is relatively weak, it is also necessary to further judge the strength of the password to be tested based on the proportion of user information in the password, thereby reminding the user whether the password is safe, which is beneficial to help the user improve the security of the password setting.

[0047] In an embodiment of the present application, a weak password detection method is provided. In step S200, the target information character string and the same type of continuous character string of the password to be detected are extracted from each item of personal information of the user, including: for each item of personal information of the user obtained, the target information characters are extracted from the personal information, and the target information characters are arranged and combined according to the preset format of the personal information to obtain at least one target information character string corresponding to the personal information of the user.

[0048] Specifically, each personal information of the user is obtained, target information characters are extracted from the personal information, and the target information characters are arranged and combined according to the preset format of the personal information to obtain at least one target information string corresponding to the personal information of the user, and all the obtained target information strings are formed into a personal information set of the user. Among them, each personal information can be composed of multiple characters (for example, numbers, letters), and personal information can include: name, ID number, mobile phone number, bank account number / card number and other information.

[0049] In an embodiment of the present application, a weak password detection method is provided. In the step S300, the target information string is matched with the continuous string of the same type for consistency to obtain a consistent string and an inconsistent string, including: matching the target information string with the continuous string of the same type one by one to obtain two types of continuous strings of the same type, namely, a continuous string of the same type with consistency and a continuous string of the same type with inconsistency; naming the continuous string of the same type with consistency as a consistent string, and naming the continuous string of the same type with inconsistency as an inconsistent string.

[0050] In an embodiment of the present application, a weak password detection method is provided. In the step S400, the ratio of the number of characters of the same type of continuous character strings with consistency and the number of characters of the same type of continuous character strings with inconsistency are calculated respectively, including: obtaining the number of characters of the password to be detected; respectively calculating the number of characters of the consistent character string and the number of characters of the inconsistent character string; comparing the number of characters of the consistent character string with the number of characters of the password to be detected to obtain a first ratio, and at the same time comparing the number of characters of the inconsistent character string to obtain a second ratio.

[0051] In an embodiment of the present application, a weak password detection method is provided. In the step S500, corresponding weights are assigned to the character number ratios of the consistent string and the inconsistent string, respectively, and a strength reference coefficient of the password to be detected is calculated, including: respectively calculating the number of strings of the consistent string and the number of strings of the inconsistent string; obtaining a first weight and a second weight corresponding to the first ratio and the second ratio according to a relationship between the number of strings of the consistent string and the number of strings of the inconsistent string and a corresponding preset number of strings, respectively; assigning the first weight to the first ratio, and assigning the second weight to the second ratio, and calculating the strength reference coefficient of the password to be detected.

[0052] In an embodiment of the present application, a weak password detection method is provided, and the calculation formula of the strength reference coefficient of the password to be detected is as follows:

[0053] Z=a*X+b*Y,

[0054] Among them, Z is the strength reference coefficient of the password to be detected, a is the first weight, X is the first ratio, b is the second weight, and Y is the second ratio.

[0055] In an embodiment of the present application, a weak password detection method is provided. In the step S600, determining whether the password to be detected is a weak password based on the strength reference coefficient of the password to be detected includes: comparing the strength reference coefficient of the password to be detected with a preset strength reference coefficient; if the strength reference coefficient of the password to be detected is lower than the preset strength reference coefficient, then the password to be detected is a weak password.

[0056] Furthermore, when it is determined that the password to be detected is a weak password, a prompt message is sent to the user to prompt the user to change a new password.

[0057] like Figure 2 As shown, in an embodiment of the present application, a weak password detection device is provided, including: an acquisition module, used to obtain the user's personal information and the password to be detected; an extraction module, used to extract the target information character string in each item of the user's personal information and the same type of continuous character string of the password to be detected; a matching module, used to match the target information character string with the same type of continuous character string for consistency, to obtain a consistent character string and an inconsistent character string; a calculation module, used to respectively calculate the character quantity ratio of the consistent character string and the inconsistent character string; respectively assign corresponding weights to the character quantity ratio of the consistent character string and the inconsistent character string, and calculate the strength reference coefficient of the password to be detected; a confirmation module, used to determine whether the password to be detected is a weak password according to the strength reference coefficient of the password to be detected.

[0058] In summary, the embodiment of the present invention provides a weak password detection method and device, which includes: obtaining the user's personal information and the password to be detected; extracting the target information string in each item of the user's personal information and the same type of continuous string of the password to be detected; matching the target information string with the same type of continuous string to obtain a consistent string and an inconsistent string; respectively calculating the character count ratio of the consistent string and the inconsistent string; respectively assigning corresponding weights to the character count ratio of the consistent string and the inconsistent string, and calculating the strength reference coefficient of the password to be detected; determining whether the password to be detected is a weak password according to the strength reference coefficient of the password to be detected. The present invention detects whether the password set by the user is set by the user using his own information, and judges the strength of the password to be tested according to the proportion of user information in the password, thereby reminding the user of the level of password security.

[0059] Finally, it should be noted that it is obvious that those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

[0060] The above is only an example of implementation of the present invention, but it cannot be used to limit the scope of the present invention. Any structural changes made according to the present invention, as long as they do not lose the essence of the present invention, should be regarded as falling within the scope of protection of the present invention and being restricted. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and related instructions of the system described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0061] The term "comprise" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that includes a list of elements includes not only those elements but also other elements not expressly listed, or also includes elements inherent to such process, method, article, or apparatus / device.

[0062] So far, the technical solutions of the present invention have been described in conjunction with the further embodiments shown in the accompanying drawings, but it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0063] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention.

Claims

1. A weak password detection method, characterized in that: include: Obtain the user's personal information and password to be tested; Extracting the target information character string and the same type of continuous character string of the password to be detected from each item of the user's personal information; Match the target information character string with the same type of continuous character strings for consistency, to obtain a consistent character string and an inconsistent character string; Calculate the character count ratios of the consistent character string and the inconsistent character string respectively; Assign corresponding weights to the character count ratios of the consistent character string and the inconsistent character string, respectively, and calculate a strength reference coefficient of the password to be detected; Determine whether the password to be detected is a weak password according to the strength reference coefficient of the password to be detected; The step of matching the target information character string with the same type of continuous character strings to obtain consistent character strings and inconsistent character strings includes: Matching the target information character string with the same type continuous character string one by one to obtain two types of same type continuous character strings, namely, the same type continuous character string with consistency and the same type continuous character string with inconsistency; The same type of continuous strings with consistency are named as consistent strings, and the same type of continuous strings without consistency are named as inconsistent strings; The calculating the ratio of the number of characters of the same type of continuous character strings with consistency and the number of characters of the same type of continuous character strings with inconsistency respectively includes: obtaining the number of characters of the password to be detected; Calculate the number of characters in the consistent string and the number of characters in the inconsistent string respectively; Comparing the number of characters in the consistent string with the number of characters in the password to be detected to obtain a first ratio, and comparing the number of characters in the inconsistent string to obtain a second ratio; The step of assigning corresponding weights to the character quantity ratios of the consistent character string and the inconsistent character string, and calculating the strength reference coefficient of the password to be detected includes: Calculate the number of characters in the consistent string and the number of characters in the inconsistent string respectively; According to the relationship between the number of characters in the consistent character string and the number of characters in the inconsistent character string and the corresponding preset number of characters, respectively obtaining a first weight and a second weight corresponding to the first ratio and the second ratio; The first weight is assigned to the first ratio, and the second weight is assigned to the second ratio, and a strength reference coefficient of the password to be detected is calculated.

2. A weak password detection method according to claim 1, characterized in that: The step of extracting a target information character string from each item of personal information of a user and a continuous character string of the same type as the password to be detected includes: For each item of personal information of the user obtained, target information characters are extracted from the personal information, and the target information characters are arranged and combined according to a preset format of the personal information to obtain at least one target information character string corresponding to the personal information of the user.

3. A weak password detection method according to claim 1, characterized in that: The calculation formula for the strength reference coefficient of the password to be detected is as follows: Z=a*X+b*Y, Among them, Z is the strength reference coefficient of the password to be detected, a is the first weight, X is the first ratio, b is the second weight, and Y is the second ratio.

4. A weak password detection method according to claim 1, characterized in that: The determining whether the password to be detected is a weak password according to the strength reference coefficient of the password to be detected includes: The strength reference coefficient of the password to be detected is compared with a preset strength reference coefficient. If the strength reference coefficient of the password to be detected is lower than the preset strength reference coefficient, the password to be detected is a weak password.

5. A weak password detection method according to claim 4, characterized in that: When it is determined that the password to be detected is a weak password, a prompt message is sent to the user to prompt the user to change a new password.

6. A weak password detection device, characterized in that: include: The acquisition module is used to obtain the user's personal information and the password to be tested; An extraction module, used to extract a target information character string and a continuous character string of the same type as the password to be detected from each item of personal information of the user; A matching module, used for matching the target information character string with the same type of continuous character strings to obtain a consistent character string and an inconsistent character string; A calculation module, used to calculate the character quantity ratios of the consistent character string and the inconsistent character string respectively; Assign corresponding weights to the character count ratios of the consistent character string and the inconsistent character string, respectively, and calculate a strength reference coefficient of the password to be detected; A confirmation module, used to determine whether the password to be detected is a weak password according to the strength reference coefficient of the password to be detected; The step of matching the target information character string with the same type of continuous character strings to obtain consistent character strings and inconsistent character strings includes: Matching the target information character string with the same type continuous character string one by one to obtain two types of same type continuous character strings, namely, the same type continuous character string with consistency and the same type continuous character string with inconsistency; The same type of continuous strings with consistency are named as consistent strings, and the same type of continuous strings without consistency are named as inconsistent strings; The calculating the ratio of the number of characters of the same type of continuous character strings with consistency and the number of characters of the same type of continuous character strings with inconsistency respectively includes: obtaining the number of characters of the password to be detected; Calculate the number of characters in the consistent string and the number of characters in the inconsistent string respectively; Comparing the number of characters in the consistent string with the number of characters in the password to be detected to obtain a first ratio, and comparing the number of characters in the inconsistent string to obtain a second ratio; The step of assigning corresponding weights to the character quantity ratios of the consistent character string and the inconsistent character string, and calculating the strength reference coefficient of the password to be detected includes: Calculate the number of characters in the consistent string and the number of characters in the inconsistent string respectively; According to the relationship between the number of characters in the consistent character string and the number of characters in the inconsistent character string and the corresponding preset number of characters, respectively obtaining a first weight and a second weight corresponding to the first ratio and the second ratio; The first weight is assigned to the first ratio, and the second weight is assigned to the second ratio, and a strength reference coefficient of the password to be detected is calculated.