Weak password determination method and device, equipment, medium and program product

By converting the initial password into a sequence of word vectors, capturing local dependencies, and constructing fuzzy logic rules, the problem of traditional weak password detection methods being unable to identify unique words is solved, thus achieving more accurate weak password judgment and risk assessment.

CN121619147APending Publication Date: 2026-03-06CERNET CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511864553.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-06

Smart Images

  • Figure CN121619147A_ABST
    Figure CN121619147A_ABST
Patent Text Reader

Abstract

The invention provides a weak password determination method and device, equipment, a medium and a program product, and relates to the technical field of network security. The method comprises the following steps: in response to receiving an initial password input by a user, converting the initial password into a first word vector sequence; respectively capturing a local dependency relationship among word vectors in the first word vector sequence, and distributing weights for the word vectors based on a preset feature word library to obtain a second word vector sequence; performing integration weighting on the feature information of the second word vector sequence based on weight information obtained by pre-training to obtain a feature vector corresponding to the second word vector sequence; constructing a fuzzy logic rule based on the feature dimension, and determining probability information of the password according to the fuzzy logic rule; and under the condition that the probability information is lower than a preset threshold value, determining that the initial password is a weak password.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of network security technology, and specifically to a method, apparatus, device, medium, and program product for determining weak passwords. Background Technology

[0002] In today's digital age, cybersecurity is paramount, and user passwords, as a critical line of defense for systems and networks, are of utmost importance in terms of security. Traditional methods for detecting weak password vulnerabilities primarily rely on searching weak password databases, which have significant limitations. Firstly, they depend on a pre-defined, fixed set of weak passwords, making it difficult to address constantly changing and diverse password scenarios. For instance, newly emerging popular terms or non-standard combinations commonly used by specific groups may not be in existing weak password databases, yet their widespread use poses security risks, which traditional methods cannot effectively identify.

[0003] On the other hand, in actual business scenarios, certain specific terms (such as terms, business terms, abbreviations of job titles and personal names) may be used extensively. Once leaked, they can easily become key elements for hackers to brute-force passwords.

[0004] However, traditional detection methods cannot take these unique words into account, which can easily lead to problems such as inaccurate identification of weak passwords. Summary of the Invention

[0005] This disclosure provides a method, apparatus, device, medium, and program product for determining weak passwords.

[0006] According to a first aspect of this disclosure, a method for determining a weak password is provided, comprising: in response to receiving an initial password input by a user, converting the initial password into a first word vector sequence, the first word vector sequence consisting of multiple word vectors, each word vector corresponding one-to-one with a password character in the initial password, the word vectors containing positional and semantic information of the password characters; capturing the local dependencies between each word vector in the first word vector sequence and assigning weights to the word vectors based on a preset feature lexicon to obtain a second word vector sequence, the second word vector sequence including multiple feature information; integrating and weighting the feature information of the second word vector sequence based on pre-trained weight information to obtain a feature vector corresponding to the second word vector sequence; constructing fuzzy logic rules based on the feature dimensions, and determining the probability information of the password according to the fuzzy logic rules; if the probability information is lower than a preset threshold, determining the initial password as a weak password.

[0007] According to embodiments of this disclosure, in response to receiving an initial password input by a user, the initial password is converted into a first word vector sequence, including: decomposing the initial password into multiple password characters and determining the category of each password character; encoding the multiple password characters based on their categories to obtain a one-hot encoded vector corresponding to each password character; performing word embedding processing on the multiple password characters to obtain a word embedding vector corresponding to each password character, wherein the word embedding vector includes the positional information and semantic information of the password character; and fusing the word embedding vector and the one-hot encoded vector corresponding to each password character to obtain a word vector for each password character.

[0008] According to embodiments of this disclosure, multiple password characters are encoded based on their categories to obtain a one-hot encoded vector corresponding to each password character. This includes: determining the encoding length corresponding to each password character based on the total number of password character categories; and encoding multiple password characters based on their encoding lengths to obtain a one-hot encoded vector corresponding to each password character.

