Verification method, device and electronic device

By preset obfuscation processing of answers in computer security verification, a collection of obfuscated answers is generated, and the target questions and obfuscated answers are displayed on the verification page, the problem that verification methods in the prior art are easily cracked is solved, and the security of the system is improved.

CN115130074BActive Publication Date: 2025-06-24CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210706356.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-21
Publication Date
2025-06-24
Estimated Expiration
2042-06-21

AI Technical Summary

Technical Problem

The existing computer security verification methods are less difficult to crack and are easily identified by machines, resulting in lower system security.

Method used

By applying a preset obfuscation strategy in the target answer collection, each answer is processed, a collection of obfuscation answers is generated, and the target question and obfuscation answer collection are displayed on the verification page to increase the difficulty of machine cracking.

Benefits of technology

It increases the difficulty of machine crack verification, enhances the security of the system, and makes the correct answer more difficult to identify by the machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115130074B_ABST
    Figure CN115130074B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a verification method, apparatus, and electronic device. The method includes: receiving a first verification request carrying a target keyword sent by a terminal device; obtaining a target question containing the target keyword and a target answer set corresponding to the target question in a target database; processing each answer in the target answer set according to a preset obfuscation strategy to obtain an obfuscated answer set; sending the target question and the obfuscated answer set to the terminal device so that the terminal device displays the target question and the obfuscated answer set on a verification page; and verifying a to-be-verified answer carried in a second verification request based on the obfuscated answer set when the second verification request for the target question sent by the terminal device is received. When providing verification in the form of a combination of questions and answers, the answers provided to the user are obfuscated answers, thereby increasing the difficulty of machine cracking and enhancing the security of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer security, and in particular, to a verification method, apparatus, and electronic device. Background Art

[0002] With the development of Internet technology, information security has become a very important issue. Among them, user identity security is of utmost importance.

[0003] Currently, graphical and textual methods are usually used for user security verification to ensure user identity security. For example, when a user conducts verification, a picture containing multiple numbers is randomly selected and displayed on the verification page. The user needs to enter the numbers in the picture to pass the verification. Or when a user conducts verification, a word is randomly selected, scrambled and placed in a background picture, and then displayed on the verification page. The user needs to enter the word in the correct order to pass the verification.

[0004] However, the cracking difficulty of the above verification methods is relatively low, and it is easy for machines to recognize the correct verification method, resulting in low system security. Summary of the Invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide a verification method, apparatus, and electronic device that overcome the above problems or at least partially solve the above problems.

[0006] In a first aspect, an embodiment of the present invention provides a verification method applied to a server. The method includes:

[0007] Receiving a first verification request carrying a target keyword sent by a terminal device;

[0008] Obtaining a target question containing the target keyword in a target database and a target answer set corresponding to the target question; wherein, the target answer set is a set composed of a first answer that correctly answers the target question and at least one second answer that incorrectly answers the target question;

[0009] Processing each answer in the target answer set according to a preset confusion strategy to obtain a confused answer set;

[0010] Sending the target question and the confused answer set to the terminal device, so that the terminal device displays the target question and the confused answer set on a verification page;

[0011] When receiving a second verification request for the target question sent by the terminal device, verifying the answer to be verified carried in the second verification request based on the confused answer set.

[0012] Optionally, the preset obfuscation strategy includes: a selection sub-strategy and an obfuscation sub-strategy. Processing each answer in the target answer set according to the preset obfuscation strategy to obtain an obfuscated answer set includes:

[0013] For each answer in the target answer set, select according to the selection sub-strategy in a preset obfuscation library to obtain multiple obfuscated characters corresponding to the answer;

[0014] For each answer, combine the answer and its corresponding multiple obfuscated characters according to the obfuscation sub-strategy to generate an obfuscated answer corresponding to the answer;

[0015] Generate the obfuscated answer set based on each of the obfuscated answers.

[0016] Optionally, the combining the answer and its corresponding multiple obfuscated characters according to the obfuscation sub-strategy to generate an obfuscated answer corresponding to the answer includes:

[0017] Add the multiple obfuscated characters corresponding to the answer to the answer to generate an intermediate obfuscated answer;

[0018] Adjust the positions of the characters in the intermediate obfuscated answer in the intermediate obfuscated answer to generate an obfuscated answer corresponding to the answer.

[0019] Optionally, the preset obfuscation library includes: multiple types of obfuscated characters;

[0020] The selecting according to the selection sub-strategy in the preset obfuscation library to obtain multiple obfuscated characters corresponding to the answer includes:

[0021] Successively select multiple of the obfuscated characters from each type of the obfuscated characters in the preset obfuscation library;

[0022] Determine the selected obfuscated characters of various types as the multiple obfuscated characters corresponding to the answer.

[0023] Optionally, the types of the obfuscated characters include multiple of: numeric type, letter type, punctuation type, special symbol type.

[0024] Optionally, after the adjusting the positions of the characters in the intermediate obfuscated answer in the intermediate obfuscated answer to generate an obfuscated answer corresponding to the answer, the method further includes:

[0025] Create a first hash table and a second hash table;

[0026] For each of the said answers, store the corresponding confused answer of the answer and the identifier indicating whether the answer is the first answer as a key-value pair in the first hash table;

[0027] Store the target question and the first hash table as a key-value pair in the second hash table;

[0028] The verification based on the set of confused answers and the answer to be verified carried in the second verification request includes:

[0029] Determine the first hash table corresponding to the target question in the second hash table;

[0030] Based on the answer to be verified, determine the target answer in the first hash table, where the target answer is the confused answer that is the same as the answer to be verified;

[0031] Generate a verification result based on the identifier corresponding to the target answer in the first hash table.

[0032] In a second aspect, an embodiment of the present invention further provides a verification method, which is applied to a terminal device. The method includes:

[0033] Obtain a target image including the page content of the current display page;

[0034] Generate target keywords based on the target image;

[0035] Send a first verification request carrying the target keywords to the server, so that the server returns the target question and the set of confused answers based on the target question including the target keywords in the target database and the set of target answers corresponding to the target question;

[0036] Receive the target question and the set of confused answers;

[0037] Display a verification page and display the target question and the set of confused answers in the verification page;

[0038] In the case of receiving the target input of the user for the answer to be verified, send a second verification request carrying the answer to be verified to the server for the target question, so that the server verifies the answer to be verified carried in the second verification request based on the set of confused answers; where the answer to be verified is any element in the set of confused answers in the verification page.

[0039] In a third aspect, an embodiment of the present invention further provides a verification device, which is applied to a server. The device includes:

[0040] A first receiving module, configured to receive a first verification request carrying a target keyword sent by a terminal device;

[0041] A question module, configured to obtain a target question including the target keyword in a target database and a target answer set corresponding to the target question; wherein, the target answer set is a set composed of a first answer that correctly answers the target question and at least one second answer that incorrectly answers the target question;

