WO2020151319A1 - 密码校验方法、装置、计算机设备及存储介质 - Google Patents

密码校验方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2020151319A1
WO2020151319A1 PCT/CN2019/117701 CN2019117701W WO2020151319A1 WO 2020151319 A1 WO2020151319 A1 WO 2020151319A1 CN 2019117701 W CN2019117701 W CN 2019117701W WO 2020151319 A1 WO2020151319 A1 WO 2020151319A1
Authority
WO
WIPO (PCT)
Prior art keywords
regular expression
verification
target
identification information
type identification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/117701
Other languages
English (en)
French (fr)
Inventor
王建华
何四燕
赵鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2020151319A1 publication Critical patent/WO2020151319A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • G06F21/46Structures or tools for the administration of authentication by designing passwords or checking the strength of passwords

Definitions

  • This application relates to the field of artificial intelligence technology, in particular to a password verification method, device, computer equipment and storage medium
  • the embodiments of the present application provide a password verification method, device, computer equipment, and storage medium, to solve the problem that the front-end and back-end password verification results are different due to the difference between the front-end developers and the back-end developers in writing regular expressions.
  • the same problem affects the accuracy of password verification and the efficiency of the system.
  • a password verification method including:
  • the verification condition includes type identification information and parameter information
  • the regular expression is obtained by matching the type identification information with the description information in the regular database;
  • a password verification device includes:
  • the verification acquisition module is configured to acquire verification conditions input by the user, where the verification conditions include type identification information and parameter information;
  • the first matching module is used to obtain a regular expression by matching the type identification information with the description information in the regular database;
  • the first generating module is configured to generate a target regular expression corresponding to the verification condition according to the regular expression in combination with the parameter information;
  • the password acquisition module is used to acquire the login password entered by the user
  • the verification module is used to verify the login password by using the target regular expression to obtain a verification result.
  • a computer device including a memory, a processor, and computer readable instructions stored in the memory and capable of running on the processor, and the processor implements the above password verification method when the processor executes the computer readable instructions A step of.
  • a non-volatile computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the password verification method is implemented step.
  • Figure 1 is a flowchart of a password verification method provided by an embodiment of the present application
  • step S2 is a flowchart of step S2 in the password verification method provided by the embodiment of the present application.
  • step S22 is a flowchart of step S22 in the password verification method provided by the embodiment of the present application.
  • FIG. 5 is a flowchart of processing different verification results in the password verification method provided by an embodiment of the present application.
  • step S72 is a flowchart of step S72 in the password verification method provided by the embodiment of the present application.
  • FIG. 7 is a flowchart of processing different current user states in the password verification method provided by the embodiment of the present application when the verification result is approved;
  • Figure 8 is a schematic diagram of a password verification device provided by an embodiment of the present application.
  • Fig. 9 is a basic structural block diagram of a computer device provided by an embodiment of the present application.
  • a password verification method is provided, which includes the following steps:
  • S1 Obtain verification conditions input by the user, where the verification conditions include type identification information and parameter information.
  • the verification condition when the user enters the verification condition on the client, the verification condition will be automatically saved in the preset record table.
  • the verification condition will be directly acquired, and the verification condition in the preset record table will be deleted after acquisition.
  • the client pre-sets the verification conditions for the user to choose, and the user selects the relevant verification conditions according to actual needs.
  • the preset record table is specifically used to store the verification conditions entered by the user, and it also records the type identification information and corresponding parameter information generated for the verification conditions according to the actual needs of the user. For example, if the verification condition entered by the user is "Include characters and length limit 8-16 bits", the corresponding type identification information "Can contain characters and length limit” will be generated for the verification conditions according to the actual needs of the user, and the corresponding parameters will be generated The message is "The maximum length is 16 and the minimum length is 8.”
  • S2 The regular expression is obtained by matching the type identification information with the description information in the regular database.
  • the regular database refers to a database dedicated to storing regular expressions, and different regular expressions are pre-stored in the regular database, and each regular expression has its corresponding description information, description information There is a mapping relationship with regular expressions. Obtain the type identification information corresponding to the verification condition according to step S1, and match the type identification information with the description information in the regular database. If the type identification information is the same as the description information, obtain the regular expression that has a mapping relationship with the description information formula.
  • Regular expressions are used to process strings. Some specific characters can be used to describe the rules of characters in the string, so as to match, extract or replace strings that meet a certain rule, and can also be used to find, delete and replace characters
  • the search speed is fast and accurate.
  • the description information in the regular database is "can contain characters and length limitation”
  • the regular expression corresponding to the description information is: "/ ⁇ [ ⁇ da-z ⁇ x21- ⁇ x2F ⁇ x3A- ⁇ x40 ⁇ x5B- ⁇ x60 ⁇ x7B- ⁇ x7E] ⁇ m,n ⁇ $/i”.
  • the symbol represents the beginning part of the match " ⁇ "
  • the symbol "$" matches the end part to ensure that there can be no other characters after it
  • " ⁇ d” means that it can contain numbers
  • "az” means that it can contain letters
  • " ⁇ x21- ⁇ "x2F ⁇ x3A- ⁇ x40 ⁇ x5B- ⁇ x60 ⁇ x7B- ⁇ x7E” can contain special characters
  • "m” represents the minimum length
  • "n” represents the maximum length.
  • the type identification information is "can contain characters and length limitation”
  • the type identification information is matched with the description information in the regular database, and the type identification information is the same as the description information, then the regular expression in the regular database is obtained: "/ ⁇ [ ⁇ da-z ⁇ x21- ⁇ x2F ⁇ x3A- ⁇ x40 ⁇ x5B- ⁇ x60 ⁇ x7B- ⁇ x7E] ⁇ m,n ⁇ $/i".
  • the target regular expression corresponding to the verification condition is generated in combination with the parameter information.
  • the parameter information corresponding to the verification condition obtained in step S1 are imported into a preset conversion library for conversion processing, and the target regular expression corresponding to the verification condition is generated after the conversion processing .
  • the preset conversion library refers to a database specially used for combining parameter information with regular expressions to generate new regular expressions.
  • the obtained regular expression is "/ ⁇ [ ⁇ da-z ⁇ x21- ⁇ x2F ⁇ x3A- ⁇ x40 ⁇ x5B- ⁇ x60 ⁇ x7B- ⁇ x7E] ⁇ m,n ⁇ $/i"
  • N represents the maximum length
  • m represents the minimum length
  • the parameter information corresponding to the verification condition is "the maximum length is 16 and the minimum length is 8"
  • the maximum length of 16 in the parameter information corresponds to the " n”
  • the minimum length of 8 corresponds to the "m” in the regular expression, that is, n will take 16, and m will take 8.
  • the target regular expression is "/ ⁇ [ ⁇ da-z ⁇ x21- ⁇ x2F ⁇ x3A- ⁇ x40 ⁇ x5B- ⁇ x60 ⁇ x7B- ⁇ x7E] ⁇ 8,16 ⁇ $/i".
  • the client by detecting the user login status of the client, when the user clicks on the account login on the client, the client will generate a login instruction and obtain the user's login account and password from the preset database, and The login password is output to the preset password table.
  • the user's login account and login password are both in the form of character strings.
  • the preset database refers to a login account and a login password specially used for real-time recording of user input.
  • the preset password table is specifically used to store the login password entered by the user.
  • the target regular expression is used to verify the login password. If the login password meets the rule represented by the target regular expression, the verification result that the verification is successful is output. If the verified login password does not meet the rules represented by the target regular expression, the verification result that the verification failed is output.
  • the target regular expression is "/ ⁇ [ ⁇ w] ⁇ 8,16 ⁇ $/i", which represents a rule that can contain letters, numbers, underscores, and the character length is 8-16 digits.
  • the password table is preset
  • the login password in is "hello12345”, which is verified by directly using the target regular expression "/ ⁇ [ ⁇ w] ⁇ 8,16 ⁇ $/i”. Since the login password satisfies the rule represented by the regular expression, it means The login password is legal, and the verification result of successful verification is output.
  • the regular expression is obtained by matching the type identification information corresponding to the verification condition with the description information, the target regular expression is generated in combination with the parameter information corresponding to the verification condition, and the login password is verified using the target regular expression.
  • Obtain the verification results so as to automatically generate corresponding regular expressions according to the verification conditions selected by the user, avoiding the front-end and back-end generating different regular expressions due to the different writing methods of front-end developers and back-end developers.
  • different verification results appear, which effectively improves the accuracy of password verification and the efficiency of the system.
  • step S2 by matching the type identification information with the description information in the regular database, obtaining the regular expression includes the following steps:
  • the type identification information corresponding to the verification condition is acquired according to step S1, and the type identification information is matched with the description information in the regular database.
  • the matching is successful, and a regular expression that has a mapping relationship with the description information is obtained.
  • step S1 the type identification information corresponding to the verification condition is obtained, and the type identification information is matched with the description information in the regular database. If the type identification information is not the same as the description information, it indicates that the matching fails, and the mechanical word segmentation method is used Perform word segmentation processing on the type identification information, and obtain the target word segmentation after word segmentation processing.
  • Mechanical word segmentation methods mainly include four methods: forward maximum matching, forward minimum matching, reverse maximum matching, and reverse minimum matching.
  • this proposal adopts the forward maximum matching algorithm.
  • the description information "bac” exists in the regular database. If the type identification information corresponding to the verification condition is "bca”, the type identification information is matched with the description information in the regular database, because the type identification information "bca” and the description information If the "bac” is not the same, it means that the matching fails, and the mechanical word segmentation method is used to segment the type identification information.
  • the description information that is the same as the target word segmentation is queried from the regular database.
  • the description information is obtained.
  • There is a regular expression of the mapping relationship between the information, and the regular expression is determined as the initial regular expression.
  • the description information corresponding to all target word segmentation is pre-stored in the regular database, and the regular expression corresponding to the target word segmentation of a single character is empty.
  • the description information "ABC” exists in the regular database, and the corresponding regular expression is "/ ⁇ [ ⁇ w] ⁇ 5,10 ⁇ $/i", for the target participle "ABC”, Query the same description information as the target participle "ABC” from the regular database, and get the regular expression as "/ ⁇ [ ⁇ w] ⁇ 5,10 ⁇ $/i", and determine the regular expression as the initial regular expression formula.
  • step S24 all the initial regular expressions obtained in step S24 are imported into the preset combination library for synthesis processing, and the synthesized regular expression after the synthesis processing is obtained, and the synthesized regular expression is the regular expression. , And save the synthesized synthesis processing state to the preset record table.
  • the preset synthesis rule refers to a legal writing rule that is expressed using regular expressions set according to the actual needs of the user.
  • the preset combination library refers to a database specially used for synthesizing initial regular expressions.
  • the preset record table refers to a data table specially used to record the synthesis processing state, where the synthesis processing state includes synthesized and unsynthesized. If the synthesis regular expression is produced, the synthesis processing state is synthesized, otherwise it is not synthesized.
  • the description information in the regular database is "Contains only numbers”, and its corresponding regular expression is: “ ⁇ [0-9]+$”, the description information is "Contains only letters”, and its corresponding regular expression
  • the expression is: “ ⁇ [A-Za-z]+$”, if the target participle is "only numbers” and “only letters”, then the regular expressions " ⁇ [0-9]+$” and " ⁇ [A-Za-z]+$” is imported into the preset combination library for synthesis processing, and the regular expression generated according to the preset synthesis rules is: " ⁇ [A-Za-z0-9]+$".
  • the type identification information is matched with the description information. If the matching is successful, the regular expression corresponding to the description information is obtained. If the matching fails, the type identification information is segmented to obtain the target word segmentation, and then the corresponding word segmentation is searched according to the target word segmentation. The initial regular expression, and finally the initial regular expression is synthesized to obtain a new regular expression, so as to realize the automatic generation of the regular expression, and can analyze the type identification information when the corresponding regular expression is not matched , And synthesize the corresponding regular expressions according to the analysis results, avoid manual intervention to write regular expressions, ensure that the front-end and back-end generate regular expressions of the same rule, and further ensure the accuracy of password verification.
  • step S22 that is, if the matching fails, performing word segmentation processing on the type identification information, and obtaining the target word segmentation includes:
  • the string index value refers to the position specifically used to locate the character to start scanning. If the character string index value is 0, it means that the first character is the position to start scanning the character.
  • the maximum length value is the maximum range specifically used for scanning characters. If the maximum length value is 2, it means scanning at most 2 characters, and if the maximum length value is 3, it means scanning at most 3 characters.
  • the type identification information will be scanned from left to right according to the preset string index value and maximum length value.
  • the character with the maximum length value is scanned, it will start scanning from The character up to the maximum length value is identified as the target character, and the target character is extracted.
  • the type identification information is "including numbers and letters”
  • the maximum length value is 4
  • the initial value of the string index is 0, and the type identification information is scanned from left to right, that is, the character scanned to the maximum length value is " Contains number”
  • the maximum length value character "including number” is identified as the target character, and the target character is extracted.
  • the preset string index value can be 0, the preset maximum length value can be 2, and the specific value range can be set according to the actual needs of the user, and there is no limitation here.
  • a legal character that is the same as the target character is queried from a preset dictionary library.
  • the preset dictionary database refers to a database specially used for storing legal characters set by the user.
  • the target character is determined as the target word segmentation, and the string index value is updated to the current string index value plus the current maximum length value, based on the updated string index value and maximum length value, from The target characters are extracted from the type identification information for query until the word segmentation operation of the type identification information is completed.
  • the query finds that the target character is the same as the legal character in the preset dictionary library, the query is successful, the target character is determined as the target word segmentation, and the string index value is updated to the string index in the current step S221 The value plus the maximum length value in the current step S221, and based on the updated string index value and maximum length value, extract the target character from the type identification information for query until the word segmentation operation on the type identification information is completed.
  • step S221 if the target character "contains a number" matches the character in the preset dictionary library, the target character "contains a number” is confirmed as the target segmentation, and the string index value Update to the current string index value 0 plus the current maximum length value 4, that is, the string index value will be updated to 4, and based on the updated string index value and maximum length value, the target character is extracted from the type identification information for query , That is, for the type identification information "including numbers and letters", scan from the "and” character until the word segmentation operation for the type identification information is completed.
  • a valid character that is the same as the target character is queried from the preset dictionary library.
  • the query fails.
  • the maximum length value is updated to the maximum length value in the current step S221 minus 1, and based on the updated string index value and maximum length value, the target character is extracted from the type identification information for query until the completion of the type identification information Until the word segmentation operation.
  • the maximum length value is updated to the current maximum length value 4 minus 1, which is the maximum The length value is updated to 3, and based on the updated string index value and maximum length value, the target character is extracted from the type identification information for query until the word segmentation operation of the type identification information is completed.
  • the type identification information is segmented by the preset string index value and maximum length value, and the target segmentation is obtained by matching the string index value and maximum length value with legal characters.
  • the target segmentation is obtained by matching the string index value and maximum length value with legal characters.
  • the password verification method further includes the following steps:
  • step S24 by detecting the synthesis processing state in the preset record table in step S24, when it is detected that the synthesis processing state is synthesized, the same description information as the type identification information is generated.
  • the synthesized regular expression is: " ⁇ [A-Za-z0-9]+$"
  • the type identification information is " Contains numbers and letters”
  • the generated description information is also "contains numbers and letters”.
  • the mapping relationship between the description information and the regular expression synthesized in step S25 is established in the regular database, that is, after the mapping relationship is established, the regular database can be queried The regular expression corresponding to the description information.
  • the mapping relationship between the regular expression " ⁇ [A-Za-z0-9]+$" and the description information "including numbers and letters” is established, and the mapping relationship is added
  • the description information in the regular database is "including numbers and letters”
  • the corresponding regular expression is " ⁇ [A-Za-z0-9]+$".
  • the corresponding description information is generated according to the synthesized regular expression, and then the mapping relationship between the description information and the regular expression is established and added to the regular database, thereby realizing continuous improvement in the regular database. Expand the range of matching regular expressions in the regular database, and further improve the success rate of matching and the accuracy of password verification.
  • the password verification method further includes the following steps:
  • the verification result is sent to the target user in a preset manner, prompting the target user to input illegal characters in the login password.
  • the preset method may be directly in Message prompts on the client login page can also be set according to the actual needs of the user.
  • the number of failed verification failures is recorded, and the number of failures is saved in the preset log table, and the number of failures in the preset log table is obtained in real time, and the obtained number of failures is compared with the preset threshold. For comparison, if the number of failures is equal to the preset threshold, the login account corresponding to the current login password will be frozen according to the preset time, that is, the login account cannot be logged in within the preset time, and the account information will be frozen.
  • the form of short message is sent to the mobile phone number of the short message receiver preset by the login account; if the number of failures is less than the preset threshold, no processing is performed, that is, the login account is allowed to continue logging in.
  • the preset log table is specifically used to record the number of failed verifications.
  • the preset threshold may be 10 specifically, or it may be set according to the actual needs of the user, and there is no limitation here.
  • the number of failures in the preset log table will be reset to zero after the preset time when the login account is not frozen, that is, the number of failures will be refreshed to 0 after the preset time.
  • the verification result is a successful verification
  • the user password of the login account corresponding to the login password is queried from the preset user library, and the login password is verified by using the user password to obtain the audit result.
  • the preset user database refers to a database specifically used to store user accounts and user passwords.
  • the verification fails, the result of the failure is fed back to the target user, and if the verification succeeds, the login password is verified, so that the login password can be further verified under the premise of ensuring the accuracy of the password verification and avoid Password verification is not allowed to increase the workload of password review, thereby improving the efficiency of the system and the success rate of password review.
  • step S72 that is, if the verification result is successful, the user identity verification is performed on the login password, and the verification result obtained includes:
  • the login account corresponding to the current login password is queried from the preset database, and the queried login account is obtained.
  • S722 Query the legal account that is the same as the login account from the preset user database, where the preset user database includes the legal account and the legal password corresponding to the legal account.
  • the user account that is the same as the login account is queried from the preset user database, where the user account is a legal account, and the user password corresponding to the user account is a legal The legal password corresponding to the account.
  • S723 Obtain the corresponding legal password based on the found legal account, and use the legal password to verify the login password to obtain the audit result.
  • a legal account that is the same as the login account is queried from the preset user database in step S722, it means that the query is successful, the legal password corresponding to the legal account is obtained, and the legal password is matched with the login password.
  • the legal password is the same as the login password, it means the matching is successful and the audit result of the user identity audit is output; when the legal password is not the same as the login password, it means the matching failed and the user identity audit failed the audit result is output.
  • the legal account in the preset user database is "hello", and the legal password corresponding to the legal account is "123456".
  • the login account is "hello”
  • the login password corresponding to the login account is "123456”.
  • the login password is matched with the legal password "123456”. Since the login password is the same as the legal password, the match is successful, and the user is output
  • the audit result of the identity audit passed; if the login password corresponding to the login account is "654321”, the login password "654321” will be matched with the legal password "123456". Since the login password is not the same as the legal password, it means the match failed, and the user is output The result of the audit that failed the identity audit.
  • step S722 if the legal account that is the same as the login account is not queried from the preset user database in step S722, it means that the login account has not been registered, the legitimate account cannot be queried, and the audit result of the failed audit is output to On the user login interface, the user is prompted to re-enter the correct login account.
  • the legal account existing in the preset user library is "123”
  • the login account is "456”
  • the login account "456” is different from the legal account "123” in the preset user library, it means that from the default user The database did not find the same legal account as the login account.
  • the corresponding login account is obtained according to the login password
  • the legal password corresponding to the legal account is obtained by querying the legal account that is the same as the login account
  • the legal password is used to verify the login password.
  • Audit to obtain the audit result so as to realize further identity audit of the login password after the login password verification is successful, improve the legitimacy of the login password audit, and further improve the accuracy of the password verification.
  • the password verification method further includes the following steps:
  • the audited login account is matched with the legal account in the preset status information table to obtain the current user status corresponding to the legal account.
  • the preset status information table is specifically used to record the legal account and the current user status corresponding to the legal account.
  • the current user status corresponding to the legal account is queried from the preset status information table. If the current user status is queried as online, the login account that is the same as the legal account is prohibited Log in.
  • the current user status corresponding to the legal account is queried from the preset status information table. If the current user status is queried as offline, the login account that is the same as the legal account is allowed to perform Log in.
  • the current user status of the login account is detected, and the result of prohibiting or allowing the login account to log in is executed according to the current user status, so as to achieve the premise that the password verification is accurate
  • the login authority of the login account can be restricted according to the user's execution status to ensure the uniqueness of online users.
  • a password verification device is provided, and the password verification device corresponds to the password verification method in the above-mentioned embodiment one-to-one.
  • the password verification device includes a verification acquisition module 81, a first matching module 82, a first generation module 83, a password acquisition module 84 and a verification module 85.
  • the detailed description of each functional module is as follows:
  • the verification acquisition module 81 is configured to acquire the verification conditions input by the user, where the verification conditions include type identification information and parameter information;
  • the first matching module 82 is configured to obtain a regular expression by matching the type identification information with the description information in the regular database;
  • the first generating module 83 is configured to generate a target regular expression corresponding to the verification condition according to the regular expression and the parameter information;
  • the password obtaining module 84 is used to obtain the login password entered by the user;
  • the verification module 85 is used to verify the login password by using the target regular expression to obtain the verification result.
  • the first matching module 82 includes:
  • the second matching submodule is used to match the type identification information with the description information in the regular database
  • the second matching success sub-module is used to obtain the regular expression corresponding to the description information if the matching is successful;
  • the second matching failure sub-module is used to perform word segmentation processing on the type identification information if the matching fails to obtain the target word segmentation;
  • the initial regular acquisition sub-module is used to obtain the initial regular expression corresponding to each target segmentation from the regular database based on the target segmentation;
  • the synthesis sub-module is used to synthesize the initial regular expression corresponding to each target word segmentation according to the preset synthesis rule to obtain the regular expression.
  • the second matching failure submodule includes:
  • the extraction unit is configured to extract the target character from the type identification information according to the preset maximum length value of the string index value if the matching fails;
  • the query unit is used to query the legal characters that are the same as the target character from the preset dictionary library;
  • the query success unit is used to determine the target character as the target word segmentation if the query is successful, and update the string index value to the current string index value plus the current maximum length value, based on the updated string index value and maximum Length value, extract the target character from the type identification information for query until the word segmentation operation of the type identification information is completed;
  • the query failure unit is used to decrement the maximum length value if the query fails, and based on the updated string index value and maximum length value, extract the target character from the type identification information for query until the word segmentation of the type identification information is completed Operation so far.
  • the password verification device further includes:
  • the second generation module is used to generate description information that is the same as the type identification information when the synthesized regular expression is detected;
  • the establishment module is used to establish the mapping relationship between the description information and the regular expression in the regular database.
  • the password verification device further includes:
  • the verification failure module is used to send the verification result to the target user if the verification result is a verification failure
  • the verification success module is used to perform user identity verification on the login password if the verification result is successful, and obtain the verification result.
  • the successful verification module includes:
  • the login account acquisition submodule is used to obtain the login account corresponding to the login password from the preset database if the verification result is successful;
  • the legal account acquisition submodule is used to query the legal account that is the same as the login account from the preset user database, where the preset user database includes the legal account and the legal password corresponding to the legal account;
  • the audit sub-module is used to obtain the corresponding legal password based on the queried legal account, and use the legal password to audit the login password to obtain the audit result.
  • the password verification device further includes:
  • the audit passed module is used to detect the current user status of the login account if the audit result is passed, where the current user status includes online status and offline status;
  • the prohibition module is used to prohibit the login account from logging in when it is detected that the current user status is online;
  • the permission module is used to allow the login account to log in when it is detected that the current user status is offline.
  • FIG. 9 is a block diagram of the basic structure of the computer device 90 in an embodiment of this application.
  • the computer device 90 includes a memory 91, a processor 92, and a network interface 93 that are communicatively connected to each other through a system bus. It should be pointed out that FIG. 9 only shows a computer device 90 with components 91-93, but it should be understood that it is not required to implement all of the illustrated components, and more or fewer components may be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions.
  • Its hardware includes, but is not limited to, a microprocessor, a dedicated Integrated Circuit (Application Specific Integrated Circuit, ASIC), Programmable Gate Array (Field-Programmable Gate Array, FPGA), Digital Processor (Digital Signal Processor, DSP), embedded equipment, etc.
  • ASIC Application Specific Integrated Circuit
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • DSP Digital Processor
  • the computer device may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the computer device can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device.
  • the memory 91 includes at least one type of readable storage medium.
  • the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static memory Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
  • the memory 91 may be an internal storage unit of the computer device 90, such as a hard disk or memory of the computer device 90.
  • the memory 91 may also be an external storage device of the computer device 90, such as a plug-in hard disk equipped on the computer device 90, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc.
  • the memory 91 may also include both an internal storage unit of the computer device 90 and an external storage device thereof.
  • the memory 91 is generally used to store an operating system and various application software installed in the computer device 90, such as computer-readable instructions of the password verification method.
  • the memory 91 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 92 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips.
  • the processor 92 is generally used to control the overall operation of the computer device 90.
  • the processor 92 is configured to execute computer-readable instructions or process data stored in the memory 91, for example, computer-readable instructions for executing the password verification method.
  • the network interface 93 may include a wireless network interface or a wired network interface, and the network interface 93 is generally used to establish a communication connection between the computer device 90 and other electronic devices.
  • This application also provides another implementation manner, that is, to provide a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores a password information entry process, and the password information entry
  • the process may be executed by at least one processor, so that the at least one processor executes the steps of any one of the aforementioned cryptographic verification methods.
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a computer device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method described in each embodiment of the present application.
  • a computer device which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Document Processing Apparatus (AREA)

