Graphical reasoning verification code recognition method, system, device and medium

By extracting the verification instructions and attribute information in the verification code image, combined with keyword screening and comparison, efficient graphical reasoning verification code recognition is achieved, which solves the problems of low recognition efficiency and poor accuracy in the existing technology, and improves the recognition efficiency Accuracy and response speed.

CN112487394BActive Publication Date: 2024-09-17CTRIP TRAVEL NETWORK TECH SHANGHAI0
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011372805.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-30
Publication Date
2024-09-17
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

In the existing technology, the graphical reasoning verification code recognition efficiency is low and the accuracy is poor, resulting in low manual recognition efficiency.

Method used

By extracting the verification instructions in the verification code image, detecting alternative verification code graphics and obtaining attribute information, combined with keyword extraction rules and benchmark object comparison, the target verification code graphics are screened out, and operation actions are performed to complete the recognition.

Benefits of technology

It improves the accuracy of graphical reasoning verification code recognition, reduces the verification response time, and solves the problems of low efficiency and poor accuracy of manual recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112487394B
    Figure CN112487394B
Patent Text Reader

Abstract

The present invention discloses a method, system, device and medium for recognizing a graphic reasoning verification code. The recognition method includes: extracting a verification instruction statement; detecting all candidate verification code graphics from a verification code image and obtaining the attribute information corresponding to each candidate verification code graphic; extracting a keyword from the verification instruction statement; if the keyword includes a reference object keyword, then by comparing the reference object keyword with the attribute features of all the candidate verification graphics, one is selected from all the candidate verification graphics as a reference object, and the attribute features of the target verification code graphic are determined based on the reference object and combined with the remaining keywords in the keyword, and the candidate verification code graphics that meet the attribute features are screened out as the target verification code image. The defects of low verification code recognition efficiency and poor recognition accuracy caused by the manual method are solved, the accuracy of the recognition of the graphic reasoning verification code is effectively improved, and the response time of verifying the graphic reasoning verification code is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image verification code recognition, and in particular to a method, system, device and medium for recognizing a graphic reasoning verification code. Background Art

[0002] CAPTCHA is widely used in Internet companies. It is a public fully automatic program that distinguishes whether the user is a computer or a human. It can prevent malicious password cracking, ticket fraud, forum flooding, etc., thereby ensuring the stability of the server system and the security of user information.

[0003] At present, the more common types of verification codes include image verification codes, sliding window verification codes, and selection verification codes, etc. If the verification code can be automatically recognized, it can effectively assist the user to quickly pass the verification link of the verification code, thereby realizing automatic access to the network page and obtaining public information.

[0004] However, the graphic reasoning image recognition solution uses manual recognition, which is time-consuming and labor-intensive; if the graphic reasoning carries complex logical reasoning, manual recognition is inefficient and has poor accuracy. Summary of the invention

[0005] The technical problem to be solved by the present invention is to overcome the defects of low efficiency and poor recognition accuracy of verification code recognition caused by manual methods in the prior art, and to provide a graphic reasoning verification code recognition method, system, device and medium.

[0006] The present invention solves the above technical problems through the following technical solutions:

[0007] In a first aspect, the present invention provides a method for recognizing a graphical reasoning verification code, the method comprising:

[0008] Extracting a verification instruction statement from the verification code image to be identified; wherein the verification instruction statement includes a text description of the characteristics of the target verification code graphic to be verified;

[0009] Detecting all candidate verification code graphics from the verification code image and obtaining attribute information corresponding to each of the candidate verification code graphics; wherein the type of the attribute information is set according to the type of the feature described in the verification instruction statement;

[0010] Extracting keywords from the verification instruction statement according to keyword extraction rules;

[0011] determining whether the keywords include a reference object keyword;

[0012] If included, selecting one of the candidate verification graphics as the reference object by comparing the reference object keyword with the attribute information of all the candidate verification graphics;

[0013] Taking the reference object as a reference and combining the remaining keywords in the keywords, the attribute characteristics of the target verification code graphic are determined, and the candidate verification code graphics meeting the attribute characteristics are screened out as the target verification code image.

[0014] Preferably, the verification instruction statement also includes an operation action on the target verification code image, and the recognition method further includes:

[0015] The operation action is performed on the target verification code.

[0016] Preferably, the determining whether the keywords include the reference object keywords comprises:

[0017] determining whether the keyword includes an associated word describing the association between the reference object and the target verification code graphic;

[0018] If included, the keyword before the associated word is used as the reference object keyword;

[0019] The method of determining the attribute information of the target verification code graphic based on the reference object and combining the remaining keywords in the keywords, and selecting the candidate verification code graphic that meets the attribute information as the target verification graphic includes:

[0020] Determining the association attribute between the reference object and the target verification code through the association word;

[0021] Performing initial filtering of candidate verification code graphics by comparing the associated attribute information of the reference object and the remaining candidate verification graphics;

