Method, device, equipment and storage medium for cracking verification codes by selecting rare characters

By generating the initial slider in the preset background image and performing alignment and rotation operations, the similarity of the graph vector is calculated to determine the point selection position and order, the problem of inefficient verification code in the prior art is solved, and the problem of inefficient point selection and unparalleled word verification code is realized. Higher accuracy and information acquisition efficiency.

CN118210418BActive Publication Date: 2025-02-14HUNAN ANTVISION SOFTWARE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410278484.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-12
Publication Date
2025-02-14
Estimated Expiration
2044-03-12

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively crack the verification code for point-selected rare word, especially in the fields of data analysis and information processing, resulting in inefficient information acquisition.

Method used

By generating the initial slider in the preset background image and aligning it with the detection box of each target unfamiliar word in the preset background image, rotating the initial slider, calculating the similarity of the graph vector, and determining the target point selection position and order .

Benefits of technology

It improves the accuracy of cracking and selecting unparalleled word verification codes on the landing web page, and enhances the efficiency of information acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118210418B_ABST
    Figure CN118210418B_ABST
Patent Text Reader

Abstract

The present application relates to the field of Internet technology, and discloses a method, device, equipment and storage medium for cracking verification codes by clicking on rare characters. The method includes determining the detection frame of each target rare character based on a target detection algorithm, and aligning the initial slider with each detection frame respectively; rotating the initial slider, calculating the graph vector similarity between the initial slider and each target rare character, and determining the target click position and the target click order in a preset background image according to the graph vector similarity. Through the above method, the present application generates an initial slider in a preset background image, aligns the initial slider with each target rare character in the preset background image, rotates the initial slider, and calculates the graph vector similarity between the initial slider and the target rare character during the rotation process, and then determines the target click position and the target click order according to the graph vector similarity, thereby improving the accuracy of cracking verification codes by clicking on rare characters on the target web page.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a method, device, equipment and storage medium for cracking a verification code by clicking on an uncommon character. Background Art

[0002] In recent years, with the rapid development of the Internet and social networks, various news websites, portal websites, social media websites, etc. have become carriers of a large amount of information. Many practitioners in industries such as data analysis and information processing need to visit a large number of websites to obtain a large amount of information from web pages for professional analysis in various business fields. In the process of obtaining information, one of the difficulties that needs to be overcome is the various verification codes on the web pages. In order to distinguish between machines and humans, a large number of web pages have been injected with verification codes such as slider puzzles, people and objects recognition, picture and word recognition, voice and face recognition, etc., which are of various types and highly disruptive. Their appearance has brought great challenges to information acquisition. In this era of diversified information, how to effectively crack the massive web page verification codes and successfully obtain web page information is a direction worthy of attention.

[0003] Among the many types of web page verification codes, sequentially clicking on the target is a type of verification code that is more difficult and more widely used. On the one hand, due to the profoundness of Chinese, Chinese characters are favored by many verification code manufacturers, and clicking on uncommon characters verification codes has become one of the newest and most difficult problems faced by practitioners in industries such as data analysis and information processing; on the other hand, most click-to-text verification codes use OCR (Optical Character Recognition) technology to recognize the text in the background image, but due to the complexity and rarity of the font structure of uncommon characters, the accuracy of most OCR frameworks in recognizing uncommon characters is very low, and the effect is very poor. Therefore, how to improve the accuracy of clicking on uncommon characters verification codes for target web pages has become a technical problem that needs to be solved at present. Summary of the invention

[0004] The present application provides a method, device, equipment and storage medium for cracking verification codes by clicking on rare characters, so as to improve the accuracy of cracking verification codes by clicking on rare characters on target web pages.

[0005] In a first aspect, the present application provides a method for cracking a verification code by clicking on an uncommon character, the method comprising:

[0006] Generate an initial slider based on the preset point selection target parameters;

[0007] Determine the detection frame of each target rare character in the preset background image based on a preset target detection algorithm, and align the initial slider with the detection frame of each target rare character respectively;

[0008] The initial slider is rotated, the image vector similarity between the initial slider and each of the target rare characters is calculated, and the target point selection position and the target point selection order are determined in the preset background image according to the image vector similarities.

[0009] Further, after determining the detection frame of each target rare character in the preset background image based on the preset target detection algorithm and aligning the initial slider with the detection frame of each target rare character respectively, the method includes:

[0010] Extracting the detection frame coordinates of each detection frame by using a preset target detection algorithm;

[0011] The coordinates of each detection frame are standardized to generate standardized coordinates corresponding to the preset background image.