Abstract

一种密码校验方法、装置、计算机设备及存储介质,所述密码校验方法包括:获取用户输入的验证条件,其中,验证条件包括类型标识信息和参数信息(S1);通过将所述类型标识信息与正则数据库中的描述信息进行匹配的方式,得到正则表达式(S2);根据所述正则表达式,结合所述参数信息生成所述验证条件对应的目标正则表达式(S3);获取用户输入的登录密码(S4);利用所述目标正则表达式对所述登录密码进行校验,得到校验结果(S5)。所述方法根据用户选择的验证条件自动生成对应的正则表达式,避免由于人工干预导致生成正则表达式不同,从而有效提高密码校验的准确性以及系统的工作效率。

Description

密码校验方法、装置、计算机设备及存储介质
本申请以2019年1月24日提交的申请号为2019100702280,名称为“密码校验方法、装置、计算机设备及存储介质”的中国发明专利申请为基础,并要求其优先权。
技术领域
本申请涉及人工智能技术领域,尤其涉及一种密码校验方法、装置、计算机设备及存储介质
背景技术
目前,关于密码的校验有多种方法,在开发过程中,前端开发人员和后端开发人员关于密码的校验通常通过正则表达式来实现,发明人意识到,同样的密码校验利用正则表达式编写的方法存在不同,导致前端和后端在对密码进行校验时的校验结果也不同,从而影响密码校验的准确性,进一步影响系统的工作效率。
发明内容
本申请实施例提供一种密码校验方法、装置、计算机设备及存储介质,以解决由于前端开发人员和后端开发人员对正则表达式编写方法的不同,导致前端和后端的密码校验结果不相同,影响密码校验准确性及系统工作效率的问题。
一种密码校验方法,包括:
获取用户输入的验证条件,其中,所述验证条件包括类型标识信息和参数信息;
通过将所述类型标识信息与正则数据库中的描述信息进行匹配的方式,得到正则表达式;
根据所述正则表达式,结合所述参数信息生成所述验证条件对应的目标正则表达式;
获取用户输入的登录密码;
利用所述目标正则表达式对所述登录密码进行校验,得到校验结果。
一种密码校验装置,包括:
验证获取模块,用于获取用户输入的验证条件,其中,所述验证条件包括类型标识信息和参数信息;
第一匹配模块,用于通过将所述类型标识信息与正则数据库中的描述信息进行匹配的方式,得到正则表达式;
第一生成模块,用于根据所述正则表达式,结合所述参数信息生成所述验证条件对应的目标正则表达式;
密码获取模块,用于获取用户输入的登录密码;
校验模块,用于利用所述目标正则表达式对所述登录密码进行校验,得到 校验结果。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述密码校验方法的步骤。
一种非易失性的计算机可读存储介质,所述非易失性的计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述密码校验方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的密码校验方法的流程图;
图2是本申请实施例提供的密码校验方法中步骤S2的流程图;
图3是本申请实施例提供的密码校验方法中步骤S22的流程图;
图4是本申请实施例提供的密码校验方法中建立描述信息与正则表达式之间的映射关系的流程图;
图5是本申请实施例提供的密码校验方法中针对不同校验结果进行处理的流程图;
图6是本申请实施例提供的密码校验方法中步骤S72的流程图;
图7是本申请实施例提供的密码校验方法中在审核结果为审核通过的情况下,针对不同的当前用户状态进行处理的流程图;
图8是本申请实施例提供的密码校验装置的示意图;
图9是本申请实施例提供的计算机设备的基本机构框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供的数据处理方法应用于服务端,服务端具体可以用独立的服务器或者多个服务器组成的服务器集群实现。在一实施例中,如图1所示,提供一种密码校验方法,包括如下步骤:
S1:获取用户输入的验证条件,其中,验证条件包括类型标识信息和参数信息。
在本申请实施例中,当用户在客户端输入验证条件时,验证条件将自动保 存到预设记录表中。通过对预设记录表进行实时检测,当检测到预设记录表中存在验证条件时,将直接对该验证条件进行获取,并在获取后将预设记录表中的验证条件进行删除处理。其中,客户端预先设置好验证条件供用户进行选择,用户根据实际需求选取相关验证条件即可。
其中,预设记录表是指专门用于存储用户输入的验证条件,并且还会记录根据用户实际需求对验证条件生成对应的类型标识信息和对应的参数信息。例如,若用户输入的验证条件为“包含字符和长度限制8-16位”,则根据用户实际需求将会对验证条件生成对应的类型标识信息“可包含字符和长度限制”,生成对应的参数信息为“最大长度为16,最小长度为8”。
S2:通过将类型标识信息与正则数据库中的描述信息进行匹配的方式,得到正则表达式。
在本申请实施例中,正则数据库是指专门用于存储正则表达式的数据库,且正则数据库中预先保存了不同的正则表达式,以及每个正则表达式都有其对应的描述信息,描述信息与正则表达式之间存在映射关系。根据步骤S1获取验证条件对应的类型标识信息,将该类型标识信息与正则数据库中的描述信息进行匹配,若类型标识信息与描述信息相同,则获取与该描述信息之间存在映射关系的正则表达式。
正则表达式是用来处理字符串的,可以用一些特定字符来描述字符串里字符出现的规则,从而匹配,提取或者替换符合某一个规则的字符串,还可以用来查找、删除和替换字符串,查找速度快且精准。
例如,正则数据库中存在描述信息为“可包含字符和长度限制”,该描述信息对应的的正则表达式为:“/^[\da-z\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]{m,n}$/i”。
其中,符号表示“^”匹配的开始部分,符号“$”匹配结束部分以保证其后不能有其他字符,“\d”表示可包含数字,“a-z”表示可包含字母,“\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E”是可包含特殊字符,“m”表示最小长度,“n”表示最大长度。
若类型标识信息为“可包含字符和长度限制”,将该类型标识信息与正则数据库中的描述信息进行匹配,得到类型标识信息与描述信息相同,则获取正则数据库中的正则表达式:“/^[\da-z\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]{m,n}$/i”。
S3:根据正则表达式,结合参数信息生成验证条件对应的目标正则表达式。
具体地,根据步骤S1得到验证条件对应的参数信息,将该参数信息与步骤S2得到的正则表达式导入到预设转换库中进行转换处理,并在转换处理后生成验证条件对应目标正则表达式。其中,预设转换库是指专门用于将参数信息与正则表达式进行结合处理,生成新的正则表达式的数据库。
例如,若获取到的正则表达式为“/^[\da-z\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]{m,n}$/i”,其中,“n”表示最大长度”,“m”表示最小长度”,验证条件对应的参数信息为“最大长度为 16,最小长度为8”,由于参数信息中最大长度16对应正则表达式中的“n”,最小长度8对应正则表达式中的“m”,即n将取16,m将取8,将该参数信息与正则表达式导入到预设转换库中进行转换处理,则生成对应的目标正则表达式为“/^[\da-z\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]{8,16}$/i”。
S4:获取用户输入的登录密码。
在本申请实施例中,通过对客户端的用户登录状态进行检测,当用户在客户端点击账户登录时,客户端将生成登录指令并从预设数据库中获取用户的登录账号和登录密码,并将该登录密码输出到预设密码表中。其中,用户的登陆账号和登录密码都是以字符串的形式存在。
其中,预设数据库是指专门用于实时记录用户输入的登录账号和登录密码。预设密码表是指专门用于存储用户输入的登录密码。
S5:利用目标正则表达式对登录密码进行校验,得到校验结果。
具体地,通过对步骤S4中的预设密码表中的登录密码进行检测,当检测到预设密码表中存在登录密码时,则利用目标正则表达式对该登录密码进行校验,若校验的登录密码符合目标正则表达式代表的规则,则输出校验成功的验证结果。若校验的登录密码不符合目标正则表达式代表的规则,则输出校验失败的验证结果。
例如:目标正则表达式为“/^[\w]{8,16}$/i”,其代表的规则为可包含字母、数字、下划线和字符长度为8-16位,若预设密码表中的登录密码为“hello12345”,通过直接利用目标正则表达式“/^[\w]{8,16}$/i”进行校验,由于该登录密码满足该正则表达式代表的规则,表示登录密码合法,输出校验成功的验证结果。若预设密码表中的登录密码为“hello”,通过直接利用目标正则表达式“/^[\w]{8,16}$/i”进行校验,由于该登录密码不满足该正则表达式代表的规则,表示登录密码不合法,输出校验失败的验证结果。
本实施例中,通过将验证条件对应的类型标识信息与描述信息进行匹配得到正则表达式,结合验证条件对应的参数信息生成目标正则表达式,并利用目标正则表达式对登录密码进行校验,得到校验结果,从而实现根据用户选择的验证条件自动生成对应的正则表达式,避免由于前端开发人员和后端开发人员编写方法的不同,导致前端和后端生成不同的正则表达式,进而在对登录密码进行校验时出现校验不同的结果的情况,有效提高密码校验的准确性以及系统的工作效率。
在一实施例中,如图2所示,步骤S2中,即通过将类型标识信息与正则数据库中的描述信息进行匹配的方式,得到正则表达式包括如下步骤:
S21:将类型标识信息与正则数据库中的描述信息进行匹配。
具体地,根据步骤S1获取验证条件对应的类型标识信息,将该类型标识信息与正则数据库中的描述信息进行匹配。
需要说明的是,当匹配到多个与验证条件的类型标识信息相同的描述信息时,随机选取其中一个与类型标识信息相同的描述信息对应的正则表达式。
S22:若匹配成功,则获取描述信息对应的正则表达式。
若类型标识信息与描述信息相同,则表示匹配成功,并获取与该描述信息之间存在映射关系的正则表达式。
S23:若匹配失败,则对类型标识信息进行分词处理,得到目标分词。
具体地,根据步骤S1获取验证条件对应的类型标识信息,将该类型标识信息与正则数据库中的描述信息进行匹配,若类型标识信息与描述信息不相同,则表示匹配失败,并利用机械分词方法对类型标识信息进行分词处理,并获取分词处理后的目标分词。
机械分词方法主要有正向最大匹配、正向最小匹配、逆向最大匹配、逆向最小匹配四种方法。优选地,本提案采用正向最大匹配算法。
例如,正则数据库中存在描述信息“bac”,若验证条件对应的类型标识信息为“bca”,将该类型标识信息与正则数据库中的描述信息进行匹配,由于类型标识信息“bca”和描述信息“bac”不相同,表示匹配失败,并利用机械分词方法对类型标识信息进行分词处理。
S24:基于目标分词,从正则数据库中获取与每个目标分词对应的初始正则表达式。
在本申请实施例中,根据步骤S23得到的目标分词,针对每个目标分词,从正则数据库中查询与目标分词相同的描述信息,当查询到与目标分词相同的描述信息时,获取与该描述信息之间存在映射关系的正则表达式,并将该正则表达式确定为初始正则表达式。
需要说明的是,正则数据库中预先保存了所有目标分词对应的描述信息,其中,单个字符的目标分词对应的正则表达式为空。
例如,存在目标分词“ABC”,正则数据库中存在描述信息“ABC”,其对应的正则表达式为“/^[\w]{5,10}$/i”,针对目标分词“ABC”,从正则数据库中分别查询与目标分词“ABC”相同的描述信息,得到正则表达式为“/^[\w]{5,10}$/i”,并将该正则表达式确定为初始正则表达式。
S25:根据预设合成规则,将每个目标分词对应的初始正则表达式进行合成处理,得到正则表达式。
具体地,根据预设合成规则,将步骤S24得到的初始正则表达式都导入到预设组合库中进行合成处理,得到合成处理后的合成正则表达式,该合成正则表达式即为正则表达式,并将已合成的合成处理状态保存到预设记录表中。
其中,预设合成规则是指根据用户实际需求设定利用正则表达式进行表达的合法编写规则。
预设组合库是指专门用于对初始正则表达式进行合成处理的数据库。
预设记录表是指专门用于记录合成处理状态的数据表,其中,合成处理状态包括已合成和未合成,若生产合成正则表达式,则合成处理状态为已合成,否则为未合成。
例如:正则数据库中存在描述信息为“只包含数字”,且其对应的正则表达式为:“^[0-9]+$”,存在描述信息为“只包含字母”,且其对应的正则表达式为:“^[A-Za-z]+$”,若目标分词为“只包含数字”和“只包含字母”,则将正 则表达式“^[0-9]+$”和“^[A-Za-z]+$”导入到预设组合库中进行合成处理,按照预设合成规则生成的正则表达式为:“^[A-Za-z0-9]+$”。
本实施例中,将类型标识信息与描述信息进行匹配,若匹配成功则获取描述信息对应的正则表达式,若匹配失败则对类型标识信息进行分词处理得到目标分词,再根据目标分词查询对应的初始正则表达式,最后对初始正则表达式进行合成处理得到新的正则表达式,从而实现正则表达式的自动生成,且在匹配不到对应正则表达式的情况下,能够对类型标识信息进行分析,并根据分析结果合成对应的正则表达式,避免人工干预编写正则表达式,保证前端和后端生成同一规则的正则表达式,进一步保证密码校验的准确性。
在一实施例中,如图3所示,步骤S22中,即若匹配失败,则对类型标识信息进行分词处理,得到目标分词包括:
S221:若匹配失败,则根据预设的字符串索引值和最大长度值,从类型标识信息中提取目标字符。
在本申请实施例中,字符串索引值是指专门用于定位开始扫描字符的位置,若该字符串索引值为0,则表示第一个字符为开始扫描字符的位置。最大长度值是专门用于扫描字符的最大范围,若最大长度值为2,则表示扫描最多2个字符,若最大长度值为3,则表示扫描最多3个字符。
具体地,若匹配失败,则根据预设的字符串索引值和最大长度值,按照从左到右的扫描方式扫描类型标识信息,当扫描到最大长度值的字符时,将从开始扫描位置的字符到该最大长度值的字符标识为目标字符,并对该目标字符进行提取。
例如,类型标识信息为“包含数字和字母”,最大长度值为4,字符串索引的初始值为0,按照从左到右的方式扫描类型标识信息,即扫描到最大长度值的字符为“包含数字”,将该最大长度值的字符“包含数字”标识为目标字符,并对该目标字符进行提取。
其中,预设的字符串索引值可以为0,预设的最大长度值可以为2,其具体的取值范围可以根据用户的实际需求进行设置,此处不做限制。
S222:从预设字典库中查询与目标字符相同的合法字符。
具体地,根据步骤S221中得到的目标字符,从预设字典库中查询与该目标字符相同的合法字符。
其中,预设字典库是指专门用于存储用户设定的合法字符的数据库。
S223:若查询成功,则将该目标字符确定为目标分词,并将字符串索引值更新为当前字符串索引值加上当前最大长度值,基于更新后的字符串索引值和最大长度值,从类型标识信息中提取目标字符进行查询,直到完成对类型标识信息的分词操作为止。
具体地,当查询到目标字符与预设字典库中的合法字符相同时,表示查询成功,并将该目标字符确定为目标分词,同时将字符串索引值更新为当前步骤S221中的字符串索引值加上当前步骤S221中的最大长度值,并基于更新后的字符串索引值和最大长度值,从类型标识信息中提取目标字符进行查询,直到 完成对类型标识信息的分词操作为止。
例如,如步骤S221中的例子所述,若目标字符“包含数字”匹配到与预设字典库中的字符相同时,则将目标字符“包含数字”确认为目标分词,并将字符串索引值更新为当前字符串索引值0加上当前最大长度值4,即字符串索引值将更新为4,并基于更新后的字符串索引值和最大长度值,从类型标识信息中提取目标字符进行查询,即针对类型标识信息“包含数字和字母”,从“和”字符开始扫描,直到完成对类型标识信息的分词操作为止。
S224:若查询失败,则将最大长度值进行递减,基于更新后的字符串索引值和最大长度值,从类型标识信息中提取目标字符进行查询,直到完成对类型标识信息的分词操作为止。
具体地,根据步骤S221中得到的目标字符,从预设字典库中查询与该目标字符相同的合法字符,当未查询到目标字符与预设字典库中的合法字符相同时,表示查询失败,则将最大长度值更新为当前步骤S221中的最大长度值减1,并基于更新后的字符串索引值和最大长度值,从类型标识信息中提取目标字符进行查询,直到完成对类型标识信息的分词操作为止。
需要说明的是,所有最大长度值大于1的目标字符都未匹配到与预设字典库中的合法字符相同时,则将单个字符确认为目标分词。
例如:如步骤S221中的例子所述,若目标字符“包含数字”未匹配到与预设字典库中的合法字符相同时,则将最大长度值更新为当前最大长度值4减1,即最大长度值更新为3,并基于更新后的字符串索引值和最大长度值,从类型标识信息中提取目标字符进行查询,直到完成对类型标识信息的分词操作为止。
本实施例中,在匹配失败的情况下通过预设的字符串索引值和最大长度值对类型标识信息进行分词处理,并根据字符串索引值和最大长度值与合法字符进行匹配得到目标分词,从而实现在匹配失败的情况下能够智能对类别标识信息进行分词处理,便于后续利用分词处理后的目标分词进行进一步匹配正则表达式,避免在匹配失败的情况下需要人工干预进行编写正则表达式,进而提高密码校验的准确性。
在一实施例中,如图4所示,步骤S24之后,该密码校验方法还包括如下步骤:
S61:当检测到合成处理后的正则表达式时,生成与类型标识信息相同的描述信息。
在本实施例中,通过对步骤S24中预设记录表中的合成处理状态进行检测,当检测到合成处理状态为已合成时,生成与类型标识信息相同的描述信息。
例如,如步骤S24中的例子所述,当检测到合成处理状态为已合成时,合成的正则表达式为:“^[A-Za-z0-9]+$”,若类型标识信息为“包含数字和字母”,则生成的描述信息也为“包含数字和字母”。
S62:在正则数据库中建立描述信息与正则表达式之间的映射关系。
具体地,根据步骤S61得到生成的描述信息,在正则数据库中建立该描述 信息与步骤S25中合成的正则表达式之间的映射关系,即在建立好映射关系之后,能够从正则数据库中查询到该描述信息对应的正则表达式。
例如,如步骤S61中的例子所述,建立正则表达式“^[A-Za-z0-9]+$”与描述信息“包含数字和字母”之间的映射关系,并将该映射关系添加到正则数据库中,即添加映射关系后正则数据库中存在描述信息为“包含数字和字母”,其对应的正则表达式为“^[A-Za-z0-9]+$”。
本实施例中,通过根据合成后的正则表达式生成对应的描述信息,再建立描述信息与正则表达式之间的映射关系,并添加到正则数据库中,从而实现对正则数据库中的不断完善,扩大正则数据库中匹配正则表达式的范围,进一步提高匹配的成功率及密码校验的准确性。
在一实施例中,如图5所示,步骤S5之后,该密码校验方法还包括如下步骤:
S71:若校验结果为校验失败,则将该校验结果发送给目标用户。
具体地,若校验结果为校验失败,则按照预设的方式将该校验结果发送给目标用户,提示目标用户输入的登录密码出现违法字符,其中,预设的方式具体可以是直接在客户端登陆页面上进行消息提示,也可以根据用户的实际需求进行设置。
进一步地,对校验失败的失败次数进行记录,并将失败次数保存到预设日志表中,通过实时对预设日志表中的失败次数进行获取,并将获取到的失败次数与预设阈值进行比较,若失败次数等于预设阈值,则按照预先设置的时间对当前登录密码对应的登陆账号进行冻结处理,即在预先设置的时间内,无法对登陆账号进行登陆,并将账号冻结信息以短信的形式发送给登陆账号预先设置的短信接收手机号码上;若失败次数小于预设阈值,则不做处理,即允许登陆账号继续进行登陆。
其中,预设日志表是指专门用于记录校验失败的失败次数。预设阈值具体可以是10,也可以根据用户的实际需求进行设置,此处不做限制。
需要说明的是,预设日志表中的失败次数在登陆账号未冻结的情况下,将会在预先设置的时间后重新清零,即在预先设置的时间后失败次数将刷新为0。
S72:若校验结果为校验成功,则对登录密码进行用户身份审核,得到审核结果。
具体地,若校验结果为校验成功,则从预设用户库中查询登录密码对应的登陆账号的用户密码,通过利用用户密码对登录密码进行审核,得到审核结果。其中,预设用户库是指专门用于存储用户账号和用户密码的数据库。
本实施例中,若校验失败则反馈失败结果给目标用户,若校验成功则对登录密码进行身份审核,从而实现在保证密码校验准确的前提下能够进一步对登录密码进行审核,避免由于密码校验不准增加密码审核的工作量,进而提高系统的工作效率和密码审核的成功率。
在一实施例中,如图6所示,步骤S72中,即若校验结果为校验成功,则对登录密码进行用户身份审核,得到审核结果包括:
S721:若校验结果为校验成功,则从预设数据库中获取登录密码对应的登陆账号。
具体地,若校验结果为校验成功,则从预设数据库中查询当前登录密码对应的登陆账号,并获取查询到的登陆账号。
S722:从预设用户库中查询与登录账号相同的合法账号,其中,预设用户库中包括合法账号及合法账号对应的合法密码。
在本申请实施例中,根据步骤S721获取到的登陆账号,从预设用户库中查询与该登陆账号相同的用户账号,其中,用户账号即为合法账号,用户账号对应的用户密码即为合法账号对应的合法密码。
S723:基于查询到的合法账号,获取对应的合法密码,并利用合法密码对登录密码进行审核,得到审核结果。
在本申请实施例中,若步骤S722中从预设用户库中查询到与登陆账号相同的合法账号,则表示查询成功,获取合法账号对应的合法密码,并将合法密码与登录密码进行匹配,当合法密码与登录密码相同时,表示匹配成功,输出用户身份审核通过的审核结果;当合法密码与登录密码不相同时,表示匹配失败,输出用户身份审核未通过的审核结果。
例如,预设用户库中存在的合法账号为:“hello”,合法账号对应的合法密码为:“123456”,若登录账号为“hello”,登录账号对应的登录密码为“123456”,从预设用户库中查询到该登录账号“hello”与合法账号“hello”相同,则将登录密码“123456”与合法密码“123456”进行匹配,由于登录密码与合法密码相同,表示匹配成功,输出用户身份审核通过的审核结果;若登录账号对应的登录密码为“654321”,则将登录密码“654321”与合法密码“123456”进行匹配,由于登录密码与合法密码不相同,表示匹配失败,输出用户身份审核未通过的审核结果。
需要说明的是,若步骤S722中从预设用户库中未查询到与登陆账号相同的合法账号,则表示该登陆账号并未注册过,查询不到合法账号,并输出审核失败的审核结果到用户登陆界面上,提示用户重新输入正确的登陆账号。
例如,预设用户库中存在的合法账号为“123”,若登陆账号为“456”,由于登陆账号“456”与预设用户库中的合法账号“123”不同,则表示从预设用户库中未查询到与登陆账号相同的合法账号。
本实施例中,在校验结果为校验成功后,根据登录密码得到对应的登陆账号,通过查询与登陆账号相同的合法账号,获取合法账号对应的合法密码,并利用合法密码对登录密码进行审核,得到审核结果,从而实现在登录密码校验成功后对登录密码的进一步身份审核,提高登录密码审核的合法性,进一步提高密码校验的准确性。
在一实施例中,如图7所示,步骤S723之后,该密码校验方法还包括如下步骤:
S81:若审核结果为审核通过,则检测登录账号的当前用户状态,其中,当前用户状态包括在线状态和离线状态。
在本申请实施例中,若审核结果为审核通过,则将审核通过的登陆账号与预设状态信息表中的合法账号进行匹配,得到合法账号对应的当前用户状态。其中,预设状态信息表是指专门用于记录合法账号及合法账号对应的当前用户状态。
S82:当检测到当前用户状态为在线状态时,则禁止该登录账号进行登录。
具体地,根据步骤S81匹配到的合法账号,从预设状态信息表中查询该合法账号对应的当前用户状态,若查询到当前用户状态为在线状态,则禁止与该合法账号相同的登陆账号进行登陆。
S83:当检测到当前用户状态为离线状态时,则允许该登录账号进行登录。
具体地,根据步骤S81匹配到的合法账号,从预设状态信息表中查询该合法账号对应的当前用户状态,若查询到当前用户状态为离线状态,则允许与该合法账号相同的登陆账号进行登陆。
本实施例中,在审核结果为审核通过后,对登陆账号的当前用户状态进行检测,并根据当前用户状态执行禁止或允许登陆账号进行登陆的结果,从而实现在密码校验准确的前提下,能够根据用户执行状态对登陆账号的登陆权限进行限定,保证在线用户的唯一性。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种密码校验装置,该密码校验装置与上述实施例中密码校验方法一一对应。如图8所示,该密码校验装置包括验证获取模块81、第一匹配模块82、第一生成模块83、密码获取模块84和校验模块85。各功能模块详细说明如下:
验证获取模块81,用于获取用户输入的验证条件,其中,验证条件包括类型标识信息和参数信息;
第一匹配模块82,用于通过将类型标识信息与正则数据库中的描述信息进行匹配的方式,得到正则表达式;
第一生成模块83,用于根据正则表达式,结合参数信息生成验证条件对应的目标正则表达式;
密码获取模块84,用于获取用户输入的登录密码;
校验模块85,用于利用目标正则表达式对登录密码进行校验,得到校验结果。
进一步地,第一匹配模块82包括:
第二匹配子模块,用于将类型标识信息与正则数据库中的描述信息进行匹配;
第二匹配成功子模块,用于若匹配成功,则获取描述信息对应的正则表达式;
第二匹配失败子模块,用于若匹配失败,则对类型标识信息进行分词处理,得到目标分词;
初始正则获取子模块,用于基于目标分词,从正则数据库中获取与每个目标分词对应的初始正则表达式;
合成子模块,用于根据预设合成规则,将每个目标分词对应的初始正则表达式进行合成处理,得到正则表达式。
进一步地,第二匹配失败子模块包括:
提取单元,用于若匹配失败,则根据预设的字符串索引值最大长度值,从类型标识信息中提取目标字符;
查询单元,用于从预设字典库中查询与目标字符相同的合法字符;
查询成功单元,用于若查询成功,则将该目标字符确定为目标分词,并将字符串索引值更新为当前字符串索引值加上当前最大长度值,基于更新后的字符串索引值和最大长度值,从类型标识信息中提取目标字符进行查询,直到完成对类型标识信息的分词操作为止;
查询失败单元,用于若查询失败,则将最大长度值进行递减,基于更新后的字符串索引值和最大长度值,从类型标识信息中提取目标字符进行查询,直到完成对类型标识信息的分词操作为止。
进一步地,密码校验装置还包括:
第二生成模块,用于当检测到合成处理后的正则表达式时,生成与类型标识信息相同的描述信息;
建立模块,用于在正则数据库中建立描述信息与正则表达式之间的映射关系。
进一步地,密码校验装置还包括:
校验失败模块,用于若校验结果为校验失败,则将该校验结果发送给目标用户;
校验成功模块,用于若校验结果为校验成功,则对登录密码进行用户身份审核,得到审核结果。
进一步地,校验成功模块包括:
登录账号获取子模块,用于若校验结果为校验成功,则从预设数据库中获取登录密码对应的登陆账号;
合法账号获取子模块,用于从预设用户库中查询与登录账号相同的合法账号,其中,预设用户库中包括合法账号及合法账号对应的合法密码;
审核子模块,用于基于查询到的合法账号,获取对应的合法密码,并利用合法密码对登录密码进行审核,得到审核结果。
进一步地,密码校验装置还包括:
审核通过模块,用于若审核结果为审核通过,则检测登录账号的当前用户状态,其中,当前用户状态包括在线状态和离线状态;
禁止模块,用于当检测到当前用户状态为在线状态时,则禁止该登录账号进行登录;
允许模块,用于当检测到当前用户状态为离线状态时,则允许该登录账号进行登录。
本申请的一些实施例公开了计算机设备。具体请参阅图9,为本申请的一实施例中计算机设备90基本结构框图。
如图9中所示意的,所述计算机设备90包括通过系统总线相互通信连接存储器91、处理器92、网络接口93。需要指出的是,图9中仅示出了具有组件91-93的计算机设备90,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。
所述存储器91至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器91可以是所述计算机设备90的内部存储单元,例如该计算机设备90的硬盘或内存。在另一些实施例中,所述存储器91也可以是所述计算机设备90的外部存储设备,例如该计算机设备90上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器91还可以既包括所述计算机设备90的内部存储单元也包括其外部存储设备。本实施例中,所述存储器91通常用于存储安装于所述计算机设备90的操作系统和各类应用软件,例如所述密码校验方法的计算机可读指令等。此外,所述存储器91还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器92在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器92通常用于控制所述计算机设备90的总体操作。本实施例中,所述处理器92用于运行所述存储器91中存储的计算机可读指令或者处理数据,例如运行所述密码校验方法的计算机可读指令。
所述网络接口93可包括无线网络接口或有线网络接口,该网络接口93通常用于在所述计算机设备90与其他电子设备之间建立通信连接。
本申请还提供了另一种实施方式,即提供一种非易失性的计算机可读存储介质,所述非易失性的计算机可读存储介质存储有密码信息录入流程,所述密码信息录入流程可被至少一个处理器执行,以使所述至少一个处理器执行上述任意一种密码校验方法的步骤。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实 施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台计算机设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
最后应说明的是,显然以上所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例,附图中给出了本申请的较佳实施例,但并不限制本申请的专利范围。本申请可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。尽管参照前述实施例对本申请进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本申请说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本申请专利保护范围之内。