[0022] The keyword after the associated word is used as the target keyword, and the target keyword is compared with the attribute information of the candidate verification patterns remaining after the initial filtering to select one that meets the target keyword as the target verification pattern.

[0023] Preferably, the associated words include location keywords or special keywords.

[0024] Preferably, the special keywords include same.

[0025] Preferably, the method further comprises:

[0026] If the keywords do not include the reference object keyword, obtaining the target keyword from the keywords;

[0027] By comparing the target keyword with the attribute information of all candidate verification images, one that matches the target keyword is selected as the target verification image.

[0028] Preferably, the step of comparing the target keyword with the candidate verification patterns remaining after the initial filtering or the attribute information of all the candidate verification patterns to select one that matches the target keyword as the target verification pattern comprises:

[0029] Obtaining the position order of all the target keywords in the verification instruction statement;

[0030] Obtaining the execution order of the screening according to the position order;

[0031] According to the execution order, the target keywords and the attribute information are screened one by one to obtain candidate verification code graphics that meet all the target keywords as the target verification code.

[0032] Preferably, the types of attribute information include shape, color, area and position coordinates.

[0033] Preferably, the step of obtaining the attribute information corresponding to each of the candidate verification code graphics includes:

[0034] The verification code graphic is input into the verification code detection model to obtain alternative verification code graphics and attribute information of the alternative verification code graphics; wherein the verification code detection model is obtained by training based on a convolutional neural network model according to the original sample graphics and the annotated sample images, and the annotated sample images contain all the verification code graphics in the sample images and attribute information of each verification code graphic.

[0035] In a second aspect, the present invention provides a system for recognizing a graphical reasoning verification code, the recognition system comprising:

[0036] An instruction statement acquisition module is used to extract a verification instruction statement from the verification code image to be identified; wherein the verification instruction statement includes a text description of the characteristics of the target verification code image to be verified;

[0037] An attribute information acquisition module, used to detect all candidate verification code graphics from the verification code image and acquire attribute information corresponding to each of the candidate verification code graphics; wherein the type of the attribute information is set according to the type of the feature described in the verification instruction statement;

[0038] A keyword extraction module, used to extract keywords from the verification instruction statement according to keyword extraction rules;

[0039] A judging module, used for judging whether the keywords include a reference object keyword;

[0040] If included, calling a reference object acquisition module, the reference object acquisition module is used to select one from all candidate verification graphics as a reference object by comparing the reference object keyword with the attribute information of all candidate verification graphics;

[0041] The first screening module is used to determine the attribute characteristics of the target verification code graphic based on the reference object and in combination with the remaining keywords in the keywords, and screen out candidate verification code graphics that meet the attribute characteristics as the target verification code image.

[0042] Preferably, the verification instruction statement also includes an operation action on the target verification code image, and the recognition system further includes:

[0043] An action execution module is used to execute the operation action on the target verification code.

[0044] Preferably, the judging module comprises:

[0045] an associated word determination unit, used to determine whether the keyword includes an associated word describing the association between the reference object and the target verification code graphic; if included, calling a reference object keyword acquisition unit, the reference object keyword acquisition unit uses the keyword before the associated word as the reference object keyword;

[0046] The first screening module comprises:

[0047] an associated attribute determining unit, configured to determine an associated attribute between the reference object and the target verification code through the associated word;

[0048] A verification code graphic filtering unit, configured to filter the candidate verification code graphics for the first time by comparing the associated attribute information of the reference object and the remaining candidate verification graphics;

[0049] The target verification code screening unit is used to take the keyword after the associated word as the target keyword, and screen out one that meets the target keyword as the target verification pattern by comparing the target keyword with the attribute information of the candidate verification patterns remaining after the initial filtering.

[0050] Preferably, the associated words include location keywords or special keywords.

[0051] Preferably, the special keywords include same.

[0052] Preferably, the judgment module is further used to call the target keyword acquisition module when the keywords do not include the reference object keyword;

[0053] The target keyword acquisition module is used to acquire the target keyword from the keywords;

[0054] The second screening module is used to screen out one that matches the target keyword as the target verification image by comparing the target keyword with the attribute information of all candidate verification images.

[0055] Preferably, the target verification code screening unit or the second screening module is specifically used for:

[0056] Obtaining the position order of all the target keywords in the verification instruction statement;

[0057] Obtaining the execution order of the screening according to the position order;

[0058] According to the execution order, the target keywords and the attribute information are screened one by one to obtain candidate verification code graphics that meet all the target keywords as the target verification code.

[0059] Preferably, the types of attribute information include shape, color, area and position coordinates.

[0060] Preferably, the attribute information acquisition module is specifically used for:

[0061] The verification code graphic is input into the verification code detection model to obtain alternative verification code graphics and attribute information of the alternative verification code graphics; wherein the verification code detection model is obtained by training based on a convolutional neural network model according to the original sample graphics and the annotated sample images, and the annotated sample images contain all the verification code graphics in the sample images and attribute information of each verification code graphic.

[0062] In a third aspect, the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for recognizing a graphic reasoning verification code as described in the first aspect is implemented.

[0063] In a fourth aspect, the present invention further provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method for recognizing a graphical reasoning verification code as described in the first aspect.

[0064] The positive and progressive effect of the present invention is that it provides a graphic reasoning filtering algorithm, which solves the defects of low efficiency and poor recognition accuracy of verification code recognition caused by manual methods, effectively improves the accuracy of graphic reasoning verification code recognition, and reduces the response time of verifying the graphic reasoning verification code. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1The figure is a flow chart of a method for recognizing a graphical reasoning verification code according to Embodiment 1 of the present invention.

[0066] Figure 2 This is a flow chart of step S14 of the method for recognizing a graphical reasoning verification code according to embodiment 1 of the present invention.

[0067] Figure 3 This is a flow chart of step S61 of the method for recognizing a graphical reasoning verification code according to embodiment 1 of the present invention.

[0068] Figure 4 This is a page schematic diagram of a verification code image of the method for recognizing a graphic reasoning verification code according to Embodiment 1 of the present invention.

[0069] Figure 5 This is a flow chart of a method for recognizing a graphical reasoning verification code according to Embodiment 2 of the present invention.

[0070] Figure 6 This is a module diagram of a system for recognizing a graphical reasoning verification code according to Embodiment 3 of the present invention.

[0071] Figure 7 This is a module diagram of a system for recognizing a graphical reasoning verification code according to Embodiment 4 of the present invention.

[0072] Figure 8 This is a schematic diagram of the hardware structure of an electronic device according to Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0073] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.

[0074] Example 1

[0075] like Figure 1 As shown, this embodiment provides a method for recognizing a graphical reasoning verification code, and the recognition method includes the following steps:

[0076] Step S1, extracting a verification instruction statement from a verification code image to be identified, wherein the verification instruction statement includes a text description of the characteristics of the target verification code image to be verified; the verification instruction statement also includes an operation action on the target verification code image.

[0077] Step S2: Detect all candidate verification code graphics from the verification code image and obtain attribute information corresponding to each candidate verification code graphic; wherein the type of attribute information is set according to the type of the feature described in the verification instruction statement.

[0078] When the verification instruction statement includes a description of the shape, color, area, and position coordinates of the target verification code image, the types of the attribute information include shape, color, area, and position coordinates.

[0079] Among them, in step S2, the step of obtaining the attribute information corresponding to each candidate verification code graphic includes:

[0080] The verification code graphic is input into the verification code detection model to obtain the alternative verification code graphics and the attribute information of the alternative verification code graphics; wherein the verification code detection model is obtained by training based on the convolutional neural network model according to the original sample graphics and the labeled sample images, and the labeled sample images contain all the verification code graphics in the sample images and the attribute information of each verification code graphic.

[0081] Specifically, 500 original sample graphics are used to mark the categories and positions using labelimg software. Before training, the objects in the original sample graphics are converted into data indexes through label classification sample vectorization. For example, 0 represents a cone, 1 represents a cylinder, 2 represents a sphere, 3 represents a polyhedron, and 4 represents a square to facilitate the subsequent training of the verification code model. The position data is normalized to the range of [0,1] through label position sample normalization, which improves the accuracy of the operation. It should be noted that the target detection algorithm used by the convolutional neural network model can be the YOLOv3 algorithm.

[0082] Step S3: extract keywords from the verification instruction statement according to the keyword extraction rule.

[0083] Step S4: Determine whether the keywords include the reference object keyword. If so, execute step S51.

[0084] Step S51 : By comparing the reference object keyword with the attribute information of all candidate verification graphics, one of the candidate verification graphics is selected as the reference object.

[0085] Step S61: Taking the reference object as a reference and combining it with other keywords in the keywords, determine the attribute characteristics of the target verification code graphic, and select candidate verification code graphics that meet the attribute characteristics as the target verification code image.

[0086] Step S7: perform an operation on the target verification code.

[0087] like Figure 2 As shown, in this embodiment, step S14 specifically includes the following steps:

[0088] Step S141: determine whether the keyword includes an associated word describing the association between the reference object and the target verification code graphic; if so, execute step S142.

[0089] Step S142: Use the keyword before the associated word as the reference object keyword.

[0090] Among them, the associated words include directional keywords or special keywords, and the special keywords include same.

[0091] like Figure 3 As shown, in this embodiment, step S61 specifically includes the following steps:

[0092] Step S611: Determine the association attribute between the reference object and the target verification code through the association word.

[0093] Step S612: Perform initial filtering of candidate verification code graphics by comparing the associated attribute information of the reference object and the remaining candidate verification code graphics.

