Verification code generation method and device, electronic equipment and storage medium

By using users' private domain knowledge to generate verification codes, the existing graphic verification codes are solved, and the problem of complex and easy to be recognized by OCR is achieved, achieving higher network security and user experience.

CN119483936APending Publication Date: 2025-02-18BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411552606.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The complex settings of existing graphic verification codes make it difficult for users to identify, and there is a risk of being identified by OCR, which leads to attackers being able to write programs to crack automatically.

Method used

By obtaining the desensitized private domain knowledge information from the user's private domain knowledge base, and combining the pre-established verification code question bank, a verification code string is generated, and finally a verification code is generated based on the string.

Benefits of technology

It improves the difficulty of cracking verification codes, enhances network security, and reduces the difficulty of users to identify verification codes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119483936A_ABST
    Figure CN119483936A_ABST
Patent Text Reader

Abstract

The invention provides a verification code processing method and device, electronic equipment and a storage medium. The method comprises the steps that target private domain knowledge information, used for generating a verification code, of a user is acquired from a pre-stored private domain knowledge base of the user, and the target private domain knowledge information is desensitized private domain knowledge information of the user; obtaining a target verification code type for generating a verification code from a pre-established verification code question bank; generating a verification code character string based on the target private domain knowledge information and the target verification code type; generating the verification code according to the verification code character string; and outputting the verification code. According to the method and the device, the purposes of improving the verification code cracking difficulty and the network security coefficient and reducing the identification difficulty of a user on the verification code can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a verification code generation method, device, electronic device and storage medium. Background Art

[0002] Verification code is a widely used method of Internet security protection, mainly used in human-computer interaction scenarios to prevent malicious attacks and submissions from machines.

[0003] Verification codes can be used in scenarios such as user login, information submission, and user registration. Currently, verification codes are usually distorted, noise is added to verification codes, and image verification codes are used to increase the difficulty of cracking verification codes. However, these methods have the following problems:

[0004] 1. The text and image verification code is too complex, making it difficult for users to recognize the content of the verification code, reducing the user experience.

[0005] 2. The design of the graphic verification code is too simple, and there is a problem of being recognized by technologies such as OCR (Optical Character Recognition), which allows attackers to write programs to automatically crack it. Summary of the invention

[0006] The purpose of the embodiments of the present application is to provide a verification code generation method, device, electronic device and storage medium, so as to achieve the purpose of reducing the difficulty of users to recognize the verification code while improving the difficulty of cracking the verification code and the network security factor. The specific technical solution is as follows:

[0007] In a first aspect of the implementation of the present application, a verification code generation method is first provided, comprising:

[0008] Acquire, from a pre-stored private domain knowledge base of a user, target private domain knowledge information of the user for generating a verification code, wherein the target private domain knowledge information is the private domain knowledge information of the user after desensitization processing;

[0009] Obtaining a target verification code type for generating a verification code from a pre-established verification code question bank;

[0010] Generate a verification code string based on the target private domain knowledge information and the target verification code type;

[0011] Generate the verification code according to the verification code character string;

[0012] The verification code is output.

[0013] In a second aspect of the implementation of the present application, a verification code generating device is provided, comprising:

[0014] A target private domain information acquisition module, used to acquire the target private domain knowledge information of the user for generating a verification code from a pre-stored private domain knowledge base of the user, wherein the target private domain knowledge information is the private domain knowledge information of the user after desensitization processing;

[0015] A verification code type acquisition module, used to acquire a target verification code type for generating a verification code from a pre-established verification code question bank;

[0016] A verification code string generation module, used to generate a verification code string based on the target private domain knowledge information and the target verification code type;

[0017] A verification code generation module, used to generate the verification code according to the verification code string;

[0018] The verification code output module is used to output the verification code.

[0019] In another aspect of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0020] Memory, used to store computer programs;

[0021] The processor is used to implement any of the verification code processing methods described above when executing the program stored in the memory.

[0022] In another aspect of the present application, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer executes any of the verification code processing methods described above.

[0023] In another aspect of the implementation of the present application, a computer program product comprising instructions is provided, on which a computer program is stored. When the computer program is run on a computer, the computer executes any of the verification code processing methods described above.

[0024] The solution provided in the embodiment of the present application obtains the user's target private domain knowledge information for generating a verification code from a pre-stored private domain knowledge base of the user, and the target private domain knowledge information is the user's private domain knowledge information after desensitization processing. Obtain the target verification code type for generating a verification code from a pre-established verification code question bank. Generate a verification code string based on the target private domain knowledge information and the target verification code type. Generate a verification code according to the verification code string and output the verification code. The embodiment of the present application generates a verification code by adopting the user's private domain knowledge, and the private domain information is only known to the user, which can increase the difficulty of cracking the verification code and improve the network security factor. At the same time, since the private domain information is only known to the user, the difficulty of the user's recognition of the verification code can be reduced compared to the overly complex graphic verification code. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0026] Figure 1 A flowchart of a verification code processing method provided in an embodiment of the present application;

[0027] Figure 2 A flowchart of a method for storing private domain knowledge information provided in an embodiment of the present application;

[0028] Figure 3 A flowchart of a method for obtaining private domain knowledge information provided in an embodiment of the present application;

[0029] Figure 4 A flowchart of another method for acquiring private domain knowledge information provided in an embodiment of the present application;

[0030] Figure 5 A flowchart of the steps of another method for acquiring private domain knowledge information provided in an embodiment of the present application;

[0031] Figure 6 A flowchart of a method for obtaining a verification code string provided in an embodiment of the present application;

[0032] Figure 7 A flowchart of a verification code verification method provided in an embodiment of the present application;

[0033] Figure 8 A flowchart of a method for outputting verification prompt information provided in an embodiment of the present application;

[0034] Fig. 9 A flowchart of a verification code generation method provided in an embodiment of the present application;

[0035] Fig.10 A schematic diagram of a system framework provided in an embodiment of the present application;

[0036] Fig.11 A schematic diagram of a verification code generation process provided in an embodiment of the present application;

[0037] Fig.12 A schematic diagram of a verification code verification process provided in an embodiment of the present application;

[0038] Fig.13 A schematic diagram of the structure of a verification code processing device provided in an embodiment of the present application;