Claims (20)

  1. 一种密码校验方法,其特征在于,所述密码校验方法包括:
    获取用户输入的验证条件,其中,所述验证条件包括类型标识信息和参数信息;
    通过将所述类型标识信息与正则数据库中的描述信息进行匹配的方式,得到正则表达式;
    根据所述正则表达式,结合所述参数信息生成所述验证条件对应的目标正则表达式;
    获取用户输入的登录密码;
    利用所述目标正则表达式对所述登录密码进行校验,得到校验结果。
  2. 如权利要求1所述的密码校验方法,其特征在于,所述通过将所述类型标识信息与正则数据库中的描述信息进行匹配的方式,得到正则表达式的步骤包括:
    将所述类型标识信息与所述正则数据库中的所述描述信息进行匹配;
    若匹配成功,则获取所述描述信息对应的所述正则表达式;
    若匹配失败,则对所述类型标识信息进行分词处理,得到目标分词;
    基于所述目标分词,从所述正则数据库中获取与每个所述目标分词对应的初始正则表达式;
    根据预设合成规则,将每个所述目标分词对应的所述初始正则表达式进行合成处理,得到所述正则表达式。
  3. 如权利要求2所述的密码校验方法,其特征在于,所述若匹配失败,则对所述类型标识信息进行分词处理,得到目标分词的步骤包括:
    若所述匹配失败,则根据预设的字符串索引值和最大长度值,从所述类型标识信息中提取目标字符;
    从预设字典库中查询与所述目标字符相同的合法字符;
    若查询成功,则将该目标字符确定为所述目标分词,并将所述字符串索引值更新为当前所述字符串索引值加上当前所述最大长度值,基于更新后的所述字符串索引值和所述最大长度值,从所述类型标识信息中提取目标字符进行查询,直到完成对所述类型标识信息的分词操作为止;
    若查询失败,则将所述最大长度值进行递减,基于更新后的所述字符串索引值和所述最大长度值,从所述类型标识信息中提取目标字符进行查询,直到完成对所述类型标识信息的分词操作为止。
  4. 如权利要求2所述的密码校验方法,其特征在于,所述根据预设合成规则,将每个所述目标分词对应的所述初始正则表达式进行合成处理,得到所述正则表达式之后,所述密码校验方法还包括:
    当检测到合成处理后的所述正则表达式时,生成与所述类型标识信息相同的描述信息;
    在所述正则数据库中建立所述描述信息与所述正则表达式之间的映射关 系。
  5. 如权利要求1所述的密码校验方法,其特征在于,所述利用所述目标正则表达式对所述登录密码进行校验,得到校验结果的步骤之后,所述密码校验方法还包括:
    若所述校验结果为校验失败,则将所述校验结果发送给目标用户;
    若所述校验结果为校验成功,则对所述登录密码进行用户身份审核,得到审核结果。
  6. 如权利要求5所述的密码校验方法,其特征在于,所述若所述校验结果为校验成功,则对所述登录密码进行用户身份审核,得到审核结果的步骤包括:
    若所述校验结果为校验成功,则从预设数据库中获取所述登录密码对应的登陆账号;
    从预设用户库中查询与所述登录账号相同的合法账号,其中,预设用户库中包括所述合法账号及所述合法账号对应的合法密码;
    基于查询到的合法账号,获取对应的合法密码,并利用所述合法密码对所述登录密码进行审核,得到所述审核结果。
  7. 如权利要求6所述的密码校验方法,其特征在于,所述基于查询到的合法账号,获取对应的合法密码,并利用所述合法密码对所述登录密码进行审核,得到所述审核结果的步骤之后,所述密码校验方法还包括:
    若所述审核结果为审核通过,则检测所述登录账号的当前用户状态,其中,所述当前用户状态包括在线状态和离线状态;
    当检测到所述当前用户状态为所述在线状态时,则禁止所述登录账号进行登录;
    当检测到所述当前用户状态为所述离线状态时,则允许所述登录账号进行登录。
  8. 一种密码校验装置,其特征在于,所述密码校验装置包括:
    验证获取模块,用于获取用户输入的验证条件,其中,所述验证条件包括类型标识信息和参数信息;
    第一匹配模块,用于通过将所述类型标识信息与正则数据库中的描述信息进行匹配的方式,得到正则表达式;
    第一生成模块,用于根据所述正则表达式,结合所述参数信息生成所述验证条件对应的目标正则表达式;
    密码获取模块,用于获取用户输入的登录密码;
    校验模块,用于利用所述目标正则表达式对所述登录密码进行校验,得到校验结果。
  9. 如权利要求8所述的密码校验装置,其特征在于,所述第一匹配模块包括:
    第二匹配子模块,用于将所述类型标识信息与所述正则数据库中的所述描述信息进行匹配;
    第二匹配成功子模块,用于若匹配成功,则获取所述描述信息对应的所述正则表达式;
    第二匹配失败子模块,用于若匹配失败,则对所述类型标识信息进行分词处理,得到目标分词;
    初始正则获取子模块,用于基于所述目标分词,从所述正则数据库中获取与每个所述目标分词对应的初始正则表达式;
    合成子模块,用于根据预设合成规则,将每个所述目标分词对应的所述初始正则表达式进行合成处理,得到所述正则表达式。
  10. 如权利要求8所述的密码校验装置,其特征在于,所述第二匹配失败子模块包括:
    提取单元,用于若所述匹配失败,则根据预设的字符串索引值和最大长度值,从所述类型标识信息中提取目标字符;
    查询单元,用于从预设字典库中查询与所述目标字符相同的合法字符;
    查询成功单元,用于若查询成功,则将该目标字符确定为所述目标分词,并将所述字符串索引值更新为当前所述字符串索引值加上当前所述最大长度值,基于更新后的所述字符串索引值和所述最大长度值,从所述类型标识信息中提取目标字符进行查询,直到完成对所述类型标识信息的分词操作为止;
    查询失败单元,用于若查询失败,则将所述最大长度值进行递减,基于更新后的所述字符串索引值和所述最大长度值,从所述类型标识信息中提取目标字符进行查询,直到完成对所述类型标识信息的分词操作为止。
  11. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取用户输入的验证条件,其中,所述验证条件包括类型标识信息和参数信息;
    通过将所述类型标识信息与正则数据库中的描述信息进行匹配的方式,得到正则表达式;
    根据所述正则表达式,结合所述参数信息生成所述验证条件对应的目标正则表达式;
    获取用户输入的登录密码;
    利用所述目标正则表达式对所述登录密码进行校验,得到校验结果。
  12. 如权利要求11所述的计算机设备,其特征在于,所述通过将所述类型标识信息与正则数据库中的描述信息进行匹配的方式,得到正则表达式的步骤包括:
    将所述类型标识信息与所述正则数据库中的所述描述信息进行匹配;
    若匹配成功,则获取所述描述信息对应的所述正则表达式;
    若匹配失败,则对所述类型标识信息进行分词处理,得到目标分词;
    基于所述目标分词,从所述正则数据库中获取与每个所述目标分词对应的初始正则表达式;
    根据预设合成规则,将每个所述目标分词对应的所述初始正则表达式进行合成处理,得到所述正则表达式。
  13. 如权利要求12所述的计算机设备,其特征在于,所述若匹配失败,则对所述类型标识信息进行分词处理,得到目标分词的步骤包括:
    若所述匹配失败,则根据预设的字符串索引值和最大长度值,从所述类型标识信息中提取目标字符;
    从预设字典库中查询与所述目标字符相同的合法字符;
    若查询成功,则将该目标字符确定为所述目标分词,并将所述字符串索引值更新为当前所述字符串索引值加上当前所述最大长度值,基于更新后的所述字符串索引值和所述最大长度值,从所述类型标识信息中提取目标字符进行查询,直到完成对所述类型标识信息的分词操作为止;
    若查询失败,则将所述最大长度值进行递减,基于更新后的所述字符串索引值和所述最大长度值,从所述类型标识信息中提取目标字符进行查询,直到完成对所述类型标识信息的分词操作为止。
  14. 如权利要求12所述的计算机设备,其特征在于,所述根据预设合成规则,将每个所述目标分词对应的所述初始正则表达式进行合成处理,得到所述正则表达式之后,所述处理器执行所述计算机可读指令时还包括实现如下步骤:
    当检测到合成处理后的所述正则表达式时,生成与所述类型标识信息相同的描述信息;
    在所述正则数据库中建立所述描述信息与所述正则表达式之间的映射关系。
  15. 如权利要求11所述的计算机设备,其特征在于,所述利用所述目标正则表达式对所述登录密码进行校验,得到校验结果的步骤之后,所述处理器执行所述计算机可读指令时还包括实现如下步骤:
    若所述校验结果为校验失败,则将所述校验结果发送给目标用户;
    若所述校验结果为校验成功,则对所述登录密码进行用户身份审核,得到审核结果。
  16. 一种非易失性的计算机可读存储介质,所述非易失性的计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被一种处理器执行时使得所述一种处理器执行如下步骤:
    获取用户输入的验证条件,其中,所述验证条件包括类型标识信息和参数信息;
    通过将所述类型标识信息与正则数据库中的描述信息进行匹配的方式,得到正则表达式;
    根据所述正则表达式,结合所述参数信息生成所述验证条件对应的目标正则表达式;
    获取用户输入的登录密码;
    利用所述目标正则表达式对所述登录密码进行校验,得到校验结果。
  17. 如权利要求16所述的非易失性的计算机可读存储介质,其特征在于,所述通过将所述类型标识信息与正则数据库中的描述信息进行匹配的方式,得到正则表达式的步骤包括:
    将所述类型标识信息与所述正则数据库中的所述描述信息进行匹配;
    若匹配成功,则获取所述描述信息对应的所述正则表达式;
    若匹配失败,则对所述类型标识信息进行分词处理,得到目标分词;
    基于所述目标分词,从所述正则数据库中获取与每个所述目标分词对应的初始正则表达式;
    根据预设合成规则,将每个所述目标分词对应的所述初始正则表达式进行合成处理,得到所述正则表达式。
  18. 如权利要求17所述的非易失性的计算机可读存储介质,其特征在于,所述若匹配失败,则对所述类型标识信息进行分词处理,得到目标分词的步骤包括:
    若所述匹配失败,则根据预设的字符串索引值和最大长度值,从所述类型标识信息中提取目标字符;
    从预设字典库中查询与所述目标字符相同的合法字符;
    若查询成功,则将该目标字符确定为所述目标分词,并将所述字符串索引值更新为当前所述字符串索引值加上当前所述最大长度值,基于更新后的所述字符串索引值和所述最大长度值,从所述类型标识信息中提取目标字符进行查询,直到完成对所述类型标识信息的分词操作为止;
    若查询失败,则将所述最大长度值进行递减,基于更新后的所述字符串索引值和所述最大长度值,从所述类型标识信息中提取目标字符进行查询,直到完成对所述类型标识信息的分词操作为止。
  19. 如权利要求17所述的非易失性的计算机可读存储介质,其特征在于,所述根据预设合成规则,将每个所述目标分词对应的所述初始正则表达式进行合成处理,得到所述正则表达式之后,所述计算机可读指令被一种处理器执行时,使得所述一种处理器还执行如下步骤:
    当检测到合成处理后的所述正则表达式时,生成与所述类型标识信息相同的描述信息;
    在所述正则数据库中建立所述描述信息与所述正则表达式之间的映射关系。
  20. 如权利要求16所述的非易失性的计算机可读存储介质,其特征在于,所述利用所述目标正则表达式对所述登录密码进行校验,得到校验结果的步骤之后,所述计算机可读指令被一种处理器执行时,使得所述一种处理器还执行如下步骤:
    若所述校验结果为校验失败,则将所述校验结果发送给目标用户;
    若所述校验结果为校验成功,则对所述登录密码进行用户身份审核,得到审核结果。