[0012] Furthermore, based on a preset target detection algorithm, a detection frame of each target rare character in a preset background image is determined, and the initial slider and the detection frame of each target rare character are aligned respectively, including:

[0013] When the initial slider reaches the bottom of the detection frame of the target rare character, the width of the initial slider is adjusted to be the same as the horizontal coordinate of the detection frame of the target rare character through a preset function.

[0014] Further, rotating the initial slider and calculating the graph vector similarity between the initial slider and each of the target rare characters includes:

[0015] Convert each target rare character into a corresponding feature vector by using a preset vector conversion function;

[0016] Performing a rotation operation on the eigenvectors corresponding to the initial sliders to generate a rotation matrix;

[0017] The graph vector similarity of the rotation matrix is ​​calculated based on a preset similarity calculation formula, wherein the graph vector similarity is the similarity between each of the rotation matrices and the feature vector corresponding to the target rare character.

[0018] Furthermore, the preset similarity calculation formula is: Where A is the rotation matrix, a i is the coordinate value of the point in A, B is the feature vector corresponding to the target rare character, b i is the coordinate value of the point in B.

[0019] Furthermore, the graph vector similarity of the rotation matrix is ​​calculated based on a preset similarity calculation formula, wherein the graph vector similarity is the similarity between each rotation matrix and the feature vector corresponding to the target rare character, including:

[0020] When the initial slider is aligned with each of the target rare characters, the initial slider is rotated once, and the maximum graph vector similarity in each rotation process is obtained;

[0021] Determining the target point selection position based on the maximum image vector similarity between the initial slider and each of the target rare characters;

[0022] The target selection order of each target rare character is determined according to the sequence of the target selection positions determined by each initial slider and each target rare character.

[0023] Furthermore, based on the preset point selection target parameters, an initial slider is generated, including:

[0024] Converting the preset point selection target parameters into an image to generate at least one word image;

[0025] The character images are spliced ​​in the preset background image to generate the initial slider.

[0026] In a second aspect, the present application further provides a device for cracking a verification code by clicking on an uncommon character, the device comprising:

[0027] An initial slider generation module is used to generate an initial slider based on preset point selection target parameters;

[0028] An alignment module is used to determine the detection frame of each target rare character in the preset background image based on a preset target detection algorithm, and to align the initial slider with the detection frame of each target rare character respectively.

[0029] The target point selection position determination module is used to rotate the initial slider, calculate the image vector similarity between the initial slider and each target rare character, and determine the target point selection position and target point selection order in the preset background image according to each image vector similarity.

[0030] In a third aspect, the present application also provides a computer device, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the above-mentioned method for cracking a verification code by clicking on rare characters when executing the computer program.

[0031] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the method for cracking a verification code by clicking on an uncommon character as described above.

[0032] The present application discloses a method, device, equipment and storage medium for cracking verification codes by clicking on rare characters. The method comprises generating an initial slider based on preset click target parameters; determining the detection frame of each target rare character in a preset background image based on a preset target detection algorithm, and aligning the initial slider with the detection frame of each target rare character respectively; rotating the initial slider, calculating the graph vector similarity between the initial slider and each target rare character, and determining the target click position and the target click order in the preset background image according to the graph vector similarity. Through the above-mentioned method, the present application generates an initial slider in a preset background image, aligns the initial slider with each target rare character in the preset background image, rotates the initial slider, and calculates the graph vector similarity between the initial slider and the target rare character during the rotation process, and then determines the target click position and the target click order according to the graph vector similarity, thereby improving the accuracy of cracking the verification code of clicking on rare characters on the target web page. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0034] Figure 1 It is a schematic flow chart of a method for cracking a verification code by clicking on an uncommon character provided in the first embodiment of the present application;

[0035] Figure 2 A schematic diagram of initial slider generation for a method for cracking a verification code by selecting an uncommon character provided in the first embodiment of the present application;

[0036] Figure 3 It is a schematic flow chart of a method for cracking a verification code by clicking on an uncommon character provided in the second embodiment of the present application;

[0037] Figure 4 A schematic diagram of the alignment of a background image detection frame and a slider in a method for cracking a verification code by selecting an uncommon character provided in the second embodiment of the present application;

[0038] Figure 5 A schematic flow chart of a method for cracking a verification code by selecting an uncommon character provided in the third embodiment of the present application;

[0039] Figure 6 A schematic diagram of graph vector similarity calculation for a method for cracking a verification code by selecting rare characters provided in the third embodiment of the present application;