[0042] A confusion module, configured to process each answer in the target answer set according to a preset confusion strategy to obtain a confused answer set;

[0043] A first sending module, configured to send the target question and the confused answer set to the terminal device, so that the terminal device displays the target question and the confused answer set on a verification page;

[0044] A verification module, configured to, when receiving a second verification request for the target question sent by the terminal device, verify a to-be-verified answer carried in the second verification request based on the confused answer set.

[0045] Optionally, the preset confusion strategy includes: a selection sub-strategy and a confusion sub-strategy, and the confusion module includes:

[0046] A first confusion unit, configured to select, for each answer in the target answer set, multiple confused characters in a preset confusion library according to the selection sub-strategy;

[0047] A second confusion unit, configured to combine, for each answer, the answer and its corresponding multiple confused characters according to the confusion sub-strategy to generate a confused answer corresponding to the answer;

[0048] An aggregation unit, configured to generate the confused answer set based on each confused answer.

[0049] Optionally, the second confusion unit is specifically configured to add the multiple confused characters corresponding to the answer to the answer to generate an intermediate confused answer; adjust the positions of the characters in the intermediate confused answer in the intermediate confused answer to generate the confused answer corresponding to the answer.

[0050] Optionally, the preset confusion library includes: multiple types of confused characters;

[0051] The first confusion unit is specifically configured to sequentially select multiple confused characters from the confused characters of each type in the preset confusion library; and determine the selected confused characters of various types as the multiple confused characters corresponding to the answer.

[0052] Optionally, the device further includes:

[0053] a creation module, configured to create a first hash table and a second hash table;

[0054] a first storage module, configured to store, for each of the answers, the corresponding obfuscated answer and an identifier indicating whether the answer is the first answer as a key-value pair in the first hash table;

[0055] a second storage module, configured to store the target question and the first hash table as a key-value pair in the second hash table;

[0056] The verification module includes:

[0057] a first verification unit, configured to determine the first hash table corresponding to the target question in the second hash table;

[0058] a second verification unit, configured to determine a target answer in the first hash table based on the answer to be verified, where the target answer is the obfuscated answer that is the same as the answer to be verified;

[0059] a third verification unit, configured to generate a verification result based on the identifier corresponding to the target answer in the first hash table.

[0060] In a fourth aspect, an embodiment of the present invention further provides a verification device, which is applied to a terminal device. The device includes:

[0061] an image module, configured to obtain a target image including the page content of the current display page;

[0062] a keyword module, configured to generate target keywords based on the target image;

[0063] a second sending module, configured to send a first verification request carrying the target keywords to a server, so that the server returns the target question and a set of obfuscated answers based on the target question including the target keywords in a target database and the set of target answers corresponding to the target question;

[0064] a second receiving module, configured to receive the target question and the set of obfuscated answers;

[0065] a display module, configured to display a verification page and display the target question and the set of obfuscated answers on the verification page;

[0066] A third sending module, configured to, when receiving a target input of a user for an answer to be verified, send a second verification request carrying the answer to be verified to the server for the target question, so that the server verifies the answer to be verified carried in the second verification request based on the set of obfuscated answers; wherein, the answer to be verified is any element in the set of obfuscated answers on the verification page.

[0067] In a fifth aspect, an embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor, where when the processor executes the program, it implements any one of the above verification methods or the verification method as described above.

[0068] In a sixth aspect, an embodiment of the present invention further provides a readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enabling the electronic device to execute any one of the above verification methods or the verification method as described above.

[0069] In an embodiment of the present invention, the received first verification request carries a target keyword, so that the target keyword can be used to match a target question and a set of target answers corresponding to the target question in a target database, where the set of target answers is a set composed of a first answer that correctly answers the target question and at least one second answer that wrongly answers the target question; furthermore, verification can be performed in a combined manner of providing questions and answers, and the questions used for verification are related to the target keyword in the first verification request, which can avoid repeating the same questions to the user to a greater extent. Then, each answer in the set of target answers is obfuscated according to a preset obfuscation strategy to obtain a set of obfuscated answers that are not easily recognized by a machine, and then the set of obfuscated answers is provided to the user. Finally, when the second verification request is received, the answer to be verified carried in the second verification request is verified based on the set of obfuscated answers. In the case where the present invention provides verification in a combined manner of questions and answers, the answers provided to the user are answers obfuscated according to a preset obfuscation strategy, making it more difficult for a machine to recognize the correct answer from them, thereby increasing the difficulty of machine cracking and enhancing the security of the system. Description of the Drawings

[0070] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0071] Figure 1It is a flowchart of steps of a verification method applied to a server provided by an embodiment of the present invention;

[0072] Figure 2 It is a flowchart of steps of a verification method applied to a terminal device provided by an embodiment of the present invention;

[0073] Figure 3 It is a schematic flowchart of a verification method provided by an embodiment of the present invention;

[0074] Figure 4 It is a schematic diagram of a data processing process of a verification method provided by an embodiment of the present invention;

[0075] Figure 5 It is a partial verification schematic diagram of a verification method provided by an embodiment of the present invention;

[0076] Figure 6 It is a structural block diagram of a verification device applied to a server provided by an embodiment of the present invention;

[0077] Figure 7 It is a structural block diagram of a verification device applied to a terminal device provided by an embodiment of the present invention. Detailed implementation manners

[0078] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0079] It should be understood that "an embodiment" or "an embodiment" mentioned throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the present invention. Therefore, the appearances of "in an embodiment" or "in an embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0080] In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the order of execution is prior or posterior, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0081] See Figure 1 , an embodiment of the present invention provides a verification method applied to a server, and the method includes:

[0082] Step 101: Receive a first verification request carrying a target keyword sent by a terminal device.

[0083] It should be noted that the target keyword can be a word or a phrase, which can be related to the page content of the current display page of the terminal device. It can be understood that the first verification request carries target data, and the target data can be the target keyword itself or an image containing the target keyword. In the case where the target data is an image containing the target keyword, the image will be recognized to parse out the target keyword therein. Among them, OCR (Optical Character Recognition) technology can be used to parse the target keyword in the image, but it is not limited thereto.

[0084] Here, when the server receives the first verification request, it will start a verification process to verify the user on the terminal device side. Preferably, the verification here is used to detect whether the user on the terminal device side is a machine or a person, that is to say, whether the behavior of initiating this verification is a human operation or a malicious attack from a machine.

[0085] Step 102: Obtain the target questions containing the target keyword in the target database and the set of target answers corresponding to the target questions.