[0039] Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0041] Figure 1 A flowchart of a verification code processing method provided in an embodiment of the present application, such as Figure 1 As shown, the verification code processing method may include: step 101, step 102, step 103 and step 104.

[0042] Step 101: acquiring target private domain knowledge information of the user for generating a verification code from a pre-stored private domain knowledge base of the user, wherein the target private domain knowledge information is the private domain knowledge information of the user after desensitization processing.

[0043] The embodiments of the present application can be applied to the scenario of generating a verification code in combination with the user's private domain knowledge information.

[0044] The user's private domain knowledge information refers to the in-depth information about the user's data, behavior, preferences, needs, etc. that the individual has accumulated, owned and managed in the private domain environment. In this example, the user's private domain knowledge information may include: personal data (such as age, name, contact information, ID card information, etc.), professional knowledge and skills (such as the user's accumulated professional knowledge, skills, experience, etc. in a specific field or industry), health management information (such as the user's health status, exercise data, diet records, etc.), etc.

[0045] The private domain knowledge base refers to a database pre-established by the system for storing the private domain knowledge information of users. In this example, the corresponding private domain knowledge bases can be pre-established for different users, and the corresponding user identifiers are added to identify the users to whom the private domain knowledge bases belong.

[0046] When it is necessary to generate a verification code for a user, the target private domain knowledge information of the user for generating the verification code can be obtained from the pre-stored private domain knowledge base of the user. The private domain knowledge base stores the user's private domain knowledge information after desensitization processing, so the obtained target private domain knowledge information is also the user's private domain knowledge information after desensitization processing. The desensitization processing process and storage process of the user's private domain knowledge information will be combined with the following embodiments. Figure 2 A detailed description is given below and this embodiment will not be described in detail here.

[0047] In a specific implementation, when a user submits information or logs in to a page, the verification code generation operation is triggered. At this time, the user's user ID (such as the user's account number when logging in to the website) can be obtained, and the user's private domain knowledge base can be determined based on the user ID. Then, the target private domain knowledge information for generating the verification code can be filtered out from the user's private domain knowledge base.

[0048] In a specific implementation of the present application, when selecting to use the user's private domain knowledge to generate a verification code, an authorization confirmation message can be sent to the user. Only after the user authorizes, the private domain knowledge can be obtained and the verification code can be generated using the private domain knowledge. This implementation process will be combined with the following embodiments. Figure 3 A detailed description is given below and this embodiment will not be described in detail here.

[0049] In another specific implementation of the present application, the target private domain knowledge information may be private domain knowledge information selected by the user, or may be private domain knowledge information selected from a private domain knowledge base in combination with the risk level of the user's current scenario. Figure 3 and Figure 4 A detailed description is given below and this embodiment will not be described in detail here.

[0050] After the user's target private domain knowledge information for generating a verification code is acquired from the pre-stored private domain knowledge base of the user, step 102 is executed.

[0051] Step 102: Obtain a target verification code type for generating a verification code from a pre-established verification code question bank.

[0052] The verification code question bank refers to a pre-established database for storing verification code types. In this embodiment, the verification code question bank stores verification code types corresponding to different private domain knowledge information to indicate what type of verification code is generated.

[0053] After obtaining the user's target private domain knowledge information for generating a verification code from the pre-stored user's private domain knowledge base, the target verification code type for generating a verification code can be obtained from the pre-established verification code question bank. For example, the target verification code type matching the target private domain knowledge information can be randomly obtained from the verification code question bank.

[0054] After the target verification code type for generating the verification code is acquired from the pre-established verification code question bank, step 103 is executed.

[0055] Step 103: Generate a verification code string based on the target private domain knowledge information and the target verification code type.

[0056] After obtaining the target verification code type for generating the verification code from the pre-established verification code question bank, a verification code string can be generated based on the target private domain knowledge information and the target verification code type. In a specific implementation, the target verification code type defines what type of verification code is generated, and combined with the target private domain knowledge information, a verification code string matching the target verification code type can be generated. For example, the target private domain knowledge information is the user's mobile phone number, and the target verification code type is a number multiplication question type. At this time, a verification code string such as "how much is the first digit of the mobile phone number multiplied by the last digit" can be generated based on the target private domain knowledge information and the target verification code type. The implementation process of generating a verification code string based on the target private domain knowledge information and the target verification code type will be described in the following embodiments in combination with the target verification code type. Figure 6 A detailed description is given below and this embodiment will not be described in detail here.

[0057] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation to the embodiments.

[0058] After the verification code string is generated based on the target private domain knowledge information and the target verification code type, step 104 is performed.

[0059] Step 104: Generate the verification code according to the verification code character string.

[0060] After the verification code string is generated based on the target private domain knowledge information and the target verification code type, a verification code can be generated based on the verification code string. Specifically, the verification code string can be rendered and displayed on a pre-established blank image to generate an initial verification code. Then, the initial verification code is processed by a preset processing method (such as adding noise, line interference, text distortion, etc.) to generate a verification code. This implementation process will be combined with the following embodiments. Fig. 9 A detailed description is given below and this embodiment will not be described in detail here.

[0061] After the verification code is generated according to the verification code character string, step 105 is executed.

[0062] Step 105: Output the verification code.

[0063] After the verification code is generated according to the verification code string, the verification code can be output. Specifically, the generated verification code can be displayed on a specified page in a pop-up window (or other forms, such as a transparent layer, etc.) so that the user can verify the verification code. For example, when a user submits a comment, the user clicks the submit button and a verification code is generated based on the user's private domain knowledge information, and the verification code is displayed in a pop-up window or a transparent layer on the upper layer of the submit button, etc., to achieve the output of the verification code.

[0064] The embodiment of the present application uses the user's private domain knowledge to increase the difficulty of cracking. Because it is difficult for robots or hackers to obtain and understand this private domain knowledge, this knowledge is often only understood and remembered by the user himself, which improves network security. At the same time, users often have a deep memory of their own private domain knowledge, such as their nicknames, their favorite TV series, etc. This type of verification code may make it easier for users to remember and input, which can avoid the problem of overly complex verification codes and improve the user experience. In addition, by using the user's private domain knowledge to create a verification code, this method integrates the user's personal information into the application, which can help users establish stronger connections and loyalty.

[0065] In this embodiment, in order to reduce the risk of leakage of the user's private domain knowledge, the user's desensitized private domain knowledge can be stored in the private domain knowledge base. Figure 2 This is described in detail as follows.

