Multi-granularity cascade fusion password attribution classification method and system

Through the multi-grained cascade fusion method, multi-dimensional word segmentation and feature representation are performed on password text, and deep learning models are used for encoding and fusion, which solves the problem of information utilization and word segmentation balance of password text classification, and realizes efficient password text attribute classification.

CN119577147APending Publication Date: 2025-03-07NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411657242.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

Without any auxiliary tag information, how to efficiently utilize limited password text information, how to control the balance of word list and expression ability when expressing password text word segmentation, and how to effectively integrate multiple word segmentation methods of the same password to realize the attribute classification of password text.

Method used

A multi-grained cascade fusion password attribution classification method is proposed. Password text is divided into multi-dimensional fine-grained segmentation and feature representation through multiple word segmentation methods. The two-layer bidirectional long and short-term memory network and self-attention network are used for initialization encoding and local feature encoding. Combined with the improved byte coding method, multiple word segmentation representations are fused to generate a unified high-dimensional feature representation, and input to a linear classifier for classification.

Benefits of technology

It realizes efficient ultra-short password text classification, improves the accuracy of password text attribute classification, performs better on multiple classification indicators than commonly used text classification methods, and can quickly converge and fit characterization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577147A_ABST
    Figure CN119577147A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-granularity cascade fusion password attribution classification method and system. The method comprises the following steps: word segmentation of a password text: performing multi-granularity segmentation and feature representation on the password text based on a plurality of word segmentation methods; initialized coding: carrying out initialized coding on a password text word segmentation result based on a double-layer bidirectional long-short-term memory network; local feature coding: carrying out local feature coding based on a self-attention network and an initialized coding result to obtain local feature representations of various word segmentation representations; cascading fusion: fusing the local feature representations of the plurality of word segmentation representations into the unified feature representation; and classification: inputting the unified feature representation into a linear classifier so as to obtain a corresponding password text classification result. According to the ultra-short password text classification method, multi-dimensional fine-grained segmentation and representation are carried out on the ultra-short password text by utilizing multiple word segmentation methods, and the limited password text character features are fully utilized after the features of multiple representations are ingeniously fused, so that the purpose of efficiently classifying the ultra-short password text is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of password text classification, and in particular to a multi-granularity cascade fusion password attribution classification method and system. Background Art

[0002] In the Internet era, human daily life is gradually becoming information-based and digital. In order to protect the security of personal information, various access authentication methods are constantly being proposed. Among them, passwords are one of the most basic and common authentication methods and the first line of defense of contemporary information systems. It aims to grant users specific access rights through text matching methods. Specifically, passwords are generally composed of a certain number of uppercase and lowercase letters, special symbols and numbers. When the user enters the set password, the system determines whether to grant the user access rights based on the correctness of the password. In recent years, a large number of studies on password strength assessment, password guessing technology, and password strategy analysis have emerged. At the same time, some studies have found that different cultural backgrounds, genders and other implicit marker information have significantly different password setting strategies, that is, the characteristics of password texts are significantly associated with these implicit marker information. For a specific password guessing task, knowing some implicit marker information of the guessing object is equivalent to knowing the high-frequency password setting strategy of such objects. Therefore, accurate classification of known passwords will significantly improve the efficiency of downstream tasks (password guessing, password evaluation).

[0003] From a macroscopic perspective, the classification of the place of origin of the password text belongs to the category of text classification. Different from traditional text classification, this study is similar to the problem of ultra-short text classification, but it also has its own distinctive characteristics. Taking "alumina cemnet (cement)" and 'sjkw22' as examples, "alumina cemnet (cement)" is an ultra-short text classification example for customs goods and can be classified as building materials, and 'sjkw22' is a password text in the rockyou dataset. By comparison, it is not difficult to find that the similarity between the password text and the text of the ultra-short text classification is that the text length is super short, usually within 20 words. This ultra-short text length limits the expression of text information, and there is very little available information. At the same time, the password text is not readable, there is no direct correlation between the characters, and it cannot form any effective semantics. The information contained in the text is concentrated in the characters themselves. This requires that before processing the password text, it needs to be reasonably segmented to express effective semantics.