[0086] It should be noted that when verifying in the form of a combination of questions and answers, in order to avoid a high repetition rate of the questions provided to the user, the target database will pre-store a large number of questions and answers. In addition, for each question, multiple different answers need to be provided, including the correct answer and at least one wrong answer. Therefore, each question in the target database corresponds to a set of answers composed of the correct answer to this question and at least one wrong answer. Here, in order to make the questions provided to the user associated with the terminal device side, the questions matching the target keyword will be queried from the target database based on the target keyword, and the target questions containing the target keyword will be used as the successfully matched questions. Then, the set of target answers should be a set composed of the first answer that correctly answers the target question and at least one second answer that wrongly answers the target question. When the target keyword is related to the page content of the current display page of the terminal device, the questions provided to the user will be associated with the page content of the current display page of the terminal device side.

[0087] It can be understood that in order to quickly query the required questions or answers in the target database, the questions and answers can be stored separately. Therefore, the target database can include a preset question library and a preset answer library, which are not limited here.

[0088] It is understandable that the number of problems containing the target keyword in the target database can be one or more. In the case where the number is more than one, one of them can be selected as the target problem based on a preset policy. Among them, the preset policy can be the first policy of randomly selecting a problem as the target problem, or the second policy of selecting the problem with the largest weight as the target problem based on the weight of each problem, or the third policy of selecting the problem with the highest relevance to the target keyword as the target problem, but it is not limited to this.

[0089] Regarding the weight of each problem in the second policy, the same weight can be assigned to each problem initially. For each problem, as the number of times the problem is selected as the target problem increases, its weight continuously decreases. For example, "What is Li Bai's courtesy name?" is problem 1, and "Which dynasty's poet is Li Bai?" is problem 2. The initial weights of both problems are 1. At this time, if both problem 1 and problem 2 are problems containing the target keyword, the possibility of selecting problem 1 or problem 2 as the target problem is the same. During multiple verifications, as the number of times problem 1 is selected as the target problem increases, the weight of problem 1 will gradually decrease, so that the weight of problem 1 will be less than the weight of problem 2. When verifying again, if both problem 1 and problem 2 are problems containing the target keyword, problem 2 will be selected as the target problem. By selecting the target problem through the second policy, it is possible to avoid providing the same problem to the user to a greater extent, thereby reducing the repetition rate of the problems provided to the user.

[0090] Step 103: In the target answer set, process each answer according to a preset obfuscation policy to obtain an obfuscated answer set.

[0091] It should be noted that each answer in the target answer set has a certain correlation with the target problem. If the answer is directly displayed without any change, the machine can easily identify the correct answer based on these correlation relationships. Therefore, in order to avoid the machine from identifying the correct answer, the answer can be changed to a certain extent to increase the difficulty of identifying the answer, so that the machine is not easy to identify the correct answer, that is, the server processes each answer according to a preset obfuscation policy to obtain an obfuscated answer set that is not easily recognized by the machine. Among them, the preset obfuscation policy is a change rule that is preset for changing the answer and causing a certain degree of confusion. It is understandable that the obfuscated answer set is composed of answers with obfuscation effects, and each answer with an obfuscation effect corresponds to an answer in the target answer set.

[0092] Step 104: Send the target problem and the obfuscated answer set to the terminal device so that the terminal device displays the target problem and the obfuscated answer set on the verification page.

[0093] It should be noted that the target question and the set of confusing answers are the verification information to be shown to the user. Therefore, the target question and the set of confusing answers are sent to the terminal device, and the terminal device shows the verification information to the user.

[0094] Step 105: When receiving a second verification request for the target question sent by the terminal device, verify the answer to be verified carried in the second verification request based on the set of confusing answers.

[0095] It should be noted that the answer to be verified is the answer selected by the user from the set of confusing answers displayed on the terminal device. Therefore, by comparing the set of confusing answers with the answer to be verified, it can be determined whether the answer to be verified corresponds to the first answer for correctly answering the target question, thereby determining whether the verification is passed on the terminal device side. Specifically, when the answer to be verified is consistent with the answer obtained by processing the first answer according to the preset confusion strategy, it indicates that the answer to be verified corresponds to the first answer for correctly answering the target question, and the verification is passed. Otherwise, the verification fails.

[0096] In an embodiment of the present invention, the received first verification request carries a target keyword, so that the target keyword can be used to match the target question and the set of target answers corresponding to the target question in the target database. The set of target answers is a set composed of the first answer for correctly answering the target question and at least one second answer for incorrectly answering the target question. Furthermore, verification can be performed in the form of a combination of questions and answers, and the questions used for verification are related to the target keyword in the first verification request, which can avoid repeating the same question to the user to a greater extent. Then, each answer in the set of target answers is processed according to the preset confusion strategy to obtain a set of confusing answers that are not easily recognized by machines, and then the set of confusing answers is provided to the user. Finally, when receiving the second verification request, verify the answer to be verified carried in the second verification request based on the set of confusing answers. When the present invention provides verification in the form of a combination of questions and answers, the answers provided to the user are the answers processed according to the preset confusion strategy, making it more difficult for machines to identify the correct answers from them, thereby increasing the difficulty of machine cracking and enhancing the security of the system.

[0097] Optionally, the preset confusion strategy includes: a selection sub-strategy and a confusion sub-strategy. Processing each answer in the set of target answers according to the preset confusion strategy to obtain a set of confusing answers includes:

[0098] For each answer in the set of target answers, select multiple confusing characters corresponding to the answer in the preset confusion library according to the selection sub-strategy;

[0099] For each answer, combine the answer with its corresponding multiple obfuscation characters according to the obfuscation sub-strategy to generate the obfuscated answer corresponding to the answer;

[0100] Generate a set of obfuscated answers based on each obfuscated answer.

[0101] It should be noted that a large number of characters are pre-stored in the preset obfuscation library. In addition, the selection sub-strategy is a strategy for selecting multiple characters from a large number of characters as obfuscation characters. For example, the selection sub-strategy can be to randomly extract multiple characters from a large number of characters as obfuscation characters, but it is not limited to this. The obfuscation sub-strategy is a strategy for combining multiple obfuscation characters and an answer according to a certain combination rule. For example, the obfuscation sub-strategy can be to insert each character of the answer into different positions of the multiple obfuscation characters respectively to complete the combination, but it is not limited to this. For example, if the answer is "Li Bai" and the multiple obfuscation characters are "abcd123", the obfuscated answers corresponding to "Li Bai" can be "abLi cd1 Bai23", "abcdLi1 Bai23", or "aLi bcd1 Bai23".

[0102] In the embodiment of the present invention, through the selection sub-strategy and the obfuscation sub-strategy, the answer is obfuscated from two different aspects, making the obfuscated answer less likely to be recognized by a machine, and further improving the security of the system.

[0103] Optionally, combining the answer with its corresponding multiple obfuscation characters according to the obfuscation sub-strategy to generate the obfuscated answer corresponding to the answer includes:

[0104] Add the multiple obfuscation characters corresponding to the answer to the answer to generate an intermediate obfuscated answer;

[0105] Adjust the positions of the characters in the intermediate obfuscated answer in the intermediate obfuscated answer to generate the obfuscated answer corresponding to the answer.