[0094] Step S613: Take the keyword after the associated word as the target keyword, and select one that meets the target keyword as the target verification pattern by comparing the target keyword with the attribute information of the candidate verification patterns remaining after the initial filtering.

[0095] In this embodiment, step S613 further includes:

[0096] Get the position order of all target keywords in the verification instruction statement.

[0097] Gets the execution order of the filtering based on position order.

[0098] According to the execution order, the target keywords and attribute information are screened one by one to obtain the candidate verification code graphics that meet all the target keywords as the target verification code.

[0099] The present solution is further explained with an example. If the verification instruction statement in the verification code image to be identified is "Please click the small ball in front of the large cone", all candidate verification code graphics are detected from the verification code image to be identified and the attribute information corresponding to each candidate verification code graphic is obtained.

[0100] Keywords may include size keywords, such as big, small; target keywords may also include color keywords, such as red, yellow, blue, green, gray, etc.; target keywords may also include shape keywords, such as cone, column, ball, multiple, block, etc.

[0101] According to the keyword extraction rule, several keywords are obtained from the verification instruction statement, namely, "small ball in front of big cone", and the keywords are searched to see whether there is an associated word describing the association between the reference object and the target verification code graphic. The associated word can be a keyword representing the orientation, or the associated word can also be a special keyword. The orientation keyword can include at least one of "front, back, left, right", and the special keyword can include "same". Obviously, the verification instruction statement has the orientation keyword "front". The reference object keyword is obtained according to the "front" orientation keyword, that is, the text in front of the orientation keyword is used as the reference object keyword, and "big cone" is the reference object keyword.

[0102] The shape and area in the verification instruction statement are text descriptions of the attribute information of the target verification code graphic to be verified. The attribute information of the reference object keyword and all the candidate verification graphics are compared, that is, the association attribute between the reference object and the target verification code is determined as the orientation association attribute through the association word "front" in the verification instruction statement, and the initial candidate verification images are filtered by comparing the association attribute information of the reference object and the remaining candidate verification images.

[0103] The keywords "small" and "ball" after the associated word "front" are used as the first target keyword and the second target keyword, and an alternative verification graphic that meets both the first target keyword and the second target keyword is selected as the target verification graphic by comparing the attribute information of the first target keyword and the second target keyword with the alternative verification graphic remaining after the initial filtering. The operation action is performed on the target verification code according to the execution action in the verification instruction statement, that is, the target verification code image is clicked.

[0104] Specifically, the candidate verification code graphics in the verification code image include graphics A, graphics B, graphics C, graphics D, graphics E, graphics F, graphics G, graphics H and graphics L, wherein:

[0105] The attribute information of shape A is: polyhedron, yellow, area 3, center point position coordinates [1,4];

[0106] The attribute information of shape B is: cone, gray, area 4, center point position coordinates [2,6];

[0107] The attribute information of shape C is: sphere, red, area 3, center point position coordinates [5,7];

[0108] The attribute information of shape D is: cylinder, yellow, area 1, center point position coordinates [3,3];

[0109] The attribute information of shape E is: cylinder, red, area 1, center point position coordinates [4,2.5];

[0110] The attribute information of shape F is: cylinder, green, area 5, center point position coordinates [5,4];

[0111] The attribute information of the graph G is: polyhedron, gray, area 2, center point position coordinates [6,6];

[0112] The attribute information of the shape H is: sphere, yellow, area 1, center point position coordinates [7,5];

[0113] The attribute information of the shape L is: polyhedron, red, area 3, center point position coordinates [8,4];

[0114] Traverse the attribute information of figure AL, filter it, and obtain the image corresponding to the reference object "large cone" in the verification code image. Obviously, the reference object corresponds to figure B, and the coordinates of the center point of figure B are [2,6].

[0115] Then, the attribute information corresponding to the traversal of graphics A to graphics L is combined with "front" to perform initial screening and filtering to obtain the graphics for the reference object graphic B that meet the filtering conditions of the orientation keyword "front", which are obviously graphics A, graphics D, graphics E, graphics H and graphics L.

[0116] Traverse the attribute information corresponding to the remaining Graphics A, Graphics D, Graphics E, Graphics H and Graphics L after filtering, and obtain the graphics in the verification code image that meet the first target keyword "small" filtering condition for the reference object Graphic B, which are obviously Graphics D, Graphics E and Graphics H.

[0117] Traverse the remaining graphics D, E, and H after filtering, and obtain the graphics in the verification code graphics that are for the reference object graphic B and meet the second target keyword "ball" filtering condition. Obviously, graphic H is the final target verification graphic. Click on graphic H to perform verification.