[0009] According to embodiments of this disclosure, capturing the local dependencies between word vectors in a first word vector sequence and assigning weights to word vectors based on a preset feature lexicon to obtain a second word vector sequence includes: capturing the local dependencies between adjacent word vectors and / or similar word vectors for multiple first word vectors in the first word vector sequence to obtain a sequence containing local feature information; assigning attention weights to the first word vector sequence based on the feature lexicon; and fusing the feature vectors of the first word vector sequence based on the attention weights to obtain the second word vector sequence.

[0010] According to embodiments of this disclosure, the feature information of the second word vector sequence is integrated and weighted based on preset weight information to obtain the feature vector corresponding to the second word vector sequence. This includes: integrating the feature information in the second word vector sequence to obtain an initial feature vector; and weighting the initial feature vector based on the weight information obtained from pre-training to obtain the feature vector corresponding to the second word vector sequence. The weight information is determined based on the degree of influence of the feature information on the judgment result.

[0011] According to embodiments of this disclosure, constructing fuzzy logic rules based on feature dimensions and determining the probability information of a password based on the fuzzy logic rules includes: determining the initial probability of a password based on a preset function; constructing fuzzy logic rules based on feature dimensions and adjusting the initial probability based on the fuzzy logic rules to obtain the probability information of the password.

[0012] According to a second aspect of this disclosure, a weak password determination device is provided, comprising: a conversion module, configured to, in response to receiving an initial password input by a user, convert the initial password into a first word vector sequence, the first word vector sequence consisting of multiple word vectors, each word vector corresponding one-to-one with a password character in the initial password, the word vectors containing positional and semantic information of the password characters; an acquisition module, configured to capture the local dependencies between each word vector in the first word vector sequence and assign weights to the word vectors based on a preset feature lexicon to obtain a second word vector sequence, the second word vector sequence including multiple feature information; an integration and weighting module, configured to integrate and weight the feature information of the second word vector sequence based on pre-trained weight information to obtain a feature vector corresponding to the second word vector sequence; a first determination module, configured to construct fuzzy logic rules based on feature dimensions and determine the probability information of the password according to the fuzzy logic rules; and a second determination module, configured to determine that the initial password is a weak password if the probability information is lower than a preset threshold.

[0013] According to a third aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the methods described above.

[0014] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided that stores a computer program or instructions thereon, characterized in that the computer program or instructions, when executed by a processor, implement the steps of the method described above.

[0015] According to a fifth aspect of this disclosure, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the steps of the method described above. Attached Figure Description

[0016] The above and other objects, features and advantages of this disclosure will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0017] Figure 1 This diagram illustrates an application scenario of the weak password determination method according to embodiments of the present disclosure.

[0018] Figure 2 A flowchart illustrating a weak password determination method according to an embodiment of the present disclosure is shown schematically.

[0019] Figure 3 This illustration schematically shows a flowchart of converting an initial password into a first word vector sequence in response to receiving an initial password input by a user, according to an embodiment of the present disclosure.

[0020] Figure 4 This schematically illustrates a flowchart of capturing the local dependencies between each first word vector in a first word vector sequence and assigning weights to the word vectors based on a preset feature lexicon to obtain a second word vector sequence according to an embodiment of the present disclosure.

[0021] Figure 5 The flowchart illustrates a process of integrating and weighting the feature information of a second word vector sequence based on preset weight information according to an embodiment of the present disclosure to obtain the feature vector corresponding to the second word vector sequence.

[0022] Figure 6 The illustration shows a flowchart of constructing fuzzy logic rules based on the contribution of each feature dimension according to an embodiment of the present disclosure, and determining the probability information of the password according to the fuzzy logic rules;

[0023] Figure 7 This schematic diagram illustrates a structural block diagram of a weak password determination apparatus according to an embodiment of the present disclosure;

[0024] Figure 8 A block diagram of an electronic device according to an embodiment of the present disclosure of a weak password determination method is shown schematically. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0026] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of a feature, step, operation, and / or component, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0027] In this disclosure, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection, an electrical connection, or a connection that allows communication between them; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this disclosure according to the specific circumstances.

[0028] In the description of this disclosure, it should be understood that the terms "longitudinal", "length", "circumferential", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and do not indicate or imply that the subsystem or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure.

[0029] Throughout the accompanying drawings, identical elements are represented by the same or similar reference numerals. Conventional structures or configurations have been omitted where they may cause confusion in understanding this disclosure. Furthermore, the shapes, dimensions, and positional relationships of the components in the drawings do not reflect actual size, scale, or actual positional relationships. Additionally, any reference symbols enclosed in parentheses should not be construed as limiting.