[0040] Figure 7A schematic block diagram of a device for cracking a verification code by selecting an uncommon character provided in an embodiment of the present application;

[0041] Figure 8 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0043] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0044] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0045] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0046] The embodiments of the present application provide a method, device, equipment and storage medium for cracking verification codes by clicking on rare characters. The method for cracking verification codes by clicking on rare characters can be applied to a server, by generating an initial slider in a preset background image, aligning the initial slider with each target rare character in the preset background image, rotating the initial slider, and calculating the graph vector similarity between the initial slider and the target rare character during the rotation process, and then determining the target click position and the target click order according to the graph vector similarity, thereby improving the accuracy of cracking the verification code of clicking on rare characters on the target web page. The server can be an independent server or a server cluster.

[0047] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0048] See also Figure 1 , Figure 1This is a schematic flow chart of a method for cracking a verification code for selecting rare characters provided by the first embodiment of the present application. The method for cracking a verification code for selecting rare characters can be applied to a server, and is used to generate an initial slider in a preset background image, align the initial slider with each target rare character in the preset background image, rotate the initial slider, and calculate the graph vector similarity between the initial slider and the target rare character during the rotation process, and then determine the target click position and target click order according to the graph vector similarity, thereby improving the accuracy of cracking the verification code for selecting rare characters on the target web page.

[0049] like Figure 1 As shown, the method for cracking the verification code by selecting rare characters specifically includes steps S10 to S30.

[0050] Step S10, generating an initial slider based on preset point selection target parameters;

[0051] In one embodiment, Figure 2 As shown, Figure 2 A schematic diagram of the initial slider generation of a method for cracking a verification code by clicking on rare characters provided in the first embodiment of the present application. The verification code is divided into two parts: a click target and a verification code background image. The click target can be a text parameter or an image parameter in the web page. Enter the click target parameters and convert them into images one by one to form several character images;

[0052] Add the text image to the lower left corner of the verification code background image to make an initial slider, and convert the target verification code scene into a slider verification code scene.

[0053] Step S20, determining the detection frame of each target rare character in the preset background image based on a preset target detection algorithm, and aligning the initial slider with the detection frame of each target rare character respectively;

[0054] In one embodiment, the steps of aligning the slider are as follows:

[0055] A. Input the verification code background image and use the target detection algorithm to obtain the coordinates of n target rare characters.

[0056] B. Slide the character map slider from left to right, and each time you slide it to the bottom of the target rare character coordinate, pause and align it, that is, align both sides of the slider with the horizontal coordinate of the target rare character.

[0057] Step S30, rotating the initial slider, calculating the image vector similarity between the initial slider and each of the target rare characters, and determining the target point selection position and the target point selection order in the preset background image according to the image vector similarities.

[0058] In one embodiment, the steps of determining the target selection position and the target selection order are as follows:

[0059] After the sliders are aligned, rotate the character image slider clockwise. Every time it rotates a certain angle, calculate the image vector similarity with the target rare character. After one rotation, take the maximum similarity.

[0060] The slider continues to slide to the right. After aligning with each target rare character detection frame and completing the graph vector similarity calculation step, n graph vector similarities are obtained and the maximum value is taken. The coordinate value of the target rare character with the largest graph vector similarity is recorded, and a serial number is recorded.

[0061] The coordinates and serial numbers of all the result target rare characters are calculated, so as to obtain the click position and click order of the click target parameters on the verification code background image.

[0062] For example, many web pages, applications or server backends currently verify whether the user's identity is valid before the user operates. The scenarios for applying verification codes can be:

[0063] 1. E-commerce websites: E-commerce websites usually need to protect user information security. Verifying user information through verification codes can effectively prevent attacks from robot programs;

[0064] 2. Financial websites: Financial websites involve the security of users’ funds. Verifying user information through verification codes can improve the security of the website.

[0065] 3. Social networking sites: Social networking sites need to protect the privacy and information security of users. Verifying user information through verification codes can effectively prevent attacks by robot programs.

[0066] Verifying user identity through uncommon character verification codes reduces the risk of user information being stolen by hacker scripts, breaks through the existing point-to-point target verification code recognition scenario, and is applied to the more difficult uncommon character verification code scenario, expanding the application scenarios of web page verification code cracking.

[0067] This embodiment increases the number of cracked rare character verification codes by expanding application scenarios, improving recognition accuracy and improving computing performance, thereby being able to effectively access more target web pages or template applications and increasing the amount of information obtained.