[0004] The existing ultra-short text classification is mainly used in scenarios such as invoice category identification in tax systems and import and export commodity classification through customs. There are not many studies on ultra-short text classification, and the research methods are mainly to make up for the missing context information of ultra-short texts through relevant auxiliary information. Yang et al. proposed an ultra-short text classification method based on collaborative filtering algorithm to solve the classification problem of ultra-short texts in specific fields. Specifically, the method first converts ultra-short texts into word frequency vectors through Chinese word segmentation and word frequency statistics. Then, a user-item matrix is ​​constructed: the relevant data in a specific field is combined, ultra-short texts are defined as users, categories as items, and a recommendation matrix is ​​constructed. Finally, the cosine similarity method is used to calculate the similarity between texts and obtain the classification results. Niu et al. proposed a commodity ultra-short text method based on deep random forest. This method adopts a classification strategy and uses an external knowledge base for assistance to directly determine the classification of commodities with clear categories in the knowledge base. For commodity names that cannot be directly extracted, the commodity names are vectorized and classified using deep random forests.

[0005] It should be pointed out that, unlike tax and commodity ultra-short texts, password texts are not regular natural language texts and are not readable. Auxiliary methods such as recommendation matrices and external knowledge bases are of no reference value for the classification of the location of password texts.

[0006] Password text is a special type of natural language without any auxiliary label information to help understand the meaning of the text. At the same time, the high degree of discreteness and typical lack of context in password text make it difficult to distinguish semantics and eliminate understanding bias, thus forming a huge gap between the underlying features of password text and high-level semantics. Summary of the invention

[0007] In view of the above difficulties, the present invention needs to solve the following problems:

[0008] 1. How to make efficient use of limited password text information without any auxiliary label information.

[0009] 2. When performing word segmentation on password text, how to control the balance between vocabulary and expression ability.

[0010] 3. How to effectively integrate multiple word segmentation methods for the same password and fuse multiple word segmentation representations into a high-dimensional unified representation to achieve the location classification of the password text.

[0011] In order to solve the above problems, the present invention proposes a multi-granularity cascade fusion password location classification method and system, starting from the ultra-short password text itself, using multiple word segmentation methods to perform multi-dimensional fine-grained segmentation and representation, and then cleverly integrating the features of multiple representations to make full use of limited password text character features, thereby achieving the purpose of efficient ultra-short password text classification. The present invention can be used for password text location classification, and the analysis results can provide decision support for password analysis and password guessing systems.

[0012] The technical solution adopted by the present invention is as follows:

[0013] A multi-granularity cascade fusion password attribution classification method, comprising:

[0014] Password text segmentation: Based on a variety of word segmentation methods, the password text is segmented and represented in multiple granularities;

[0015] Initialization coding: Initialize the coding of the password text segmentation results based on a two-layer bidirectional long short-term memory network;

[0016] Local feature encoding: Local feature encoding is performed based on the self-attention network and the initialization encoding results to obtain local feature representations of multiple word segmentation representations;

[0017] Cascade fusion: fusion of local feature representations of multiple word segmentation representations into a unified feature representation;

[0018] Classification: Input the unified feature representation into the linear classifier to obtain the corresponding password text classification result.

[0019] Furthermore, the multi-dimensional and fine-grained segmentation and feature representation of the password text based on multiple word segmentation methods includes:

[0020] Character-based password text segmentation: split the password text into independent character sequences based on characters;

[0021] Password text segmentation based on probabilistic context-free grammar: the password text is segmented into independent password segmentations based on character types, including English characters, numbers and special symbols;

[0022] Password text segmentation based on improved byte pair encoding method: for a given password text and a starting fixed-size vocabulary, word frequency is used as the subword segmentation criterion; high-frequency word pairs are calculated and added to the vocabulary, i.e., adding words; word pairs in the string are merged according to the vocabulary, i.e., merging words; adding words and merging words are iteratively performed until the vocabulary reaches a preset fixed size.