[0030] Similarly, to simplify this disclosure and aid in understanding one or more of the various aspects of the disclosure, in the above description of exemplary embodiments of the present disclosure, various features of the present disclosure are sometimes grouped together in a single embodiment, figure, or description thereof. The use of terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refers to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the present disclosure. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0031] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this disclosure, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0032] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, and application of user personal information all comply with relevant laws and regulations, necessary confidentiality measures have been taken, and they do not violate public order and good morals. In the technical solution disclosed herein, user authorization or consent has been obtained before acquiring or collecting user personal information.

[0033] Embodiments of this disclosure provide a method for determining a weak password, comprising: in response to receiving an initial password input by a user, converting the initial password into a first word vector sequence, the first word vector sequence consisting of multiple word vectors, each word vector corresponding one-to-one with a password character in the initial password, the word vectors containing positional and semantic information of the password characters; capturing the local dependencies between each word vector in the first word vector sequence and assigning weights to the word vectors based on a preset feature lexicon to obtain a second word vector sequence, the second word vector sequence including multiple feature information; integrating and weighting the feature information of the second word vector sequence based on pre-trained weight information to obtain a feature vector corresponding to the second word vector sequence; constructing fuzzy logic rules based on feature dimensions, determining the probability information of the password according to the fuzzy logic rules; and determining the initial password as a weak password if the probability information is lower than a preset threshold.

[0034] Figure 1 The diagram illustrates an application scenario of the weak password determination method according to an embodiment of the present disclosure.

[0035] like Figure 1 As shown, application scenario 100 according to this embodiment may include terminal devices 101, 102, and 103, network 104, and server 105. Network 104 is used as a medium to provide a communication link between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0036] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as physics simulation applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0037] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0038] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0039] It should be noted that the weak password determination method provided in this disclosure embodiment can generally be executed by server 105. Correspondingly, the weak password determination device provided in this disclosure embodiment can generally be located in server 105. The weak password determination method provided in this disclosure embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the weak password determination device provided in this disclosure embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105.

[0040] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0041] The following will be based on Figure 1 The described scene, through Figures 2-6 The method for determining weak passwords according to embodiments of this disclosure will be described in detail.

[0042] Figure 2 A flowchart illustrating a weak password determination method according to an embodiment of the present disclosure is shown schematically.

[0043] like Figure 2 As shown, the weak password determination method in this embodiment includes operations S210 to S250.

[0044] In operation S210, in response to receiving the initial password input by the user, the initial password is converted into a first word vector sequence. The first word vector sequence consists of multiple word vectors, and each word vector corresponds one-to-one with a password character in the initial password. The word vector contains positional and semantic information of the password characters.

[0045] In some embodiments, after the user enters a new password (i.e., the initial password), the initial password is broken down into multiple password characters. Each password character can be encoded using one-hot encoding and word embedding encoding to obtain a word vector. The word vector can contain information about the password character itself, its position in the password, semantic information, etc.

[0046] Taking the initial password "Abc123" as an example, the word vector of the character "A" will contain the positional information of it being the first character in the password, as well as the semantic information of "A" as an uppercase letter.

[0047] In operation S220, the local dependencies between word vectors in the first word vector sequence are captured and weights are assigned to the word vectors based on a preset feature lexicon to obtain the second word vector sequence, which includes multiple feature information.

[0048] In some embodiments, local dependencies between word vectors in the first word vector sequence are captured. Local dependencies refer to the association between adjacent or nearby word vectors; for example, consecutive letters in a cipher may have a specific meaning.

[0049] A pre-defined feature lexicon can contain, for example, feature words or patterns related to weak passwords. By assigning weights to word vector sequences based on these features, the feature information related to weak passwords can be highlighted. For instance, if a character in a word vector sequence is marked as related to a weak password in the feature lexicon, then that word vector sequence will be assigned a higher weight.

[0050] For example, local dependencies between characters can be captured using a small number of LSTM or GRU units. A second word vector sequence is obtained by integrating global information and performing long-term analysis on the underlying output through a multi-layer attention mechanism module.