[0066] Reference Figure 2 , shows a flowchart of the steps of a private domain knowledge information storage method provided by an embodiment of the present application. Figure 2 As shown, the private domain knowledge information storage method may include: step 201, step 202 and step 203.

[0067] Step 201: Acquire the user's private domain knowledge information.

[0068] In this embodiment, the user's private domain knowledge information may be acquired in advance.

[0069] After the user's private domain knowledge information is acquired, step 202 is executed.

[0070] Step 202: performing data desensitization processing on the private domain knowledge information to obtain desensitized private domain knowledge information.

[0071] Data desensitization refers to the deformation of certain sensitive information through specific desensitization rules to achieve reliable protection of sensitive privacy data. Through data desensitization technology, it can effectively prevent the leakage of personal sensitive information (such as ID number, mobile phone number, bank card number, etc.) and protect personal privacy from being violated.

[0072] After obtaining the user's private domain knowledge information, the user's private domain knowledge information can be desensitized to obtain desensitized private domain knowledge information. In this example, the data desensitization method can be any one of the methods such as replacement method, encryption method, masking method, and pseudo data generation method.

[0073] After performing data desensitization processing on the private domain knowledge information to obtain desensitized private domain knowledge information, step 203 is executed.

[0074] Step 203: storing the desensitized private domain knowledge information in a pre-established private domain knowledge base of the user.

[0075] After the private domain knowledge information is desensitized to obtain the desensitized private domain knowledge information, the desensitized private domain knowledge information can be stored in the pre-established private domain knowledge base of the user. Specifically, in order to protect the personal information security of the user, the content in the desensitized private domain knowledge base is the desensitized user information, not the complete user information. For example, after the nickname is desensitized, only part of the nickname content is included, such as the first few, middle few or last few characters of the nickname, etc., to prevent personal information leakage.

[0076] The embodiment of the present application can effectively prevent the leakage of personal sensitive information (such as ID number, mobile phone number, bank card number, etc.) and protect personal privacy from being violated by desensitizing and storing the user's private knowledge information.

[0077] Next, combine Figure 3 The process of obtaining target private domain knowledge information is described in detail.

[0078] Reference Figure 3 , shows a flowchart of the steps of a method for obtaining private domain knowledge information provided by an embodiment of the present application. Figure 3 As shown, the method for acquiring private domain knowledge information may include: step 301 and step 302.

[0079] Step 301: In response to receiving a verification code generation operation, displaying authorization confirmation information indicating the use of the user's private domain knowledge information.

[0080] In this embodiment, after receiving the verification code generation operation, authorization confirmation information for indicating the use of the user's private domain knowledge information may be displayed, and the authorization confirmation information may be used to prompt the user whether the user's private domain knowledge information may be used to generate a verification code.

[0081] In actual applications, a pop-up window with authorization confirmation information for using private domain knowledge can be displayed on the user's browsing page, and "Confirm" and "Reject" buttons can be displayed in the pop-up window to allow the user to choose whether to use private domain knowledge information to generate a verification code.

[0082] After the authorization confirmation information indicating the use of the user's private domain knowledge information is displayed, step 302 is executed.

[0083] Step 302: upon receiving a confirmation response message sent by the user, acquiring the target private domain knowledge information from the private domain knowledge base of the user.

[0084] After the authorization confirmation information indicating the use of the user's private domain knowledge information is displayed, the user can choose whether to use the user's private domain knowledge information to generate a verification code.

[0085] If the user refuses to use his private domain knowledge information to generate a verification code, the verification code can be generated according to the conventional process, and this embodiment does not limit this process.

[0086] If the user chooses to use his private domain knowledge information to generate a verification code, the target private domain knowledge information can be obtained from the user's private domain knowledge base.

[0087] The embodiment of the present application can prevent illegal users from stealing the user's private domain knowledge information by obtaining the user's authorization before using the user's private domain knowledge information to generate a verification code, thereby improving the security index of the user's private domain knowledge information.

[0088] Next, combine Figure 4 The process of filtering target private domain knowledge information by a user is described in detail.

[0089] Reference Figure 4 , shows a flowchart of another method for obtaining private domain knowledge information provided by an embodiment of the present application. Figure 4 As shown, the method for acquiring private domain knowledge information may include: step 401, step 402 and step 403.

[0090] Step 401: Acquire all private domain knowledge information of the user from the private domain knowledge base.

[0091] In this embodiment, after the user authorizes the use of his private domain knowledge information to generate a verification code, all the private domain knowledge information of the user can be obtained from the private domain knowledge base of the user.

[0092] After all the private domain knowledge information of the user is acquired from the private domain knowledge base, step 402 is executed.

[0093] Step 402: Display all the private domain knowledge information.

[0094] After obtaining all the private domain knowledge information of the user from the private domain knowledge base, all the private domain knowledge information can be displayed. For example, all the private domain knowledge information can be displayed in a pop-up window on the user's browsing page, as shown below:

[0095] 1. Personal Data

[0096] Name

[0097] age

[0098] Contact Details

[0099] ID card information

[0100] 2. Health management information

[0101] Health status

[0102] Sports data

[0103] Food record information 3....

[0105] By displaying all the private domain knowledge information of the user in the above manner, the user can filter out the private domain knowledge information used for generating the verification code this time from all the private domain knowledge information.

[0106] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation to the embodiments.

[0107] After all private domain knowledge information of the user is displayed, step 403 is executed.

[0108] Step 403: Acquire the target private domain knowledge information screened by the user from all the private domain knowledge information.

[0109] After all the private domain knowledge information of the user is displayed, the target private domain knowledge information filtered by the user from all the private domain knowledge information may be acquired.

[0110] In the embodiment of the present application, the user can select the target private domain knowledge information for generating the verification code by himself, so as to avoid the situation that the user has repeatedly failed to verify by randomly selecting the private domain knowledge information that the user has forgotten to generate the verification code. At the same time, the user has the right to choose whether to use the private domain knowledge to generate the verification code, or to choose which private domain knowledge to use for generating the verification code, which increases the flexibility of the verification code and the control of the user.

[0111] Next, combine Figure 5 The process of obtaining target private domain knowledge information based on the risk level of the scenario in which the user is located is described in detail.