[0068] The present embodiment discloses a method, device, equipment and storage medium for cracking verification codes by clicking on rare characters. The method for cracking verification codes by clicking on rare characters includes generating an initial slider based on preset click target parameters; determining the detection frames of each target rare character in a preset background image based on a preset target detection algorithm, and aligning the initial slider with the detection frames of each target rare character respectively; rotating the initial slider, calculating the graph vector similarity between the initial slider and each target rare character, and determining the target click position and the target click order in the preset background image according to the graph vector similarity. Through the above-mentioned method, the present application generates an initial slider in a preset background image, aligns the initial slider with each target rare character in the preset background image, rotates the initial slider, and calculates the graph vector similarity between the initial slider and the target rare character during the rotation process, and then determines the target click position and the target click order according to the graph vector similarity, thereby improving the accuracy of cracking verification codes by clicking on rare characters on the target web page.

[0069] See also Figure 3 , Figure 3 This is a schematic flow chart of a method for cracking a verification code for selecting rare characters provided in the second embodiment of the present application. The method for cracking a verification code for selecting rare characters can be applied to a server, and is used to generate an initial slider in a preset background image, align the initial slider with each target rare character in the preset background image, rotate the initial slider, and calculate the graph vector similarity between the initial slider and the target rare character during the rotation process, and then determine the target click position and target click order according to the graph vector similarity, thereby improving the accuracy of cracking the verification code for selecting rare characters on the target web page.

[0070] based on Figure 1 The embodiment shown, this embodiment Figure 3 As shown, step S20 includes steps S21 to S22.

[0071] Step S21, extracting the detection frame coordinates of each detection frame by using a preset target detection algorithm;

[0072] In one embodiment, the verification code background image includes two parts: a highly interfering background image and a target rare character in the image. Using a target detection algorithm, the position of the target rare character is framed from the background image to obtain n detection frame coordinates.

[0073] Step S22: normalize the coordinates of each detection frame to generate standardized coordinates corresponding to the preset background image.

[0074] In one embodiment, most current OCR text detection models can also frame the position of rare characters to a certain extent, but the effect still has room for improvement. The detection effect can be improved by collecting rare character image data for model training. This embodiment collects and annotates thousands of rare character scene data sets, trains a rare character detection model based on Yolov7 and DBNet framework, and can accurately frame the target rare character position on the verification code background image and output the target rare character coordinates.

[0075] like Figure 4 As shown, Figure 4 A schematic diagram of the alignment of a background image detection frame and a slider for a method for cracking a verification code by selecting rare characters provided in the second embodiment of the present application. The background image output by the rare character detection technology includes a detection frame, which frames all the target rare characters in the image. The coordinates of each frame are 4 points, namely [x1, y1], [x1, y 01 ]、[x 01 ,y 01 ]、[x 01 ,y1], and the output after standardization is [x1,y1,x 01 ,y 01 ],like Figure 4 As shown in the middle left picture;

[0076] Each image gets n target rare characters coordinates [x1, y1, x 01 ,y 01 ],...,[x n ,y n ,x 0n ,y 0n ].

[0077] The present embodiment discloses a method, device, equipment and storage medium for cracking a verification code for clicking on rare characters. The method for cracking a verification code for clicking on rare characters includes generating an initial slider based on preset click target parameters; determining the detection frames of each target rare character in a preset background image based on a preset target detection algorithm, and aligning the initial slider with the detection frames of each target rare character respectively; extracting the detection frame coordinates of each detection frame through a preset target detection algorithm; normalizing the coordinates of each detection frame to generate a standardized coordinate corresponding to the preset background image; rotating the initial slider, calculating the image vector similarity between the initial slider and each target rare character, and determining the target click position and the target click order in the preset background image according to the image vector similarity. In the above manner, the present application generates an initial slider in a preset background image, aligns the initial slider with each target rare character in the preset background image, rotates the initial slider, and calculates the image vector similarity between the initial slider and the target rare character during the rotation process, and then determines the target click position and the target click order according to the image vector similarity, thereby improving the accuracy of cracking the verification code for clicking on rare characters on the target web page.

[0078] based on Figure 4 In the embodiment shown, in this embodiment, step S20 includes:

[0079] When the initial slider reaches the bottom of the detection frame of the target rare character, the width of the initial slider is adjusted to be the same as the horizontal coordinate of the detection frame of the target rare character through a preset function.

[0080] In one embodiment, slide the lower character image slider from left to right, and pause to align each time it slides to the coordinates of the target rare character on the background image. Use the resize function of Image to adjust the width of the slider until the coordinates on both sides of the slider are adjusted to the horizontal coordinate x of the target rare character. n and x 0n , complete the alignment of the slider and the target rare character detection box, refer to Figure 4 Right picture.