[0051] In operation S230, the feature information of the second word vector sequence is integrated and weighted based on the weight information obtained from pre-training to obtain the feature vector corresponding to the second word vector sequence.

[0052] In some embodiments, a fully connected neural network can be used to integrate and weight the feature information. Taking the second word vector sequence as input, the various feature information is combined according to pre-trained weights through linear transformations and nonlinear near-linear functions of the fully connected layer, resulting in the final feature vector. The pre-trained weights can be learned from a large amount of cryptographic data and determined based on the degree of influence of each feature dimension on weak password detection.

[0053] In operation S240, fuzzy logic rules are constructed based on feature dimensions, and the probability information of the password is determined according to the fuzzy logic rules.

[0054] In some embodiments, the feature dimension refers to each dimension in the feature vector, where each dimension represents a feature of the password, such as password length, password character type, etc. Fuzzy logic rules are a reasoning method based on fuzzy set theory. Based on the values ​​of each dimension in the feature vector, it can infer and judge the probability that a password is weak, thus obtaining the password's probabilistic information.

[0055] For example, if the dimension representing password length and the dimension representing character diversity in the feature vector are both small, then according to fuzzy logic rules, the probability that the password is a weak password may be relatively high.

[0056] In operation S250, if the probability information is lower than a preset threshold, the initial password is determined to be a weak password.

[0057] In some embodiments, the preset threshold can be set based on actual application needs and experience. When the probability that the password is a weak password is lower than the threshold, it indicates that the password meets the characteristics of a weak password, and the password is determined to be a weak password. If the password is determined to be a weak password, the user is prompted to reset the password.

[0058] This disclosure, through converting the initial password into a word vector sequence and extracting multi-dimensional features, helps to more accurately determine whether a password is weak. Constructing fuzzy logic rules based on feature dimensions takes into account the fuzziness and uncertainty of password features, improving the flexibility and accuracy of weak password detection. In the weak password determination process, weighted integration of feature information based on pre-trained weights can effectively improve the accuracy of weak password judgment, as well as enhance the adaptability and robustness of the judgment.

[0059] Figure 3 The illustration shows a flowchart of converting an initial password into a first word vector sequence in response to receiving an initial password input by a user, according to an embodiment of the present disclosure.

[0060] like Figure 3 As shown, in this embodiment, in response to receiving an initial password input by the user, converting the initial password into a first word vector sequence includes operations S310 to S340.

[0061] In operation S310, the initial password is broken down into multiple password characters and the category of each password character is determined.

[0062] In operation S320, multiple password characters are encoded based on their categories to obtain a one-hot encoded vector for each password character.

[0063] In some embodiments, the initial cipher is decomposed into multiple cipher characters and one-hot encoded to obtain a one-hot encoded vector for each cipher character. The length of the one-hot encoding is determined based on the diversity of cipher characters in the initial cipher, to make the one-hot encoded vector more suitable for practical applications. For example, the encoding length for each cipher character can be determined based on the total number of cipher character categories; multiple cipher characters are then encoded based on their encoding lengths to obtain the one-hot encoded vector for each cipher character. Here, the character category refers to all different characters that can appear in the cipher. Whether it's numbers, English letters, or other special characters, as long as they appear in the cipher and are different from each other, they belong to different character categories.

[0064] For example, a user enters the password "abc123", which is broken down into the characters "a", "b", "c", "1", "2", and "3". The size N of the character set is dynamically determined based on the diversity of the decomposed password characters. Here, N represents the total number of different character categories used for one-hot encoding. Based on the determined N value, a one-hot encoded vector is generated for each character. One-hot encoding is a method of converting categorical variables into binary vectors. Each character corresponds to a vector of length N, with 1s at the corresponding positions and 0s at the remaining positions. For example, if the character set contains 6 characters ("a", "b", "c", "1", "2", "3"), the one-hot encoded vector for character "a" might be [1, 0, 0, 0, 0, 0], the one-hot encoded vector for character "b" is [0, 1, 0, 0, 0, 0], and so on.

[0065] In operation S330, word embedding processing is performed on multiple password characters to obtain a word embedding vector corresponding to each password character. The word embedding vector includes the position information and semantic information of the password character.