[0112] Reference Figure 5 , shows a flowchart of the steps of another method for obtaining private domain knowledge information provided by an embodiment of the present application. Figure 5 As shown, the method for acquiring private domain knowledge information may include: step 501, step 502 and step 503.

[0113] Step 501: Obtain the current time information of the system and the current location information of the user.

[0114] In this embodiment, after the user authorizes the use of his private domain knowledge information to generate a verification code, the current time information of the system and the current location information of the user can be obtained.

[0115] In actual applications, you can first apply for location authorization from the user, so that you can use the positioning function on the electronic device used by the user to locate the user's current location information.

[0116] After obtaining the system current time information and the user's current location information, step 502 is executed.

[0117] Step 502: Based on the current time information and / or the location information, determine the risk level of the scene where the user is currently located.

[0118] After obtaining the current time information of the system and the current location information of the user, the risk level of the scene where the user is currently located can be determined based on the current time information and / or the current location information of the user.

[0119] In a specific implementation, the risk levels corresponding to different time periods and location information can be pre-set. For example, the risk level from 10:00 am to 5:00 pm is set to a high risk level, the risk level from 5:00 pm to 10:00 pm is set to a medium risk level, and the risk level from 10:00 pm to 10:00 am the next day is set to a low risk level. The risk level at home is set to a low risk level, the risk level in the office is set to a medium risk level, and the risk level in shopping places, public transportation and other places is set to a high risk level, etc. Corresponding risk indexes can be set for different risk levels of time and location. When determining the risk level of the user's current scene, any of the following three methods can be used to determine the risk level:

[0120] 1. Determine the risk level of the user's current scenario based on the current time information.

[0121] 2. Determine the risk level of the user's current scene based on the user's current location information.

[0122] 3. Determine the risk level of the scene the user is currently in by combining the user's current location information and current time information. For example, the risk index corresponding to the current time information and the risk index corresponding to the current location information may be weighted and summed to obtain the risk index of the scene the user is currently in, and the risk level of the scene the user is currently in may be determined based on the index.

[0123] After determining the risk level of the scene where the user is currently located based on the current time information and / or location information, step 503 is executed.

[0124] Step 503: Filter out the target private domain knowledge information matching the risk level from the private domain knowledge base of the user.

[0125] After determining the risk level of the user's current scene based on the current time information and / or location information, the target private domain knowledge information that matches the risk level can be filtered out from the user's private domain knowledge base. In a specific implementation, the corresponding risk level can be set for different private domain knowledge. For example, a lower risk level can be set for the user's private domain knowledge that remains unchanged for a long time (such as mobile phone number, ID card information, etc.), and a higher risk level can be set for the user's private domain knowledge that changes frequently (such as exercise status, browsing history, etc.). In this way, matching target private domain knowledge can be filtered out from the private domain knowledge base according to the risk level of the user's current scene.

[0126] Understandably, when there is only one type of private domain knowledge that passes the risk level screening, the private domain knowledge can be directly used as the target private domain knowledge information. When the private domain knowledge that passes the risk level screening includes multiple types of private domain knowledge (such as mobile phone numbers, ID card information, etc.), at this time, the target private domain knowledge information can be screened out from the multiple types of private domain knowledge by random selection. The frequency of use of private domain knowledge can also be used to screen out the private domain knowledge with a higher frequency of use from the multiple types of private domain knowledge as the target private domain knowledge information, etc.

[0127] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation to the embodiments.

[0128] In the embodiments of the present application, by screening out target private domain knowledge information from the user's private domain knowledge base according to the risk level of the user's location scenario, the generated verification code can have high security and reduce the risk of the verification code being cracked. At the same time, by adjusting the use of private domain knowledge according to information such as time and location, the content of the verification code has randomness and temporariness, which can further increase the cracking difficulty of the verification code and improve the network security factor.

[0129] Next, a detailed description will be given of the generation process of the verification code string in conjunction with Figure 6 For the generation process of the verification code string.

[0130] Referring to Figure 6 , a flowchart of the steps of a method for obtaining a verification code string provided by an embodiment of the present application is shown. As Figure 6 shown, the method for obtaining the verification code string may include: step 601, step 602, step 603, and step 604.

[0131] Step 601: Screen out target information for generating the verification code string from the target private domain knowledge information.

[0132] In this embodiment, after obtaining the target private domain knowledge information, target information for generating the verification code string may be screened out from the target private domain knowledge information.

[0133] In some examples, the target information may be screened out from the target private domain knowledge information in a random screening manner. For example, if the target private domain knowledge information is the user's mobile phone number: 13xxxx2118, then two digits may be randomly screened out from this mobile phone number (such as the 1 in the second last digit and the 1 in the third last digit, etc.) as the target information, etc.

[0134] In some examples, the target information may be screened out from the target private domain knowledge information in a manner of user independent selection. For example, if the target private domain knowledge information is the user's nickname: Luo X Xing X Chen, when generating the verification code string, a selection prompt message for the target information of the nickname may be displayed to the user, so that the user randomly selects at least one character from the user's nickname "Luo X Xing X Chen" as the target information, etc.

[0135] It can be understood that the above examples are only examples listed for better understanding the technical solution of the embodiments of the present application and do not serve as the sole limitation of this embodiment.

[0136] After screening out the target information for generating the verification code string from the target private domain knowledge information, step 602 is executed.

[0137] Step 602: Generate a question string associated with the target verification code type according to the target information.

[0138] After the target information for generating the verification code string is filtered out from the target private domain knowledge information, a question string associated with the target verification code type can be generated according to the target information. For example, when the filtered target information is the first and last digits of the user's mobile phone number (where the first and last digits are both 1), and the verification code type is a math problem type, then a question string such as "What is the first digit of the mobile phone number multiplied by the last digit" can be generated.

[0139] After generating a question string associated with the target verification code type according to the target information, step 603 is executed.

[0140] Step 603: Generate a correct answer string corresponding to the question string according to the target information, and randomly generate a distractor string corresponding to the question string.

[0141] After generating a question string associated with the target verification code type according to the target information, a correct answer string corresponding to the question string can be generated according to the target information, and a distractor string corresponding to the question string can be randomly generated. For example, following the example in step 602 above, the generated question string is "how much is the first digit of the mobile phone number multiplied by the last digit", then the correct answer string can be "1×1=1", and the randomly generated distractor string can be "1×2=2", "1×3=3", "1×8=8", etc.