PCT/CN2019/117701 2019-01-24 2019-11-12 密码校验方法、装置、计算机设备及存储介质 Ceased WO2020151319A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910070228.0A CN109933973B (zh) 2019-01-24 2019-01-24 密码校验方法、装置、计算机设备及存储介质
CN201910070228.0 2019-01-24

Publications (1)

Publication Number Publication Date
WO2020151319A1 true WO2020151319A1 (zh) 2020-07-30

Family

ID=66985213

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117701 Ceased WO2020151319A1 (zh) 2019-01-24 2019-11-12 密码校验方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN109933973B (zh)
WO (1) WO2020151319A1 (zh)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112733199A (zh) * 2020-12-28 2021-04-30 北京极豪科技有限公司 数据处理方法、装置、电子设备及可读存储介质
CN113742406A (zh) * 2021-08-31 2021-12-03 北京锐安科技有限公司 样例数据的抽取方法、装置、设备及介质
CN114240476A (zh) * 2021-11-22 2022-03-25 彩讯科技股份有限公司 异常用户确定方法、装置、设备及存储介质
CN114372247A (zh) * 2022-01-17 2022-04-19 瀚云科技有限公司 一种报表的查看方法、装置、电子设备及可读存储介质
CN114741459A (zh) * 2022-04-26 2022-07-12 平安国际智慧城市科技股份有限公司 基于人工智能的数据查询方法、装置、电子设备及介质
CN114971235A (zh) * 2022-05-12 2022-08-30 深圳壹账通智能科技有限公司 案件分配方法、装置、计算机设备及存储介质
CN115526443A (zh) * 2022-01-05 2022-12-27 中科云策(深圳)科技成果转化信息技术有限公司 一种基于大数据的科技成果转化风险信息评估系统
CN115564948A (zh) * 2022-09-28 2023-01-03 明度智云(浙江)科技有限公司 一种电子记录中实验数据的校验方法、系统和存储介质
CN115617852A (zh) * 2022-09-30 2023-01-17 深圳前海微众银行股份有限公司 一种数据规则匹配方法、设备及存储介质
CN115758301A (zh) * 2022-11-28 2023-03-07 深圳市灰度科技有限公司 Led控制卡的用户权限保护方法、装置、控制卡及介质
CN116450805A (zh) * 2023-04-18 2023-07-18 上海识装信息科技有限公司 文本处理方法、装置、设备和存储介质
CN117575488A (zh) * 2023-03-22 2024-02-20 江苏道达智能科技有限公司 一种生产配方的管理方法、系统及装置
CN117714213A (zh) * 2024-02-05 2024-03-15 云上(江西)密码服务科技有限公司 基于商用密码评测要求的证据链自动校验方法及系统
CN118133269A (zh) * 2024-03-22 2024-06-04 北京优特捷信息技术有限公司 一种业务系统加密方法、装置、电子设备及存储介质
CN118377470A (zh) * 2024-06-21 2024-07-23 浙江保融科技股份有限公司 一种rpa登录组件自动生成工具
CN119011195A (zh) * 2024-07-16 2024-11-22 广东职业技术学院 一种智能帽子的控制方法、装置、系统和介质
CN120893391A (zh) * 2025-07-19 2025-11-04 中数复新智能科技(上海)有限公司 一种用于模具生产过程中各物料编码校验方法及装置

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109933973B (zh) * 2019-01-24 2024-01-19 平安科技(深圳)有限公司 密码校验方法、装置、计算机设备及存储介质
CN110458184B (zh) * 2019-06-26 2023-06-30 平安科技(深圳)有限公司 光学字符识别辅助方法、装置、计算机设备及存储介质
CN111949836A (zh) * 2020-07-31 2020-11-17 上海中通吉网络技术有限公司 正则表达式的应用方法及系统
US11757865B2 (en) * 2020-10-23 2023-09-12 International Business Machines Corporations Rule-based filtering for securing password login
CN112686019A (zh) * 2020-12-25 2021-04-20 深圳市元征科技股份有限公司 车辆传感器数据解析方法、设备及存储介质
CN114997146A (zh) * 2021-03-01 2022-09-02 深圳市腾讯信息技术有限公司 一种参数校验方法、装置、设备及存储介质
US20220407877A1 (en) * 2021-06-21 2022-12-22 International Business Machines Corporation Detecting data leakage
CN113987433B (zh) * 2021-10-25 2024-09-24 西安热工研究院有限公司 Dcs后台用户权限配置及校验方法、系统、设备及介质
CN114244519B (zh) * 2021-11-19 2023-05-23 建信金融科技有限责任公司 密码的校验方法、装置、计算机设备和存储介质
CN114780086A (zh) * 2022-04-21 2022-07-22 中国农业银行股份有限公司 校验函数生成方法和装置
CN115034910A (zh) * 2022-06-28 2022-09-09 中国银行股份有限公司 金融市场债券投资收益率分析方法及装置
CN115080034B (zh) * 2022-06-29 2025-08-26 济南浪潮数据技术有限公司 前端校验方式的调用方法、装置及计算机可读存储介质
CN115935332A (zh) * 2022-12-26 2023-04-07 北京天融信网络安全技术有限公司 一种密码复杂度实现方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150067836A1 (en) * 2013-08-30 2015-03-05 Cavium, Inc. System and Method to Traverse a Non-Deterministic Finite Automata (NFA) Graph Generated for Regular Expression Patterns with Advanced Features
CN105187632A (zh) * 2015-08-06 2015-12-23 北京金山安全软件有限公司 一种手机号码的确定方法及装置
CN107423056A (zh) * 2017-06-30 2017-12-01 北京五八信息技术有限公司 输入内容验证方法及装置
CN108804487A (zh) * 2017-12-28 2018-11-13 中国移动通信集团公司 一种提取目标字符的方法及装置
CN109933973A (zh) * 2019-01-24 2019-06-25 平安科技(深圳)有限公司 密码校验方法、装置、计算机设备及存储介质

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104935558B (zh) * 2014-03-21 2018-01-30 四三九九网络股份有限公司 一种网络用户快捷注册与登录方法及系统
CN104038344B (zh) * 2014-06-19 2017-03-22 电子科技大学 一种基于正则表达式的身份验证方法
CN104407849B (zh) * 2014-10-31 2017-10-17 福建六壬网安股份有限公司 一种带通配符正则表达式的有穷自动机生成方法
CN104580197A (zh) * 2014-12-31 2015-04-29 北京奇虎科技有限公司 密码检测方法和密码检测系统
US10242062B2 (en) * 2015-02-20 2019-03-26 Threatstop, Inc. Normalization and extraction of log data
CN105718787A (zh) * 2016-02-15 2016-06-29 上海斐讯数据通信技术有限公司 路由器密码复杂度校验方法
CN107608981B (zh) * 2016-07-11 2021-11-12 深圳市丰驰顺行信息技术有限公司 基于正则表达式的字符匹配方法及系统
CN106326363B (zh) * 2016-08-11 2019-09-17 海信集团有限公司 一种基于正则表达式的匹配方法及装置
CN106973043B (zh) * 2017-03-14 2019-12-17 广州视源电子科技股份有限公司 一种密码验证系统和密码验证方法
CN107196899B (zh) * 2017-03-21 2020-05-22 北京神州泰岳软件股份有限公司 设备弱口令管理方法及装置
CN108667678A (zh) * 2017-03-29 2018-10-16 中国移动通信集团设计院有限公司 一种基于大数据的运维日志安全检测方法及装置
US10552122B2 (en) * 2017-05-02 2020-02-04 Mastercard International Incorporated Systems and methods for customizable regular expression generation
CN108011863B (zh) * 2017-08-23 2020-12-15 北京车和家信息技术有限责任公司 识别暴力破解的方法及装置
CN108304372B (zh) * 2017-09-29 2021-08-03 腾讯科技(深圳)有限公司 实体提取方法和装置、计算机设备和存储介质
CN107992481B (zh) * 2017-12-25 2021-05-04 鼎富智能科技有限公司 一种基于多叉树的正则表达式匹配方法、装置及系统
CN108062422B (zh) * 2018-01-22 2020-06-26 中国平安人寿保险股份有限公司 一种分页查询的排序方法、智能终端、系统及存储介质
CN108829765A (zh) * 2018-05-29 2018-11-16 平安科技(深圳)有限公司 一种信息查询方法、装置、计算机设备及存储介质
CN109086343A (zh) * 2018-07-11 2018-12-25 中国联合网络通信集团有限公司 信息处理方法、客服服务器及主动式客服系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150067836A1 (en) * 2013-08-30 2015-03-05 Cavium, Inc. System and Method to Traverse a Non-Deterministic Finite Automata (NFA) Graph Generated for Regular Expression Patterns with Advanced Features
CN105187632A (zh) * 2015-08-06 2015-12-23 北京金山安全软件有限公司 一种手机号码的确定方法及装置
CN107423056A (zh) * 2017-06-30 2017-12-01 北京五八信息技术有限公司 输入内容验证方法及装置
CN108804487A (zh) * 2017-12-28 2018-11-13 中国移动通信集团公司 一种提取目标字符的方法及装置
CN109933973A (zh) * 2019-01-24 2019-06-25 平安科技(深圳)有限公司 密码校验方法、装置、计算机设备及存储介质

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112733199A (zh) * 2020-12-28 2021-04-30 北京极豪科技有限公司 数据处理方法、装置、电子设备及可读存储介质
CN113742406A (zh) * 2021-08-31 2021-12-03 北京锐安科技有限公司 样例数据的抽取方法、装置、设备及介质
CN114240476A (zh) * 2021-11-22 2022-03-25 彩讯科技股份有限公司 异常用户确定方法、装置、设备及存储介质
CN115526443A (zh) * 2022-01-05 2022-12-27 中科云策(深圳)科技成果转化信息技术有限公司 一种基于大数据的科技成果转化风险信息评估系统
CN114372247A (zh) * 2022-01-17 2022-04-19 瀚云科技有限公司 一种报表的查看方法、装置、电子设备及可读存储介质
CN114741459A (zh) * 2022-04-26 2022-07-12 平安国际智慧城市科技股份有限公司 基于人工智能的数据查询方法、装置、电子设备及介质
CN114971235A (zh) * 2022-05-12 2022-08-30 深圳壹账通智能科技有限公司 案件分配方法、装置、计算机设备及存储介质
CN115564948A (zh) * 2022-09-28 2023-01-03 明度智云(浙江)科技有限公司 一种电子记录中实验数据的校验方法、系统和存储介质
CN115617852A (zh) * 2022-09-30 2023-01-17 深圳前海微众银行股份有限公司 一种数据规则匹配方法、设备及存储介质
CN115758301A (zh) * 2022-11-28 2023-03-07 深圳市灰度科技有限公司 Led控制卡的用户权限保护方法、装置、控制卡及介质
CN117575488A (zh) * 2023-03-22 2024-02-20 江苏道达智能科技有限公司 一种生产配方的管理方法、系统及装置
CN116450805A (zh) * 2023-04-18 2023-07-18 上海识装信息科技有限公司 文本处理方法、装置、设备和存储介质
CN117714213A (zh) * 2024-02-05 2024-03-15 云上(江西)密码服务科技有限公司 基于商用密码评测要求的证据链自动校验方法及系统
CN117714213B (zh) * 2024-02-05 2024-04-26 云上(江西)密码服务科技有限公司 基于商用密码评测要求的证据链自动校验方法及系统
CN118133269A (zh) * 2024-03-22 2024-06-04 北京优特捷信息技术有限公司 一种业务系统加密方法、装置、电子设备及存储介质
CN118377470A (zh) * 2024-06-21 2024-07-23 浙江保融科技股份有限公司 一种rpa登录组件自动生成工具
CN119011195A (zh) * 2024-07-16 2024-11-22 广东职业技术学院 一种智能帽子的控制方法、装置、系统和介质
CN120893391A (zh) * 2025-07-19 2025-11-04 中数复新智能科技(上海)有限公司 一种用于模具生产过程中各物料编码校验方法及装置