[0106] It should be noted that when adding multiple obfuscating characters before and after the answer, the order of each character in the answer will not change, and the order of each obfuscating character among the multiple obfuscating characters will not change either. Therefore, to further increase the difficulty of cracking the obfuscated answer, by adjusting the positions of the characters in the intermediate obfuscated answer within the intermediate obfuscated answer, the order of each obfuscating character in the obfuscated answer is not necessarily the same as the order of each obfuscating character in the intermediate obfuscated answer, and the order of each character in the obfuscated answer is not necessarily the same as the order of each character in the intermediate obfuscated answer. It can be understood that the characters in the intermediate obfuscated answer here can be obfuscating characters or non-obfuscating characters in the answer. For example, a random strategy can be adopted to randomly adjust the order of each character in the intermediate obfuscated answer, but it is not limited to this. For example, if the intermediate obfuscated answer is "Li Bai 12343", the obfuscated answer can be "Bai 123 Li 43" or "43 Bai 1 Li 23". Preferably, adjusting the positions of the characters in the intermediate obfuscated answer within the intermediate obfuscated answer includes: reversing the order of multiple characters corresponding to the answer in the intermediate obfuscated answer. The reversed order here is other orders than the correct order, and the correct order is the order represented by the answer. For example, if the answer is "Bai Juyi", its reversed order can be "Bai Yiju", "Yiju Bai", "Yi Baiju", etc.

[0107] In the embodiment of the present invention, in the process of generating an obfuscated answer based on the answer and multiple obfuscating characters, the recognition difficulty of the obfuscated answer can be further increased by means of secondary obfuscation.

[0108] Optionally, the preset obfuscation library includes: multiple types of obfuscating characters;

[0109] Selecting multiple obfuscating characters corresponding to the answer according to the selection sub-strategy in the preset obfuscation library includes:

[0110] Sequentially selecting multiple obfuscating characters from the obfuscating characters of each type in the preset obfuscation library;

[0111] Determining the selected obfuscating characters of various types as multiple obfuscating characters corresponding to the answer.

[0112] It should be noted that the multiple obfuscation characters selected for each answer are of multiple types of obfuscation characters. Among them, the number of different types of obfuscation characters in the multiple obfuscation characters corresponding to the answer can be equal or unequal. Preferably, the number of obfuscation characters of each type is equal. The types of obfuscation characters include: multiple of the number type, letter type, punctuation type, and special symbol type. The obfuscation characters are used to combine with the answer to generate an obfuscated answer. It should be noted that compared with the answer, the obfuscated answer has a higher recognition difficulty. However, the meaning represented by the obfuscated answer remains unchanged. Only the answer is obfuscated to increase the recognition difficulty of the answer, but the semantic content of the answer will not be changed. The obfuscation characters of the number type are numbers, the obfuscation characters of the letter type are English letters, which can be capital letters, lowercase letters, etc., the obfuscation characters of the punctuation type are punctuation marks, which can be punctuation marks in Chinese or English, and the obfuscation characters of the special symbol type are special symbols. Specifically, the preset obfuscation library includes ten numbers from 0 to 9, twenty-six English letters from a to z, multiple punctuation marks in Chinese and English, and multiple special symbols.

[0113] In the embodiment of the present invention, the obfuscation characters corresponding to each answer can be selected from different types of obfuscation characters, thereby further increasing the recognition difficulty of the obfuscated answer.

[0114] Optionally, after adjusting the position of the text in the intermediate obfuscated answer to generate the obfuscated answer corresponding to the answer, the method further includes:

[0115] Create a first hash table and a second hash table;

[0116] For each answer, store the obfuscated answer corresponding to the answer and the identifier indicating whether the answer is the first answer as a key-value pair in the first hash table;

[0117] Store the target question and the first hash table as a key-value pair in the second hash table;

[0118] Verify based on the obfuscated answer set and the answer to be verified carried in the second verification request, including:

[0119] Determine the first hash table corresponding to the target question in the second hash table;

[0120] Based on the answer to be verified, determine the target answer in the first hash table, where the target answer is the obfuscated answer identical to the answer to be verified;

[0121] Generate a verification result based on the identifier corresponding to the target answer in the first hash table.

[0122] It should be noted that a hash table is a data structure that implements the abstract data type of an associative array. This structure can set the key and the given value as a set of key-value pairs, providing a mapping relationship that maps the key to the given value, simply referred to as a hash table (hashmap). Here, in the first hash table, the key is the obfuscated answer corresponding to the answer, and the given value is the identifier indicating whether the answer is the first answer; in the second hash table, the key is the target question, and the given value is the first hash table. It can be understood that the answer to be verified is the answer selected by the user from the set of obfuscated answers displayed on the terminal device. Therefore, by comparing the set of obfuscated answers with the answer to be verified, it can be determined whether the answer to be verified corresponds to the first answer for correctly answering the target question, thereby determining whether the verification is passed on the terminal device side. Specifically, when receiving the second verification request for the target question sent by the terminal device, the first hash table corresponding to the target question can be determined in the second hash table, that is, in the second hash table, find the key-value pair with the target question as the key, and then the given value in this key-value pair is the first hash table corresponding to the target question. Then, in the first hash table, find the obfuscated answer that is the same as the answer to be verified, and finally, determine the verification result according to the given value mapped by this obfuscated answer.

[0123] Here, taking the target question "Which dynasty was Du Fu a poet of?" as an example, the first hash table and the second hash table are shown. The data structure is as follows:

[0124] The first hash table is {"aa-! Chao z = Tang bz", true}, {"at-! Chao z = Yuan ba", false}, {"ca-! Song z = 4z", false}, {"ab-! Chao z = Tang bz", false}, where parts such as "aa-! Chao z = Tang bz" and "Chao z = Yuan ba" are the key parts of the first hash table, that is, the set of obfuscated answers; parts such as "true" and "false" are the given value parts of the first hash table, that is, the identifier indicating whether the answer is the first answer. Among them, "true" indicates that this answer corresponds to the first answer for correctly answering the target question; "false" indicates that this answer corresponds to the second answer for wrongly answering the target question.

[0125] The second hash table is {"Which dynasty was the poet Du Fu from?": [{"aa-! Dynasty z = Tang bz", true}, {"at-! Dynasty z = Yuan ba", false}, {"ca-! Dynasty z = Song 4z", false}, {"ab-! Dynasty z = Tang bz", false}]}, where the "Which dynasty was the poet Du Fu from?" part is the key part of the second hash table, that is, the target question part, and [{"aa-! Dynasty z = Tang bz", true}, {"at-! Dynasty z = Yuan ba", false}, {"ca-! Dynasty z = Song 4z", false}, {"ab-! Dynasty z = Tang bz", false}] is the given value part of the second hash table, that is, the first hash table part.