[0066] In some embodiments, a word embedding algorithm combining positional information and semantic understanding can be used to process the decomposed password characters to obtain word embedding vectors. In addition to containing the semantic information of the characters, the word embedding vectors also incorporate the positional information of the characters in the password. For example, the word vector of the character "a" will be different when it is at the beginning and end of the password to reflect the influence of position on semantics.

[0067] For example, by incorporating the positional information of characters within a password into word vectors, the generated word vectors can contain not only the semantic information of the characters but also their positional information. This allows the model to better understand the order and semantic relationships of characters in the password, completing the transformation from characters to vectors containing rich positional and semantic information. For instance, for the password "pass123", the algorithm would consider information such as "p" at the beginning and "s" in the second position to generate more accurate word vectors.

[0068] In operation S340, the word embedding vector and one-hot encoding vector corresponding to each password character are fused to obtain the first word vector for each password character.

[0069] In some embodiments, the one-hot encoded vector and the word embedding vector are fused to obtain the final input vector. The fusion method can be a simple concatenation, such as concatenating the one-hot encoded vector and the word embedding vector in sequence to form a longer vector as the output of the input layer, which is then passed to subsequent fully connected layers and other network structures for processing.

[0070] This embodiment dynamically adjusts the N value based on the diversity of the input password characters, ensuring that the encoding covers all appearing characters, making the encoding more suitable for practical application scenarios and improving the flexibility of one-hot encoding. Introducing positional information into the word embedding algorithm achieves the fusion of multi-dimensional information, effectively improving the richness of password feature representation and thus enhancing the accuracy of cryptanalysis.

[0071] Figure 4 The flowchart illustrates a process of capturing the local dependencies between each first word vector in a first word vector sequence and assigning weights to the word vectors based on a preset feature lexicon to obtain a second word vector sequence, according to an embodiment of the present disclosure.

[0072] like Figure 4 As shown, this embodiment captures the local dependencies between each first word vector in the first word vector sequence and assigns weights to the word vectors based on a preset feature lexicon to obtain the second word vector sequence, including operations S410 to S430.

[0073] In operation S410, for multiple first word vectors in the first word vector sequence, the local dependencies between adjacent word vectors and / or similar word vectors are captured to obtain a sequence containing local feature information.

[0074] In some embodiments, the word vectors in the first word vector sequence can be initially processed based on the low-level LSTM / GRU units in the recurrent neural network layer. The LSTM or GRU units can process these characters sequentially according to their character order, capturing local dependencies between characters through their internal gating mechanisms (such as forget gates, input gates, and output gates). For example, when processing "P@ssw0rd", the low-level units might capture local patterns like "ss" (consecutive identical characters) or local features like "w0" (adjacent numbers and letters). After low-level processing, preliminary feature vectors corresponding to each character position are obtained. These vectors contain information about the character itself and its local context.

[0075] In operation S420, attention weights are assigned to the first word vector sequence based on the feature vocabulary.

[0076] In operation S430, the feature vectors of the first word vector sequence are fused based on attention weights to obtain the second word vector sequence.

[0077] In some embodiments, the attention mechanism module at the upper layer can be used to perform global information integration and long-term dependency analysis on these preliminary feature vectors output from the lower layer.

[0078] Taking the attention mechanism's computation process as an example, for each feature vector output from the lower layer, a corresponding query, key, and value matrix is ​​generated. During the computation, feature vocabulary information is incorporated. If a character sequence contains words from the feature vocabulary (e.g., the company name "CompanyX" appears in the password), then when calculating the attention weights, the value vector corresponding to that character sequence is artificially assigned a higher weight. In this way, the learning of password features related to specific words can be strengthened. Finally, the upper-layer attention mechanism module performs weighted summation and other operations on all lower-layer feature vectors to obtain a vector representation that integrates global information and long-term dependencies. This vector can more comprehensively and accurately reflect the semantic features of the input password sequence; for example, it can contain important features such as the overall structure of the password and whether it contains specific words.

[0079] Figure 5 The flowchart illustrates a process of integrating and weighting the feature information of a second word vector sequence based on preset weight information according to an embodiment of the present disclosure to obtain the feature vector corresponding to the second word vector sequence.

[0080] like Figure 5 As shown, this embodiment integrates and weights the feature information of the second word vector sequence based on preset weight information to obtain the feature vector corresponding to the second word vector sequence, including operations S510 to S520.