[0118] Now let's further explain this solution with another example. If the verification instruction statement in the verification code image to be identified is "Please click on the large object with the same color as the small cone", a number of keywords "small cone with the same color and large size" are extracted from the verification instruction statement. Check whether there are special keywords from the extracted keywords. Obviously, there are special keywords in the verification instruction statement. The reference object keyword is obtained based on the special keyword "same", and the text in front of the special keyword is used as the reference object keyword, that is, "small cone" is the reference object.

[0119] The target keywords behind the reference object are screened from left to right, and the target keywords can be one or more, the third target keyword is "same color", and the fourth target keyword is "big". Based on the reference object "small cone", the target verification code image is screened from the attribute information corresponding to various images included in the obtained verification code image in combination with the special keyword "same", the third target keyword "same color" and the fourth target keyword "big".

[0120] Specifically, Figure 4 As shown, the alternative verification code graphics in the verification code image include graphics A, graphics B, graphics C, graphics D, graphics E, graphics F, graphics G, graphics H, graphics L and graphics M, wherein,

[0121] The attribute information of shape A is: sphere, yellow, area 2, center point position coordinates [1,4];

[0122] The attribute information of shape B is: sphere, gray, area 3, center point position coordinates [3,6];

[0123] The attribute information of shape C is: sphere, red, area 3, center point position coordinates [4,7];

[0124] The attribute information of shape D is: sphere, yellow, area 3, center point position coordinates [7,8];

[0125] The attribute information of shape E is: polyhedron, red, area 1.8, center point position coordinates [2,4];

[0126] The attribute information of the shape F is: square, green, area 1.6, center point position coordinates [5,4];

[0127] The attribute information of the graph G is: polyhedron, gray, area 1.3, center point position coordinates [3,3];

[0128] The attribute information of shape H is: cone, yellow, area 1, center point position coordinates [5,3];

[0129] The attribute information of shape L is: cone, red, area 3, center point position coordinates [8,3];

[0130] The attribute information of the shape M is: cylinder, gray, area 2, center point position coordinates [9,5];

[0131] Traverse the attribute information of graphics A to graphics M, and after screening and filtering, obtain the image corresponding to the reference object "small cone" in the verification code image. Obviously, the reference object corresponds to graphic H, which is yellow.

[0132] Then, the attribute information of graphics A to graphics M is traversed for screening and filtering, and graphics that meet the third target keyword "same color" screening condition for the reference object graphic H are obtained. In the verification code image, they are obviously graphics A and graphics D. Graphics that meet the fourth target keyword "large" screening condition are screened from graphics A and D. Graphic D is the final target verification graphic, and verification is performed after clicking on graphic D.

[0133] A graphic reasoning filtering algorithm is provided to solve the defects of low efficiency and poor recognition accuracy of verification code caused by manual method, effectively improve the accuracy of graphic reasoning verification code recognition, and reduce the response time of verifying graphic reasoning verification code.

[0134] Example 2

[0135] like Figure 5 As shown, this embodiment provides a method for recognizing a graphical reasoning verification code, and the recognition method includes the following steps:

[0136] Step S1, extracting a verification instruction statement from a verification code image to be identified, wherein the verification instruction statement includes a text description of the characteristics of the target verification code image to be verified; the verification instruction statement also includes an operation action on the target verification code image.

[0137] Step S2: Detect all candidate verification code graphics from the verification code image and obtain attribute information corresponding to each candidate verification code graphic; wherein the type of attribute information is set according to the type of feature described in the verification instruction statement.

[0138] When the verification instruction statement includes a description of the shape, color, area, and position coordinates of the target verification code image, the types of the attribute information include shape, color, area, and position coordinates.

[0139] Step S3: extract keywords from the verification instruction statement according to the keyword extraction rule.

[0140] Step S4: Determine whether the keywords include the reference object keyword. If not, execute step S52.

[0141] Step S52: Obtain target keywords from the keywords;

[0142] Step S62: By comparing the target keyword with the attribute information of all candidate verification images, one that matches the target keyword is selected as the target verification image.

[0143] In this embodiment, step S62 includes:

[0144] Get the position order of all target keywords in the verification instruction statement.

[0145] Gets the execution order of the filtering based on position order.

[0146] According to the execution order, the target keywords and attribute information are screened one by one to obtain the candidate verification code graphics that meet all the target keywords as the target verification code.

[0147] Step S7: perform an operation on the target verification code.

[0148] Now, another example is used to further explain the present solution. If the verification instruction statement in the verification code graphic to be identified is "Please click on the green polyhedron in the text below", a number of keywords "green polyhedron" are obtained from the verification instruction statement. From the keyword, find out whether there is an orientation keyword. If not, continue to find out whether there is a special keyword. Because there is no orientation keyword or special keyword in the keyword, all target keywords are extracted from left to right, and the fifth target keyword "green" and the sixth target keyword "polyhedron" can be obtained.

