Password similarity detection method, device, equipment and storage medium
By constructing a verification character sequence and a detection window, the problem of high computational complexity in password similarity detection is solved, enabling real-time detection in embedded devices and high-concurrency scenarios, reducing computational complexity and improving detection efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING ANNING INNOVATION NETWORK TECHNOLOGY CO LTD
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-02
AI Technical Summary
Existing password similarity detection methods have high computational complexity and cannot meet real-time requirements, especially in embedded devices and high-concurrency authentication scenarios where response latency is significant.
Construct at least two verification character sequences. The character sequences obtained by the same preset low-discreteness algorithm are selected. The same position points that meet the set constraints are selected. The detection window is defined to extract the character sequences and perform similarity verification, thereby reducing computational complexity and improving detection efficiency.
By using lightweight verification of key location points and detection windows in the localized coverage sequence, computational overhead is reduced, ensuring the accuracy of detection results and adapting to the real-time requirements of embedded and high-concurrency scenarios.
Smart Images

Figure CN122133127A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security technology, and in particular to a method, apparatus, device and storage medium for detecting cryptographic similarity. Background Technology
[0002] In the field of information security, password similarity detection is a key technology for preventing social engineering credential stuffing attacks based on fine-tuning of the original password and ensuring the security of user accounts. It is widely used in scenarios such as password reset verification, identity authentication risk interception, and abnormal login behavior identification.
[0003] Currently, most mainstream password storage mechanisms use hash algorithms to encrypt plaintext passwords. This process only retains the hash value, not the plaintext. Therefore, password similarity detection needs to be performed based on the hash value, not the original password. Correspondingly, password similarity detection methods can use full hash value comparison, calculating the edit distance and Hamming distance of the hashes for precise similarity determination. However, such methods have high computational complexity and low detection efficiency. In scenarios with stringent real-time requirements, such as embedded devices and high-concurrency authentication, the response latency is significant, failing to meet real-time requirements. Summary of the Invention
[0004] In view of this, this application provides a method, apparatus, device and coarse-grained medium for detecting cryptographic similarity, the main purpose of which is to solve the problems of high computational complexity, low detection efficiency and inability to meet real-time requirements of existing technologies that use full comparison of hash values.
[0005] According to the first aspect of this application, a method for detecting password similarity is provided, comprising: Construct at least two check character sequences, wherein the at least two check character sequences include at least two character sequences obtained by the same preset low-discrete algorithm for each of the passwords to be detected; In the at least two check character sequences, at least one identical position point that satisfies the set constraint conditions is selected. The identical position point is a position point with the same position order selected by the at least two check character sequences using the same position order measurement method. A detection window is defined based on the same location point, and a character sequence is extracted from the at least two verification character sequences through the detection window to obtain at least two window sequences; The similarity of at least two verification character sequences is checked based on the at least two window sequences to obtain the password similarity detection result.
[0006] Furthermore, before selecting at least one identical position point satisfying the set constraint conditions from the at least two verification character sequences, the method further includes: Pre-set quantity constraints and / or distribution constraints, wherein the quantity constraints are used to constrain the range of the number of points at the same location, and the distribution constraints are used to constrain the range of the location of points at the same location. Accordingly, in the at least two verification character sequences, the same position points that satisfy the quantity constraint and / or the distribution constraint are selected respectively.
[0007] Furthermore, the pre-set quantity constraints and / or distribution constraints include: The number of points at the same position is selected within a predetermined range using the lengths of the at least two check character sequences; and / or The range of easily variable characters in the at least two verification character sequences is used as the selection range for the same position, and a distribution constraint is preset.
[0008] Further, the step of defining a detection window based on the same position point, and extracting character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences, including... The start and end positions are determined based on the same position points, and the end position is calculated based on the set window length and the start position. A detection window is defined based on the start point and the end point, and a character sequence is extracted from the at least two check character sequences through the detection window to obtain at least two window sequences.
[0009] Furthermore, after determining the start and end points of the detection window based on the same location points, the method further includes: When the position of the end position point is greater than the length of the check character sequence, the check character sequence is treated as a circular structure, and the end position point is used to perform a modulo operation on the length of the check character sequence to obtain the actual end position point. The position of the actual position point is less than the position of the start position point. Accordingly, a detection window is defined based on the starting position point and the actual ending position point, so as to extract character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences.
[0010] Further, the step of defining a detection window based on the starting position point and the actual ending position point, and extracting character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences, includes: Based on the starting position point, the position point from the starting position point to the end of the verification character sequence is defined as the first detection window, so as to extract character sequences from the at least two verification character sequences through the first detection window to obtain at least two first window sequences; Based on the actual end position point, the position point from the beginning of the verification character sequence to the actual end position point is defined as the second detection window, so as to extract character sequences from the at least two verification character sequences through the second detection window to obtain at least two second window sequences; The first window sequence is concatenated with the second window sequence to obtain at least two window sequences.
[0011] Further, the step of performing similarity checks on at least two verification character sequences based on the at least two window sequences to obtain password similarity detection results includes: Based on the at least two window sequences, perform a difference comparison on the same detection windows in at least two check character sequences to obtain the difference comparison results of the same detection windows; The number of matching windows is determined based on the difference comparison results of the same detection windows; If the number of matching windows is greater than or equal to the first set number, then at least two passwords to be detected are determined to be similar; otherwise, at least two passwords to be detected are determined to be dissimilar.
[0012] Further, the step of performing difference comparison on the same detection windows in at least two check character sequences based on the at least two window sequences to obtain the difference comparison results of the same detection windows includes: Based on the standard numeric code corresponding to each character in the at least two window sequences, perform a traversal XOR operation on the characters in the same detection window in the at least two check character sequences to obtain the XOR result of the characters in the same detection window; The XOR results of the characters in the same detection window are concatenated and combined to obtain the XOR result of the sequence of the same detection window. The XOR result of the sequence includes the difference markers of the corresponding binary bits of the same detection window. The difference comparison result of the same detection window is determined based on the difference markers on the corresponding binary bits of the same detection window; Accordingly, if the number of difference markers on the corresponding binary bits of the same detection window is greater than the second set number, the difference comparison result of the same detection window is determined to be a mismatched window; otherwise, the difference comparison result of the same detection window is determined to be a matched window.
[0013] Further, the step of performing an XOR operation on the characters within the same detection window in the at least two verification character sequences based on the standard numeric code corresponding to each character in the at least two window sequences to obtain the XOR result of the characters in the same detection window includes: Traverse the characters at the same position in the at least two window sequences to obtain the standard numeric codes corresponding to the characters at the same position within the same detection window; Perform consecutive XOR operations on the standard numeric codes corresponding to each character at the same position within the same detection window to obtain the XOR result of the characters within the same detection window.
[0014] According to a second aspect of this application, a password similarity detection device is provided, comprising: A construction unit is used to construct at least two check character sequences, wherein the at least two check character sequences include character sequences obtained by calculating the same preset low-discreteness algorithm for at least two passwords to be detected; The selection unit is used to select at least one identical position point that satisfies the set constraint conditions in the at least two check character sequences, wherein the identical position point is a position point with the same position order selected by the at least two check character sequences using the same position order measurement method. An extraction unit is configured to define a detection window based on the same location point, and extract character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences; The verification unit is used to perform similarity verification on at least two verification character sequences based on the at least two window sequences to obtain password similarity detection results.
[0015] Furthermore, the device also includes: The setting unit is used to pre-set quantity constraints and / or distribution constraints before selecting at least one identical position point that satisfies the set constraint conditions from the at least two verification character sequences. The quantity constraints are used to constrain the selection range of the number of identical position points, and the distribution constraints are used to constrain the selection range of the positions of identical position points. Accordingly, the selection unit is specifically used to select the same position points that satisfy the quantity constraint and / or the distribution constraint in the at least two verification character sequences.
[0016] Furthermore, the setting unit is specifically used for: The number of points at the same position is selected within a predetermined range using the lengths of the at least two check character sequences; and / or The range of easily variable characters in the at least two verification character sequences is used as the selection range for the same position, and a distribution constraint is preset.
[0017] Furthermore, the extraction unit is specifically used for: The start and end positions are determined based on the same position points, and the end position is calculated based on the set window length and the start position. A detection window is defined based on the start point and the end point, and a character sequence is extracted from the at least two check character sequences through the detection window to obtain at least two window sequences.
[0018] Furthermore, the device also includes: The calculation unit is configured to, after determining the start and end positions of the detection window based on the same position points, when the position of the end position point is greater than the length of the verification character sequence, treat the verification character sequence as a circular structure, and perform a modulo operation on the length of the verification character sequence using the end position point to obtain the actual end position point, wherein the position of the actual end position point is less than the position of the start position point; Accordingly, the extraction unit is specifically used to define a detection window based on the starting position point and the actual ending position point, so as to extract character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences.
[0019] Furthermore, the extraction unit is specifically used for: Based on the starting position point, the position point from the starting position point to the end of the verification character sequence is defined as the first detection window, so as to extract character sequences from the at least two verification character sequences through the first detection window to obtain at least two first window sequences; Based on the actual end position point, the position point from the beginning of the verification character sequence to the actual end position point is defined as the second detection window, so as to extract character sequences from the at least two verification character sequences through the second detection window to obtain at least two second window sequences; The first window sequence is concatenated with the second window sequence to obtain at least two window sequences.
[0020] Furthermore, the verification unit includes: The calculation module is used to perform difference comparison on the same detection windows in at least two verification character sequences according to the at least two window sequences, so as to obtain the difference comparison result of the same detection windows; The first determining module is used to determine the number of matching windows based on the difference comparison results of the same detection windows; The second determining module is used to determine that at least two passwords to be detected are similar if the number of matching windows is greater than or equal to a first preset number; otherwise, it determines that at least two passwords to be detected are not similar.
[0021] Furthermore, the computing module is specifically used for: Based on the standard numeric code corresponding to each character in the at least two window sequences, perform a traversal XOR operation on the characters in the same detection window in the at least two check character sequences to obtain the XOR result of the characters in the same detection window; The XOR results of the characters in the same detection window are concatenated and combined to obtain the XOR result of the sequence of the same detection window. The XOR result of the sequence includes the difference markers of the corresponding binary bits of the same detection window. The difference comparison result of the same detection window is determined based on the difference markers on the corresponding binary bits of the same detection window; Accordingly, the first determining module is specifically used to determine the difference comparison result of the same detection window as a mismatched window if the number of difference markers on the corresponding binary bits of the same detection window is greater than the second set number; otherwise, it determines the difference comparison result of the same detection window as a matched window.
[0022] Furthermore, the computing module is specifically used for: Traverse the characters at the same position in the at least two window sequences and obtain the standard numeric codes corresponding to the characters at the same position. Perform an XOR operation on the standard numeric codes corresponding to each character at the same position within the same detection window to obtain the XOR result of the characters within the same detection window.
[0023] According to a third aspect of this application, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the password similarity detection method described in the first aspect.
[0024] According to a fourth aspect of this application, a readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the password similarity detection method described in the first aspect above.
[0025] By employing the above technical solution, this application provides a password similarity detection method, apparatus, device, and storage medium. Compared with the current method of using full hash value comparison to achieve password similarity detection, this application constructs at least two verification character sequences, each consisting of character sequences obtained by calculating the same preset low-discreteness algorithm for at least two passwords to be detected. At least one identical position point satisfying set constraints is selected in each of the at least two verification character sequences. The identical position point is a position point with the same positional order selected using the same positional measurement method in the at least two verification character sequences. A detection window is defined based on the identical position point to extract character sequences from the at least two verification character sequences, resulting in at least two window sequences. Similarity verification is performed on the at least two verification character sequences based on the at least two window sequences to obtain the password similarity detection result. The entire process selects at least one identical position point in the verified character sequence as the key position of the local coverage sequence, using fewer position points to cover more key scenes to reflect the non-uniform distribution and spacing characteristics of real attack data; then, based on the identical position points, a detection window is defined to cyclically cover the verified character sequence, and lightweight verification is performed using the detection window as a unit, which reduces the computational overhead of each window, avoids missing key information in local windows, ensures the accuracy of the detection results, and greatly reduces computational complexity and improves detection efficiency.
[0026] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0027] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart illustrating a password similarity detection method in one embodiment of this application; Figure 2 This is a flowchart illustrating a password similarity detection method in another embodiment of this application; Figure 3 yes Figure 1 A flowchart illustrating a specific implementation method for step 103; Figure 4 This is a flowchart illustrating a password similarity detection method in another embodiment of this application; Figure 5 yes Figure 1 A flowchart illustrating a specific implementation method for step 104; Figure 6 This is a schematic diagram of the structure of a password similarity detection device in one embodiment of this application; Figure 7 This is a schematic diagram of the device structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0028] The invention will now be discussed with reference to several exemplary embodiments. It should be understood that these embodiments are described merely to enable those skilled in the art to better understand and thus implement the invention, and are not intended to imply any limitation on the scope of the invention.
[0029] As used herein, the term "comprising" and its variations are to be interpreted as open-ended terms meaning "including but not limited to". The term "based on" is to be interpreted as "at least partially based on". The terms "one embodiment" and "an embodiment" are to be interpreted as "at least one embodiment". The term "another embodiment" is to be interpreted as "at least one other embodiment".
[0030] Currently, mainstream password storage mechanisms all use hash algorithms to encrypt plaintext passwords. This process only retains the hash value, not the plaintext. Therefore, password similarity detection needs to be performed based on the hash value, not the original password. Correspondingly, password similarity detection methods mainly revolve around full comparison of hash values or feature extraction. One type is to determine precise similarity by calculating hash edit distance, Hamming distance, etc., but this method has high computational complexity and significant response latency in scenarios with stringent real-time requirements, such as embedded devices and high-concurrency authentication, failing to meet real-time requirements. Another type uses a sliding window or fixed segmentation method to split the hash value and compares the cryptographic hash values of each segment. Although this method reduces complexity to some extent, it still suffers from redundant calculations due to continuous window sliding and the inability of fixed segments to adapt to local feature changes in hash values, making it difficult to balance the requirements of detection efficiency and real-time performance.
[0031] To address this issue, this embodiment provides a password similarity detection method, such as... Figure 1 As shown, it includes the following steps: 101. Construct at least two check character sequences.
[0032] The verification character sequence comprises at least two character sequences obtained by calculating the same preset low-discreteness algorithm for each of the at least two passwords to be tested. The at least two passwords to be tested are the at least two passwords that need to be verified, including at least one input password to be verified and a stored reference password. In actual verification, to avoid the risk of plaintext leakage, the passwords are not directly used in the calculation; instead, they are first converted into verification character sequences, and then the verification character sequences are tested.
[0033] In this embodiment, the preset low-dispersion algorithm refers to an algorithm with a small avalanche effect, so that similar inputs will produce corresponding outputs, thus achieving the purpose of password comparison. This includes, but is not limited to, the CRC32 algorithm, Adler-32 algorithm, and SimHash algorithm (Locality Sensitive Hashing). Correspondingly, the reference password calculated using the preset low-dispersion algorithm yields a reference value, which can be described as a reference check character sequence. At least one input password to be verified, calculated using the preset low-dispersion algorithm, yields at least one target value, which can be described as at least one target check character sequence. Taking a hash algorithm as an example, the reference value obtained by calculating the reference password using a specified hash algorithm is a hexadecimal string or byte stream with a fixed length L, i.e., L = 64 characters / 32 bytes. It should be noted that if the input password to be verified is as expected, then the reference value and target value calculated using the same hash algorithm should be completely consistent.
[0034] Understandably, a pre-defined low-dispersion algorithm can convert passwords of any length into character sequences of a fixed length. Different algorithms have slightly different conversion rules, and only by using the same pre-defined low-dispersion algorithm can the character sequences obtained from different passwords satisfy the verification conditions. Therefore, at least two passwords to be tested need to be calculated using the same pre-defined low-dispersion algorithm to eliminate the interference of algorithm differences on the verification results.
[0035] 102. Select at least one identical position point that satisfies the set constraint conditions from the at least two verification character sequences.
[0036] In this embodiment, the same position point refers to a position point with the same positional order selected by using the same positional counting method for at least two check character sequences. This same positional counting method can be counting along the check character sequence from left to right with the first position being 1, or counting along the check character sequence from right to left with the first position being 1. For example, if the at least two check character sequences include sequence A and sequence B, the position point with position 5 in sequence A and sequence B are selected as the same position point.
[0037] Understandably, to ensure the selection of valid points at the same location, constraints can be set according to the scenario. These constraints can include, but are not limited to, at least one of positional range constraints, character feature constraints, and quantity constraints. Specific constraint settings should be combined with pre-defined low-discreteness algorithm characteristics (such as output length, character set), sequence features (such as length, difference patterns), and verification scenarios (such as anti-offset, anti-tampering) to avoid aimless generalization and filtering.
[0038] Positional range constraints can filter positions within a specific interval of a sequence by limiting the numerical range of positional points at the same location, avoiding indiscriminate processing of the entire sequence and reducing computational overhead. Specific positional range constraints can be fixed interval constraints, specifying a fixed interval within the character sequence to be verified, such as selecting positions within the range of position 0-10. They can also be proportional interval constraints, defining a range based on a proportion of the total length of the character sequence being verified, such as selecting positions within the range of 0-30%. Furthermore, they can be interval sampling constraints, selecting positions at fixed intervals, such as selecting a position every 5 positions. Character feature constraints can filter positions with specific attributes by limiting the character type or features at the same location, focusing on characters meaningful for verification. Specific character feature constraints can be character type constraints, which limit the character type of a fixed position point to a certain type. For example, filtering positions where the same position point is the digit 0-9 and excluding those positions. Specific character feature constraints can also be character frequency constraints, which filter positions where the same position point is a specific sensitive character. For example, filtering positions where the same position point is the digit A or F. Quantity constraints limit the number of identical positions that can be selected. Generally, the number of identical positions is less than half the length of the validated character sequence. For example, if the validated character sequence length is 64, then the number of identical positions is 1-31.
[0039] 103. Define a detection window based on the same position point, and extract character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences.
[0040] In this embodiment, defining the detection window based on the same position point is equivalent to using the same position point as an anchor point to achieve the alignment and truncation of at least two check character sequences. Specifically, the detection window can be defined based on the set window length information. One definition method is to use the same position point as the starting point and define the detection window based on the set window length. In this case, the window range = [same position point, same position point + window length - 1]. For example, if the same position point is position 8 and the window length is 5, the window range is position 8-12. Another definition method is to use the same position point as the midpoint and define the detection window based on the set window half-length. In this case, the window range = [same position point - Y, same position point + Y], where Y is the window half-length. For example, if the same position point is position 10 and the window half-length is 2, the window range is position 8-12. To ensure that the window range effectively exists in the check character sequence, the maximum position of the window is usually less than or equal to the length of the check character sequence.
[0041] Specifically, in the process of extracting character sequences from at least two check character sequences using a detection window, for each check character sequence, all characters within the detection window are extracted and reassembled into a character sequence in their original positions, thus obtaining the window sequence. It can be understood that if there are N check character sequences, then N window sequences are extracted, and the character positions of these window sequences correspond.
[0042] 104. Perform similarity checks on at least two verification character sequences based on the at least two window sequences to obtain password similarity detection results.
[0043] In this embodiment, the process of performing similarity verification on at least two verification character sequences based on at least two window sequences is a process of converting password similarity into a quantifiable verification of window sequence differences. This mainly involves comparing the differences between window sequences, including character matching degree and sequence matching degree, to indirectly determine the similarity of at least two verification character sequences, and finally obtain the password similarity matching result.
[0044] Since at least two window sequences are character sequences obtained by truncating characters at the same positions in at least two check character sequences, the similarity of the at least two check character sequences can be measured by quantifying the differences between the window sequences, thus obtaining a similarity measurement result. One similarity verification method is to use character-by-character matching to calculate the matching rate of characters at the same positions in the at least two window sequences. This matching rate is the ratio of the number of identical characters to the window length. A higher matching rate indicates a higher similarity between the at least two window sequences. Another similarity verification method is to use XOR operations to perform bitwise XOR on corresponding characters in the at least two window sequences and count the number of identical characters in the XOR result. A higher proportion of identical characters indicates a higher similarity between the at least two window sequences. Yet another similarity verification method is to calculate the feature values of the at least two window sequences separately and measure the difference through the difference in these feature values. A smaller difference indicates a higher similarity between the at least two window sequences.
[0045] It should be noted that if multiple window sequences exist within the verified character sequence, the similarity measurement results of all window sequences need to be aggregated to avoid random errors from a single window sequence. Specifically, the average matching rate of multiple window sequences can be used as the password similarity detection result. Alternatively, the similarity of window sequences can be defined based on the matching rate of each window sequence, and the password similarity detection result can be determined based on whether the number of similar window sequences exceeds a threshold.
[0046] The password similarity detection method provided in this application, compared with the current method of using full hash value comparison to achieve password similarity detection, constructs at least two verification character sequences, which include character sequences obtained by calculating the passwords to be detected using the same preset low-discreteness algorithm; selects at least one identical position point in each of the at least two verification character sequences that satisfies set constraints, where the identical position point is a position point with the same positional order selected by the at least two verification character sequences using the same positional measurement method; defines a detection window based on the identical position point, and extracts character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences; performs similarity verification on the at least two verification character sequences based on the at least two window sequences to obtain the password similarity detection result. The entire process selects at least one identical position point in the verified character sequence as the key position of the local coverage sequence, using fewer position points to cover more key scenes to reflect the non-uniform distribution and spacing characteristics of real attack data; then, based on the identical position points, a detection window is defined to cyclically cover the verified character sequence, and lightweight verification is performed using the detection window as a unit, which reduces the computational overhead of each window, avoids missing key information in local windows, ensures the accuracy of the detection results, and greatly reduces computational complexity and improves detection efficiency.
[0047] In practical applications, verifying identical positions in a character sequence requires considering both verification requirements and computational resource overhead. By setting constraints, valuable positions can be selected from the character sequence, avoiding verification failures caused by random or irregular selection. Furthermore, such as... Figure 2 Prior to step 102, the method further includes the following steps: 201. Pre-set quantity constraints and / or distribution constraints.
[0048] Among them, quantity constraints are used to limit the range of the number of points at the same location, while distribution constraints are used to limit the range of the locations of points at the same location. By combining quantity constraints and / or distribution constraints, both the quality of points at the same location and the quantity of points at the same location are ensured.
[0049] Specifically, the number of identical position points is selected within the range defined by the length of at least two check character sequences, with a pre-set constraint. This constraint can be half, one-third, or two-thirds of the sequence length, etc. It's understandable that if the number of identical position points is too small, the detection window defined based on these points might fall precisely into a low-sensitivity region of the check character sequence, causing the window to fail to reflect the true differences in the original password. Conversely, if the number of identical position points is too large, it will result in an excessive number of windows, consequently increasing the computational load for subsequent window sequence extraction and similarity calculations. By setting a reasonable range, it can be ensured that identical position points cover multiple key regions of the check character sequence without unnecessarily increasing computational overhead due to an excessive number.
[0050] Specifically, the selection range for the same position is defined by the range of easily variable characters in at least two check character sequences, with pre-set distribution constraints. These constraints can be the proportion of characters in the check character sequence, such as a 50% or 80% proportion. It's understood that different positions in the check character sequence correspond to different sensitivities to password changes. The same position points in the check character sequence need to cover high-value check areas. Distribution constraints limit these points to highly sensitive areas, ensuring that the coverage area captures subtle differences in the password. If the same position points are concentrated in adjacent positions, they essentially only cover a local area of the check character sequence. Differences in the window sequence may be affected by this local fluctuation, failing to reflect overall differences. By combining the proportion of characters in the check character sequence, it ensures that the selected same position points cover high-value check areas, avoiding position clustering or ineffective distribution.
[0051] Accordingly, in step 102, select the same position points in the at least two verification character sequences that satisfy the quantity constraint and / or the distribution constraint.
[0052] Specifically, in the character sequence being verified, the points at the same positions that satisfy the quantity constraint can be selected as integers greater than 1 and less than half the sequence length. For example, if the sequence length is 64, the number of points at the same positions can be between 2 and 31.
[0053] Specifically, selecting identical position points in the verification character sequence that satisfy the distribution constraints can be positions evenly distributed within the range [0, 50%] of the verification character sequence. Generally speaking, based on attack data, a small modification to the plaintext password by the attacker will cause local changes in the verification character sequence, and the changes are concentrated in the first half of the verification character sequence.
[0054] For example, for a check character sequence of length L of 64, the same position points S={0%,10%,25%,45%} can be selected by combining the quantity constraint and the distribution constraint.
[0055] In practical applications, the core of defining a detection window based on points at the same location is to segment and focus the verification character sequence. Lightweight verification of the window replaces full sequence verification, thus reducing computational overhead while maintaining accuracy. Specifically, for example... Figure 3 As shown, step 103 above includes the following steps: 301. Determine the starting and ending positions based on the aforementioned identical positions.
[0056] 302. Define a detection window based on the start position point and the end position point, and extract character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences.
[0057] In this embodiment, the same position point can be directly used as the starting position point, or it can be used as a reference to determine the starting position point. The ending position point is calculated based on the set window length and the starting position point, i.e., ending position point = starting position point + window length - 1. The character range of the detection window can be determined based on the starting and ending position points. For example, if the same position point is the starting position point with a position number of 3, and the set window length is 5, then the position number of the ending position point is 7. Accordingly, the window range determined based on the starting and ending position points is position numbers 3-7.
[0058] Specifically, in the process of determining the starting position point, the starting position point can be described as follows: ,in, The coordinates represent the relative positions of points at the same location within the validated character sequence, and can be rounded down to the nearest integer. This is used to verify the length of a character sequence. Integer coordinates correspond to the character position or byte index within the character sequence. For example, , At this point, the starting position is the 3rd character in the check character sequence.
[0059] Specifically, in determining the end position point, the window length ratio can be described as follows: The window length can be described as ,For example, , At that time, window length The end position can be described as -1.
[0060] In this embodiment, the selection of identical position points in the verification character sequence is based on the sensitive area and sparse points selected from the feature bits of the verification character sequence. This process mainly uses non-uniform selection, combined with dense distribution in typical scenarios, using multiple identical position points to achieve coverage of different scenarios and avoid redundant calculations. Accordingly, the detection window defined by identical position points can abandon the full-range uniform low-spacing sliding window comparison, and complete lightweight non-cryptographic verification in a single cycle, ensuring that a small number of windows can cover core difference features. This leverages the low-overhead advantage of lightweight verification and achieves high-scenario adaptation through identical position point settings, unifying low-overhead verification and high-scenario adaptation, and improving processing efficiency. In this way, this solution only requires a very small fixed memory space to store the lightweight verification results of the detection window, without the need for complex caching or preprocessing, and can easily adapt to the operating environment of resource-constrained terminals such as embedded systems and IoT devices.
[0061] It should be noted that, to address the validation requirements of specific functional scenarios, the starting point in the validation character sequence may be set later. This results in the ending point of the validation character sequence being greater than its length. In this case, the detection window cannot be accurately defined using only the starting and ending points, and it needs to be redefined based on the scenario requirements. Furthermore, as... Figure 4 As shown, after step 301, the method further includes the following steps: 401. When the position of the end position point is greater than the length of the check character sequence, the check character sequence is treated as a circular structure, and the end position point is used to perform a modulo operation on the length of the check character sequence to obtain the actual end position point.
[0062] In this context, the position of the actual position point is less than that of the starting position point. Specifically, the check character sequence can be viewed as a loop where the first character is directly connected to the last character, forming an infinitely repeating character sequence. For example, if the check character sequence is ABCDE, it can be described as ABCDEABCDE… as a loop structure.
[0063] Specifically, by performing a modulo operation on the length of the verification character sequence using the end position point, the out-of-bounds end point exceeding the sequence length can be mapped to an actual position within the effective range of the ring structure. This position serves as the actual end position point, ensuring that the detection window can be completely extracted through seamless connection between the beginning and end, while strictly maintaining the preset window length. If the remainder is not 0, it indicates that the end position point exceeds the verification character sequence. In this case, the portion exceeding the sequence length can be defined using the ring structure as a new position point, which serves as the actual end position point. For example, if the verification character sequence length is 5, the detection window length is 4, and the starting position point is the 3rd character, then the end position point is calculated as 3 + 4 - 1 = 6. The remainder exceeding the sequence length is 1. Therefore, the actual end position point can be defined using the ring structure as 6 - 5 = 1, meaning the actual end position is the 1st character of the verification character sequence.
[0064] Accordingly, in step 302, a detection window is defined based on the starting position point and the actual ending position point, so as to extract character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences.
[0065] Specifically, based on the starting position, the position from the starting position to the end of the verification character sequence can be defined as the first detection window. Character sequences can be extracted from at least two verification character sequences through the first detection window to obtain at least two first window sequences. Based on the actual ending position, the position from the beginning of the verification character sequence to the actual ending position can be defined as the second detection window. Character sequences can be extracted from at least two verification character sequences through the second detection window to obtain at least two second window sequences. The first window sequences and the second window sequences are then concatenated to obtain at least two window sequences.
[0066] Specifically, when the position of the end point is greater than the length of the check character sequence, the end position is described as follows: .like A loop processing mechanism is enabled to detect when the window spans both the end and beginning positions of the check character sequence. Specifically, it detects when the window spans the first and last character positions of the check character sequence. The actual end position is determined by taking the modulo operation between the end position and the length of the check character sequence. For example... hour, At this point, the detection window covers two parts: the first window sequence is the 60th to 63rd characters in the verification character sequence, and the second window sequence is the 0th to 3rd characters in the verification character sequence.
[0067] Understandably, considering that the verification character sequence of short passwords is relatively short or the starting position of the detection window is set too far back, it is easy for the boundary to be exceeded when constructing a detection window that covers the entire sequence. By using a loop processing mechanism, the short sequence can be regarded as a ring structure. When the detection window exceeds the end of the sequence, it continues from the beginning, completely preserving the boundary information and avoiding verification distortion caused by insufficient password length.
[0068] In this way, both short passwords and regular passwords can maintain stable and efficient processing capabilities, and can achieve linear scaling in high-concurrency scenarios without performance degradation issues, fully meeting the core requirements of real-time identity authentication, password management, and login scenarios for rapid response.
[0069] In practical applications, the core of using window sequences to perform similarity checks on character sequences is to replace the high-complexity calculations of the entire sequence with the low-complexity calculations of a local window. This process can achieve similarity judgment of the character sequences through logic such as matching rate, XOR statistics, and feature value comparison. Specifically, for example... Figure 5 As shown, step 104 above includes the following steps: 501. Based on the at least two window sequences, perform a difference comparison on the same detection windows in at least two check character sequences to obtain the difference comparison results of the same detection windows.
[0070] 502. Determine the number of matching windows based on the difference comparison results of the same detection windows.
[0071] 503. If the number of matching windows is greater than or equal to the first set number, then at least two passwords to be detected are determined to be similar.
[0072] 504. Otherwise, determine that at least two passwords to be tested are not similar.
[0073] In this embodiment, the same detection window refers to the detection window that is aligned in position based on the same position point in at least two check character sequences. For example, the detection window for positions 3-8 in sequence A and the detection window for positions 3-8 in sequence B are the same detection windows. For window sequences with the same detection windows, the differences between the window sequences can be quantified by performing a character traversal XOR operation to obtain the difference comparison result of the same detection windows. Specifically, based on the standard numeric code corresponding to each character in at least two window sequences, a traversal XOR operation can be performed on the characters in at least two check character sequences to obtain the character XOR result of the same detection window; then, the character XOR result of the same detection window is concatenated and combined to obtain the sequence XOR result of the same detection window, which includes the difference marker of the same detection window on the corresponding binary bits; based on the difference marker of the same detection window on the corresponding binary bits, the difference comparison result of the same detection window is determined.
[0074] In this embodiment, the standard numeric encoding corresponding to the characters is ASCII code. For example, in sequence A, the first character corresponds to ASCII code 0x61, and the second character corresponds to ASCII code 0x62. In sequence B, the first character corresponds to ASCII code 0x63, and the second character corresponds to ASCII code 0x66. The specific XOR operation process involves performing an XOR operation on the ASCII codes of the first characters in at least two check character sequences, followed by an XOR operation on the ASCII codes of the second characters, and so on. Characters at the same position in each window sequence are XORed one by one until all characters in the window sequence have been traversed, resulting in the XOR result for each character in the window sequence. For example, if two window sequences contain 5 characters, the first character in each window is XORed to obtain the first XOR value, and the second character is XORed to obtain the second XOR value. This process is repeated until the fifth character in the window sequence, resulting in the final five XOR values. These five XOR values are then concatenated to obtain the XOR result for the window sequence. Specifically, it is possible to traverse characters at the same position in at least two window sequences and obtain the standard numeric codes corresponding to the characters at the same position; perform an XOR operation on the standard numeric codes corresponding to each character at the same position in the same detection window to obtain the XOR result of the characters in the same detection window.
[0075] It should be noted that the essence of XOR operation is bit-by-bit comparison. To intuitively and accurately present the bit-level differences of XOR operation, the ASCII code corresponding to each character is first converted to binary, and then XOR is performed on the characters under the binary description. The resulting XOR result is a binary description. Similarly, concatenating and combining the XOR results yields a sequence XOR result that is also a binary description. The XOR result of the binary description includes 0 and 1, where 1 represents the difference marker of the same detection window on the binary bits. By counting the number of difference markers of the same detection window on the corresponding binary bits, the degree of difference of the same detection window in at least two check character sequences can be quantified to a certain extent. That is, the more 1s there are, the greater the bit-level difference of the same window sequence, and vice versa.
[0076] Accordingly, if the number of difference markers on the corresponding binary bits of the same detection window is greater than the second set number, the difference comparison result of the same detection window is determined to be a mismatched window; otherwise, the difference comparison result of the same detection window is determined to be a mismatched window.
[0077] For example, if the XOR result of the sequences within the same detection window contains more than 6 1s, then the same detection window is determined to be a mismatched window; otherwise, it is considered a matched window.
[0078] Understandably, verification character sequences typically define multiple identical detection windows around the same positioning points. Each identical detection window undergoes a difference comparison, yielding a result indicating whether it's a matching window. The number of matching windows can then be determined based on a pre-set number. Since this pre-set number is less than the number of detection windows in the verification character sequence, it's usually less than the number of identical positioning points. For example, if the number of identical positioning points is 4, the pre-set number can be set to 3; if the number of identical positioning points is 20, the pre-set number can be set to 18. Accordingly, if the number of matching windows is greater than or equal to the pre-set number, the two passwords to be tested are determined to be similar; otherwise, at least two passwords to be tested are determined to be dissimilar.
[0079] Furthermore, as Figure 1-5 To specifically implement the method, this application provides a password similarity detection device, such as... Figure 6 As shown, the device includes: a construction unit 61, a selection unit 62, an extraction unit 63, and a verification unit 64.
[0080] Construction unit 61 is used to construct at least two check character sequences, wherein the at least two check character sequences include character sequences obtained by calculating the same preset low discreteness algorithm for at least two passwords to be detected; The selection unit 62 is used to select at least one identical position point that satisfies the set constraint conditions in the at least two check character sequences, wherein the identical position point is a position point with the same position order selected by the at least two check character sequences using the same position order measurement method. Extraction unit 63 is used to define a detection window based on the same position point, so as to extract character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences; The verification unit 64 is used to perform similarity verification on at least two verification character sequences based on the at least two window sequences to obtain password similarity detection results.
[0081] The password similarity detection device provided in this application, compared with the current method of using full hash value comparison to achieve password similarity detection, constructs at least two verification character sequences, each consisting of character sequences obtained by the same preset low-discreteness algorithm for at least two passwords to be detected; selects at least one identical position point in each of the at least two verification character sequences that satisfies set constraints, wherein the identical position point is a position point with the same positional order selected by the same positional measurement method in the at least two verification character sequences; defines a detection window based on the identical position point, and extracts character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences; performs similarity verification on the at least two verification character sequences based on the at least two window sequences to obtain the password similarity detection result. The entire process selects at least one identical position point in the verified character sequence as the key position of the local coverage sequence, using fewer position points to cover more key scenes to reflect the non-uniform distribution and spacing characteristics of real attack data; then, based on the identical position points, a detection window is defined to cyclically cover the verified character sequence, and lightweight verification is performed using the detection window as a unit, which reduces the computational overhead of each window, avoids missing key information in local windows, ensures the accuracy of the detection results, and greatly reduces computational complexity and improves detection efficiency.
[0082] In practical applications, the device further includes: The setting unit is used to pre-set quantity constraints and / or distribution constraints before selecting at least one identical position point that satisfies the set constraint conditions from the at least two verification character sequences. The quantity constraints are used to constrain the selection range of the number of identical position points, and the distribution constraints are used to constrain the selection range of the positions of identical position points. Accordingly, the selection unit is specifically used to select the same position points that satisfy the quantity constraint and / or the distribution constraint in the at least two verification character sequences.
[0083] In practical applications, the setting unit is specifically used for: The number of points at the same position is selected within a predetermined range using the lengths of the at least two check character sequences; and / or The range of easily variable characters in the at least two verification character sequences is used as the selection range for the same position, and a distribution constraint is preset.
[0084] In practical applications, the extraction unit is specifically used for: The start and end positions are determined based on the same position points, and the end position is calculated based on the set window length and the start position. A detection window is defined based on the start point and the end point, and a character sequence is extracted from the at least two check character sequences through the detection window to obtain at least two window sequences.
[0085] In practical applications, the device further includes: The calculation unit is configured to, after determining the start and end positions of the detection window based on the same position points, when the position of the end position point is greater than the length of the verification character sequence, treat the verification character sequence as a circular structure, and perform a modulo operation on the length of the verification character sequence using the end position point to obtain the actual end position point, wherein the position of the actual end position point is less than the position of the start position point; Accordingly, the extraction unit is specifically used to define a detection window based on the starting position point and the actual ending position point, so as to extract character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences.
[0086] In practical applications, the extraction unit is further used for: Based on the starting position point, the position point from the starting position point to the end of the verification character sequence is defined as the first detection window, so as to extract character sequences from the at least two verification character sequences through the first detection window to obtain at least two first window sequences; Based on the actual end position point, the position point from the beginning of the verification character sequence to the actual end position point is defined as the second detection window, so as to extract character sequences from the at least two verification character sequences through the second detection window to obtain at least two second window sequences; The first window sequence is concatenated with the second window sequence to obtain at least two window sequences.
[0087] In practical applications, the verification unit includes: The calculation module is used to perform difference comparison on the same detection windows in at least two verification character sequences according to the at least two window sequences, so as to obtain the difference comparison result of the same detection windows; The first determining module is used to determine the number of matching windows based on the difference comparison results of the same detection windows; The second determining module is used to determine that at least two passwords to be detected are similar if the number of matching windows is greater than or equal to a first preset number; otherwise, it determines that at least two passwords to be detected are not similar.
[0088] In practical applications, the computing module is specifically used for: Based on the standard numeric code corresponding to each character in the at least two window sequences, perform a traversal XOR operation on the characters in the same detection window in the at least two check character sequences to obtain the XOR result of the characters in the same detection window; The XOR results of the characters in the same detection window are concatenated and combined to obtain the XOR result of the sequence of the same detection window. The XOR result of the sequence includes the difference markers of the corresponding binary bits of the same detection window. The difference comparison result of the same detection window is determined based on the difference markers on the corresponding binary bits of the same detection window; Accordingly, the first determining module is specifically used to determine that the difference comparison result of the same detection window is a mismatched window if the number of difference markers on the corresponding binary bits of the same detection window is greater than the second set number; otherwise, it determines that the same detection window is a matching window.
[0089] In practical applications, the computing module is specifically used for: Traverse the characters at the same position in the at least two window sequences and obtain the standard numeric codes corresponding to the characters at the same position. Perform an XOR operation on the standard numeric codes corresponding to each character at the same position within the same detection window to obtain the XOR result of the characters within the same detection window.
[0090] It should be noted that other corresponding descriptions of the functional units involved in the password similarity detection device provided in this embodiment can be found in [reference]. Figures 1-5 The corresponding description in [the document] will not be repeated here.
[0091] Based on the above, Figures 1-5 Accordingly, this application embodiment also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method. Figures 1-5 The password similarity detection method shown.
[0092] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.
[0093] Based on the above, Figures 1-5 The method shown, and Figure 6To achieve the above objectives, this application also provides a physical device for a password similarity detection method, as illustrated in the virtual device embodiment. Specifically, this device can be a computer, smartphone, tablet, smartwatch, server, or network device, etc. The physical device includes a storage medium and a processor; the storage medium stores a computer program; the processor executes the computer program to implement the above-described method. Figures 1-5 The password similarity detection method shown.
[0094] Optionally, the physical device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.
[0095] In an exemplary embodiment, see Figure 7 The aforementioned physical device includes a communication bus, a processor, a memory, and a communication interface. It may also include input / output interfaces and a display device. The various functional units can communicate with each other via the bus. The memory stores a computer program, and the processor executes the program stored in the memory to perform the password similarity detection method described in the above embodiments.
[0096] Those skilled in the art will understand that the physical device structure for password similarity detection provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0097] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device for password similarity detection, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.
[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms, or it can be implemented by hardware. By applying the technical solution of this application, compared with the existing methods, this application selects at least one same position point in the verification character sequence as the key position of the local coverage sequence, using fewer position points to cover more key scenes, so as to reflect the non-uniform distribution characteristics and spacing characteristics of real attack data; then, based on the same position points, a detection window is defined to cyclically cover the verification character sequence, and lightweight verification is performed with the detection window as the unit, so that the computational overhead of each window is reduced, avoiding the omission of key information in local windows, ensuring the accuracy of the detection results, while greatly reducing the computational complexity and improving the detection efficiency.
[0099] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.
[0100] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.
Claims
1. A method for detecting password similarity, characterized in that, include: Construct at least two check character sequences, wherein the at least two check character sequences include at least two character sequences obtained by the same preset low-discrete algorithm for each of the passwords to be detected; In the at least two check character sequences, at least one identical position point that satisfies the set constraint conditions is selected. The identical position point is a position point with the same position order selected by the at least two check character sequences using the same position order measurement method. A detection window is defined based on the same location point, and a character sequence is extracted from the at least two verification character sequences through the detection window to obtain at least two window sequences; The similarity of at least two verification character sequences is checked based on the at least two window sequences to obtain the password similarity detection result.
2. The method according to claim 1, characterized in that, Before selecting at least one identical position point satisfying the set constraint conditions from the at least two verification character sequences, the method further includes: Pre-set quantity constraints and / or distribution constraints, wherein the quantity constraints are used to constrain the range of the number of points at the same location, and the distribution constraints are used to constrain the range of the location of points at the same location. Accordingly, in the at least two verification character sequences, the same position points that satisfy the quantity constraint and / or the distribution constraint are selected respectively.
3. The method according to claim 2, characterized in that, The pre-set quantity constraints and / or distribution constraints include: The number of points at the same position is selected within a predetermined range using the lengths of the at least two check character sequences; and / or The range of easily variable characters in the at least two verification character sequences is used as the selection range for the same position, and a distribution constraint is preset.
4. The method according to claim 1, characterized in that, The step involves defining a detection window based on the same location points, and extracting character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences, including... The start and end positions are determined based on the same position points, and the end position is calculated based on the set window length and the start position. A detection window is defined based on the start point and the end point, and a character sequence is extracted from the at least two check character sequences through the detection window to obtain at least two window sequences.
5. The method according to claim 4, characterized in that, After determining the start and end points of the detection window based on the same location points, the method further includes: When the position of the end position point is greater than the length of the check character sequence, the check character sequence is treated as a circular structure, and the end position point is used to perform a modulo operation on the length of the check character sequence to obtain the actual end position point. The position of the actual position point is less than the position of the start position point. Accordingly, a detection window is defined based on the starting position point and the actual ending position point, so as to extract character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences.
6. The method according to claim 5, characterized in that, The step of defining a detection window based on the starting position point and the actual ending position point, and extracting character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences, includes: Based on the starting position point, the position point from the starting position point to the end of the verification character sequence is defined as the first detection window, so as to extract character sequences from the at least two verification character sequences through the first detection window to obtain at least two first window sequences; Based on the actual end position point, the position point from the beginning of the verification character sequence to the actual end position point is defined as the second detection window, so as to extract character sequences from the at least two verification character sequences through the second detection window to obtain at least two second window sequences; The first window sequence is concatenated with the second window sequence to obtain at least two window sequences.
7. The method according to any one of claims 1-6, characterized in that, The step of performing similarity checks on at least two verification character sequences based on the at least two window sequences to obtain password similarity detection results includes: Based on the at least two window sequences, perform a difference comparison on the same detection windows in at least two check character sequences to obtain the difference comparison results of the same detection windows; The number of matching windows is determined based on the difference comparison results of the same detection windows; If the number of matching windows is greater than or equal to the first set number, then at least two passwords to be detected are determined to be similar; otherwise, at least two passwords to be detected are determined to be dissimilar.
8. The method according to claim 7, characterized in that, The step of performing difference comparison on the same detection windows in at least two check character sequences based on the at least two window sequences to obtain the difference comparison results of the same detection windows includes: Based on the standard numeric code corresponding to each character in the at least two window sequences, perform a traversal XOR operation on the characters in the same detection window in the at least two check character sequences to obtain the XOR result of the characters in the same detection window; The XOR results of the characters in the same detection window are concatenated and combined to obtain the XOR result of the sequence of the same detection window. The XOR result of the sequence includes the difference markers of the corresponding binary bits of the same detection window. The difference comparison result of the same detection window is determined based on the difference markers on the corresponding binary bits of the same detection window; Accordingly, if the number of difference markers on the corresponding binary bits of the same detection window is greater than the second set number, the difference comparison result of the same detection window is determined to be a mismatched window; otherwise, the difference comparison result of the same detection window is determined to be a matched window.
9. The method according to claim 8, characterized in that, The step of performing a traversal XOR operation on the characters within the same detection window in at least two check character sequences based on the standard numeric code corresponding to each character in the at least two window sequences to obtain the XOR result of the characters in the same detection window includes: Traverse the characters at the same position in the at least two window sequences and obtain the standard numeric codes corresponding to the characters at the same position. Perform an XOR operation on the standard numeric codes corresponding to each character at the same position within the same detection window to obtain the XOR result of the characters within the same detection window.
10. A password similarity detection device, characterized in that, include: A construction unit is used to construct at least two check character sequences, wherein the at least two check character sequences include character sequences obtained by calculating the same preset low-discreteness algorithm for at least two passwords to be detected; The selection unit is used to select at least one identical position point that satisfies the set constraint conditions in the at least two check character sequences, wherein the identical position point is a position point with the same position order selected by the at least two check character sequences using the same position order measurement method. An extraction unit is configured to define a detection window based on the same location point, and extract character sequences from the at least two verification character sequences through the detection window to obtain at least two window sequences; The verification unit is used to perform similarity verification on at least two verification character sequences based on the at least two window sequences to obtain password similarity detection results.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the password similarity detection method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the password similarity detection method according to any one of claims 1 to 9.