[0023] Furthermore, in the password text segmentation based on the improved byte pair encoding method, when merging words, both the word frequency and the cohesion of the merged information are considered, and the calculation method includes:

[0024]

[0025] Among them, PMI(C j , C j+1 ) is the mutual information of subwords C j , C j+1 . P( ) is the probability of a certain subword. C j is the j-th subword in the password, and C j+1 is the (j + 1)-th subword in the password. C j ||C j+1 is the new subword formed by combining the j-th subword and the (j + 1)-th subword.

[0026] Furthermore, the local feature encoding based on the self-attention network and the initialization encoding result includes:

[0027] L = MultiHead(Q, Q, Q) = Concat(head 1 , …, head n )W O

[0028]

[0029] Among them, L is the local feature representation, Q is the feature vector after initialization encoding, Q T is the transpose of the feature vector Q, d k is the dimension of the feature vector Q; W is the parameter matrix, and W O , W i Q , W i K , W i V are all hyperparameters; head i is the i-th attention head, 1 < i < n; MultiHead( ) is the multi-head attention, Concat( ) is the concatenation operation, Attention( ) is the attention mechanism, and softmax( ) is the activation function.

[0030] Furthermore, the fusion of the local feature representations of multiple word segmentations into a unified feature representation includes:

[0031] Calculate the attention between two word segmentation representations:

[0032]

[0033] Among them, C 2 is the attention between word segmentations, L 1 is the local feature representation of one word segmentation and serves as the key and value, L2 It is another local feature representation of the word segmentation representation and serves as a query;

[0034] Concatenate the inter-segmentation attention with the local feature representation to obtain the fusion information passed down:

[0035]

[0036] Among them, A 2 To integrate information, For splicing operation;

[0037] Based on the fusion information, the local feature representations of multiple word segmentation representations are fused into a unified feature representation C n middle.

[0038] A multi-granularity cascade fusion password attribution classification system, comprising:

[0039] A password text segmentation module is configured to perform multi-granular segmentation and feature representation on the password text based on multiple segmentation methods;

[0040] An initialization encoding module is configured to perform initialization encoding on the password text segmentation result based on a double-layer bidirectional long short-term memory network;

[0041] A local feature encoding module is configured to perform local feature encoding based on the self-attention network and the initialization encoding result to obtain local feature representations of multiple word segmentation representations;

[0042] A cascade fusion module configured to fuse the local feature representations of multiple word segmentation representations into a unified feature representation;

[0043] The classification module is configured to input the unified feature representation into a linear classifier to obtain a corresponding password text classification result.

[0044] Furthermore, in the password text segmentation module, the password text is segmented and represented in a multi-dimensional and fine-grained manner based on a variety of segmentation methods, including:

[0045] Character-based password text segmentation: split the password text into independent character sequences based on characters;

[0046] Password text segmentation based on probabilistic context-free grammar: the password text is segmented into independent password segmentations based on character types, including English characters, numbers and special symbols;

[0047] Password text segmentation based on an improved byte pair encoding method: For a given password text and an initial fixed-size vocabulary, the word frequency is used as the subword segmentation criterion; calculate high-frequency word pairs and add them to the vocabulary, that is, add words; merge word pairs in the string according to the vocabulary, that is, merge words; iteratively execute adding words and merging words until the vocabulary reaches the preset fixed size.

[0048] Furthermore, in the password text segmentation based on the improved byte pair encoding method, when merging words, the word frequency and the cohesion degree of the merging information are considered simultaneously. The calculation method includes:

[0049]

[0050] where PMI(C j , C j+1 ) is the mutual information of subwords C j , C j+1 , P( ) is the probability of a certain subword, C j is the j-th subword in the password, C j+1 is the (j + 1)-th subword in the password, and C j ||C j+1 is the new subword formed by merging the j-th subword and the (j + 1)-th subword.