[0149] In the verification code image, the first position sequence of the fifth target keyword "green" in the verification instruction statement is obtained, and the second position sequence of the sixth target keyword "polyhedron" in the verification instruction statement is obtained. From left to right, the screening execution order is determined to first screen based on the fifth target keyword corresponding to the first position sequence, then screen based on the sixth target keyword corresponding to the second position sequence, and finally determine the target verification code.

[0150] Specifically, the candidate verification code graphics in the verification code image include graphics A, graphics B, graphics C, graphics D, graphics E, graphics F, and graphics G, wherein:

[0151] The attribute information of shape A is: polyhedron, yellow, area 3, center point position coordinates [1,4];

[0152] The attribute information of shape B is: cone, green, area 4, center point position coordinates [1,6];

[0153] The attribute information of shape C is: sphere, red, area 3, center point position coordinates [2,7];

[0154] The attribute information of shape D is: cylinder, green, area 1, center point position coordinates [3,3];

[0155] The attribute information of shape E is: cylinder, red, area 1, center point position coordinates [4,4];

[0156] The attribute information of shape F is: cylinder, green, area 5, center point position coordinates [5,4];

[0157] The attribute information of the graph G is: polyhedron, green, area 2, center point position coordinates [6,6];

[0158] The attribute information of graphics A to G is traversed, and after screening and filtering, graphics that meet the screening condition of the first target keyword "green" are obtained, which are obviously graphics B, graphics D, graphics F and graphics G in the verification code image.

[0159] Then, the attribute information corresponding to the remaining graphics B, D, F and G after screening is traversed to obtain the graphics that meet the screening condition of the sixth target keyword "polyhedron". In the verification code image, graphic G is the final target verification graphic.

[0160] A graphic reasoning filtering algorithm is provided to solve the defects of low efficiency and poor recognition accuracy of verification code caused by manual method, effectively improve the accuracy of graphic reasoning verification code recognition, and reduce the response time of verifying graphic reasoning verification code.

[0161] Example 3

[0162] This embodiment provides a system for recognizing a graphical reasoning verification code. Figure 6 As shown, it specifically includes: an instruction statement acquisition module 110, an attribute information acquisition module 120, a keyword extraction module 130, a judgment module 140, a reference object acquisition module 151, a first screening module 161 and an action execution module 170. The judgment module 140 includes a related word judgment unit 141 and a reference object keyword acquisition unit 142; the first screening module 161 includes a related attribute determination unit 1611, a verification code graphic filtering unit 1612 and a target verification code screening unit 1613;

[0163] The instruction statement acquisition module 110 is used to extract the verification instruction statement from the verification code image to be identified, wherein the verification instruction statement includes a text description of the characteristics of the target verification code graphic to be verified; the verification instruction statement also includes an operation action on the target verification code image.

[0164] The attribute information acquisition module 120 is used to detect all candidate verification code graphics from the verification code image and obtain the attribute information corresponding to each candidate verification code graphic; wherein the type of the attribute information is set according to the type of the feature described in the verification instruction statement.

[0165] The attribute information acquisition module 120 is specifically used for:

[0166] The verification code graphic is input into the verification code detection model to obtain the alternative verification code graphics and the attribute information of the alternative verification code graphics; wherein the verification code detection model is obtained by training based on the convolutional neural network model according to the original sample graphics and the labeled sample images, and the labeled sample images contain all the verification code graphics in the sample images and the attribute information of each verification code graphic.

[0167] The keyword extraction module 130 is used to extract keywords from the verification instruction statement according to the keyword extraction rule.

[0168] The determination module 140 is used to determine whether the keyword includes the reference object keyword, and if so, call the reference object acquisition module 151.

[0169] The reference object acquisition module 151 is used to select one of all the candidate verification graphics as the reference object by comparing the reference object keyword with the attribute information of all the candidate verification graphics.

[0170] The first screening module 161 is used to determine the attribute characteristics of the target verification code graphic based on the reference object and the remaining keywords in the keywords, and screen out candidate verification code graphics that meet the attribute characteristics as the target verification code image.

[0171] The action execution module 170 is used to execute an operation action on the target verification code.

[0172] In this embodiment, in the judgment module 140,

[0173] The associated word determination unit 141 is used to determine whether the keyword includes an associated word that describes the association between the reference object and the target verification code graphic.

[0174] If included, the reference object keyword acquisition unit 142 is called.

[0175] The reference object keyword acquisition unit 142 is used to take the keyword preceding the related word as the reference object keyword.

[0176] Among them, the associated words include directional keywords or special keywords, and the special keywords include same.

[0177] Among them, in this embodiment, in the first screening module 161;

[0178] The associated attribute determining unit 1611 is used to determine the associated attribute between the reference object and the target verification code through the associated word.

[0179] The verification code pattern filtering unit 1612 is used to perform initial filtering of candidate verification code patterns by comparing the associated attribute information of the reference object and the remaining candidate verification patterns.