[0081] See also Figure 5 , Figure 5 A schematic flow chart of a method for cracking a verification code by clicking on rare characters provided in the third embodiment of the present application. The method for cracking a verification code by clicking on rare characters can be applied to a server, and is used to generate an initial slider in a preset background image, align the initial slider with each target rare character in the preset background image, rotate the initial slider, and calculate the graph vector similarity between the initial slider and the target rare character during the rotation process, and then determine the target click position and target click order according to the graph vector similarity, thereby improving the accuracy of cracking the verification code by clicking on rare characters on the target web page.

[0082] based on Figure 1 The embodiment shown, this embodiment Figure 5 As shown, step S30 includes steps S31 to S33.

[0083] Step S31, converting each target rare character into a corresponding feature vector through a preset vector conversion function;

[0084] In one embodiment, since most of the target rare characters in the verification code background image are irregular, they have been processed by changing color, rotating, etc., and the background image is more disturbing, and the input point selection target parameter is a regular horizontal rare character. In order to improve the overall accuracy and reliability, the initial slider is rotated, and each time it rotates a certain angle, the image vector similarity is calculated with the target rare character, and after one rotation, the maximum similarity is taken.

[0085] In one embodiment, the target rare characters on the verification code background image are converted into feature vectors, where the numpy function can be used to preprocess the image and convert the vector. The coordinates of all target rare characters are cropped to obtain n target rare characters images, which are converted into n image feature vectors. If the target rare characters image is a colorful RGB three-channel image, the feature vectors converted into several two-dimensional matrices, each element of the matrix is ​​composed of the values ​​of the three color channels of red, green and blue, such as [255, 168, 102]; if the target rare characters are binary images, two channels have values, such as [255, 168, 0]; if it is a GRAY grayscale image, only one channel has a value, such as [255, 0, 0].

[0086] Step S32, performing a rotation operation on the feature vectors corresponding to each of the initial sliders to generate a rotation matrix;

[0087] In one embodiment, a fixed rotation angle is defined, a coordinate system is established with the center of the word image slider as the center of the circle, and the slider is rotated clockwise to obtain a rotation matrix. Before the slider is rotated, there is:

[0088]

[0089] After the slider rotates by a certain angle α, we have:

[0090]

[0091] It can be expressed in matrix form as:

[0092]

[0093] Here, the slider is represented as an m*n matrix, and the midpoint (x', y') of the matrix is ​​converted to the Cartesian coordinate system (x, y) as follows:

[0094]

[0095] Through numpy matrix operations, the calculation formula is:

[0096]

[0097] Step S33, calculating the graph vector similarity of the rotation matrix based on a preset similarity calculation formula, wherein the graph vector similarity is the similarity between each of the rotation matrices and the feature vector corresponding to the target rare character.

[0098] In one embodiment, the vector similarity calculations are performed several times on the slider rotation matrix and the target rare character feature vector and recorded, and a list is made using the append function. Here, methods such as cosine similarity and Euclidean distance can be used to calculate vector similarity. For example, the Euclidean distance is used to calculate the actual distance between two points in n-dimensional space. The smaller the Euclidean distance, the greater the similarity. Let two points A = (a1, a2, ..., a n ), B=(b1,b2,...,b n ), the distance between AB is as follows:

[0099]

[0100] After the slider rotates one circle, several vector similarities are obtained and the maximum value t in the list is taken. max1

[0101] like Figure 6 As shown, Figure 6 A schematic diagram of the graph vector similarity calculation of a method for cracking a verification code by selecting an uncommon character provided in the third embodiment of the present application. The slider continues to slide to the right, and after aligning with each target uncommon character detection frame and completing the graph vector similarity calculation step, n graph vector similarities are obtained, and the maximum value max(t max1 ,...,t maxn ) to get t max , record t max The corresponding target rare character coordinate value is recorded, and a serial number ① is recorded, indicating that the selection order of the target rare character is 1.

[0102] The calculation finally obtains the coordinates and serial numbers of q target rare characters, thereby obtaining the click positions and click orders of all click target parameters on the verification code background image. The machine only needs to locate the position of the target rare character on the verification code background image according to the serial number, and perform click operations in sequence to pass the verification of the webpage verification code.