[0142] Step 604: Use the question string, the correct answer string and the interference item string as the verification code string.

[0143] After the question string, the correct answer string and the interference item string are generated through the above steps, the question string, the correct answer string and the interference item string can be used as the verification code string.

[0144] The embodiment of the present application generates a verification code by filtering information from the target private domain knowledge information, which can ensure that the verification code content is closely related to the target user or system, increasing the difficulty for external attackers to crack it. The random generation of interference item strings increases the complexity of the verification code, making it more difficult for automated scripts or robots to crack the verification code through simple pattern matching, further hindering automated attacks.

[0145] After the verification code is generated, the user can enter verification information to verify the verification code. Figure 7 This is described in detail as follows.

[0146] Reference Figure 7 , shows a flowchart of the steps of a verification code verification method provided by an embodiment of the present application. Figure 7As shown, the verification code verification method may include: step 701, step 702, step 703 and step 704.

[0147] Step 701: Obtain verification information for the verification code input by the user.

[0148] In this embodiment, after the verification code character string is rendered and displayed on the blank image to generate the verification code, the user can verify the verification code. At this time, verification information for the verification code input by the user can be obtained.

[0149] After obtaining the verification information for the verification code input by the user, step 702 is executed.

[0150] Step 702: When the verification information does not match the standard verification information corresponding to the verification code, obtain the number of times the user verifies the verification code.

[0151] After obtaining the verification information for the verification code input by the user, the verification information may be matched with the standard verification information corresponding to the verification code.

[0152] If the verification information entered by the user matches the standard verification information corresponding to the verification code, it means that the verification is successful and the user can proceed to the next step.

[0153] If the verification information entered by the user does not match the standard verification information corresponding to the verification code, it means that the verification has failed. At this time, the number of times the user has verified the verification code can be obtained, that is, the number of times the user has completed verification.

[0154] After obtaining the number of times the user verifies the verification code, step 703 is executed.

[0155] Step 703: Determine whether the verification times have reached a preset verification times threshold, and / or whether the current time has reached a preset expiration time of the verification code.

[0156] The verification times threshold refers to the maximum number of times that a pre-set verification code can be verified. In this example, the verification times threshold can be 3 times, 4 times, etc., and this embodiment does not limit the specific value of the verification times threshold.

[0157] The expiration time refers to the pre-set time when the verification code expires.

[0158] After obtaining the number of times the user verifies the verification code, it can be determined whether the number of verifications reaches a preset verification threshold and / or whether the current time reaches a preset expiration time of the verification code.

[0159] Step 704: when it is determined that the number of verifications reaches the verification number threshold, and / or the current time does not reach the expiration time of the verification code, determine that the verification result of the verification code is a verification failure result.

[0160] When it is determined that the number of verifications reaches the verification number threshold and / or the current time reaches the expiration time of the verification code, the verification result of the verification code can be determined to be a verification failure result, and a prompt message of verification failure can be output to the user.

[0161] The embodiment of the present application can prevent illegal users from continuously attempting verification by presetting a verification code verification number threshold and an expiration time, thereby improving the network security factor.

[0162] In this embodiment, when the user fails to verify multiple times and the number of verifications does not reach the verification number threshold, and the verification code has not expired, a prompt message can be output to the user to assist the user in verification. Figure 8 This is described in detail as follows.

[0163] Reference Figure 8 , shows a flowchart of the steps of a verification prompt information output method provided by an embodiment of the present application. Figure 8 As shown, the verification prompt information output method may include: step 801 and step 802.

[0164] Step 801: When it is determined that the number of verifications has not reached the verification number threshold and the current time has not reached the expiration time of the verification code, determine whether the number of verifications has reached a set number, and the set number is less than the verification number threshold.

[0165] In this embodiment, the set number of times refers to the number of verifications that is preset for outputting a verification prompt to the user. The set number of times is less than the verification number threshold of the verification code. For example, when the verification number threshold is 5 times, the set number of times can be 2 times, 3 times, etc. When the verification number threshold is 3 times, the set number of times can be 2 times, etc.

[0166] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation to the embodiments.

[0167] If it is determined that the number of verifications has not reached the verification number threshold and the current time has not reached the expiration time of the verification code, it can be determined whether the number of verifications of the user for the verification code has reached the set number of times. If it has not reached the set number of times, the user continues to verify the verification code. If it has reached the set number of times, step 802 is executed.

[0168] Step 802: When it is determined that the number of verifications reaches the set number of times, output verification prompt information associated with the verification code.

[0169] When it is determined that the number of verifications reaches the set number of times, verification prompt information associated with the verification code may be output to the user.

[0170] In the embodiment of the present application, some private domain knowledge may not be easy to remember or understand, especially when the user forgets this information in a short period of time, which will cause the user to fail the verification. For those private domain knowledge that the user may forget, the auxiliary verification method is adopted to reduce the number of user verification failures and improve the user experience.

[0171] Next, combine Fig. 9 The process of generating the verification code is described in detail as follows.

[0172] Reference Fig. 9 , shows a flowchart of the steps of a verification code generation method provided by an embodiment of the present application. Fig. 9 As shown, the verification code generation method may include: step 901 and step 902.

[0173] Step 901: Display the verification code string on a pre-created blank image to generate an initial verification code.

[0174] In this embodiment, after obtaining the verification code string, the verification code string can be displayed on a pre-created blank image to generate an initial verification code. Specifically, an image processing library can be used to create a blank image of a specified size and background color as a carrier of the verification code. After obtaining the verification code string, the verification code string (including the question string, the correct answer string, and the interference item string) can be drawn on the image with a specific font, size, and color on the blank image using an image drawing function, and at this time, the initial verification code can be obtained.

[0175] Step 902: Process the initial verification code based on a preset processing method to generate the verification code.

[0176] After obtaining the initial verification code, the initial verification code can be processed based on a preset processing method to generate a verification code. The preset processing method may include at least one of a noise adding processing method, a line interference processing method, a distortion and deformation processing method, etc. Among them, the noise adding processing method refers to randomly adding a certain number of noise points to the image, and these noise points can be black or white pixels. The line interference processing method refers to drawing lines of random positions and directions on the image. These lines can be straight lines, curves or broken lines to further interfere with image recognition. The distortion and deformation processing method refers to the overall distortion or deformation of the image, such as rotation, scaling, tilting, etc., to change the shape and layout of the image, making it more difficult to be automatically recognized.