[0180] The target verification code screening unit 1613 is used to take the keyword after the associated word as the target keyword, and screen out one that meets the target keyword as the target verification pattern by comparing the target keyword with the attribute information of the candidate verification patterns remaining after the initial filtering.

[0181] In this embodiment, the target verification code screening unit 1613 is specifically used for:

[0182] Get the position order of all target keywords in the verification instruction statement.

[0183] Gets the execution order of the filtering based on position order.

[0184] According to the execution order, the target keywords and attribute information are screened one by one to obtain the candidate verification code graphics that meet all the target keywords as the target verification code.

[0185] A graphic reasoning filtering algorithm is provided to solve the defects of low efficiency and poor recognition accuracy of verification code caused by manual method, effectively improve the accuracy of graphic reasoning verification code recognition, and reduce the response time of verifying graphic reasoning verification code.

[0186] Example 4

[0187] This embodiment provides a system for recognizing a graphical reasoning verification code. Figure 7 As shown, it specifically includes: an instruction statement acquisition module 110, an attribute information acquisition module 120, a keyword extraction module 130, a judgment module 140, a target keyword acquisition module 152, a second screening module 162 and an action execution module 170.

[0188] The instruction statement acquisition module 110 is used to extract the verification instruction statement from the verification code image to be identified, wherein the verification instruction statement includes a text description of the characteristics of the target verification code graphic to be verified; the verification instruction statement also includes an operation action on the target verification code image.

[0189] The attribute information acquisition module 120 is used to detect all candidate verification code graphics from the verification code image and obtain the attribute information corresponding to each candidate verification code graphic; wherein the type of the attribute information is set according to the type of the feature described in the verification instruction statement.

[0190] The types of attribute information include shape, color, area and location coordinates.

[0191] The keyword extraction module 130 is used to extract keywords from the verification instruction statement according to the keyword extraction rule.

[0192] The keyword extraction module 140 is used to determine whether the keyword includes the reference object keyword; if the keyword does not include the reference object keyword, the target keyword acquisition module 152 is called.

[0193] The target keyword acquisition module 152 is used to acquire the target keyword from the keywords.

[0194] The second screening module 162 is used to screen out one that matches the target keyword as the target verification image by comparing the target keyword with the attribute information of all candidate verification images.

[0195] The action execution module 170 is used to execute an operation action on the target verification code.

[0196] In this embodiment, the second screening module 162 is specifically used for:

[0197] Get the position order of all target keywords in the verification instruction statement.

[0198] Gets the execution order of the filtering based on position order.

[0199] According to the execution order, the target keywords and the attribute information are screened one by one to obtain candidate verification code graphics that meet all the target keywords as the target verification code.

[0200] A graphic reasoning filtering algorithm is provided to solve the defects of low efficiency and poor recognition accuracy of verification code caused by manual method, effectively improve the accuracy of graphic reasoning verification code recognition, and reduce the response time of verifying graphic reasoning verification code.

[0201] Example 5

[0202] Figure 8 The schematic diagram of the structure of an electronic device provided in this embodiment. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for recognizing the graphic reasoning verification code of Embodiment 1 or Embodiment 2 is implemented. Figure 8 The electronic device 30 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0203] The electronic device 30 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 30 may include, but are not limited to: at least one processor 31, at least one memory 32, and a bus 33 connecting different system components (including the memory 32 and the processor 31).

[0204] The bus 33 includes a data bus, an address bus, and a control bus.

[0205] The memory 32 may include a volatile memory, such as a random access memory (RAM) 321 and / or a cache memory 322 , and may further include a read-only memory (ROM) 323 .

[0206] The memory 32 may also include a program / utility 325 having a set (at least one) of program modules 324, such program modules 324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0207] The processor 31 executes various functional applications and data processing by running the computer program stored in the memory 32, such as the method for recognizing a graphic reasoning verification code of Embodiment 1 or Embodiment 2 of the present invention.

[0208] The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 35. Furthermore, the model-generated device 30 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 36. As shown, the network adapter 36 communicates with other modules of the model-generated device 30 via a bus 33. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the model-generated device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (RAID) systems, tape drives, and data backup storage systems.

[0209] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0210] Example 6

[0211] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method for recognizing a graphic reasoning verification code of Embodiment 1 or Embodiment 2 are implemented.

[0212] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0213] In a possible implementation, the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of the method for recognizing a graphic reasoning verification code of Example 1 or Example 2.

[0214] The program code for executing the present invention may be written in any combination of one or more programming languages, and may be executed entirely on a user device, partially on a user device, as an independent software package, partially on a user device and partially on a remote device, or entirely on a remote device.

[0215] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that this is only for illustration and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.

Claims