[0051] Furthermore, in the local feature encoding module, local feature encoding is performed based on the self-attention network and the initial encoding result, including:

[0052] L = MultiHead(Q, Q, Q) = Concat(head 1 , …, head n )W O

[0053]

[0054] where L is the local feature representation, Q is the feature vector after initial encoding, Q T is the transpose of the feature vector Q, d k is the dimension of the feature vector Q; W is the parameter matrix, and W O , W i Q , W i K , W i V are all hyperparameters; head i is the i-th attention head, 1 < i < n; MultiHead( ) is the multi-head attention, Concat( ) is the concatenation operation, Attention( ) is the attention mechanism, and softmax( ) is the activation function.

[0055] Furthermore, in the cascade fusion module, the local feature representations of multiple word segmentation representations are fused into a unified feature representation, including:

[0056] Calculate the attention between two word representations:

[0057]

[0058] Among them, C 2 is the attention between word segments, L 1 is a local feature representation of word segmentation and serves as key and value, L 2 It is another local feature representation of the word segmentation representation and serves as a query;

[0059] Concatenate the inter-segmentation attention with the local feature representation to obtain the fusion information passed down:

[0060]

[0061] Among them, A 2 To integrate information, For splicing operation;

[0062] Based on the fusion information, the local feature representations of multiple word segmentation representations are fused into a unified feature representation C n middle.

[0063] The beneficial effects of the present invention are:

[0064] (1) The present invention innovatively utilizes multiple word segmentation structures to perform multi-granular feature representation on the password text to enrich the representation of the password text, which can alleviate the information limitations of the password text and make better use of the limited password text.

[0065] (2) The present invention proposes an improved BPE (byte pair encoding) word segmentation algorithm, which reduces the size of the vocabulary while ensuring the semantic information of the password text.

[0066] (3) The present invention innovatively proposes a cascade fusion scheme for multiple password segmentation representations, which fuses the multi-dimensional and multi-granular password segmentation representations into a unified high-dimensional representation, thereby greatly improving the classification accuracy of the password text attribution.

[0067] (4) Compared with the commonly used text classification methods, the present invention has lower loss values ​​per step and per round and the highest classification accuracy, which means that the present invention can converge quickly and has stronger characterization and fitting capabilities. Specifically, through verification on seven Chinese and foreign password data sets, including Tianya, 126, 163, CSDN, 17173, Rockyou and LinkedIn, the present invention finally achieved an 88.18% classification accuracy rate. Compared with the commonly used text classification methods TextCNN, BiLSTM, RCNN, DCNN and Transformer, the present invention is superior to the existing commonly used classification methods in four classification indicators, and has improved the accuracy by 2.12%, the precision by 3.19%, the recall by 0.95% and the F1 value by 1.98% respectively compared with the highest performance classification method. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 This is a flow chart of a multi-granularity cascade-fused password location classification method according to Example 1 of the present invention.

[0069] Figure 2 This is the improved BPE word segmentation algorithm logic in Example 1 of the present invention.

[0070] Figure 3 It is a loss curve diagram of each step of Example 1 of the present invention.

[0071] Figure 4 It is a loss curve diagram of each round in Example 1 of the present invention.

[0072] Figure 5 4 is a graph of the accuracy of each round of verification in Example 1 of the present invention. DETAILED DESCRIPTION

[0073] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, the specific implementation methods of the present invention are now described. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention, that is, the embodiments described are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0074] Example 1

[0075] Since password text is a special type of natural language, there is no auxiliary label information to help understand the meaning of the text. At the same time, the high degree of discreteness and typical lack of context in password text make it difficult to distinguish semantics and eliminate understanding bias, thus forming a huge gap between the underlying features of password text and high-level semantics.

[0076] Based on this, this embodiment provides a multi-granularity cascade fusion password location classification method, which can be used for password text location classification, and the analysis results can provide decision support for password analysis and password guessing systems. Figure 1 As shown, the password attribution classification method includes:

[0077] Password text segmentation: Based on a variety of word segmentation methods, the password text is segmented and represented in multiple granularities;

[0078] Initialization coding: Initialize the coding of the password text segmentation results based on a two-layer bidirectional long short-term memory network;

[0079] Local feature encoding: Local feature encoding is performed based on the self-attention network and the initialization encoding results to obtain local feature representations of multiple word segmentation representations;

[0080] Cascade fusion: fusion of local feature representations of multiple word segmentation representations into a unified feature representation;

[0081] Classification: Input the unified feature representation into the linear classifier to obtain the corresponding password text classification result.

[0082] Preferably, when the password text is segmented, in view of the lack of context and high discreteness of the password text information, this embodiment uses the following three segmentation methods to more comprehensively represent the effective information of the password:

[0083] Character-based password text segmentation: The password text is segmented into independent character sequences based on characters, for example, yuwei1314520=yuwei1314520.

[0084] Password text segmentation based on probabilistic context-free grammar (PCFG): The password text is segmented into independent password segments based on character types, such as yuwei1314520=yuwei 1314520. The character types include English characters, numbers and special symbols.

[0085] Password text segmentation based on improved byte pair encoding (BPE): Figure 2 As shown, for a given password text and a vocabulary of a fixed initial size, word frequency is used as a subword segmentation standard; high-frequency word pairs are calculated and added to the vocabulary, i.e., adding words; word pairs in the string are merged according to the vocabulary, i.e., merging words; adding words and merging words are iteratively performed until the vocabulary reaches a preset fixed size. More preferably, when merging words, this embodiment not only considers word frequency but also considers the cohesion of the merged information. The specific calculation method may be:

[0086]

[0087] Among them, PMI (C j, C j+1 ) is the subword C j , C j+1 is the mutual information of C, P( ) is the probability of a certain subword, C j is the j-th subword in the password, C j+1 is the (j + 1)-th subword in the password, C j ||C j+1 is the new subword formed by combining the j-th subword and the (j + 1)-th subword.

[0088] Preferably, when initializing the encoding, a 256-dimensional 2-layer bidirectional long short-term memory network can be used to initialize the encoding of the tokenization results of multiple password texts.

[0089] Preferably, when performing local feature encoding, a 4-head self-attention network and the initialization encoding result can be used for local feature encoding. The specific calculation method can be:

[0090] L = MultiHead(Q, Q, Q) = Concat(head 1 , …, head n )W O

[0091]

[0092] where L is the local feature representation, Q is the feature vector after initialization encoding, Q T is the transpose of the feature vector Q, d k is the dimension of the feature vector Q; W is the parameter matrix, W O , W i Q , W i K , W i V are all hyperparameters; head i is the i-th attention head, 1 < i < n; MultiHead( ) is the multi-head attention, Concat( ) is the concatenation operation, Attention( ) is the attention mechanism, and softmax( ) is the activation function.

[0093] Preferably, during cascade fusion, the local feature representations of multiple tokenizations are fused into a unified feature representation. Taking the cascade fusion of the character tokenization local representation L 1 and the improved BPE tokenization local representation L 2 as an example. Specifically, using L 1 as the key and value, and L 2 as the query for cross-attention calculation, the specific calculation method can be:

[0094]

[0095] Among them, C 2 for inter-participle attention;

[0096] Concatenate the inter-segmentation attention with the local feature representation to obtain the fusion information passed down:

[0097]

[0098] Among them, A 2 To integrate information, For splicing operation;

[0099] Based on the fusion information, the local feature representations of multiple word segmentation representations are fused into a unified feature representation C n middle.