[0177] The embodiment of the present application adds noise, line interference, distortion and other processing methods to make the verification code image more complex and difficult to recognize, thereby effectively improving the security of the verification code and preventing malicious attacks by automated scripts and robots.

[0178] The present application embodiment also provides a system framework to generate and process the verification code. Fig.10 The system may include: a knowledge base module and a verification code module.

[0179] The knowledge base module includes a question bank and a desensitized private domain knowledge base. The question bank and the desensitized private domain knowledge base are combined to generate the materials and types of verification codes. Different question banks rely on different private domain knowledge bases to generate verification codes. For example, if there is a question in the question bank titled "Please connect the last 4 characters of your nickname by dragging and dropping", a drag-type verification code will be generated based on the last 4 characters of the user's nickname.

[0180] The verification code module is composed of a random verification code module, a verification code generation module, a verification code storage module, and a verification code verification module.

[0181] The random module is used to generate random questions, distractors, and answers based on the question bank and the desensitized private domain knowledge base. For example, the generated question is what is the first digit of the mobile phone number multiplied by the last digit? The generated answer is 1×1=1, and the generated distractors are 1×2=2, 1×3=3, 1×4=4, etc.

[0182] The verification code module is used to generate verification code images and content. For example, based on the above random verification code module, the generated questions, answers, and interference items will generate relevant verification code images, allowing users to click and select the corresponding answer.