[0126] If the answer to be verified is "ab-! Dynasty z = Tang bz", according to the target question "Which dynasty was the poet Du Fu from?", the first hash table can be determined from the second hash table first, and then in the "{ab-! Dynasty z = Tang bz", false} in the first hash table, it can be determined that "ab-! Dynasty z = Tang bz" corresponds to "false", then a verification result of verification failure or verification not passed is generated. Similarly, if the answer to be verified is "aa-! Dynasty z = Tang bz", then it can be determined that "aa-! Dynasty z = Tang bz" corresponds to "true", and a verification result of verification passed is generated.

[0127] In the embodiment of the present invention, the two-layer nested hash table is used to store the target question and the set of confused answers required for verification, and the verification of the answer to be verified can be quickly completed, thereby improving the verification efficiency.

[0128] See Figure 2 , the embodiment of the present invention provides a verification method, which is applied to a terminal device, and the method includes:

[0129] Step 201: Obtain a target image including the page content of the current display page.

[0130] It should be noted that the target image includes the page content of the current display page on the terminal device side. Among them, the page content can be a certain frame of a video being played or a certain picture, and there is no limit here. Here, there are various ways to obtain the target image. For example, the target image can be obtained by randomly taking a screenshot of a certain position of the current display page, but it is not limited to this.

[0131] Step 202: Generate a target keyword based on the target image.

[0132] It should be noted that the generated target keywords can exist in any data form. For example, they can exist in the form of text or in the form of images. For example, the target keyword in text form can be "Li Bai", or it can be an image containing the text "Li Bai". It can be understood that when the target keyword exists in the form of an image, the target keyword can be a partial image containing text information in the target image or the target image itself.

[0133] Step 203: Send a first verification request carrying the target keyword to the server, so that the server returns the target question and the set of confusing answers based on the target question containing the target keyword in the target database and the set of target answers corresponding to the target question.

[0134] It should be noted that when the terminal device sends a first verification request carrying the target keyword to the server, it indicates that the user has a verification requirement, and the target keyword is information related to the page content of the current display page of the terminal device. So that when the server receives the first verification request, it will start the verification process to verify the user on the terminal device side, and the questions used for verification are related to the page content of the current display page on the terminal device side. It can be understood that the process of the server returning the target question and the set of confusing answers based on the target question containing the target keyword in the target database and the set of target answers corresponding to the target question can refer to the above-mentioned invention embodiments. To avoid repetition, it will not be elaborated here.

[0135] Step 204: Receive the target question and the set of confusing answers.

[0136] Step 205: Display a verification page and display the target question and the set of confusing answers on the verification page.

[0137] It should be noted that the target question and the set of confusing answers are the verification information that needs to be shown to the user. Therefore, when receiving the target question and the set of confusing answers, display the verification page and show the verification information to the user.

[0138] Step 206: When receiving the target input of the user for the answer to be verified, send a second verification request carrying the answer to be verified to the server for the target question, so that the server verifies the answer to be verified carried in the second verification request based on the set of confusing answers.

[0139] It should be noted that after showing the verification information to the user, the terminal device needs to receive the target input of the user, that is, the terminal device receives the answer to be verified selected by the user, adds the answer to be verified to the second verification request, and sends the second verification request to the server so that the server performs the verification operation. Here, the answer to be verified is any element in the set of confusing answers displayed on the verification page.

[0140] In an embodiment of the present invention, a target image containing the page content of the currently displayed page is first obtained, and a target keyword is generated based on the target image, and then a first verification request carrying the target keyword is sent to the server, so that the server returns the target question and the obfuscated answer set based on the target question containing the target keyword and the target answer set corresponding to the target question in the target database, so that the target question and the obfuscated answer set can be provided to the user for verification in a combination of questions and answers, and the question used for verification is related to the target keyword in the first verification request, which can avoid repeatedly providing the same question to the user to a greater extent. After that, a verification page is displayed, and the target question and the obfuscated answer set are displayed in the verification page; finally, when the user receives the target input for the answer to be verified, a second verification request carrying the answer to be verified is sent to the server for the target question, so that the server verifies the answer to be verified carried in the second verification request based on the obfuscated answer set. In the present invention, when verification is provided in a combination of questions and answers, the answer provided to the user is an obfuscated answer, which makes it more difficult for the machine to identify the correct answer, thereby increasing the difficulty of machine cracking and improving the security of the system. At the same time, the target questions required for verification are related to the page content of the page currently displayed by the terminal device, which can avoid repeatedly providing the same questions to the user to a greater extent, thereby reducing the repetition rate of the questions provided to the user.

[0141] See also Figure 3 , an embodiment of the present invention provides a flow chart of a verification method, the flow chart comprising:

[0142] Step 301: Capture any image on the current system browsing page and generate source content.

[0143] It should be noted that any picture on the current system browsing page includes but is not limited to part or all of the pictures on the browsing page. In other words, part of the pictures on the current system browsing page can be intercepted to generate the source content, or all of the pictures on the current system browsing page can be intercepted to generate the source content, and there is no limitation here. It can be understood that the intercepted pictures here are Figure 2 The target images in the illustrated embodiment are similar and will not be described in detail here.

[0144] Step 302: Analyze the image and identify valid content.

[0145] It should be noted that the image parsing here refers to the intercepted image mentioned in the above step 301, and the effective content recognition refers to identifying text information from the information contained in the intercepted image, and determining part or all of the text information in the text information as effective content. The effective content here is the same as Figure 1The target keywords in the illustrated embodiments are similar and will not be elaborated here.

[0146] Step 303: Use the valid content to perform a relevance collision with the local question bank.

[0147] It should be noted that the so-called relevance collision means querying for questions containing the valid content in the local question bank based on the valid content.

[0148] Step 304: Are there any matching items?

[0149] It should be noted that if there are matching items, it can indicate that there are questions containing the valid content and the corresponding answer set in the local question bank. Therefore, execute Step 305; if there are no matching items, it means that questions containing the valid content cannot be found in the local question bank. At this time, Step 306 will be executed.

[0150] Step 305: Generate questions and related answers.

[0151] It should be noted that generating questions and related answers here is equivalent to Figure 1 obtaining the target answers and the target answer set in the illustrated embodiments and will not be elaborated here.

[0152] Step 306: Obtain a random difficulty coefficient.

[0153] Step 307: Randomly obtain questions and answers from the local question bank according to the difficulty coefficient.

[0154] It should be noted that different random difficulty coefficients correspond to questions of different difficulty levels in the local question bank. When obtaining questions and answers based on a certain random difficulty coefficient, questions will be obtained from the questions of the difficulty level corresponding to the random difficulty coefficient. Then, obtain the answer set corresponding to the question in the local answer bank.

[0155] Step 308: Answer obfuscation.

[0156] It should be noted that in order to increase the difficulty of identifying answers, making it difficult for the system to identify the correct answers and thus enhancing the security of the system, the system needs to process the answers and cause a certain degree of obfuscation. Here, obfuscation characters can be added to the answers to make the answers become obfuscated answers. The obfuscation characters here can be numbers 1-9, or letters a-z, or special symbols, or punctuation marks, etc., and are not limited here.