[0103] The present embodiment discloses a method, device, equipment and storage medium for cracking a verification code by clicking on rare characters. The method comprises generating an initial slider based on preset click target parameters; determining the detection frame of each target rare character in a preset background image based on a preset target detection algorithm, and aligning the initial slider with the detection frame of each target rare character respectively; converting each target rare character into a corresponding feature vector through a preset vector conversion function, performing a rotation operation on the feature vector corresponding to each of the initial sliders to generate a rotation matrix, calculating the graph vector similarity of the rotation matrix based on a preset similarity calculation formula, wherein the graph vector similarity is the similarity between the feature vectors corresponding to each of the rotation matrices and the target rare character, and determining the target click position and the target click order in the preset background image according to each of the graph vector similarities. Through the above method, the present application generates an initial slider in a preset background image, aligns the initial slider with each target rare character in the preset background image, rotates the initial slider, and calculates the image vector similarity between the initial slider and the target rare character during the rotation process, and then determines the target click position and target click order according to the image vector similarity, thereby improving the accuracy of cracking the verification code of clicking rare characters on the target web page.

[0104] based on Figure 5 In the embodiment shown, in this embodiment, the preset similarity calculation formula is Where A is the rotation matrix, a i is the coordinate value of the point in A, B is the feature vector corresponding to the target rare character, b i is the coordinate value of the point in B.

[0105] Based on the above embodiment, in this embodiment, step S33 includes:

[0106] When the initial slider is aligned with each of the target rare characters, the initial slider is rotated once, and the maximum graph vector similarity in each rotation process is obtained;

[0107] Determining the target point selection position based on the maximum image vector similarity between the initial slider and each of the target rare characters;

[0108] The target selection order of each target rare character is determined according to the sequence of the target selection positions determined by each initial slider and each target rare character.

[0109] Based on any of the above embodiments, in this embodiment, step S10 includes:

[0110] Converting the preset point selection target parameters into an image to generate at least one word image;

[0111] The character images are spliced ​​in the preset background image to generate the initial slider.

[0112] In one embodiment, the steps of generating the initial slider are as follows:

[0113] 1) Input the target parameters, i.e. the uncommon characters, and set the font type and size;

[0114] 2) Calculate the image width and height required to select the rare word, record i_width and i_height;

[0115] 3) Create a blank image with the size of i_width and i_height through the Image function;

[0116] 4) Create a drawing object on the image through the ImageDraw function, draw the selected rare characters on the image to form a character map, and save it.

[0117] Get the width b_width of the verification code background image, splice the generated word image to the lower left corner of the preset background image, and extend the word image width to the background image width b_width, and fill the extended part with black to make a slider.

[0118] See also Figure 7 , Figure 7 The embodiment of the present application provides a schematic block diagram of a device for decrypting a verification code by clicking on an uncommon character, and the device for decrypting a verification code by clicking on an uncommon character is used to execute the aforementioned method for decrypting a verification code by clicking on an uncommon character. The device for decrypting a verification code by clicking on an uncommon character can be configured on a server.

[0119] like Figure 7 As shown, the device for decrypting the verification code for selecting rare characters comprises:

[0120] An initial slider generation module 410 is used to generate an initial slider based on preset point selection target parameters;

[0121] An alignment module 420, for determining a detection frame of each target rare character in a preset background image based on a preset target detection algorithm, and aligning the initial slider with the detection frame of each target rare character respectively;

[0122] The target point selection position determination module 430 is used to rotate the initial slider, calculate the image vector similarity between the initial slider and each of the target rare characters, and determine the target point selection position and target point selection order in the preset background image according to each of the image vector similarities.

[0123] Furthermore, the device for decrypting verification codes by clicking on rare characters also includes:

[0124] A detection frame coordinate extraction module, used to extract the detection frame coordinates of each detection frame by using a preset target detection algorithm;

[0125] The standardized coordinate generation module is used to perform standardization processing on the coordinates of each detection frame to generate standardized coordinates corresponding to the preset background image.

[0126] Furthermore, the alignment module 420 includes:

[0127] The initial slider width adjustment unit is used to adjust the width of the initial slider to be the same as the horizontal coordinate of the detection frame of the target rare character through a preset function when the initial slider reaches the bottom of the detection frame of the target rare character.

[0128] Furthermore, the target point selection position determination module 430 includes:

[0129] A feature vector conversion unit, used to convert each target rare character into a corresponding feature vector through a preset vector conversion function;

[0130] A rotation matrix generating unit, used for performing a rotation operation on the feature vectors corresponding to each of the initial sliders to generate a rotation matrix;

[0131] A graph vector similarity calculation unit is used to calculate the graph vector similarity of the rotation matrix based on a preset similarity calculation formula, wherein the graph vector similarity is the similarity between each rotation matrix and the feature vector corresponding to the target rare character.