Also Published As

Publication number Publication date
CN109933973A (zh) 2019-06-25
CN109933973B (zh) 2024-01-19

Similar Documents

Publication Publication Date Title
WO2020151319A1 (zh) 密码校验方法、装置、计算机设备及存储介质
WO2020155740A1 (zh) 信息查询方法、装置、计算机设备及存储介质
US12126631B2 (en) Detecting compromised credentials in a credential stuffing attack
WO2021135910A1 (zh) 基于机器阅读理解的信息抽取方法、及其相关设备
CN109962908B (zh) 基于令牌的权限管理方法、装置、设备和存储介质
CN107276982A (zh) 一种异常登录检测方法及装置
CN108924118B (zh) 一种撞库行为检测方法及系统
CN106776791B (zh) 一种基于云服务的模式串匹配验证方法及装置
CN111797217B (zh) 基于faq匹配模型的信息查询方法、及其相关设备
WO2019184122A1 (zh) 一种登录验证方法、装置、终端设备及存储介质
CN112150305B (zh) 企业电力用户信息核验方法及其系统、计算机设备、介质
WO2020164272A1 (zh) 上网设备的识别方法、装置及存储介质、计算机设备
US20250125952A1 (en) Methods, apparatuses, and computer program products for generation and use of mobile legal identification data objects
CN111339293A (zh) 告警事件的数据处理方法、装置和告警事件的分类方法
CN119669446B (zh) 基于知识库检索增强大模型的rfid读写器智能故障诊断方法和系统
CN115297104B (zh) 文件上传方法、装置、电子设备和存储介质
CN116366603A (zh) 一种活跃IPv6地址的确定方法及装置
US11429620B2 (en) Data storage selection based on data importance
CN108763889A (zh) 一种登录验证方法、装置、设备及可读存储介质
CN111597453B (zh) 用户画像方法、装置、计算机设备及计算机可读存储介质
KR20230033420A (ko) 기업의 감사보고서를 기초로 공시용 요약보고서를 작성하여 제공할 수 있는 문서 제공 서버 및 그 동작 방법
CN107430533B (zh) 一种数据校验方法和装置
CN111786991A (zh) 基于区块链的平台认证登录方法及相关装置
CN114095935B (zh) 一种移动云计算场景下攻击想定生成的方法
CN109815717A (zh) 数据权限管理方法、数据访问方法、装置、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19911868

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19911868

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16/11/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19911868

Country of ref document: EP

Kind code of ref document: A1