[0157] Step 309: Secondary obfuscation, perform transposition.

[0158] It should be noted that the secondary obfuscation is also carried out on the answer. The purpose is the same as that of the primary obfuscation, which is to increase the recognition difficulty of the answer, thereby enhancing the security of the system. Here, the secondary obfuscation is mainly a transposition operation, that is, adjusting the positions of the characters in the answer and / or adjusting the positions of the obfuscation characters in the obfuscated answer. For example, if the answer is "Tang Dynasty" and the obfuscation characters are "abcd123", the obfuscated answer can be "Tang ab1 Dynasty 23cd", or "12 Dynasty cd Tang ab3", etc.

[0159] Step 310: Generate questions and obfuscated answers.

[0160] In the embodiment of the present invention, first, an arbitrary picture on the current system browsing page is intercepted to generate source content; then the picture is parsed to identify the valid content, so as to obtain the valid content related to the question; then this content is used to perform a relevance collision with the local question bank to determine whether there is a matching item, and then generate questions and related answers; then the answer is obfuscated twice, and finally questions and obfuscated answers are generated, thereby increasing the recognition difficulty of the answer, making it difficult for the system to identify the correct answer, and thus enhancing the security of the system.

[0161] See Figure 4 , the embodiment of the present invention provides a schematic diagram of the data processing process of a verification method, and the process includes:

[0162] Step 401: The front end intercepts the picture on the current browsing page.

[0163] It should be noted that the front end here is equivalent to the Figure 2 terminal device in the embodiment shown, which will not be elaborated here.

[0164] Step 402: Convert the picture to 64 bits and transfer it to the back end.

[0165] It should be noted that the back end here is equivalent to the Figure 1 server in the embodiment shown, which will not be elaborated here. It should be known that since the information space occupied by pictures and other information is too large, during the information transmission process, the transmitted is the information flow containing picture information, rather than the picture information itself. Therefore, the picture is converted to 64-bit information here and then transferred to the back end.

[0166] Step 403: Call the OCR algorithm to identify the picture content.

[0167] It should be noted that the OCR algorithm is an algorithm for identifying image text. Therefore, calling this algorithm to identify the picture content is to obtain the text content in the picture.

[0168] Step 404: Perform relevance matching in the search server based on the recognized text content, and select the one with a higher score and its related answers.

[0169] It should be noted that when the search server performs relevance matching, each question found will be scored. That is to say, as the degree of association with the recognized text content increases, its score also increases. Here, select the question with a higher score and its related answers.

[0170] Step 405: Add irrelevant letters and numbers to the answer to achieve an obfuscation effect.

[0171] Step 406: Perform another transposition obfuscation on the obfuscated answer.

[0172] Step 407: Package the question object.

[0173] It should be noted that the object is a function of a specific program in a computer language. Here, the question object is a function that combines the question and the answer after re-obfuscation. It is convenient for the server to send it to the terminal device.

[0174] Step 408: Create a hash table to store the answer, with the answer as the key and a flag indicating whether it is correct or incorrect as the value.

[0175] It should be noted that a hash table (abbreviated as hash table) can represent a mapping relationship of a set of key-value pairs. Among them, the key is key and the value is value. Here, create a hash table to store the answer. In this hash table, the key is the answer, and the value is a flag indicating whether the answer is correct. Among them, the flag for correct is true; the flag for incorrect is false.

[0176] Step 409: Establish a hash table with the question as the key and the hash table of the answer as the value, forming a cascaded hash table.

[0177] It should be noted that when establishing a hash table for the question, the key is the question and the value is the hash table of the answer. In a situation where the key or value in such a hash table is another hash table, we call it a cascaded hash table.

[0178] Step 410: Store it in the database, with the key being the current user identifier + question identifier, the value being the cascaded hash table, and set an expiration time.

[0179] It should be noted that the user identifier here is the user identifier of the currently verified user, and the question identifier is the identifier of the target question, which can be the target question itself, but is not limited to this. For example, during the verification process when user A logs in to his own account, the user identifier is the account name of user A, and the question identifier is the target question.

[0180] Step 411: Return the currently generated question object.

[0181] It should be noted that the backend returns the question object containing the question and the re-confused answer to the frontend, so that the frontend can display the corresponding data for the user to select. After the user makes a selection, the backend will receive the verification request carrying the answer to be verified sent by the frontend and initiate the verification process. Among them, the steps to be executed after the backend initiates the verification process are as Figure 5 shown, including:

[0182] Step 501: Assemble the current question identifier and the user identifier into a database key.

[0183] It should be noted that the verification request carries the question identifier representing the current question and the user identifier of the current user. Since the key in Step 410 is the current user identifier + question identifier and the value is the cascaded hash table, by assembling the current question identifier and the user identifier, a key can be obtained, and the cascaded hash table required for verification is the value corresponding to this key.

[0184] Step 502: Obtain the current question cascaded hash table.

[0185] Step 503: Obtain the hash table of the answer according to the current question.

[0186] Step 504: Pass in the answer to obtain the identification value in the answer hash table. If it is not correct, this verification fails.

[0187] It can be understood that the process of using the cascaded hash table for verification is similar to the process of verification based on the first hash table and the second hash table in the foregoing invention embodiments, and will not be elaborated here.

[0188] See Figure 6 , this invention embodiment provides a verification device applied to a server. The device includes:

[0189] The first receiving module 61 is configured to receive the first verification request carrying the target keyword sent by the terminal device;

[0190] The question module 62 is configured to obtain the target question containing the target keyword and the target answer set corresponding to the target question in the target database; wherein, the target answer set is a set composed of the first answer that correctly answers the target question and at least one second answer that wrongly answers the target question;

[0191] The confusion module 63 is configured to process each answer in the target answer set according to a preset confusion strategy to obtain a confused answer set;

[0192] The first sending module 64 is configured to send the target question and the set of confused answers to the terminal device, so that the terminal device displays the target question and the set of confused answers on the verification page;

[0193] The verification module 65 is configured to, when receiving a second verification request for the target question sent by the terminal device, verify the answer to be verified carried in the second verification request based on the set of confused answers.

[0194] In the embodiment of the present invention, the received first verification request carries a target keyword, so that the target question and the set of target answers corresponding to the target question can be matched in the target database by using the target keyword. The set of target answers is a set composed of the first answer that correctly answers the target question and at least one second answer that wrongly answers the target question. Furthermore, verification can be performed in a combined manner of providing questions and answers, and the questions used for verification are related to the target keyword in the first verification request, which can avoid repeating the same questions to the user to a greater extent. Then, each answer in the set of target answers is subjected to confusion processing according to a preset confusion strategy to obtain a set of confused answers that are not easily recognized by a machine, and then the set of confused answers is provided to the user. Finally, when receiving the second verification request, the answer to be verified carried in the second verification request is verified based on the set of confused answers. In the case where the present invention provides verification in a combined manner of questions and answers, the answers provided to the user are the answers after being subjected to confusion processing according to the preset confusion strategy, making it more difficult for the machine to recognize the correct answer from them, thereby increasing the difficulty of machine cracking and enhancing the security of the system.