[0081] In operation S510, the feature information in the second word vector sequence is integrated to obtain the initial feature vector.

[0082] In operation S520, the initial feature vector is weighted based on the weight information obtained from pre-training to obtain the feature vector corresponding to the second word vector sequence. The weight information is determined based on the degree of influence of the feature information on the judgment result.

[0083] In some embodiments, the feature information may include, for example, password length, character types, number of special characters, etc. These scattered features can be combined into a whole feature vector through linear transformation, and the features are weighted according to the pre-trained weights to obtain the feature vector corresponding to the second word vector sequence.

[0084] For example, during model training, each input feature dimension contributes differently to the final weak password judgment result. For features that significantly contribute to weak password judgment, the model updates the corresponding weight parameters more frequently, with larger adjustments each time. For instance, assuming password length and the number of special characters are important features in weak password judgment, the model will adjust the weights associated with these two features more frequently, with larger changes each time, thus determining the weights for each feature dimension. These trained weights are then used to weight the features during the weak password judgment stage. For example, if training results show that password length and the number of special characters are more important for weak password judgment, their corresponding weights will be relatively large. When new password data is input, the fully connected layers weight the corresponding features according to these weights, highlighting the role of important features in the final feature representation.

[0085] Figure 6 The flowchart illustrates a process for constructing fuzzy logic rules based on the contribution levels of each feature dimension according to an embodiment of the present disclosure, and determining the probability information of a password based on the fuzzy logic rules.

[0086] like Figure 6 As shown, this embodiment constructs fuzzy logic rules based on the contribution level of each feature dimension, and determines the probability information of the password according to the fuzzy logic rules, including operations S610 to S620.

[0087] In operation S610, the initial probability of the password is determined based on a preset function.

[0088] In operation of S620, fuzzy logic rules are constructed based on feature dimensions, and the initial probability is adjusted based on the fuzzy logic rules to obtain the probability information of the password.

[0089] In some embodiments, an initial weak password probability value can be calculated in a conventional manner. Taking the softmax layer as an example, the initial probability can be calculated based on the softmax function. This initial probability is obtained by the neural network learning and calculating the features of the input password. It reflects the possibility that the password is judged as a weak password without considering additional dimensions such as password length and character type diversity.

[0090] Fuzzy logic rules define how to adjust initial probabilities based on multiple dimensions of information, such as password length and character type diversity. These rules can be determined during pre-training. When constructing fuzzy logic rules, the information in each dimension can be fuzzified and divided into different fuzzy sets. Taking password length as an example, it can be divided into three fuzzy sets: "short," "medium," and "long." For instance, a password length less than 6 characters can be defined as "short," 6-10 characters as "medium," and more than 10 characters as "long."

[0091] Based on these fuzzy sets, fuzzy logic rules are constructed. These rules might include, for example, increasing the probability of a short password with a single character type, and decreasing it if the password is short, complex, or has a large number of unique characters. The initial probability is then adjusted using these fuzzy logic rules to obtain the final probability information. For instance, if the initial probability is 0.4 and the adjustment is +0.3, the final probability of a weak password is 0.4 + 0.3 = 0.7.

[0092] The embodiments of this disclosure adjust the initial probability of the password through fuzzy logic rules, which can effectively improve the accuracy of the model probability information, thereby improving the beneficial effect of weak password determination.

[0093] In this way, the probability of weak passwords in the final output is more consistent with the actual security risk assessment. When the probability exceeds a preset threshold (such as 0.6), the system determines that the password strength is insufficient and prompts the user to reset the password.

[0094] In some embodiments, operations S210 to S250 may be implemented, for example, based on a trained neural network model. The weak password determination method may further include training the neural network model.

[0095] For example, different specific terminologies can be used for different business scenarios. Taking a company system as an example, a specific terminology could be a terminology generated based on internal company information. When setting passwords for internal company accounts, some employees may use commonly used words specific to the company, business terms, or abbreviations of job titles and personal names. Traditional detection methods cannot take these company-specific terms into account, resulting in a lack of effective monitoring and prevention of weak password risks caused by these terms in the enterprise's internal network environment. Once passwords are leaked, the likelihood of security incidents such as attacks on enterprise information systems and data breaches increases significantly, seriously threatening the normal operation and data security of the enterprise.