1. A method for recognizing a graphical reasoning verification code, characterized in that: The identification method comprises: Extracting a verification instruction statement from the verification code image to be identified; wherein the verification instruction statement includes a text description of the characteristics of the target verification code graphic to be verified; Detecting all candidate verification code graphics from the verification code image and obtaining attribute information corresponding to each candidate verification code graphic; wherein the type of the attribute information is set according to the type of the feature described in the verification instruction statement; extracting keywords from the verification instruction statement according to keyword extraction rules; determining whether the keywords include a reference object keyword; If included, selecting one of the candidate verification graphics as the reference object by comparing the reference object keyword with the attribute information of all candidate verification graphics; Taking the reference object as a reference and combining the remaining keywords in the keywords except for the reference object keyword, determining the attribute characteristics of the target verification code graphic, and screening out candidate verification code graphics that meet the attribute characteristics as the target verification code image; The determining whether the keywords include the reference object keywords includes: determining whether the keyword includes an association word describing the association between the reference object and the target verification code graphic; If included, the keyword preceding the associated word is used as the reference object keyword.

2. The method for recognizing a graphical reasoning verification code according to claim 1, wherein: The verification instruction statement also includes an operation action on the target verification code image, and the recognition method further includes: The operation action is performed on the target verification code.

3. The method for recognizing a graphical reasoning verification code according to claim 1, wherein: The step of determining the attribute information of the target verification code graphic based on the reference object and combining it with the remaining keywords in the keywords, and selecting the candidate verification code graphic that meets the attribute information as the target verification code graphic, includes: Determining the association attribute between the reference object and the target verification code through the association word; Performing initial filtering of candidate verification code graphics by comparing associated attribute information of the reference object and the remaining candidate verification graphics; The keyword following the associated word is used as a target keyword, and the target keyword is compared with the attribute information of the candidate verification patterns remaining after the initial filtering to select one that meets the target keyword as the target verification code pattern.

4. The method for recognizing a graphical reasoning verification code according to claim 3, wherein: The associated words include location keywords or special keywords.

5. The method for recognizing a graphical reasoning verification code according to claim 4, wherein: The special keywords include: "same".

6. The method for recognizing a graphical reasoning verification code according to claim 1, wherein: The method further comprises: If the keywords do not include the reference object keyword, obtaining the target keyword from the keywords; By comparing the target keyword with the attribute information of all candidate verification images, one that matches the target keyword is selected as the target verification code graphic.

7. The method for recognizing a graphical reasoning verification code according to claim 3 or 6, wherein: The step of comparing the target keyword with the attribute information of the candidate verification patterns remaining after the initial filtering or all the candidate verification patterns to select one that matches the target keyword as the target verification code pattern includes: Obtaining the position order of all the target keywords in the verification instruction statement; Obtaining the execution order of the screening according to the position order; According to the execution order, the target keywords and the attribute information are screened one by one to obtain candidate verification code graphics that meet all target keywords as the target verification code.

8. The method for recognizing a graphical reasoning verification code according to claim 7, wherein: The types of attribute information include shape, color, area, and position coordinates.

9. The method for recognizing a graphical reasoning verification code according to claim 1, wherein: The step of obtaining the attribute information corresponding to each candidate verification code graphic comprises: The verification code graphic is input into a verification code detection model to obtain alternative verification code graphics and attribute information of the alternative verification code graphics; wherein the verification code detection model is obtained by training a convolutional neural network model based on the original sample graphic and the labeled sample image, and the labeled sample image contains all verification code graphics in the sample image and attribute information of each verification code graphic.

10. A system for recognizing a graphical reasoning verification code, characterized in that: The identification system comprises: An instruction statement acquisition module is used to extract a verification instruction statement from the verification code image to be identified; wherein the verification instruction statement includes a text description of the characteristics of the target verification code image to be verified; an attribute information acquisition module, configured to detect all candidate verification code graphics from the verification code image and acquire attribute information corresponding to each candidate verification code graphic; wherein the type of the attribute information is set according to the type of the feature described in the verification instruction statement; A keyword extraction module, configured to extract keywords from the verification instruction statement according to keyword extraction rules; A judging module, configured to judge whether the keywords include a reference object keyword; If included, calling a reference object acquisition module, the reference object acquisition module is used to select one of all candidate verification graphics as a reference object by comparing the reference object keyword with the attribute information of all candidate verification graphics; a first screening module, configured to determine attribute characteristics of the target verification code graphic based on the reference object and the remaining keywords in the keywords except for the reference object keyword, and screen out candidate verification code graphics that meet the attribute characteristics as the target verification code image; The judgment module includes: The associated word judgment unit is used to judge whether the keyword includes an associated word describing the association between the reference object and the target verification code graphic; if included, the reference object keyword acquisition unit is called, and the reference object keyword acquisition unit is used to use the keyword before the associated word as the reference object keyword.

11. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for recognizing a graphical reasoning verification code according to any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for recognizing a graphical reasoning verification code according to any one of claims 1 to 9 are implemented.