[0132] Furthermore, the graph vector similarity calculation unit includes:

[0133] A graph vector similarity calculation subunit is used to rotate the initial slider for one circle when the initial slider is aligned with each target rare character, and obtain the maximum graph vector similarity during each rotation process;

[0134] A target point selection position determination subunit, used for determining the target point selection position based on the maximum image vector similarity between the initial slider and each of the target rare characters;

[0135] The target click order determining subunit is used to determine the target click order of each target rare character according to the sequence of the target click positions determined by each initial slider and each target rare character.

[0136] Furthermore, the initial slider generation module 410 includes:

[0137] A character image generation unit, used for converting the preset point selection target parameters into an image to generate at least one character image;

[0138] The initial slider generating unit is used to splice each of the character images in the preset background image to generate the initial slider.

[0139] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0140] The above-mentioned device can be implemented in the form of a computer program. Figure 8 Runs on the computer device shown.

[0141] See also Figure 8 , Figure 8 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.

[0142] See also Figure 8 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0143] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any one of the methods for cracking the verification code by clicking on rare characters.

[0144] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0145] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any method for cracking the verification code by clicking on rare characters.

[0146] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0147] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0148] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0149] Generate an initial slider based on the preset point selection target parameters;

[0150] Determine the detection frame of each target rare character in the preset background image based on a preset target detection algorithm, and align the initial slider with the detection frame of each target rare character respectively;

[0151] The initial slider is rotated, the image vector similarity between the initial slider and each of the target rare characters is calculated, and the target point selection position and the target point selection order are determined in the preset background image according to the image vector similarities.

[0152] In one embodiment, based on a preset target detection algorithm, a detection frame of each target rare character in a preset background image is determined, and after the initial slider and the detection frame of each target rare character are aligned, it is used to achieve:

[0153] Extracting the detection frame coordinates of each detection frame by using a preset target detection algorithm;

[0154] The coordinates of each detection frame are standardized to generate standardized coordinates corresponding to the preset background image.

[0155] In one embodiment, a detection frame of each target rare character in a preset background image is determined based on a preset target detection algorithm, and the initial slider and the detection frame of each target rare character are aligned respectively, so as to achieve:

[0156] When the initial slider reaches the bottom of the detection frame of the target rare character, the width of the initial slider is adjusted to be the same as the horizontal coordinate of the detection frame of the target rare character through a preset function.

[0157] In one embodiment, the initial slider is rotated, and the graph vector similarity between the initial slider and each of the target rare characters is calculated to achieve:

[0158] Convert each target rare character into a corresponding feature vector by using a preset vector conversion function;

[0159] Performing a rotation operation on the eigenvectors corresponding to the initial sliders to generate a rotation matrix;

[0160] The graph vector similarity of the rotation matrix is ​​calculated based on a preset similarity calculation formula, wherein the graph vector similarity is the similarity between each of the rotation matrices and the feature vector corresponding to the target rare character.

[0161] In one embodiment, the graph vector similarity of the rotation matrix is ​​calculated based on a preset similarity calculation formula, wherein the graph vector similarity is the similarity between each rotation matrix and the feature vector corresponding to the target rare character, which is used to achieve:

[0162] When the initial slider is aligned with each of the target rare characters, the initial slider is rotated once, and the maximum graph vector similarity in each rotation process is obtained;

[0163] Determining the target point selection position based on the maximum image vector similarity between the initial slider and each of the target rare characters;

[0164] The target selection order of each target rare character is determined according to the sequence of the target selection positions determined by each initial slider and each target rare character.

[0165] In one embodiment, an initial slider is generated based on preset point selection target parameters to achieve:

[0166] Converting the preset point selection target parameters into an image to generate at least one word image;

[0167] The character images are spliced ​​in the preset background image to generate the initial slider.

[0168] A computer-readable storage medium is also provided in an embodiment of the present application, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement any one of the methods for cracking a verification code for selecting an uncommon character provided in an embodiment of the present application.