[0100] Specifically, by verifying on seven Chinese and foreign password datasets, including Tianya, 126, 163, CSDN, 17173, Rockyou and LinkedIn, the method of this embodiment finally achieved an 88.18% classification accuracy rate. r In terms of the four classification indicators, the method of this embodiment is superior to the existing commonly used classification methods in all aspects, and improves the accuracy by 2.12%, the precision by 3.19%, the recall by 0.95% and the F1 value by 1.98% respectively compared with the highest performance classification method. The basic information of the dataset, the cleaned dataset and the test results are shown in Tables 1 to 3. For specific test data, see Figure 3 to Figure 5 .

[0101] Table 1-Statistical table of basic information of data set

[0102]

[0103]

[0104] Table 2-Dataset division table

[0105] Training set Validation set Test Set total China 47770601 7961766 7961766 63694133 USA 46833072 7805511 7805511 62444094 total 94603673 15767277 15767277 126138227 Proportion 80% 10% 10% 100%

[0106] Table 3 - Test results

[0107]

[0108] It can be seen that the method of this embodiment has lower loss values ​​per step and per round and the highest classification accuracy than the commonly used text classification methods, which means that the method of this embodiment can converge quickly and has stronger representation and fitting capabilities.

[0109] To sum up, the method of this embodiment starts from the ultra-short password text itself, uses multiple word segmentation methods to perform multi-dimensional fine-grained segmentation and representation, and then cleverly integrates the features of multiple representations to make full use of the limited password text character features, thereby achieving efficient ultra-short password text classification.

[0110] Example 2

[0111] This embodiment provides a multi-granularity cascade fusion password attribution classification system, including the following modules:

[0112] A password text segmentation module is configured to perform multi-granular segmentation and feature representation on the password text based on multiple segmentation methods;

[0113] An initialization encoding module is configured to perform initialization encoding on the password text segmentation result based on a double-layer bidirectional long short-term memory network;

[0114] A local feature encoding module is configured to perform local feature encoding based on the self-attention network and the initialization encoding result to obtain local feature representations of multiple word segmentation representations;

[0115] A cascade fusion module configured to fuse the local feature representations of multiple word segmentation representations into a unified feature representation;

[0116] The classification module is configured to input the unified feature representation into a linear classifier to obtain a corresponding password text classification result.

[0117] Preferably, in the password text segmentation module, the password text is segmented and represented in a multi-dimensional and fine-grained manner based on a variety of segmentation methods, including:

[0118] Character-based password text segmentation: split the password text into independent character sequences based on characters;

[0119] Password text segmentation based on probabilistic context-free grammar: The password text is segmented into independent password tokens based on character types, including English characters, numbers, and special symbols;

[0120] Password text segmentation based on improved byte pair encoding method: for a given password text and a starting fixed-size vocabulary, word frequency is used as the subword segmentation criterion; high-frequency word pairs are calculated and added to the vocabulary, i.e., adding words; word pairs in the string are merged according to the vocabulary, i.e., merging words; adding words and merging words are iteratively performed until the vocabulary reaches a preset fixed size.

[0121] Preferably, in the password text segmentation based on the improved byte pair encoding method, when merging words, both the word frequency and the cohesion of the merged information are considered, and the calculation method includes:

[0122]

[0123] Among them, PMI(C j , C j+1 ) is the mutual information of subwords C j , C j+1 . P( ) is the probability of a certain subword. C j is the j-th subword in the password, and C j+1 is the (j + 1)-th subword in the password. C j ||C j+1 is the new subword formed by combining the j-th subword and the (j + 1)-th subword.

[0124] Preferably, in the local feature encoding module, local feature encoding is performed based on the self-attention network and the initialized encoding result, including:

[0125] L = MultiHead(Q, Q, Q) = Concat(head 1 , …, head n )W O

[0126]

[0127] Among them, L is the local feature representation, Q is the feature vector after initialized encoding, Q T is the transpose of the feature vector Q, d k is the dimension of the feature vector Q; W is the parameter matrix, and W O , W i Q , W i K , W i V are all hyperparameters; head i is the i-th attention head, 1 < i < n; MultiHead( ) is the multi-head attention, Concat( ) is the concatenation operation, Attention( ) is the attention mechanism, and softmax( ) is the activation function.