[0195] Optionally, the preset confusion strategy includes: a selection sub-strategy and a confusion sub-strategy. The confusion module 63 includes:

[0196] The first confusion unit is configured to, for each answer in the set of target answers, make a selection in a preset confusion library according to the selection sub-strategy to obtain a plurality of confused characters corresponding to the answer;

[0197] The second confusion unit is configured to, for each answer, combine the answer with its corresponding plurality of confused characters according to the confusion sub-strategy to generate a confused answer corresponding to the answer;

[0198] The set unit is configured to generate a set of confused answers based on the respective confused answers.

[0199] Optionally, the second confusion unit is specifically configured to add the plurality of confused characters corresponding to the answer to the answer to generate an intermediate confused answer; adjust the positions of the characters in the intermediate confused answer in the intermediate confused answer to generate a confused answer corresponding to the answer.

[0200] Optionally, the preset confusion library includes: various types of confused characters;

[0201] The first obfuscation unit is specifically configured to sequentially select multiple obfuscation characters from the obfuscation characters of each type in a preset obfuscation library; and determine the selected obfuscation characters of various types as multiple obfuscation characters corresponding to the answer.

[0202] Optionally, the types of the obfuscation characters include multiple of: numeric type, letter type, punctuation type, special symbol type.

[0203] Optionally, the device further includes:

[0204] A creation module, configured to create a first hash table and a second hash table;

[0205] A first storage module, configured to store, for each answer, the obfuscated answer corresponding to the answer and an identifier indicating whether the answer is the first answer as a key-value pair in the first hash table;

[0206] A second storage module, configured to store the target question and the first hash table as a key-value pair in the second hash table;

[0207] The verification module 65 includes:

[0208] A first verification unit, configured to determine the first hash table corresponding to the target question in the second hash table;

[0209] A second verification unit, configured to determine a target answer in the first hash table based on the answer to be verified, where the target answer is an obfuscated answer identical to the answer to be verified;

[0210] A third verification unit, configured to generate a verification result based on the identifier corresponding to the target answer in the first hash table.

[0211] See Figure 7 , an embodiment of the present invention provides a verification device, which is applied to a terminal device. The device includes:

[0212] An image module 71, configured to obtain a target image including the page content of the current display page;

[0213] A keyword module 72, configured to generate target keywords based on the target image;

[0214] A second sending module 73, configured to send a first verification request carrying the target keywords to a server, so that the server returns a target question and a set of obfuscated answers based on the target question including the target keywords in a target database and the set of target answers corresponding to the target question;

[0215] A second receiving module 74, configured to receive the target question and the set of obfuscated answers;

[0216] A display module 75 for displaying a verification page and displaying the target question and the set of confusing answers on the verification page;

[0217] A third sending module 76 for, when receiving the target input of the user for the answer to be verified, sending a second verification request carrying the answer to be verified to the server for the target question, so that the server verifies the answer to be verified carried in the second verification request based on the set of confusing answers; wherein, the answer to be verified is any element in the set of confusing answers on the verification page.

[0218] In the embodiment of the present invention, first, a target image containing the page content of the current display page is obtained, and based on the target image, a target keyword is generated. Then, a first verification request carrying the target keyword is sent to the server, so that the server returns the target question and the set of confusing answers based on the target question containing the target keyword in the target database and the set of target answers corresponding to the target question, and thus can be provided to the user for verification in the form of a combination of questions and answers. Moreover, the questions used for verification are related to the target keyword in the first verification request, which can avoid providing the same questions to the user repeatedly to a greater extent. Then, the verification page is displayed, and the target question and the set of confusing answers are displayed on the verification page. Finally, when receiving the target input of the user for the answer to be verified, a second verification request carrying the answer to be verified is sent to the server for the target question, so that the server verifies the answer to be verified carried in the second verification request based on the set of confusing answers. When the present invention provides verification in the form of a combination of questions and answers, the answers provided to the user are answers after being obfuscated, making it more difficult for the machine to identify the correct answer therefrom, thereby increasing the difficulty of machine cracking and enhancing the security of the system.

[0219] On the other hand, the embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the verification method provided by each of the above embodiments of the present invention.

[0220] On yet another aspect, the embodiment of the present invention further provides a readable storage medium. When the instructions in the readable storage medium are executed by the processor of the electronic device, the electronic device can execute the verification method provided by each of the above embodiments of the present invention.

[0221] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative work.

[0222] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0223] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A verification method, applied to a server, characterized in that, The method includes: Receiving a first verification request carrying a target keyword sent by a terminal device; Obtaining a target question including the target keyword in a target database and a target answer set corresponding to the target question; wherein, the target answer set is a set composed of a first answer that correctly answers the target question and at least one second answer that wrongly answers the target question; Processing each answer in the target answer set according to a preset confusion strategy to obtain a confused answer set; Sending the target question and the confused answer set to the terminal device so that the terminal device displays the target question and the confused answer set on a verification page; When receiving a second verification request for the target question sent by the terminal device, verifying the answer to be verified carried in the second verification request based on the confused answer set; The preset confusion strategy includes: a selection sub-strategy and a confusion sub-strategy. Processing each answer in the target answer set according to the preset confusion strategy to obtain a confused answer set includes: For each answer in the target answer set, selecting according to the selection sub-strategy in a preset confusion library to obtain multiple confused characters corresponding to the answer; For each answer, combining the answer and its corresponding multiple confused characters according to the confusion sub-strategy to generate a confused answer corresponding to the answer; Generating the confused answer set based on each of the confused answers; Combining the answer and its corresponding multiple confused characters according to the confusion sub-strategy to generate a confused answer corresponding to the answer includes: Adding the multiple confused characters corresponding to the answer to the answer to generate an intermediate confused answer; Adjusting the positions of the characters in the intermediate confused answer in the intermediate confused answer to generate a confused answer corresponding to the answer.

2. The method according to claim 1, characterized in that, The preset confusion library includes: multiple types of confused characters; Selecting according to the selection sub-strategy in the preset confusion library to obtain multiple confused characters corresponding to the answer includes: Sequentially selecting multiple confused characters from the confused characters of each type in the preset confusion library; Determining the selected confused characters of various types as the multiple confused characters corresponding to the answer.

3. The method according to claim 2, wherein The types of the confused characters include: multiple of numeric type, alphabetic type, punctuation type, special symbol type.