[0169] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0170] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for cracking a verification code by selecting an uncommon character, characterized in that: include: Generate an initial slider based on the preset point selection target parameters; Determine the detection frame of each target rare character in the preset background image based on a preset target detection algorithm, and align the initial slider with the detection frame of each target rare character respectively; Rotate the initial slider, calculate the image vector similarity between the initial slider and each target rare character, and determine the target point selection position and target point selection order in the preset background image according to each image vector similarity; The method of determining the detection frame of each target rare character in the preset background image based on the preset target detection algorithm and aligning the initial slider with the detection frame of each target rare character respectively comprises: Extracting the detection frame coordinates of each detection frame by using a preset target detection algorithm; Standardizing the coordinates of each detection frame to generate standardized coordinates corresponding to the preset background image; The step of determining the detection frame of each target rare character in the preset background image based on the preset target detection algorithm and aligning the initial slider with the detection frame of each target rare character respectively includes: When the initial slider reaches the bottom of the detection frame of the target rare character, the width of the initial slider is adjusted to be the same as the horizontal coordinate of the detection frame of the target rare character through a preset function; The step of rotating the initial slider and calculating the graph vector similarity between the initial slider and each of the target rare characters includes: Convert each target rare character into a corresponding feature vector by using a preset vector conversion function; Performing a rotation operation on the eigenvectors corresponding to the initial sliders to generate a rotation matrix; Calculating the graph vector similarity of the rotation matrix based on a preset similarity calculation formula, wherein the graph vector similarity is the similarity between each rotation matrix and the feature vector corresponding to the target rare character; Among them, the preset similarity calculation formula is: Where A is the rotation matrix, a i is the coordinate value of the point in A, B is the feature vector corresponding to the target rare character, b i is the coordinate value of the point in B; The method of calculating the graph vector similarity of the rotation matrix based on a preset similarity calculation formula, wherein the graph vector similarity is the similarity between each rotation matrix and the feature vector corresponding to the target rare character, includes: When the initial slider is aligned with each of the target rare characters, the initial slider is rotated once, and the maximum graph vector similarity in each rotation process is obtained; Determining the target point selection position based on the maximum image vector similarity between the initial slider and each of the target rare characters; The target selection order of each target rare character is determined according to the sequence of the target selection positions determined by each initial slider and each target rare character.

2. The method for decrypting a verification code by clicking on an uncommon character according to claim 1, characterized in that: The generating of the initial slider based on the preset point selection target parameters includes: Converting the preset point selection target parameters into an image to generate at least one word image; The character images are spliced ​​in the preset background image to generate the initial slider.

3. A device for cracking verification codes by selecting rare characters, characterized in that: include: An initial slider generation module is used to generate an initial slider based on preset point selection target parameters; An alignment module, used to determine the detection frame of each target rare character in the preset background image based on a preset target detection algorithm, and align the initial slider with the detection frame of each target rare character respectively; A target point selection position determination module is used to rotate the initial slider, calculate the image vector similarity between the initial slider and each of the target rare characters, and determine the target point selection position and target point selection order in the preset background image according to the image vector similarities; The device for decrypting verification codes by selecting rare characters further comprises: A detection frame coordinate extraction module, used to extract the detection frame coordinates of each detection frame by using a preset target detection algorithm; A standardized coordinate generation module, used to perform standardization processing on the coordinates of each detection frame to generate standardized coordinates corresponding to the preset background image; Wherein, the alignment module comprises: An initial slider width adjustment unit, used to adjust the width of the initial slider to be the same as the horizontal coordinate of the detection frame of the target rare character through a preset function when the initial slider reaches the bottom of the detection frame of the target rare character; Furthermore, the target point selection position determination module includes: A feature vector conversion unit, used to convert each target rare character into a corresponding feature vector through a preset vector conversion function; A rotation matrix generating unit, used for performing a rotation operation on the feature vectors corresponding to each of the initial sliders to generate a rotation matrix; A graph vector similarity calculation unit, used to calculate the graph vector similarity of the rotation matrix based on a preset similarity calculation formula, wherein the graph vector similarity is the similarity between each rotation matrix and the feature vector corresponding to the target rare character; Furthermore, the graph vector similarity calculation unit includes: A graph vector similarity calculation subunit is used to rotate the initial slider for one circle when the initial slider is aligned with each target rare character, and obtain the maximum graph vector similarity during each rotation process; A target point selection position determination subunit, used for determining the target point selection position based on the maximum image vector similarity between the initial slider and each of the target rare characters; The target click order determining subunit is used to determine the target click order of each target rare character according to the sequence of the target click positions determined by each initial slider and each target rare character.

4. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the method for cracking a verification code by clicking on an uncommon character as described in any one of claims 1 or 2 when executing the computer program.

5. 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 processor implements the method for cracking a verification code by clicking on an uncommon character as described in any one of claims 1 or 2.

Citation Information

Patent Citations

  • Method and system for cracking image verification code, electronic equipment and storage medium

    CN110851816A

  • Graphic verification code identification method and device, electronic equipment and readable storage medium

    CN114529912A