[0128] Preferably, in the cascade fusion module, the local feature representations of multiple word segmentations are fused into a unified feature representation, including:

[0129] Calculate the attention between two word segmentation representations:

[0130]

[0131] Among them, C 2 is the attention between word segmentations, L 1 is the local feature representation of a word segmentation and serves as the key and value, and L 2It is another local feature representation of the word segmentation representation and serves as a query;

[0132] Concatenate the inter-segmentation attention with the local feature representation to obtain the fusion information passed down:

[0133]

[0134] Among them, A 2 To integrate information, For splicing operation;

[0135] Based on the fusion information, the local feature representations of multiple word segmentation representations are fused into a unified feature representation C n middle.

[0136] Example 3

[0137] This embodiment is based on embodiment 1:

[0138] This embodiment provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a multi-granularity cascade fusion password attribution classification method of embodiment 1 is implemented. The computer program may be in source code form, object code form, executable file, or some intermediate form.

[0139] Example 4

[0140] This embodiment is based on embodiment 1:

[0141] This embodiment provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements a multi-granularity cascade-fused password attribution classification method of embodiment 1. The computer program may be in source code form, object code form, executable file, or some intermediate form, etc. The storage medium includes: any entity or device capable of carrying computer program code, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the storage medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the storage medium does not include electric carrier signals and telecommunication signals.

[0142] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

Claims

1. A multi-granularity cascade fusion password attribution classification method, characterized in that: include: Password text segmentation: Based on a variety of word segmentation methods, the password text is segmented and represented in multiple granularities; Initialization coding: Initialize the coding of the password text segmentation results based on a two-layer bidirectional long short-term memory network; Local feature encoding: Local feature encoding is performed based on the self-attention network and the initialization encoding results to obtain local feature representations of multiple word segmentation representations; Cascade fusion: fusion of local feature representations of multiple word segmentation representations into a unified feature representation; Classification: Input the unified feature representation into the linear classifier to obtain the corresponding password text classification result.

2. According to the multi-granularity cascade fusion password attribution classification method of claim 1, it is characterized by: The multi-dimensional and fine-grained segmentation and feature representation of the password text based on multiple word segmentation methods include: Character-based password text segmentation: split the password text into independent character sequences based on characters; Password text segmentation based on probabilistic context-free grammar: the password text is segmented into independent password segmentations based on character types, including English characters, numbers and special symbols; Password text segmentation based on improved byte pair encoding method: for a given password text and a starting fixed-size vocabulary, word frequency is used as the subword segmentation criterion; high-frequency word pairs are calculated and added to the vocabulary, i.e., adding words; word pairs in the string are merged according to the vocabulary, i.e., merging words; adding words and merging words are iteratively performed until the vocabulary reaches a preset fixed size.

3. The multi-granularity cascade fusion password attribution classification method according to claim 2 is characterized in that: In the password text segmentation based on the improved byte pair encoding method, when merging words, both the word frequency and the cohesion of the merged information are considered, and the calculation method includes: Among them, PMI (C j ,C j+1 ) is the subword C j ,C j+1 The mutual information of P() is the probability of a subword, C j is the jth subword in the password, C j+1 is the j+1th subword in the password, C j ||C j+1 The new subword is the combination of the j-th subword and the j+1-th subword.

4. The multi-granularity cascade fusion password attribution classification method according to claim 1 is characterized in that: The local feature encoding based on the self-attention network and the initialization encoding result includes: L=MultiHead(Q,Q,Q)=Concat(head1,…,head n )W O Among them, L is the local feature representation, Q is the feature vector after initialization encoding, and Q T is the transpose of the feature vector Q, and d k is the dimension of the feature vector Q; W is the parameter matrix, and W O and are both hyperparameters; head i is the i-th attention head, 1 < i < n; MultiHead() is the multi-head attention, Concat() is the concatenation operation, Attention() is the attention mechanism, and softmax() is the activation function.