4. The method according to claim 1, characterized in that After adjusting the positions of the characters in the intermediate confused answer in the intermediate confused answer to generate a confused answer corresponding to the answer, the method further includes: Creating a first hash table and a second hash table; For each answer, storing the confused answer corresponding to the answer and an identifier indicating whether the answer is the first answer as a key-value pair in the first hash table; Storing the target question and the first hash table as a key-value pair in the second hash table; Verifying based on the confused answer set and the answer to be verified carried in the second verification request includes: Determining the first hash table corresponding to the target question in the second hash table; Based on the answer to be verified, determine the target answer in the first hash table, where the target answer is the obfuscated answer that is the same as the answer to be verified; Generate a verification result based on the identifier corresponding to the target answer in the first hash table.

5. A verification method, applied to a terminal device, characterized in that The method includes: Obtain a target image including the page content of the current display page; Generate target keywords based on the target image; Send a first verification request carrying the target keywords to the server, so that the server returns the target question and the obfuscated answer set based on the target question including the target keywords in the target database and the target answer set corresponding to the target question; Receive the target question and the obfuscated answer set; Display a verification page and display the target question and the obfuscated answer set on the verification page; In the case of receiving the target input of the user for the answer to be verified, send a second verification request carrying the answer to be verified to the server for the target question, so that the server verifies the answer to be verified carried in the second verification request based on the obfuscated answer set; wherein, the answer to be verified is any element in the obfuscated answer set on the verification page; The preset obfuscation strategy includes: a selection sub-strategy and an obfuscation sub-strategy. In the target answer set, each answer is processed according to the preset obfuscation strategy to obtain an obfuscated answer set, including: For each answer in the target answer set, select in a preset obfuscation library according to the selection sub-strategy to obtain multiple obfuscated characters corresponding to the answer; For each answer, combine the answer and its corresponding multiple obfuscated characters according to the obfuscation sub-strategy to generate an obfuscated answer corresponding to the answer; Generate the obfuscated answer set based on each obfuscated answer; The combining the answer and its corresponding multiple obfuscated characters according to the obfuscation sub-strategy to generate an obfuscated answer corresponding to the answer includes: Add the multiple obfuscated characters corresponding to the answer to the answer to generate an intermediate obfuscated answer; Adjust the positions of the characters in the intermediate obfuscated answer in the intermediate obfuscated answer to generate an obfuscated answer corresponding to the answer.

6. A verification device, applied to a server, characterized in that, The device includes: A first receiving module, configured to receive a first verification request carrying target keywords sent by a terminal device; A question module, configured to obtain a target question including the target keywords in the target database and a target answer set corresponding to the target question; wherein, the target answer set is a set composed of a first answer that correctly answers the target question and at least one second answer that wrongly answers the target question; An obfuscation module, configured to process each answer in the target answer set according to a preset obfuscation strategy to obtain an obfuscated answer set; A first sending module, configured to send the target question and the obfuscated answer set to the terminal device, so that the terminal device displays the target question and the obfuscated answer set on a verification page; A verification module, configured to, when receiving a second verification request for the target problem sent by the terminal device, verify the answer to be verified carried in the second verification request based on the set of obfuscated answers; The preset obfuscation strategy includes: a selection sub-strategy and an obfuscation sub-strategy. The obfuscation module includes: A first obfuscation unit, configured to, for each answer in the set of target answers, select in a preset obfuscation library according to the selection sub-strategy to obtain a plurality of obfuscated characters corresponding to the answer; A second obfuscation unit, configured to, for each answer, combine the answer with the plurality of obfuscated characters corresponding to it according to the obfuscation sub-strategy to generate an obfuscated answer corresponding to the answer; An aggregation unit, configured to generate the set of obfuscated answers based on the respective obfuscated answers; The second obfuscation unit is specifically configured to add the plurality of obfuscated characters corresponding to the answer to the answer to generate an intermediate obfuscated answer; adjust the positions of the characters in the intermediate obfuscated answer in the intermediate obfuscated answer to generate the obfuscated answer corresponding to the answer.

7. The device according to claim 6, characterized in that, The preset obfuscation library includes: various types of obfuscated characters; The first obfuscation unit is specifically configured to sequentially select a plurality of the obfuscated characters from the obfuscated characters of each type in the preset obfuscation library; and determine the selected obfuscated characters of various types as the plurality of obfuscated characters corresponding to the answer.

8. The device according to claim 6, characterized in that The device further includes: A creation module, configured to create a first hash table and a second hash table; A first storage module, configured to, for each answer, store the obfuscated answer corresponding to the answer and an identifier indicating whether the answer is the first answer as a key-value pair in the first hash table; A second storage module, configured to store the target problem and the first hash table as a key-value pair in the second hash table; The verification module includes: A first verification unit, configured to determine the first hash table corresponding to the target problem in the second hash table; A second verification unit, configured to determine the target answer in the first hash table based on the answer to be verified, where the target answer is the obfuscated answer identical to the answer to be verified; A third verification unit, configured to generate a verification result based on the identifier corresponding to the target answer in the first hash table.

9. A verification device, applied to a terminal device, characterized in that, The device includes: An image module, configured to obtain a target image including the page content of the current display page; A keyword module, configured to generate target keywords based on the target image; A second sending module, configured to send a first verification request carrying the target keywords to a server, so that the server returns the target problem and the set of obfuscated answers based on the target problem including the target keywords in a target database and the set of target answers corresponding to the target problem; A second receiving module, configured to receive the target problem and the set of obfuscated answers; A display module, configured to display a verification page and display the target problem and the set of obfuscated answers on the verification page; A third sending module, configured to, when receiving a target input of a user for an answer to be verified, send a second verification request carrying the answer to be verified to the server for the target question, so that the server verifies the answer to be verified carried in the second verification request based on the set of obfuscated answers; wherein, the answer to be verified is any element in the set of obfuscated answers in the verification page. The preset obfuscation strategy includes: a selection sub-strategy and an obfuscation sub-strategy. The obfuscation module includes: A first obfuscation unit, configured to select, for each answer in the target answer set, in a preset obfuscation library according to the selection sub-strategy, to obtain a plurality of obfuscated characters corresponding to the answer. A second obfuscation unit, configured to, for each answer, combine the answer and the plurality of obfuscated characters corresponding thereto according to the obfuscation sub-strategy to generate an obfuscated answer corresponding to the answer. An aggregation unit, configured to generate the set of obfuscated answers based on the respective obfuscated answers. Specifically, the second obfuscation unit is configured to add the plurality of obfuscated characters corresponding to the answer to the answer to generate an intermediate obfuscated answer; and adjust the positions of the characters in the intermediate obfuscated answer in the intermediate obfuscated answer to generate the obfuscated answer corresponding to the answer.

10. An electronic device, characterized in that, including: A processor, a memory, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, it implements the verification method according to any one of claims 1-4 or the verification method according to claim 5.

11. A readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is enabled to execute the verification method according to any one of claims 1-4 or the verification method according to claim 5.

Citation Information

Patent Citations

  • User verification method and system

    CN112836185A

  • Question generation method and device

    CN112989303A