[0183] The verification code storage module will store the verification code question bank, answers, current session information (such as the current number of verifications, IP address of the user's device, etc.), validity period, number of allowed verifications, and number of current verification failures.

[0184] The verification code verification module will compare the content entered by the user with the information obtained from the verification code module. If they are consistent with the answer, it will pass.

[0185] As can be seen from the system block diagram, the verification code based on user knowledge adds a knowledge base on the basis of the traditional verification code, and plays a better protection role on the verification code through the knowledge blind spot of machine cracking.

[0186] Next, combine Fig.11 The verification code generation process is described in detail.

[0187] Reference Fig.11 , which shows a schematic diagram of a verification code generation process provided by an embodiment of the present application. Fig.11 As shown, the verification code generation process may include:

[0188] 1. Randomly generate question bank, answer, and verification code type. That is, determine the verification code type through the question bank, and randomly generate the verification code and the answer to the verification code based on the verification code type and the private domain knowledge base.

[0189] 2. The distraction of generated answers. Generate random questions, distractions, and answers based on the question bank and desensitized private domain knowledge base.

[0190] 3. Save the question bank, answers and session information. That is, save the verification code question bank, answers, current session information (such as the current verification times, IP address of the user's device, etc.), validity period, number of allowed verifications, and number of current verification failures.

[0191] 4. Draw the verification code. That is, generate the picture and content of the verification code. For example, based on the above random verification code module, the questions, answers, and interference items will generate relevant verification code pictures, allowing users to click and select the corresponding answer.

[0192] 5. Return the verification code and verification code type. That is, after drawing the verification code, the verification code and verification code type can be returned to the user end.

[0193] 6. Front-end display, that is, displaying the verification code on the user side to instruct the user to verify.

[0194] The verification process of the verification code can be combined with Fig.12 This is described in detail as follows.

[0195] Reference Fig.12, showing a schematic diagram of a verification code verification process provided in an embodiment of the present application.

[0196] like Fig.12 As shown, the verification code verification process may include:

[0197] 1. The user enters the verification code. The verification code entered by the user is the verification information of the verification code.

[0198] 2. Obtain verification code information from the verification code storage module, where the verification code information is standard verification information of the verification code.

[0199] 3. Determine whether the upper limit of the number of verification errors has been exceeded. That is, determine whether the number of times the user has currently verified has reached the verification number threshold.

[0200] 4. If the maximum number of allowed verification errors is not exceeded, the validity period of the verification code is verified, that is, whether the verification code has expired.

[0201] 5. If the verification code is within the validity period, determine whether the answer is correct. If correct, the verification passes.

[0202] The solution of generating verification codes based on user private domain knowledge in the embodiment of the present application has a wide range of application prospects. The above verification code generation solution can be adopted for online service platforms that require user login, registration, crawler and other verifications, including but not limited to the following types of companies: social media platforms, e-commerce websites, online banks and financial companies, education platforms, healthcare industries, government and public service websites, etc.

[0203] The verification code processing method provided in the embodiment of the present application obtains the user's target private domain knowledge information for generating the verification code from the pre-stored user's private domain knowledge base, and the target private domain knowledge information is the user's private domain knowledge information after desensitization processing. Obtain the target verification code type for generating the verification code from the pre-established verification code question bank. Generate a verification code string based on the target private domain knowledge information and the target verification code type. Generate a verification code according to the verification code string and output the verification code. The embodiment of the present application generates a verification code by adopting the user's private domain knowledge, and the private domain information is only known to the user, which can increase the difficulty of cracking the verification code and improve the network security factor. At the same time, since the private domain information is only known to the user, compared with the overly complex graphic verification code, the user's difficulty in recognizing the verification code can be reduced.

[0204] Reference Fig.13 , shows a schematic diagram of the structure of a verification code processing device provided in an embodiment of the present application, such as Fig.13 As shown, the verification code processing device 1300 may include the following modules:

[0205] The target private domain information acquisition module 1310 is used to acquire the target private domain knowledge information of the user used to generate the verification code from the pre-stored private domain knowledge base of the user;

[0206] A verification code type acquisition module 1320 is used to acquire a target verification code type for generating a verification code from a pre-established verification code question bank;

[0207] A verification code string generating module 1330, configured to generate a verification code string based on the target private domain knowledge information and the target verification code type;

[0208] A verification code generation module 1340, configured to generate the verification code according to the verification code string;

[0209] The verification code output module 1350 is used to output the verification code.

[0210] Optionally, the device further comprises:

[0211] A private domain knowledge information acquisition module, used to acquire the private domain knowledge information of the user;

[0212] A desensitized private domain information acquisition module is used to perform data desensitization processing on the private domain knowledge information to obtain desensitized private domain knowledge information;

[0213] The desensitized private domain information storage module is used to store the desensitized private domain knowledge information in a pre-established private domain knowledge base of the user.

[0214] Optionally, the target private domain information acquisition module includes:

[0215] an authorization confirmation information display unit, configured to display authorization confirmation information indicating the use of the private domain knowledge information of the user in response to receiving the verification code generation operation;

[0216] The target private domain information acquisition unit is configured to acquire the target private domain knowledge information from the private domain knowledge base of the user upon receiving a confirmation response message sent by the user.

[0217] Optionally, the target private domain information acquisition unit includes:

[0218] A private domain information acquisition subunit, configured to acquire all private domain knowledge information of the user from the private domain knowledge base;

[0219] A private domain information display subunit, used to display all the private domain knowledge information;

[0220] The first private domain information acquisition subunit is configured to acquire the target private domain knowledge information screened by the user from all the private domain knowledge information.

[0221] Optionally, the target private domain information acquisition unit includes:

[0222] A location information acquisition subunit, used to acquire the current time information of the system and the current location information of the user;

[0223] a risk level determination subunit, configured to determine a risk level of a scene in which the user is currently located based on the current time information and / or the location information;

[0224] The second private domain information acquisition subunit is used to filter out the target private domain knowledge information matching the risk level from the private domain knowledge base of the user.

[0225] Optionally, the verification code string generation module includes:

[0226] A target information screening unit, used to screen target information for generating a verification code string from the target private domain knowledge information;

[0227] A question character string generating unit, configured to generate a question character string associated with the target verification code type according to the target information;

[0228] A distractor character string generating unit, configured to generate a correct answer character string corresponding to the question character string according to the target information, and to randomly generate a distractor character string corresponding to the question character string;

[0229] The verification code string acquisition unit is used to use the question string, the correct answer string and the interference item string as the verification code string.

[0230] Optionally, the device further comprises:

[0231] A verification information acquisition module, used to obtain the verification information for the verification code input by the user;

[0232] A verification times acquisition module, used to acquire the number of times the user has verified the verification code if the verification information does not match the standard verification information corresponding to the verification code;

[0233] A verification times determination module, used to determine whether the verification times have reached a preset verification times threshold, and / or whether the current time has reached a preset expiration time of the verification code;

[0234] The verification failure result determination module is used to determine that the verification result of the verification code is a verification failure result when it is determined that the number of verifications reaches the verification number threshold and / or the current time does not reach the expiration time of the verification code.

[0235] Optionally, the device further comprises:

[0236] A set number of determination module, used to determine whether the number of verifications reaches a set number of times, and the set number of times is less than the verification number of times threshold, when it is determined that the number of verifications does not reach the verification number threshold and the current time does not reach the expiration time of the verification code;

[0237] The verification prompt output module is used to output verification prompt information associated with the verification code when it is determined that the number of verifications reaches the set number of times.

[0238] Optionally, the verification code generation module includes:

[0239] An initial verification code generating unit, used for displaying the verification code string on a pre-created blank image to generate an initial verification code;

[0240] A verification code generating unit, configured to process the initial verification code based on a preset processing method to generate the verification code;

[0241] The preset processing method includes at least one of a noise adding processing method, a line interference processing method, and a distortion and deformation processing method.

[0242] The verification code processing device provided in the embodiment of the present application obtains the user's target private domain knowledge information for generating the verification code from the pre-stored user's private domain knowledge base, and the target private domain knowledge information is the user's private domain knowledge information after desensitization processing. The target verification code type for generating the verification code is obtained from the pre-established verification code question bank. Based on the target private domain knowledge information and the target verification code type, a verification code string is generated. A verification code is generated according to the verification code string and output. The embodiment of the present application generates a verification code by adopting the user's private domain knowledge, and the private domain information is only known to the user, which can increase the difficulty of cracking the verification code and improve the network security factor. At the same time, since the private domain information is only known to the user, compared with the overly complex graphic verification code, the difficulty of the user to recognize the verification code can be reduced.

[0243] The present application also provides an electronic device, such as Fig.14 As shown, it includes a processor 1401, a communication interface 1402, a memory 1403 and a communication bus 1404, wherein the processor 1401, the communication interface 1402, and the memory 1403 communicate with each other through the communication bus 1404.

[0244] Memory 1403, used for storing computer programs;

[0245] The processor 1401 is used to implement the following steps when executing the program stored in the memory 1403:

[0246] Acquire, from a pre-stored private domain knowledge base of a user, target private domain knowledge information of the user for generating a verification code, wherein the target private domain knowledge information is the private domain knowledge information of the user after desensitization processing;

[0247] Obtaining a target verification code type for generating a verification code from a pre-established verification code question bank;

[0248] Generate a verification code string based on the target private domain knowledge information and the target verification code type;

[0249] Generate the verification code according to the verification code character string;

[0250] The verification code is output.

[0251] Optionally, before acquiring the target private domain knowledge information of the user for generating a verification code from the pre-stored private domain knowledge base of the user, the method further includes:

[0252] Acquiring private domain knowledge information of the user;

[0253] Performing data desensitization processing on the private domain knowledge information to obtain desensitized private domain knowledge information;

[0254] The desensitized private domain knowledge information is stored in a pre-established private domain knowledge base of the user.

[0255] Optionally, acquiring the target private domain knowledge information of the user for generating a verification code from a pre-stored private domain knowledge base of the user includes:

[0256] In response to receiving the verification code generation operation, displaying authorization confirmation information for indicating the use of the private domain knowledge information of the user;

[0257] When a confirmation response message sent by the user is received, the target private domain knowledge information is acquired from the private domain knowledge base of the user.

[0258] Optionally, the acquiring the target private domain knowledge information from the private domain knowledge base of the user includes:

[0259] Acquire all private domain knowledge information of the user from the private domain knowledge base;

[0260] Display all the private domain knowledge information;

[0261] The target private domain knowledge information screened by the user from all the private domain knowledge information is obtained.

[0262] Optionally, the acquiring the target private domain knowledge information from the private domain knowledge base of the user includes:

[0263] Obtaining the system's current time information and the user's current location information;

[0264] Determine the risk level of the scene currently located by the user based on the current time information and / or the location information;

[0265] The target private domain knowledge information matching the risk level is screened out from the private domain knowledge base of the user.

[0266] Optionally, the generating a verification code string based on the target private domain knowledge information and the target verification code type includes:

[0267] Filtering target information for generating a verification code string from the target private domain knowledge information;

[0268] Generate a question string associated with the target verification code type according to the target information;

[0269] Generate a correct answer string corresponding to the question string according to the target information, and randomly generate a distractor string corresponding to the question string;

[0270] The question character string, the correct answer character string and the interference character string are used as the verification code character string.

[0271] Optionally, after outputting the verification code, the method further includes:

[0272] Acquire verification information for the verification code input by the user;

[0273] If the verification information does not match the standard verification information corresponding to the verification code, obtaining the number of times the user verifies the verification code;

[0274] Determine whether the verification times reaches a preset verification times threshold, and / or whether the current time reaches a preset expiration time of the verification code;

[0275] When it is determined that the number of verifications reaches the verification number threshold, and / or the current time does not reach the expiration time of the verification code, it is determined that the verification result of the verification code is a verification failure result.

[0276] Optionally, after determining whether the number of verifications reaches a preset number of verifications threshold and / or whether the current time reaches a preset expiration time of the verification code, the method further includes:

[0277] If it is determined that the number of verifications has not reached the verification number threshold and the current time has not reached the expiration time of the verification code, determine whether the number of verifications has reached a set number, and the set number is less than the verification number threshold;

[0278] When it is determined that the number of verifications reaches the set number of times, verification prompt information associated with the verification code is output.

[0279] Optionally, generating the verification code according to the verification code character string includes:

[0280] Displaying the verification code string on a pre-created blank image to generate an initial verification code;

[0281] Processing the initial verification code based on a preset processing method to generate the verification code;

[0282] The preset processing method includes at least one of a noise adding processing method, a line interference processing method, and a distortion and deformation processing method.

[0283] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0284] The communication interface is used for communication between the above terminal and other devices.

[0285] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0286] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0287] In another embodiment provided in the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the verification code processing method described in any one of the above embodiments.