[0096] Based on this, a target model that can be used to implement the aforementioned weak password determination method can be obtained by constructing a company feature word library and training the initial neural network model based on the feature word library and historical password data. The training process of the initial neural network model can include three parts: constructing the company feature word library, labeling historical data, and training the model.

[0097] In some embodiments, commonly used words within the company, business-related terms, job titles, employee name abbreviations, etc., can be collected. Semantic expansion and association mining techniques can be used to mine semantic associations between words in the feature word library through knowledge graph technology. For example, "R&D department" is closely related to words such as "technological innovation" and "product iteration". These expanded words are also included in the feature word library to enrich the semantic information of the word library and improve the model's ability to detect weak passwords related to company-specific words.

[0098] In some embodiments, in addition to labeling data samples containing feature vocabulary and exhibiting weak password characteristics as positive samples and strong passwords as negative samples from previously leaked password data and simulated password data, a multi-label annotation method based on risk level can also be used. Based on factors such as the difficulty of cracking the password and the potential security losses, positive samples can be further subdivided into three levels of labels: high-risk, medium-risk, and low-risk. This allows the model to learn the characteristic differences of weak passwords at different risk levels during training, improving detection accuracy and risk assessment capabilities.

[0099] In some embodiments, labeled data can be input into the original neural network model, and a hybrid loss function combining Focal Loss and Dice Loss can be used to calculate the difference between the predicted results and the true labels. Focal Loss can address the problem of imbalanced samples, giving more attention to hard-to-classify samples. Dice Loss, on the other hand, can better measure the similarity between the predicted results and the true labels. The Adaptive Moment Estimation (AdamW) optimization algorithm continuously adjusts the parameters of each layer of the model. This algorithm improves upon the Adam algorithm by implementing a weight decay strategy, making the model training process more stable, converging faster, reducing the loss value, and enabling the model to better learn weak cryptographic feature patterns, thereby improving detection accuracy.

[0100] Figure 7 A schematic block diagram of a weak password determination apparatus according to an embodiment of the present disclosure is shown.

[0101] like Figure 7 As shown, the weak password determination device 700 of this embodiment includes a conversion module 710, an acquisition module 720, an integration weighting module 730, a first determination module 740, and a second determination module 750.

[0102] The conversion module 710 is used to convert the initial password into a first word vector sequence in response to receiving the initial password input by the user. The first word vector sequence consists of multiple word vectors, each corresponding one-to-one with a password character in the initial password. The word vectors contain positional and semantic information of the password characters. In one embodiment, the conversion module 710 can be used to perform the operation S210 described above, which will not be repeated here.

[0103] The obtaining module 720 is used to capture the local dependencies between word vectors in the first word vector sequence and assign weights to the word vectors based on a preset feature lexicon to obtain a second word vector sequence, which includes multiple feature information. In one embodiment, the second obtaining module 720 can be used to perform the operation S220 described above, which will not be repeated here.

[0104] The integration and weighting module 730 is used to integrate and weight the feature information of the second word vector sequence based on the weight information obtained from pre-training, so as to obtain the feature vector corresponding to the second word vector sequence. In one embodiment, the integration and weighting module 730 can be used to perform the operation S230 described above, which will not be repeated here.

[0105] The first determining module 740 is used to construct fuzzy logic rules based on feature dimensions, and determine the probability information of the password according to the fuzzy logic rules. In one embodiment, the first determining module 740 can be used to perform the operation S240 described above, which will not be repeated here.

[0106] The second determining module 750 is used to determine that the initial password is a weak password when the probability information is lower than a preset threshold. In one embodiment, the second determining module 1050 can be used to perform the operation S250 described above, which will not be repeated here.

[0107] According to embodiments of this disclosure, any plurality of modules among the conversion module 710, the obtaining module 720, the integration weighting module 730, the first determining module 740, and the second determining module 750 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the conversion module 710, the obtaining module 720, the integration weighting module 730, the first determining module 740, and the second determining module 750 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, at least one of the conversion module 710, the acquisition module 720, the integration weighting module 730, the first determination module 740, and the second determination module 750 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.

[0108] Figure 8 A block diagram of an electronic device according to an embodiment of the present disclosure of a weak password determination method is shown schematically.