5. The multi-granularity cascade fusion password attribution classification method according to claim 4 is characterized in that: The method of fusing the local feature representations of multiple word segmentation representations into a unified feature representation includes: Calculate the attention between two word representations: Among them, C2 is the attention between word segments, L1 is the local feature representation of one word segmentation and serves as the key and value, and L2 is the local feature representation of another word segmentation and serves as the query; Concatenate the inter-segmentation attention with the local feature representation to obtain the fusion information passed down: Among them, A2 is the fusion information, For splicing operation; Based on the fusion information, the local feature representations of multiple word segmentation representations are fused into a unified feature representation C n middle.

6. A multi-granularity cascade fusion password attribution classification system, characterized in that: include: A password text segmentation module is configured to perform multi-granular segmentation and feature representation on the password text based on multiple segmentation methods; An initialization encoding module is configured to perform initialization encoding on the password text segmentation result based on a double-layer bidirectional long short-term memory network; A local feature encoding module is configured to perform local feature encoding based on the self-attention network and the initialization encoding result to obtain local feature representations of multiple word segmentation representations; A cascade fusion module configured to fuse the local feature representations of multiple word segmentation representations into a unified feature representation; The classification module is configured to input the unified feature representation into a linear classifier to obtain a corresponding password text classification result.

7. A multi-granularity cascade fusion password attribution classification system according to claim 6, characterized in that: In the password text segmentation module, the password text is segmented and represented in a multi-dimensional and fine-grained manner based on a variety of segmentation methods, including: Character-based password text segmentation: split the password text into independent character sequences based on characters; Password text segmentation based on probabilistic context-free grammar: the password text is segmented into independent password segmentations based on character types, including English characters, numbers and special symbols; Password text segmentation based on improved byte pair encoding method: for a given password text and a starting fixed-size vocabulary, word frequency is used as the subword segmentation criterion; high-frequency word pairs are calculated and added to the vocabulary, i.e., adding words; word pairs in the string are merged according to the vocabulary, i.e., merging words; adding words and merging words are iteratively performed until the vocabulary reaches a preset fixed size.

8. The multi-granularity cascade fusion password attribution classification system according to claim 7, characterized in that: In the password text segmentation based on the improved byte pair encoding method, when merging words, both the word frequency and the cohesion of the merged information are considered, and the calculation method includes: Among them, PMI (C j ,C j+1 ) is the subword C j ,C j+1 The mutual information of P() is the probability of a subword, C j is the jth subword in the password, C j+1 is the j+1th subword in the password, C j ||C j+1 The new subword is the combination of the j-th subword and the j+1-th subword.

9. The multi-granularity cascade fusion password attribution classification system according to claim 6, characterized in that: In the local feature encoding module, local feature encoding is performed based on the self-attention network and the initialization encoding result, including: L=MultiHead(Q,Q,Q)=Concat(head1,…,head n )W O Among them, L is the local feature representation, Q is the feature vector after initialization encoding, Q T is the transpose of the feature vector Q, d k is the dimension of the feature vector Q; W is the parameter matrix, W O and are both hyperparameters; head i is the i-th attention head, 1 < i < n; MultiHead() is the multi-head attention, Concat() is the concatenation operation, Attention() is the attention mechanism, and softmax() is the activation function.

10. A multi-granularity cascade fusion password attribution classification system according to claim 9, characterized in that: In the cascade fusion module, the local feature representations of multiple word segmentation representations are fused into a unified feature representation, including: Calculate the attention between two word representations: Among them, C2 is the attention between word segments, L1 is the local feature representation of one word segmentation and serves as the key and value, and L2 is the local feature representation of another word segmentation and serves as the query; Concatenate the inter-segmentation attention with the local feature representation to obtain the fusion information passed down: Among them, A2 is the fusion information, For splicing operation; Based on the fusion information, the local feature representations of multiple word segmentation representations are fused into a unified feature representation C n middle.