[0288] In another embodiment provided by the present application, a computer program product including instructions is also provided, on which a computer program is stored. When the computer program is run on a computer, the computer executes the verification code processing method described in any of the above embodiments.

[0289] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0290] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0291] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0292] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A verification code processing method, characterized in that: include: Acquire, from a pre-stored private domain knowledge base of a user, target private domain knowledge information of the user for generating a verification code, wherein the target private domain knowledge information is the private domain knowledge information of the user after desensitization processing; Obtaining a target verification code type for generating a verification code from a pre-established verification code question bank; Generate a verification code string based on the target private domain knowledge information and the target verification code type; Generate the verification code according to the verification code character string; The verification code is output.

2. The method according to claim 1, characterized in that Before acquiring the target private domain knowledge information of the user for generating a verification code from the pre-stored private domain knowledge base of the user, the method further includes: Acquiring private domain knowledge information of the user; Performing data desensitization processing on the private domain knowledge information to obtain desensitized private domain knowledge information; The desensitized private domain knowledge information is stored in a pre-established private domain knowledge base of the user.

3. The method according to claim 1, characterized in that The step of acquiring target private domain knowledge information of the user for generating a verification code from a pre-stored private domain knowledge base of the user includes: In response to receiving the verification code generation operation, displaying authorization confirmation information for indicating the use of the private domain knowledge information of the user; When a confirmation response message sent by the user is received, the target private domain knowledge information is acquired from the private domain knowledge base of the user.

4. The method according to claim 3, characterized in that The acquiring the target private domain knowledge information from the private domain knowledge base of the user includes: Acquire all private domain knowledge information of the user from the private domain knowledge base; Display all the private domain knowledge information; The target private domain knowledge information screened by the user from all the private domain knowledge information is obtained.

5. The method according to claim 3, characterized in that: The acquiring the target private domain knowledge information from the private domain knowledge base of the user includes: Obtaining the system's current time information and the user's current location information; Determine the risk level of the scene currently located by the user based on the current time information and / or the location information; The target private domain knowledge information matching the risk level is screened out from the private domain knowledge base of the user.

6. The method according to claim 1, characterized in that The generating a verification code string based on the target private domain knowledge information and the target verification code type includes: Filtering target information for generating a verification code string from the target private domain knowledge information; Generate a question string associated with the target verification code type according to the target information; Generate a correct answer string corresponding to the question string according to the target information, and randomly generate a distractor string corresponding to the question string; The question character string, the correct answer character string and the interference character string are used as the verification code character string.

7. The method according to claim 1, characterized in that After outputting the verification code, the method further includes: Acquire verification information for the verification code input by the user; If the verification information does not match the standard verification information corresponding to the verification code, obtaining the number of times the user verifies the verification code; Determine whether the verification times reaches a preset verification times threshold, and / or whether the current time reaches a preset expiration time of the verification code; When it is determined that the number of verifications reaches the verification number threshold, and / or the current time does not reach the expiration time of the verification code, it is determined that the verification result of the verification code is a verification failure result.

8. The method according to claim 7, characterized in that After determining whether the verification times reaches a preset verification times threshold, and / or whether the current time reaches a preset expiration time of the verification code, the method further includes: If it is determined that the number of verifications has not reached the verification number threshold and the current time has not reached the expiration time of the verification code, determine whether the number of verifications has reached a set number of times, and the set number of times is less than the verification number threshold; When it is determined that the number of verifications reaches the set number of times, verification prompt information associated with the verification code is output.

9. The method according to claim 1, characterized in that: The step of generating the verification code according to the verification code character string includes: Displaying the verification code string on a pre-created blank image to generate an initial verification code; Processing the initial verification code based on a preset processing method to generate the verification code; The preset processing method includes at least one of a noise adding processing method, a line interference processing method, and a distortion and deformation processing method.

10. A verification code processing device, characterized in that: include: A target private domain information acquisition module, used to acquire the target private domain knowledge information of the user for generating a verification code from a pre-stored private domain knowledge base of the user, wherein the target private domain knowledge information is the private domain knowledge information of the user after desensitization processing; A verification code type acquisition module, used to acquire a target verification code type for generating a verification code from a pre-established verification code question bank; A verification code string generation module, used to generate a verification code string based on the target private domain knowledge information and the target verification code type; A verification code generation module, used to generate the verification code according to the verification code string; The verification code output module is used to output the verification code.

11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 9 when executing a program stored in a memory.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

13. A computer program product comprising instructions, on which a computer program is stored, characterized in that When the computer program is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 9.