[0109] like Figure 8 As shown, an electronic device 800 according to an embodiment of this disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.

[0110] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 802 and / or RAM 803. It should be noted that the program may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.

[0111] According to embodiments of this disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the input / output (I / O) interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.

[0112] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0113] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0114] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of this disclosure, those skilled in the art can make various substitutions and modifications, all of which should be included within the protection scope of this disclosure.

Claims

1. A weak password determination method, characterized by, The method comprises: in response to receiving an initial password input by a user, converting the initial password into a first word vector sequence, the first word vector sequence being composed of a plurality of word vectors corresponding one-to-one to password characters in the initial password, the word vectors containing position information and semantic information of the password characters; capturing local dependency relationships between respective word vectors in the first word vector sequence and assigning weights to the word vectors based on a preset feature word library to obtain a second word vector sequence, the second word vector sequence including a plurality of feature information; integrating and weighting the feature information of the second word vector sequence based on pre-trained weight information to obtain a feature vector corresponding to the second word vector sequence; constructing a fuzzy logic rule based on a feature dimension and determining probability information of the password according to the fuzzy logic rule; in a case where the probability information is lower than a preset threshold, determining that the initial password is a weak password.

2. The method of claim 1, wherein, The method comprises: determining the category of each password character based on the category of the password character; encoding each password character based on the category of the password character to obtain a one-hot encoding vector corresponding to each password character; performing word embedding processing on each password character to obtain a word embedding vector corresponding to each password character, the word embedding vector including position information and semantic information of the password character; fusing the word embedding vector and the one-hot encoding vector corresponding to each password character to obtain a word vector corresponding to each password character.

3. The method of claim 2, wherein, The method comprises: determining the encoding length of each password character based on the total number of categories of password characters; encoding each password character based on the encoding length to obtain a one-hot encoding vector corresponding to each password character.

4. The method of claim 1, wherein, The method comprises: for a plurality of first word vectors in the first word vector sequence, capturing local dependency relationships between adjacent word vectors and / or similar word vectors to obtain a sequence containing local feature information; assigning attention weights to the first word vector sequence based on a feature word library; fusing feature vectors of the first word vector sequence based on the attention weights to obtain a second word vector sequence.

5. The weak password determination method of claim 1, wherein, The method comprises: integrating feature information in the second word vector sequence to obtain an initial feature vector; performing weighting processing on the initial feature vector based on pre-trained weight information to obtain a feature vector corresponding to the second word vector sequence, wherein the weight information is determined based on the influence of the feature information on a judgment result.

6. The weak password determination method of claim 1, wherein, The constructing fuzzy logic rules based on the feature dimension, determining the probability information of the password according to the fuzzy logic rules, comprises: determining the initial probability of the password based on a preset function; adjusting the initial probability according to the fuzzy logic rules constructed based on the feature dimension to obtain the probability information of the password.

7. A weak password determination apparatus characterized by comprising: The device comprises: a conversion module configured to convert the initial password into a first word vector sequence in response to receiving the initial password input by a user, the first word vector sequence being composed of a plurality of word vectors, each word vector corresponding to a password character in the initial password, the word vector containing position information and semantic information of the password character; an obtaining module configured to capture local dependency relationships between each word vector in the first word vector sequence respectively and assign weights to the word vectors based on a preset feature word library to obtain a second word vector sequence, the second word vector sequence comprising a plurality of feature information; a weighting integration module configured to integrate and weight the feature information of the second word vector sequence based on pre-trained weight information to obtain a feature vector corresponding to the second word vector sequence; a first determining module configured to construct fuzzy logic rules based on the feature dimension and determine the probability information of the password according to the fuzzy logic rules; a second determining module configured to determine the initial password as a weak password if the probability information is lower than a preset threshold.

8. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1-6.

9. A computer readable storage medium having stored thereon a computer program or instructions, characterized in that, The computer program or instructions are executed by the processor to implement the steps of the method according to any one of claims 1-6.

10. A computer program product comprising computer programs or instructions, characterized in that, The computer program or instructions are executed by the processor to implement the steps of the method according to any one of claims 1-6. The computer program or instructions are executed by the processor to implement the steps of the method according to any one of claims 1-6.