WO2019214269A1 - Verification picture processing method and apparatus, and computer device and storage medium - Google Patents

Verification picture processing method and apparatus, and computer device and storage medium Download PDF

Info

Publication number
WO2019214269A1
WO2019214269A1 PCT/CN2019/070129 CN2019070129W WO2019214269A1 WO 2019214269 A1 WO2019214269 A1 WO 2019214269A1 CN 2019070129 W CN2019070129 W CN 2019070129W WO 2019214269 A1 WO2019214269 A1 WO 2019214269A1
Authority
WO
WIPO (PCT)
Prior art keywords
region
angle
dynamic verification
verification
area
Prior art date
Application number
PCT/CN2019/070129
Other languages
French (fr)
Chinese (zh)
Inventor
李江华
李武奇
Original Assignee
深圳壹账通智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2019214269A1 publication Critical patent/WO2019214269A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/36User authentication by graphic or iconic representation

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a verification map processing method, apparatus, computer device, and storage medium.
  • crawling technology has emerged, and crawling websites are used to crawl websites, and information on a large number of web pages can be obtained.
  • the destination website to be crawled is in the login state, and needs to input the verification code corresponding to the provided verification map, and can continue to climb the destination website after submitting the verification code and verifying the passage. take.
  • the commonly used verification method of the website is: the verification question is raised, and the user selects the verification answer corresponding to the proposed verification question from the verification map.
  • the verification image is usually directly identified by the verification picture. Select the map corresponding to the verification problem.
  • the inventors have realized that dynamic verification codes have appeared at present, and there is no effective identification method for such dynamic verification codes at this stage.
  • a verification map processing method is provided.
  • a verification map processing method includes:
  • the selected deviation angle is taken as the angle of the pointer to be rotated for verification.
  • a verification map processing device includes:
  • a dynamic verification map obtaining module configured to obtain a dynamic verification map
  • a determining module configured to determine a first area and a second area of the dynamic verification map; the first area includes a pointer rotatable from a default position to the second area;
  • An obtaining module configured to acquire a range of deviation angles of the second area relative to the default position
  • a deviation angle selection module for selecting an off angle from the off angle range
  • the verification module is configured to use the selected deviation angle as the angle of the pointer to be rotated for verification.
  • a computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executable by the processor to cause the one or more processors to execute The following steps:
  • the selected deviation angle is taken as the angle of the pointer to be rotated for verification.
  • One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the steps of:
  • the selected deviation angle is taken as the angle of the pointer to be rotated for verification.
  • FIG. 1 is an application scenario diagram of a verification map processing method in accordance with one or more embodiments.
  • FIG. 2 is a flow diagram of a verification map processing method in accordance with one or more embodiments.
  • 3A is a schematic diagram of a dynamic verification map in accordance with one or more embodiments.
  • FIG. 3B is a schematic diagram of a dynamic verification map in accordance with another or more embodiments.
  • 3C is a schematic diagram of a dynamic verification map in accordance with still another embodiment.
  • FIG. 4 is a schematic diagram showing the principle of deviating the angles of two straight line segments of a second region with respect to a default position, in accordance with one or more embodiments.
  • FIG. 5 is a flow diagram of determining a first region and a second region of a dynamic verification map in accordance with one or more embodiments.
  • FIG. 6 is a schematic diagram showing the principle of deviating the angles of the two straight line segments of the second region with respect to the default position according to another embodiment or embodiments.
  • 7A is a schematic diagram of the principle of acquiring feature vectors of a static verification map in accordance with one or more embodiments.
  • FIG. 7B is a schematic diagram showing the principle of acquiring a feature vector of a static verification map according to another embodiment or embodiments.
  • FIG. 8 is a flow diagram of a verification map processing method in accordance with one or more specific embodiments.
  • FIG. 9 is a block diagram of a verification map processing apparatus in accordance with one or more embodiments.
  • FIG. 10 is a block diagram of a verification map processing apparatus in accordance with another or more embodiments.
  • FIG. 11 is a block diagram of a verification map processing apparatus in accordance with still another embodiment.
  • Figure 12 is a block diagram of a computer device in accordance with one or more embodiments.
  • Terminal 102 communicates with server 104 over a network over a network.
  • the terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablets, and portable wearable devices, and the server 104 can be implemented with a stand-alone server or a server cluster composed of a plurality of servers.
  • a verification map processing method is provided, which is applied to the terminal in FIG. 1 as an example, and includes the following steps:
  • the dynamic verification map is a verification diagram that changes the original form of the picture by the user's trigger operation.
  • the triggering operation may be a click operation, a drag operation, a rotation operation, or the like triggered by the user through the input device.
  • the dynamic verification map can be, for example, a dynamic verification map of the rotation angle.
  • S204 Determine a first area and a second area of the dynamic verification map; the first area includes a pointer that can be rotated from the default position to the second area.
  • the first area is the background area in the dynamic verification map.
  • the second area is the target area in the dynamic verification map.
  • the trigger operation of the user for the pointer in the dynamic verification map is obtained by the input device, and the pointer in the first region is from the default position according to the operation distance or direction of the trigger operation.
  • the terminal determines whether the verification pattern after changing the shape reaches an expectation, such as whether the pointer is transferred to the second area, that is, whether the angle of rotation conforms to an expectation, thereby determining whether the user behavior is based on the angle of rotation.
  • the terminal processes the verification map to obtain a corresponding angle corresponding to the pointer after being rotated, and uses the obtained angle as a “passport” of the dynamic verification code for verification.
  • the terminal after acquiring the dynamic verification map, the terminal performs pre-processing on the obtained verification dynamic graph, and determines the first region and the second region from the pre-processed dynamic verification graph.
  • the pre-processing includes noise reduction processing, binarization processing or gray processing on the dynamic verification map.
  • FIG. 3A a schematic diagram of the dynamic verification diagram 3100 in one embodiment is shown.
  • the first region 3102 and the second region 3104 form a circle 3106, and the second region 3104 is a fan shape of the composed circle 3106.
  • the dynamic verification map 3100 also includes a pointer 3110 that is rotatable about a center 3108 of the circle 3106 from a default position of the first region 3102.
  • the terminal presents the dynamic verification map 3100 to the user, and the user can rotate the pointer 3110 from the default position to the second area 3104 through the input device to pass the verification of the dynamic verification map 3100.
  • FIG. 3B a schematic diagram of the dynamic verification diagram 3200 in one embodiment.
  • the first region 3202 and the second region 3204 form a circle 3206, and the second region 3204 is a fan ring of the formed circle 3206.
  • the dynamic verification map 3200 also includes a pointer 3210 that is rotatable about a center 3208 of the circle 3206 from a default position of the first region 3202.
  • the terminal presents the dynamic verification map 3200 to the user, and the user can rotate the pointer 3210 from the default position to the second area 3204 through the input device to pass the verification of the dynamic verification map 3200.
  • FIG. 3C a schematic diagram of the dynamic verification diagram 3300 in one embodiment.
  • the first region 3302 and the second region 3304 form a ring 3306, and the second region 3304 is a fan ring in the formed circle 3306.
  • the dynamic verification map 3300 also includes a pointer 3310 that is rotatable about a center 3308 of the circle 3306 from a default position of the first region 3302.
  • the terminal presents the dynamic verification map 3300 to the user, and the user can rotate the pointer 3310 from the default position to the second area 3304 through the input device to pass the verification of the dynamic verification map 3300.
  • the first area and the second area in the dynamic verification map are provided with a difference that can be judged by a person.
  • the color of the first area is different from the color of the second area.
  • the background of the first area is a flower color
  • the background of the second area is a solid color
  • the first area is a warm color
  • the second area is a dark color
  • the background of the first area is blue
  • the second The area is orange and so on.
  • the area ratio of the first area in the dynamic verification map is greater than the area ratio of the second area.
  • the terminal determines whether the pointer is rotated to the second area by the angle at which the pointer is rotated, thereby determining whether the user behavior is based on the rotated angle. If the area of the second area is too large, it is easy to determine some non-user behavior as user behavior. The verification effect of the verification code will be unsatisfactory. Only when the area of the second area is smaller than the area of the first area can a better verification function be exerted.
  • the circular radius formed by the first region and the second region is R
  • the area occupied by the first region is The second area is a fan shape in the circle, and the area occupied is
  • the second region in the dynamic verification map may comprise a plurality of discrete sectors and/or fan rings
  • the first region may comprise a plurality of discrete sub-regions, each sector in the second region and/or The fan ring is spaced apart by each sub-area in the first area.
  • the second area is a fan shape, and the two straight line segments of the second area are two radii of the fan shape; the second area is a fan ring, and the two straight line segments of the second area are two straight line segments corresponding to the width of the fan ring.
  • the terminal may obtain a deviation angle of each of the two straight line segments of the determined second area with respect to the default position.
  • the terminal may construct a coordinate system for the circle 408 composed of the first region 402 and the second region 404 in the dynamic verification map 400.
  • the center of the circle 410 is the coordinate origin, and the default is Position 406 is the radius of the first region 402 that coincides with the positive half-axis of the y-axis, and ⁇ is the angle between the radius of the circle and the default position 406.
  • the angular extent of the second region relative to the pointer is the angle between the angles of deviation between the two straight segments of the second region and the default position. Specifically, after determining the deviation angle between the two straight line segments of the second region and the default position, the terminal determines the deviation angle range of the second region from the pointer. It can be understood that the deviation angle of the two straight line segments of the second region with respect to the default position of the pointer is an absolute angle, and the magnitude of the deviation angle is only related to the default position of the pointer and the position of the second region in the dynamic verification map.
  • an offset angle can be selected from the range of deviation angles.
  • the selected deviation angle may be an intermediate value of the deviation angle range. For example, the terminal determines that the deviation angles of the two straight line segments of the second region with respect to the default position are n and n+k, and the corresponding deviation angle range is n to n+k, and the intermediate value of the deviation angle range may be selected. N+k/2 is taken as the deviation angle.
  • the selected deviation angle is used as the angle of the pointer to be rotated for verification.
  • the angle to be rotated is an angle that simulates user behavior to rotate the pointer in the dynamic verification map from the default position.
  • the terminal may submit the obtained to-be-rotated angle to the server, and the server verifies the submitted angle to be rotated. If the angle to be rotated is determined by the server to be the angle rotated by the user behavior, the verification is passed, thereby realizing Automatic identification of the dynamic verification map.
  • the above verification map processing method can automatically recognize the verification map of the rotation angle. After determining the first region and the second region in the verification map, obtaining an off angle of the second region relative to the default position of the pointer, it is possible to determine a range of deviation angles of the second region from the pointer, and select from the range of the deviation angle An angle, as the angle to be rotated of the pointer, the angle to be rotated is an angle in the second region, so that the rotation operation of the user can be simulated by using the angle to be rotated, and effective automatic recognition of the verification map is realized.
  • the step of determining the first area and the second area of the dynamic verification map specifically includes:
  • the pixel value is the RGB (Red-Green-Blue) component value of each pixel in the dynamic verification map.
  • the black pixel value is 0:0:0
  • the white pixel value is 255:255:255.
  • the terminal may divide the entire dynamic verification map into a plurality of pixel points, and sequentially mark each of the divided pixel points, and sequentially acquire corresponding pixel values by the color selectors on the marked pixel points.
  • the terminal may further perform noise reduction processing on the dynamic verification map to remove the interference information in the graph, and then perform the image after the noise reduction processing. Perform grayscale processing or binarization processing to highlight the difference between different contents in the dynamic verification graph, and then obtain the pixel values of each pixel in the pre-processed dynamic verification graph.
  • the first area pixel value feature is a pixel value feature of a pixel point falling in the first area
  • the second area pixel value feature is a pixel value feature of the pixel point falling in the second area.
  • the terminal obtains the pixel value of each pixel in the dynamic verification map, and divides each pixel value into two types according to the first region pixel value feature or the second region pixel value feature of the pixel value of each pixel point. .
  • the pixel value of the first region is characterized in that the pixel value corresponding to each pixel point is 0:0:225, and the pixel value of the second region is characterized by: the pixel value corresponding to each pixel point is 225:225:0. . That is, when the pixels in the dynamic verification graph can be clearly divided into two types according to the pixel values, the pixel values can be directly divided into two types.
  • the terminal may perform grayscale processing on the dynamic verification image, obtain pixel values corresponding to the respective pixel points, acquire feature values corresponding to each pixel point according to the pixel values, and input the feature values to the trained ones.
  • the output gets the category of the pixel. For example, if the pixel matrix of each pixel is 4*4, the 16-dimensional eigenvalue corresponding to the pixel is obtained, and the input eigenvalue is classified by the trained classifier to obtain the category as the first category or category. The result of classification for the second category.
  • the terminal divides the dynamic verification map into the first region and the second region according to the features of the divided pixel values.
  • the terminal determines an area formed by a pixel corresponding to the first color as the first area, and corresponds to the second color.
  • the area formed by the corresponding pixel is determined as the second area.
  • the terminal obtains each pixel value, and each pixel value is one of 0:0:225 and 225:225:0, and 0:0:225 corresponds to blue, and 225:225:0 corresponds to yellow, then It is possible to directly set the area composed of the blue pixel values as the first area and the area composed of the yellow pixel values as the second area.
  • the terminal may select, as the second region, a region formed by a pixel of a certain type of pixel values and a second type of pixel value, and select a plurality of pixel points.
  • a region of a type of pixel is used as the first region. For example, in the dynamic verification graph, the pixel value of the A category has 100 pixels, and the pixel value of the B category has 1000 pixels, then the pixel corresponding to the pixel value in the A category is determined as the first In the two regions, the pixel corresponding to the pixel value in the B category is determined as the first region.
  • the divided pixel values are classified, so that the pixel points corresponding to the pixel values in the graph can be divided into the first region or the second region.
  • the first region and the second region in the dynamic verification map can be determined.
  • the first area and the second area form a circle or a ring, and the second area is a sector or a fan ring;
  • the step of obtaining an off-angle range of the second area relative to the default position comprises: Or a discrete point on the concentric circumference of the ring; the radius of the concentric circle is less than or equal to the radius of the circle or the ring; respectively determine the deviation angle of each discrete point from the default position; obtain the circle or circle corresponding to each discrete point
  • the pixel value in the ring; the pixel value corresponding to the filtering belongs to the discrete point of the second region; the maximum deviation angle and the minimum deviation angle are determined in the deviation angle corresponding to the selected discrete points; the maximum deviation angle and the minimum deviation angle are respectively taken as The angle between the two straight segments of the second region relative to the default position.
  • the circle 601 is comprised of a first region 6011 and a second region 6012 in a dynamic verification map, the concentric circles 602 being concentric circles of the circle 601 and having a radius less than the radius of the circle 601.
  • the terminal may select discrete points 6031, 6032, 603k, 603(k+m), 603(k+n) from the concentric circumference 602 at intervals of a preset angle of 10°, and determine deviation angles of the respective discrete points from the default position.
  • the pixel values of the discrete points selected on the concentric circle 602 are respectively A, ..., A, B, B, ..., B, B, A...A,
  • the discrete points 603k, 603(k+m), 603(k+n) whose pixel values belong to the second region are selected from all the discrete points.
  • the maximum deviation angle (k+n)*10° and the minimum deviation angle k*10° of the deviation angle corresponding to the discrete points are selected, and then the two angles obtained as the second region are respectively obtained. The deviation of each of the two straight segments from the default position.
  • the radius of the concentric circumference is equal to the radius of the circle or the ring; obtaining the pixel values in the circle or the ring corresponding to each discrete point, including: being smaller than the concentric circumference of the discrete point, and wearing On a concentric circumference of a circle or a circle, select a reference point that is at the same radius as the discrete point; select a pixel value at a position where the reference point is located; and select the selected pixel value as a circle or circle corresponding to the discrete point The pixel value.
  • the dynamic verification map includes a plurality of dynamic verification maps acquired from the website to be crawled; the verification map processing method further includes the following steps: respectively calculating the hash values of the acquired dynamic verification maps; The hash value of the graph is stored corresponding to the angle to be rotated.
  • the hash value of the dynamic verification graph is a set of binary values obtained by encrypting the image content.
  • the hash values of the dynamic verification graphs of different content are not the same. For example, if the first regions of the two verification dynamic images are the same and the second regions are the same, but the two straight segments of the second region of the two verification dynamic images are different from each other with respect to the default position, then the two Verify that the hash value corresponding to the dynamic graph is also different. That is, the hash value of each dynamic verification graph can be used to uniquely identify the dynamic verification map.
  • the terminal acquires a URL address of the website to be crawled to crawl the website to obtain resources of the website.
  • the multiple dynamic verification maps in the webpage are downloaded, and the hash value of each dynamic verification graph downloaded is obtained by using a hash algorithm, and the verification graph processing method is adopted.
  • the downloaded verification dynamic graphs are processed to obtain the to-be-rotated angles corresponding to the respective verification maps, and the hash values of each verification dynamic graph are correspondingly stored with the to-be-rotated angles.
  • the hash algorithm used may be MD4 (Message-Digest Algorithm 4), MD5 or SHS (Secure Hash Algorithm).
  • the terminal may also send all the obtained dynamic verification maps to the server after acquiring all the dynamic verification maps of the website to be crawled, and the server processes and obtains each verification map by using the verification map processing method.
  • the corresponding angle to be rotated, the corresponding hash value, and the corresponding rotation angle and the hash value of each verification map are stored locally.
  • the to-be-rotation angle of each verification map is obtained, and the hash value capable of uniquely identifying the dynamic verification map is stored corresponding to the to-be-rotated angle, and the verification dynamic graph can be encountered when the verification dynamic image is encountered.
  • the angle to be rotated of the picture is indexed according to the hash value.
  • the verification map processing method further includes the steps of: acquiring user login information corresponding to the website to be crawled; initiating a dynamic verification drawing pull request to the server to be crawled; and dynamically verifying the pull request Instructing the server to return a dynamic verification map in response to the dynamic verification map pull request; calculating a hash value corresponding to the returned dynamic verification map; finding a to-be-rotated angle stored corresponding to the hash value; and logging the user login information and the searched The angle to be rotated is submitted to the server for verification.
  • User login information is the identity information required to log in to the web page.
  • the user login information may be, for example, a user identifier and a corresponding login password.
  • the server initiates a dynamic verification map pull request, just like the server of the website to be crawled, and the server randomly returns a dynamic verification when receiving the request.
  • the terminal uses a hash algorithm to obtain a hash value corresponding to the verification dynamic graph, and finds the verification dynamic graph according to the correspondence between the stored hash value and the angle to be rotated.
  • the queried to-be-turned angle is submitted to the server, and the server verifies the submitted to-be-turned angle. If the server passes the verification, the terminal can continue to crawl the website and obtain the resources of the website.
  • the verification map processing method further includes the steps of: obtaining a static verification map; separating a plurality of character images with characters from the static verification image; and normalizing each character image to obtain the same a character picture of the pixel matrix; obtaining a feature vector corresponding to each character image after normalization; respectively inputting the feature vector corresponding to each character picture into the trained classification model, and outputting the corresponding character; The characters are combined to obtain the verification code corresponding to the static verification map.
  • the static verification map is a verification map that needs to be identified in the verification map.
  • the content in the static verification map may be, for example, a character string composed of Chinese characters, numbers or letters.
  • the pixel matrix is the pixel specification of the picture.
  • the pixel matrix can be, for example, 16*16 or 64*64.
  • the normalization process refers to adjusting the pictures of different sizes so that each picture has the same pixel matrix.
  • the terminal may perform pre-processing on the static verification map, such as noise reduction processing and grayscale processing; segment the character string in the pre-processed static verification graph, and segment the single Characters, because the size of the characters is different, so the size of the cut characters is different; the terminal normalizes the cut character pictures to obtain character pictures with the same pixel matrix; after normalization processing The feature vector corresponding to each character picture is input into the trained classifier, and the corresponding character is outputted; the characters corresponding to each character picture are combined to obtain a verification code corresponding to the static verification picture.
  • pre-processing such as noise reduction processing and grayscale processing
  • the feature vector is a feature value corresponding to the normalized vector.
  • FIG. 7A it is a schematic diagram of the principle of acquiring a feature vector in one embodiment.
  • the picture is subjected to gradation processing and normalization processing so that the picture has a pixel matrix of 16*16 size.
  • the 256 pixel blocks in the picture are respectively marked as 1 or 0.
  • the pixel value corresponding to black is marked as 1
  • the pixel value corresponding to white is marked as 0.
  • the corresponding dimension is 256 feature vector.
  • FIG. 7B it is a schematic diagram of acquiring a feature vector of a verification map in one embodiment.
  • 256 pixel blocks in a picture having a 16*16 pixel matrix are divided into 16 large pixel blocks, and each large pixel block includes 16 small pixel blocks of a 4*4 pixel matrix, each of which is large.
  • the number of pixel blocks marked as 1 in the pixel block, as the tag value corresponding to the large pixel block, according to the order of the large pixel block in the picture and the corresponding tag value, the corresponding feature vector is: ⁇ 1, 4, 3 , 0,5,1,2,3,4,13,10,3,0,6,4,0 ⁇ , dimension is 16.
  • the corresponding feature vector is obtained, and the corresponding character of the static verification diagram is output by using the classification ability of the trained classifier, thereby realizing the static verification diagram. Effective identification.
  • the verification map processing method further includes the steps of: acquiring a model training verification map and corresponding verification characters; and dividing a plurality of character images with characters from the model training verification map; The processing is performed to obtain a character picture having the same pixel point; the feature vector corresponding to each character image after normalization is obtained; and the feature vector corresponding to each character picture is respectively input into the classification model, and each character picture is correspondingly obtained.
  • the predicted character according to the difference between the predicted character and the verification character corresponding to the model training chart, the model parameters of the classification model are adjusted, and the training is continued until the difference meets the preset condition.
  • the terminal may obtain a model training map for training the classification model and corresponding verification characters in advance, and perform noise reduction, grayscale, segmentation, and normalization processing on the model training map to obtain feature vectors corresponding to the training charts of the respective models.
  • the feature vector is input into the classification model, and the corresponding predicted characters are output.
  • the parameters of the classification model are adjusted according to the difference between the predicted characters and the verification characters, and the classification model is continued to be trained until the difference meets the preset condition.
  • the classification model is trained by acquiring the model training verification map, so that the prediction accuracy reaches the preset condition, and then the trained classifier is applied to the identification process of the static verification diagram to improve the possibility of recognition.
  • the verification map processing method specifically includes the following steps:
  • S808 determining a first area and a second area according to the pixel values divided into two types; the first area and the second area are circular or circular, and the second area is a sector or a fan ring; the dynamic verification map includes a default position A pointer that rotates around the center of a circle or ring; the default position is in the first area.
  • the pixel value corresponding to the screening belongs to a discrete point of the second region.
  • the maximum deviation angle and the minimum deviation angle are respectively taken as the deviation angles of the two straight line segments of the second region with respect to the default position.
  • the selected deviation angle is used as the angle of the pointer to be rotated; the angle to be rotated is used to rotate the pointer toward the second area to be rotated for verification.
  • S834 Initiating a dynamic verification map pull request to the server to be crawled; the dynamic verification pull request is used to instruct the server to return a dynamic verification map when responding to the dynamic verification pull request.
  • the above verification map processing method can automatically recognize the verification map of the rotation angle. After determining the first region and the second region in the verification map, obtaining an off angle of the second region relative to the default position of the pointer, it is possible to determine a range of deviation angles of the second region from the pointer, and select from the range of the deviation angle An angle, as the angle to be rotated of the pointer, the angle to be rotated is an angle in the second region, so that the rotation operation of the user can be simulated by using the angle to be rotated, and effective automatic recognition of the verification map is realized.
  • steps in the flowchart of FIG. 8 are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and the steps may be performed in other orders. Moreover, at least some of the steps in FIG. 8 may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be executed at different times, and the execution of these sub-steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of the other steps.
  • a verification map processing apparatus 900 including: a dynamic verification map acquisition module 902, a determination module 904, an acquisition module 906, a deviation angle selection module 908, and a verification module 910:
  • the dynamic verification map obtaining module 902 is configured to obtain a dynamic verification map.
  • the determining module 904 is configured to determine a first area and a second area of the dynamic verification map; the first area includes a pointer that can be rotated from the default position to the second area.
  • the obtaining module 906 is configured to obtain a range of deviation angles of the second area from the default position.
  • the deviation angle selection module 908 selects the deviation angle from the range of deviation angles.
  • the verification module 910 is configured to use the selected off angle as the angle of the pointer to be rotated for verification.
  • the determining module 904 is further configured to obtain each pixel value in the dynamic verification graph; and divide each pixel value into two categories according to the preset first region pixel value feature and the second region pixel value feature; The first area and the second area are determined according to pixel values divided into two types.
  • the first area and the second area form a circle or a ring, and the second area is a sector or a fan ring;
  • the acquisition module 906 is further configured to select discrete points from a circle or a concentric circumference of the ring;
  • the radius of the concentric circle is less than or equal to the radius of the circle or the ring; respectively determine the deviation angle of each discrete point from the default position; obtain the pixel value in the circle or the ring corresponding to each discrete point; filter the corresponding pixel
  • the value belongs to a discrete point of the second region; the maximum deviation angle and the minimum deviation angle are determined in the deviation angle corresponding to the selected discrete points; and the maximum deviation angle and the minimum deviation angle are respectively taken as the two straight line segments of the second region The deviation from the default position.
  • the radius of the concentric circumference is equal to the radius of the circle or the ring; the acquisition module 906 is further configured to select on a concentric circumference that is smaller than the concentric circumference of the discrete point and that passes through the circle or the ring.
  • the discrete points are located at the reference point of the same radius; the pixel value at the position where the reference point is located is selected; and the selected pixel value is taken as the pixel value in the circle or the ring corresponding to the discrete point.
  • the dynamic verification map includes a plurality of dynamic verification maps acquired from the website to be crawled; the verification map processing apparatus 900 further includes a hash value calculation module 1002 and a storage module 1004, and a hash
  • the value calculation module 1002 is configured to separately calculate the hash values of the acquired dynamic verification maps.
  • the storage module 1004 is configured to store the hash values of the dynamic verification maps corresponding to the to-be-rotated angles.
  • the verification map processing apparatus 900 further includes a user login information acquisition module 1102, a request initiation module 1104, a query module 1106, and a submission module 1108, where:
  • the user login information obtaining module 1102 is configured to obtain user login information corresponding to the website to be crawled; the request initiation module 1104 is configured to initiate a dynamic verification map pull request to the server to be crawled; the dynamic verification map pull request is used to indicate The server returns a dynamic verification map in response to the dynamic verification map pull request; the hash value calculation module 1004 is further configured to calculate a hash value corresponding to the returned dynamic verification map; the query module 1106 is configured to search for the storage corresponding to the hash value. The angle to be rotated; the submitting module 1108 submits the user login information and the found angle to be rotated to the server for verification.
  • the verification map processing apparatus 900 further includes a static verification map acquisition module, a segmentation module, a normalization module, a feature vector acquisition module, a character prediction module, and a split module, wherein:
  • the static verification map acquisition module is configured to obtain a static verification map;
  • the segmentation module is configured to segment a plurality of character images with characters from the static verification map;
  • the normalization module is configured to normalize each character image to obtain a character picture of the same pixel matrix;
  • the feature vector obtaining module is configured to obtain a feature vector corresponding to each character image after normalization;
  • the character prediction module is configured to respectively input the feature vector corresponding to each character picture into the trained classification model In the output, the corresponding character is obtained;
  • the splitting module is used to flatten the characters of each character picture to obtain the verification code corresponding to the static verification picture.
  • the verification map processing device 900 further includes a training module, wherein: the static verification map acquisition module is further configured to acquire a model training verification map and corresponding verification characters; and the segmentation module is further configured to segment from the model training verification map. a plurality of character pictures with characters; the normalization module is further used for normalizing each character picture to obtain a character picture having the same pixel point; the feature vector obtaining module is further configured to obtain after normalization processing The feature vector corresponding to each character picture; the character prediction module is further configured to input feature vectors corresponding to each character picture into the classification model respectively, and obtain predicted characters corresponding to each character picture; the training module is configured to train according to the predicted characters and models The difference between the verification characters corresponding to the figure, adjust the model parameters of the classification model, and continue training until the difference meets the preset conditions.
  • the verification map processing device 900 described above can automatically recognize the verification map of the rotation angle. After determining the first region and the second region in the verification map, obtaining an off angle of the second region relative to the default position of the pointer, it is possible to determine a range of deviation angles of the second region from the pointer, and select from the range of the deviation angle An angle, as the angle to be rotated of the pointer, the angle to be rotated is an angle in the second region, so that the rotation operation of the user can be simulated by using the angle to be rotated, and effective automatic recognition of the verification map is realized.
  • the various modules in the verification map processing device described above may be implemented in whole or in part by software, hardware, and combinations thereof. Each of the above modules may be embedded in or independent of the processor in the computer device, or may be stored in a memory in the computer device in a software form, so that the processor invokes the operations corresponding to the above modules.
  • a computer device which may be a terminal, and its internal structure diagram may be as shown in FIG.
  • the computer device includes a processor, memory, network interface, display screen, and input device connected by a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-transitory computer readable storage medium, an internal memory.
  • the non-transitory computer readable storage medium stores an operating system and computer readable instructions.
  • the internal memory provides an environment for the operation of an operating system and computer readable instructions in a non-transitory computer readable storage medium.
  • the network interface of the computer device is used to communicate with an external terminal via a network connection.
  • the computer readable instructions are executed by a processor to implement a verification map processing method.
  • the display screen of the computer device may be a liquid crystal display or an electronic ink display screen
  • the input device of the computer device may be a touch layer covered on the display screen, or may be a button, a trackball or a touchpad provided on the computer device casing. It can also be an external keyboard, trackpad or mouse.
  • FIG. 12 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 of the computer device to which the solution of the present application is applied.
  • the specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
  • a computer apparatus comprising a memory and one or more processors having stored therein computer readable instructions that are executed by the processor to implement any of the embodiments of the present application The steps provided to validate the graph processing method.
  • one or more non-transitory computer readable storage mediums storing computer readable instructions that, when executed by one or more processors, cause one or more processes
  • the steps of the verification map processing method provided in any one of the embodiments of the present application are implemented.
  • Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in a variety of formats, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization chain.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • Synchlink DRAM SLDRAM
  • Memory Bus Radbus
  • RDRAM Direct RAM
  • DRAM Direct Memory Bus Dynamic RAM
  • RDRAM Memory Bus Dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)
  • Collating Specific Patterns (AREA)

Abstract

Disclosed is a verification picture processing method, comprising: acquiring a dynamic verification picture; determining a first region and a second region of the dynamic verification picture, wherein the first region comprises a pointer capable of rotating from a default position to the second region; acquiring a deviation angle range of the second region with respect to the default position; selecting a deviation angle from the deviation angle range; and taking the selected deviation angle as an angle to be deflected by of the pointer for verification.

Description

验证图处理方法、装置、计算机设备和存储介质Verification map processing method, device, computer device and storage medium
本申请要求于2018年05月07日提交中国专利局,申请号为201810426893.4,申请名称为“验证图处理方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims to be filed on May 07, 2018, the Chinese Patent Office, the application number is 201101826893.4, the priority of the Chinese patent application entitled "Verification map processing method, device, computer equipment and storage medium", the entire contents of which are incorporated by reference. Combined in this application.
技术领域Technical field
本申请涉及计算机技术领域,特别是涉及一种验证图处理方法、装置、计算机设备和存储介质。The present application relates to the field of computer technologies, and in particular, to a verification map processing method, apparatus, computer device, and storage medium.
背景技术Background technique
随着计算机技术的发展,出现了爬虫技术,利用爬虫技术对网站进行爬取,能够获取大量网页中的信息。然而,在爬取网站的过程中,经常遇到待爬取的目的网站为登录态,需要输入提供的验证图对应的验证码,在提交了验证码并验证通过之后才能继续对目的网站进行爬取。With the development of computer technology, crawling technology has emerged, and crawling websites are used to crawl websites, and information on a large number of web pages can be obtained. However, in the process of crawling the website, it often encounters that the destination website to be crawled is in the login state, and needs to input the verification code corresponding to the provided verification map, and can continue to climb the destination website after submitting the verification code and verifying the passage. take.
目前,网站常用的验证方式是:提出验证问题,用户从验证图中选择与提出的验证问题对应的验证答案,对于这类验证码的识别,通常是直接对验证图进行图片识别,从验证图中选择与验证问题相应的图即可。然而,发明人意识到,目前出现了动态验证码,现阶段对于这种动态验证码还没有有效的识别方法。At present, the commonly used verification method of the website is: the verification question is raised, and the user selects the verification answer corresponding to the proposed verification question from the verification map. For the identification of such verification code, the verification image is usually directly identified by the verification picture. Select the map corresponding to the verification problem. However, the inventors have realized that dynamic verification codes have appeared at present, and there is no effective identification method for such dynamic verification codes at this stage.
发明内容Summary of the invention
根据本申请公开的各种实施例,提供一种验证图处理方法、装置、计算机设备和存储介质。According to various embodiments disclosed herein, a verification map processing method, apparatus, computer apparatus, and storage medium are provided.
一种验证图处理方法包括:A verification map processing method includes:
获取动态验证图;Obtain a dynamic verification map;
确定所述动态验证图的第一区域和第二区域;所述第一区域包括能从默认位置起转动至所述第二区域的指针;Determining a first region and a second region of the dynamic verification map; the first region including a pointer rotatable from a default position to the second region;
获取所述第二区域相对于所述默认位置的偏离角度范围;Obtaining a range of deviation angles of the second area relative to the default position;
从所述偏离角度范围中选取偏离角度;及Selecting a deviation angle from the range of deviation angles; and
将选取的偏离角度作为所述指针的待转动角度以进行验证。The selected deviation angle is taken as the angle of the pointer to be rotated for verification.
一种验证图处理装置包括:A verification map processing device includes:
动态验证图获取模块,用于获取动态验证图;a dynamic verification map obtaining module, configured to obtain a dynamic verification map;
确定模块,用于确定所述动态验证图的第一区域和第二区域;所述第一区域包括能从默认位置起转动至所述第二区域的指针;a determining module, configured to determine a first area and a second area of the dynamic verification map; the first area includes a pointer rotatable from a default position to the second area;
获取模块,用于获取所述第二区域相对于所述默认位置的偏离角度范围;An obtaining module, configured to acquire a range of deviation angles of the second area relative to the default position;
偏离角度选取模块,用于从所述偏离角度范围中选取偏离角度;及a deviation angle selection module for selecting an off angle from the off angle range; and
验证模块,用于将选取的偏离角度作为所述指针的待转动角度以进行验证。The verification module is configured to use the selected deviation angle as the angle of the pointer to be rotated for verification.
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executable by the processor to cause the one or more processors to execute The following steps:
获取动态验证图;Obtain a dynamic verification map;
确定所述动态验证图的第一区域和第二区域;所述第一区域包括能从默认位置起转动至所述第二区域的指针;Determining a first region and a second region of the dynamic verification map; the first region including a pointer rotatable from a default position to the second region;
获取所述第二区域相对于所述默认位置的偏离角度范围;Obtaining a range of deviation angles of the second area relative to the default position;
从所述偏离角度范围中选取偏离角度;及Selecting a deviation angle from the range of deviation angles; and
将选取的偏离角度作为所述指针的待转动角度以进行验证。The selected deviation angle is taken as the angle of the pointer to be rotated for verification.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the steps of:
获取动态验证图;Obtain a dynamic verification map;
确定所述动态验证图的第一区域和第二区域;所述第一区域包括能从默认位置起转动至所述第二区域的指针;Determining a first region and a second region of the dynamic verification map; the first region including a pointer rotatable from a default position to the second region;
获取所述第二区域相对于所述默认位置的偏离角度范围;Obtaining a range of deviation angles of the second area relative to the default position;
从所述偏离角度范围中选取偏离角度;及Selecting a deviation angle from the range of deviation angles; and
将选取的偏离角度作为所述指针的待转动角度以进行验证。The selected deviation angle is taken as the angle of the pointer to be rotated for verification.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of the present application are set forth in the accompanying drawings and description below. Other features and advantages of the present invention will be apparent from the description, drawings and claims.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings to be used in the embodiments will be briefly described below. Obviously, the drawings in the following description are only some embodiments of the present application, Those skilled in the art can also obtain other drawings based on these drawings without any creative work.
图1为根据一个或多个实施例中验证图处理方法的应用场景图。1 is an application scenario diagram of a verification map processing method in accordance with one or more embodiments.
图2为根据一个或多个实施例中验证图处理方法的流程示意图。2 is a flow diagram of a verification map processing method in accordance with one or more embodiments.
图3A为根据一个或多个实施例中动态验证图的示意图。3A is a schematic diagram of a dynamic verification map in accordance with one or more embodiments.
图3B为根据另一个或多个实施例中动态验证图的示意图。FIG. 3B is a schematic diagram of a dynamic verification map in accordance with another or more embodiments.
图3C为根据又一个或多个实施例中动态验证图的示意图。3C is a schematic diagram of a dynamic verification map in accordance with still another embodiment.
图4为根据一个或多个实施例中获取第二区域的两条直线段各自相对于默认位置的偏离角度的原理示意图。4 is a schematic diagram showing the principle of deviating the angles of two straight line segments of a second region with respect to a default position, in accordance with one or more embodiments.
图5为根据一个或多个实施例中确定动态验证图的第一区域和第二区域的流程示意图。FIG. 5 is a flow diagram of determining a first region and a second region of a dynamic verification map in accordance with one or more embodiments.
图6为根据另一个或多个实施例中获取第二区域的两条直线段各自相对于默认位置的偏离角度的原理示意图。FIG. 6 is a schematic diagram showing the principle of deviating the angles of the two straight line segments of the second region with respect to the default position according to another embodiment or embodiments.
图7A为根据一个或多个实施例中获取静态验证图的特征向量的原理示意图。7A is a schematic diagram of the principle of acquiring feature vectors of a static verification map in accordance with one or more embodiments.
图7B为根据另一个或多个实施例中获取静态验证图的特征向量的原理示意图。FIG. 7B is a schematic diagram showing the principle of acquiring a feature vector of a static verification map according to another embodiment or embodiments.
图8为根据一个或多个具体的实施例中验证图处理方法的流程示意图。FIG. 8 is a flow diagram of a verification map processing method in accordance with one or more specific embodiments.
图9为根据一个或多个实施例中验证图处理装置的框图。9 is a block diagram of a verification map processing apparatus in accordance with one or more embodiments.
图10为根据另一个或多个实施例中验证图处理装置的框图。10 is a block diagram of a verification map processing apparatus in accordance with another or more embodiments.
图11为根据又一个或多个实施例中验证图处理装置的框图。11 is a block diagram of a verification map processing apparatus in accordance with still another embodiment.
图12为根据一个或多个实施例中计算机设备的框图。Figure 12 is a block diagram of a computer device in accordance with one or more embodiments.
具体实施方式detailed description
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
本申请提供的验证图处理方法,可以应用于如图1所示的应用环境中。终端102通过网络与服务器104通过网络进行通信。终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The verification map processing method provided by the present application can be applied to an application environment as shown in FIG. 1. Terminal 102 communicates with server 104 over a network over a network. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablets, and portable wearable devices, and the server 104 can be implemented with a stand-alone server or a server cluster composed of a plurality of servers.
在其中一个实施例中,如图2所示,提供了一种验证图处理方法,以该方法应用于图1中的终端为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 2, a verification map processing method is provided, which is applied to the terminal in FIG. 1 as an example, and includes the following steps:
S202,获取动态验证图。S202. Acquire a dynamic verification map.
动态验证图是通过用户的触发操作改变图片的原始形态的验证图。触发操作可以是用户通过输入装置触发的点击操作、拖动操作或转动操作等。动态验证图比如可以是转动角度的动态验证图。The dynamic verification map is a verification diagram that changes the original form of the picture by the user's trigger operation. The triggering operation may be a click operation, a drag operation, a rotation operation, or the like triggered by the user through the input device. The dynamic verification map can be, for example, a dynamic verification map of the rotation angle.
S204,确定动态验证图的第一区域和第二区域;第一区域包括能从默认位置起转动至第二区域的指针。S204. Determine a first area and a second area of the dynamic verification map; the first area includes a pointer that can be rotated from the default position to the second area.
第一区域是动态验证图中的背景区域。第二区域是动态验证图中的目标区域。正常情况下,终端将动态验证图进行展示后,获取到用户通过输入装置针对该动态验证图中的指针的触发操作,根据触发操作的操作距离或方向将第一区域中的指针从默认位置起开始转动,以此改变动态验证图的形态。终端通过对改变形态后的验证图是否达到预期进行判定,比如指针是否转到了第二区域,即转动的角度是否符合预期,从而根据转动的角度来判定是否为用户行为。而在本实施例中,终端对验证图进行处理,以获取到指针被转动后对应的、符合预期的角度,将获取的该角度作为该动态验证码的“通行证”以进行验证。The first area is the background area in the dynamic verification map. The second area is the target area in the dynamic verification map. Normally, after the terminal displays the dynamic verification map, the trigger operation of the user for the pointer in the dynamic verification map is obtained by the input device, and the pointer in the first region is from the default position according to the operation distance or direction of the trigger operation. Start turning to change the shape of the dynamic verification chart. The terminal determines whether the verification pattern after changing the shape reaches an expectation, such as whether the pointer is transferred to the second area, that is, whether the angle of rotation conforms to an expectation, thereby determining whether the user behavior is based on the angle of rotation. In this embodiment, the terminal processes the verification map to obtain a corresponding angle corresponding to the pointer after being rotated, and uses the obtained angle as a “passport” of the dynamic verification code for verification.
具体地,终端在获取了动态验证图之后,对获取的验证动态图进行预处理,从经过预处理的动态验证图中确定第一区域和第二区域。预处理包括对动态验证图进行降噪处理、二值化处理或灰度处理等等。Specifically, after acquiring the dynamic verification map, the terminal performs pre-processing on the obtained verification dynamic graph, and determines the first region and the second region from the pre-processed dynamic verification graph. The pre-processing includes noise reduction processing, binarization processing or gray processing on the dynamic verification map.
如图3A所示,为一个实施例中动态验证图3100的示意图。其中,第一区域3102和第二区域3104组成一个圆形3106,第二区域3104为组成的圆形3106中的一个扇形。动态验证图3100还包括能从第一区域3102的默认位置起围绕圆形3106的圆心3108转动的 指针3110。终端向用户展示该动态验证图3100,用户通过输入装置将指针3110从默认位置处转动至第二区域3104中,才能通过该动态验证图3100的验证。As shown in FIG. 3A, a schematic diagram of the dynamic verification diagram 3100 in one embodiment is shown. The first region 3102 and the second region 3104 form a circle 3106, and the second region 3104 is a fan shape of the composed circle 3106. The dynamic verification map 3100 also includes a pointer 3110 that is rotatable about a center 3108 of the circle 3106 from a default position of the first region 3102. The terminal presents the dynamic verification map 3100 to the user, and the user can rotate the pointer 3110 from the default position to the second area 3104 through the input device to pass the verification of the dynamic verification map 3100.
如图3B所示,为一个实施例中动态验证图3200的示意图。其中,第一区域3202和第二区域3204组成一个圆形3206,第二区域3204为组成的圆形3206中的一个扇环。动态验证图3200还包括能从第一区域3202的默认位置起围绕圆形3206的圆心3208转动的指针3210。终端向用户展示该动态验证图3200,用户通过输入装置将指针3210从默认位置处转动至第二区域3204中,才能通过该动态验证图3200的验证。As shown in FIG. 3B, a schematic diagram of the dynamic verification diagram 3200 in one embodiment. The first region 3202 and the second region 3204 form a circle 3206, and the second region 3204 is a fan ring of the formed circle 3206. The dynamic verification map 3200 also includes a pointer 3210 that is rotatable about a center 3208 of the circle 3206 from a default position of the first region 3202. The terminal presents the dynamic verification map 3200 to the user, and the user can rotate the pointer 3210 from the default position to the second area 3204 through the input device to pass the verification of the dynamic verification map 3200.
如图3C所示,为一个实施例中动态验证图3300的示意图。其中,第一区域3302和第二区域3304组成一个圆环3306,第二区域3304为组成的圆形3306中的扇环。动态验证图3300还包括能从第一区域3302的默认位置起围绕圆形3306的圆心3308转动的指针3310。终端向用户展示该动态验证图3300,用户通过输入装置将指针3310从默认位置处转动至第二区域3304中,才能通过该动态验证图3300的验证。As shown in FIG. 3C, a schematic diagram of the dynamic verification diagram 3300 in one embodiment. The first region 3302 and the second region 3304 form a ring 3306, and the second region 3304 is a fan ring in the formed circle 3306. The dynamic verification map 3300 also includes a pointer 3310 that is rotatable about a center 3308 of the circle 3306 from a default position of the first region 3302. The terminal presents the dynamic verification map 3300 to the user, and the user can rotate the pointer 3310 from the default position to the second area 3304 through the input device to pass the verification of the dynamic verification map 3300.
在其中一个实施例中,动态验证图中的第一区域和第二区域具备可通过人判断的区别。比如,第一区域的颜色和第二区域的颜色有区别。举例来说,第一区域的背景为花色,而第二区域的背景为纯色;或者,第一区域为暖色调,第二区域为深色调,比如,第一区域的背景为蓝色,第二区域为橙色等等。In one of the embodiments, the first area and the second area in the dynamic verification map are provided with a difference that can be judged by a person. For example, the color of the first area is different from the color of the second area. For example, the background of the first area is a flower color, and the background of the second area is a solid color; or, the first area is a warm color, and the second area is a dark color, for example, the background of the first area is blue, and the second The area is orange and so on.
在一个实施例中,动态验证图中的第一区域的面积占比大于第二区域的面积占比。终端通过指针被转动的角度来判断指针是否被转动至第二区域,从而根据被转动的角度判定是否为用户行为,若第二区域面积过大,很容易将一些非用户行为判定为用户行为,验证码的验证作用效果就会不理想。只有在第二区域的面积小于第一区域的面积时,才能发挥较好的验证作用。比如,第一区域和第二区域组成的圆形半径为R,第一区域所占面积为
Figure PCTCN2019070129-appb-000001
第二区域为圆中的扇形,所占面积为
Figure PCTCN2019070129-appb-000002
In one embodiment, the area ratio of the first area in the dynamic verification map is greater than the area ratio of the second area. The terminal determines whether the pointer is rotated to the second area by the angle at which the pointer is rotated, thereby determining whether the user behavior is based on the rotated angle. If the area of the second area is too large, it is easy to determine some non-user behavior as user behavior. The verification effect of the verification code will be unsatisfactory. Only when the area of the second area is smaller than the area of the first area can a better verification function be exerted. For example, the circular radius formed by the first region and the second region is R, and the area occupied by the first region is
Figure PCTCN2019070129-appb-000001
The second area is a fan shape in the circle, and the area occupied is
Figure PCTCN2019070129-appb-000002
在其中一个实施例中,动态验证图中的第二区域可以包括多个分散的扇形和/或扇环,第一区域可包括多个分散的子区域,第二区域中的各个扇形和/或扇环由第一区域中各个子区域间隔开。In one embodiment, the second region in the dynamic verification map may comprise a plurality of discrete sectors and/or fan rings, the first region may comprise a plurality of discrete sub-regions, each sector in the second region and/or The fan ring is spaced apart by each sub-area in the first area.
S206,获取第二区域相对于默认位置的偏离角度范围。S206. Acquire a range of deviation angles of the second area from the default position.
第二区域为扇形,则第二区域的两条直线段为扇形的两条半径;第二区域为扇环,则第二区域的两条直线段为扇环的宽度对应的两条直线段。具体地,终端可在确定了第一区域和第二区域后,获取确定的第二区域的两条直线段各自相对于默认位置的偏离角度。The second area is a fan shape, and the two straight line segments of the second area are two radii of the fan shape; the second area is a fan ring, and the two straight line segments of the second area are two straight line segments corresponding to the width of the fan ring. Specifically, after determining the first area and the second area, the terminal may obtain a deviation angle of each of the two straight line segments of the determined second area with respect to the default position.
在其中一个实施例中,如图4所示,终端可对动态验证图400中的第一区域402和第二区域404组成的圆形408构建坐标系,圆形的圆心410为坐标原点,默认位置406为第 一区域402中与y轴的正半轴重合的半径,θ为圆的半径与默认位置406之间的夹角。终端依次获取θ为0°~360°时半径与圆周的交点所对应的像素值,当θ=m时像素值为第一颜色,当θ=n时像素值为第二颜色,且θ取n至n+k时,像素值都为第二颜色,第二颜色对应了第二区域,那么就可得到第二区域的两条半径相对于默认位置的偏离角度分别为n和n+k。In one embodiment, as shown in FIG. 4, the terminal may construct a coordinate system for the circle 408 composed of the first region 402 and the second region 404 in the dynamic verification map 400. The center of the circle 410 is the coordinate origin, and the default is Position 406 is the radius of the first region 402 that coincides with the positive half-axis of the y-axis, and θ is the angle between the radius of the circle and the default position 406. The terminal sequentially acquires the pixel value corresponding to the intersection of the radius and the circumference when θ is 0°-360°, the pixel value is the first color when θ=m, the pixel value is the second color when θ=n, and θ takes n When n+k, the pixel value is the second color, and the second color corresponds to the second region, then the deviation angles of the two radii of the second region with respect to the default position are respectively n and n+k.
S208,从偏离角度范围中选取偏离角度。S208, selecting an off angle from the range of deviation angles.
第二区域相对于指针的偏离角度范围,是第二区域的两条直线段与默认位置之间的偏离角度之间的夹角。具体地,终端在确定了第二区域的两条直线段分别与默认位置之间的偏离角度之后,就确定了第二区域相对于指针的偏离角度范围。可以理解,第二区域的两条直线段相对于指针的默认位置的偏离角度是绝对角度,偏离角度的大小只与动态验证图中指针的默认位置和第二区域的位置有关。The angular extent of the second region relative to the pointer is the angle between the angles of deviation between the two straight segments of the second region and the default position. Specifically, after determining the deviation angle between the two straight line segments of the second region and the default position, the terminal determines the deviation angle range of the second region from the pointer. It can be understood that the deviation angle of the two straight line segments of the second region with respect to the default position of the pointer is an absolute angle, and the magnitude of the deviation angle is only related to the default position of the pointer and the position of the second region in the dynamic verification map.
在终端确定了第二区域相对于指针的偏离角度范围以后,就可从偏离角度范围中选取一个偏离角度。选取的偏离角度可以是偏离角度范围的中间值。比如,终端确定了第二区域的两条直线段各自相对于默认位置的偏离角度为n和n+k,那么对应的偏离角度范围就是n~n+k,可以选取该偏离角度范围的中间值n+k/2作为偏离角度。After the terminal determines the range of deviation angles of the second region from the pointer, an offset angle can be selected from the range of deviation angles. The selected deviation angle may be an intermediate value of the deviation angle range. For example, the terminal determines that the deviation angles of the two straight line segments of the second region with respect to the default position are n and n+k, and the corresponding deviation angle range is n to n+k, and the intermediate value of the deviation angle range may be selected. N+k/2 is taken as the deviation angle.
S210,将选取的偏离角度作为指针的待转动角度以进行验证。S210, the selected deviation angle is used as the angle of the pointer to be rotated for verification.
待转动角度是模拟用户行为将动态验证图中的指针从默认位置转动的角度。具体地,终端可将获得的待转动角度提交至服务器,由服务器对提交的待转动角度进行验证,若待转动的角度被服务器判定为是用户行为所转动的角度,则验证通过,从而实现了对该动态验证图的自动识别。The angle to be rotated is an angle that simulates user behavior to rotate the pointer in the dynamic verification map from the default position. Specifically, the terminal may submit the obtained to-be-rotated angle to the server, and the server verifies the submitted angle to be rotated. If the angle to be rotated is determined by the server to be the angle rotated by the user behavior, the verification is passed, thereby realizing Automatic identification of the dynamic verification map.
上述验证图处理方法,能够实现对待转动角度的验证图进行自动识别。在确定验证图中的第一区域和第二区域之后,获取第二区域相对于指针的默认位置的偏离角度,就能够确定第二区域相对于指针的偏离角度范围,从该偏离角度范围中选择一个角度,作为将指针的待转动角度,该待转动角度是第二区域中的角度,从而利用该待转动角度就能够模拟用户的转动操作,实现对该验证图的有效自动识别。The above verification map processing method can automatically recognize the verification map of the rotation angle. After determining the first region and the second region in the verification map, obtaining an off angle of the second region relative to the default position of the pointer, it is possible to determine a range of deviation angles of the second region from the pointer, and select from the range of the deviation angle An angle, as the angle to be rotated of the pointer, the angle to be rotated is an angle in the second region, so that the rotation operation of the user can be simulated by using the angle to be rotated, and effective automatic recognition of the verification map is realized.
如图5所示,在其中一个实施例中,确定动态验证图的第一区域和第二区域的步骤具体包括:As shown in FIG. 5, in one embodiment, the step of determining the first area and the second area of the dynamic verification map specifically includes:
S502,获取动态验证图中的各个像素值。S502. Acquire each pixel value in the dynamic verification graph.
像素值是动态验证图中各个像素点的RGB(Red-Green-Blue)分量值。比如,黑色的像素值是0:0:0,白色的像素值是255:255:255。具体地,终端可将整个动态验证图划分为多个像素点,并为划分的各个像素点依次标记,通过颜色选择器对标记的像素点依次获取相应的像素值。The pixel value is the RGB (Red-Green-Blue) component value of each pixel in the dynamic verification map. For example, the black pixel value is 0:0:0, and the white pixel value is 255:255:255. Specifically, the terminal may divide the entire dynamic verification map into a plurality of pixel points, and sequentially mark each of the divided pixel points, and sequentially acquire corresponding pixel values by the color selectors on the marked pixel points.
在其中一个实施例中,终端在获取动态验证图中的各个像素点的像素值之前,还可对动态验证图进行降噪处理,以去除图中的干扰信息,然后对降噪处理后的图片进行灰度处 理或二值化处理,以凸显出动态验证图中不同内容之间的区别,然后再获取预处理后的动态验证图中各个像素点的像素值。In one embodiment, before obtaining the pixel values of the respective pixels in the dynamic verification map, the terminal may further perform noise reduction processing on the dynamic verification map to remove the interference information in the graph, and then perform the image after the noise reduction processing. Perform grayscale processing or binarization processing to highlight the difference between different contents in the dynamic verification graph, and then obtain the pixel values of each pixel in the pre-processed dynamic verification graph.
S504,按照预设的第一区域像素值特征和第二区域像素值特征,将各个像素值划分为两类。S504. Divide each pixel value into two categories according to the preset first region pixel value feature and the second region pixel value feature.
第一区域像素值特征是落在第一区域中的像素点所具有的像素值特征,第二区域像素值特征是落在第二区域中的像素点所具有的像素值特征。具体地,终端在获取了动态验证图中每个像素点的像素值,根据各个像素点的像素值具备的第一区域像素值特征或第二区域像素值特征,将各个像素值划分为两类。The first area pixel value feature is a pixel value feature of a pixel point falling in the first area, and the second area pixel value feature is a pixel value feature of the pixel point falling in the second area. Specifically, the terminal obtains the pixel value of each pixel in the dynamic verification map, and divides each pixel value into two types according to the first region pixel value feature or the second region pixel value feature of the pixel value of each pixel point. .
在其中一个实施例中,第一区域像素值特征为:各个像素点对应的像素值为0:0:225,第二区域像素值特征为:各个像素点对应的像素值为225:225:0。即,当动态验证图中各个像素点可以根据像素值明确划分成两类,就可以直接将像素值划分成两类。In one embodiment, the pixel value of the first region is characterized in that the pixel value corresponding to each pixel point is 0:0:225, and the pixel value of the second region is characterized by: the pixel value corresponding to each pixel point is 225:225:0. . That is, when the pixels in the dynamic verification graph can be clearly divided into two types according to the pixel values, the pixel values can be directly divided into two types.
在其中一个实施例中,终端可将动态验证图进行灰度化处理后,获取各个像素点对应的像素值,根据像素值获取每个像素点对应的特征值,将特征值输入至训练好的分类器中,输出得到该像素点的类别。比如,若每个像素点的像素矩阵为4*4,得到对应该像素点的16维的特征值,利用训练好的分类器对输入的该特征值进行分类,得到类别为第一类或类别为第二类的分类结果。In one embodiment, the terminal may perform grayscale processing on the dynamic verification image, obtain pixel values corresponding to the respective pixel points, acquire feature values corresponding to each pixel point according to the pixel values, and input the feature values to the trained ones. In the classifier, the output gets the category of the pixel. For example, if the pixel matrix of each pixel is 4*4, the 16-dimensional eigenvalue corresponding to the pixel is obtained, and the input eigenvalue is classified by the trained classifier to obtain the category as the first category or category. The result of classification for the second category.
S506,根据划分为两类的像素值确定第一区域和第二区域。S506. Determine the first region and the second region according to the pixel values divided into two types.
具体地,终端在将像素值分为两类之后,根据划分出的像素值所具有的特征将动态验证图划分为第一区域和第二区域。Specifically, after dividing the pixel values into two categories, the terminal divides the dynamic verification map into the first region and the second region according to the features of the divided pixel values.
在其中一个实施例中,终端在将像素值划分为两类之后,将对应了第一颜色的一类所对应的像素点构成的区域确定为第一区域,将对应了第二颜色的一类所对应的像素点构成的区域确定为第二区域。比如,终端获取各个像素值,各个像素值分别为0:0:225和225:225:0中的一种,而0:0:225对应了蓝色,225:225:0对应了黄色,那么就可以直接将蓝色像素值构成的区域为第一区域,将黄色像素值构成的区域为第二区域。In one embodiment, after dividing the pixel value into two categories, the terminal determines an area formed by a pixel corresponding to the first color as the first area, and corresponds to the second color. The area formed by the corresponding pixel is determined as the second area. For example, the terminal obtains each pixel value, and each pixel value is one of 0:0:225 and 225:225:0, and 0:0:225 corresponds to blue, and 225:225:0 corresponds to yellow, then It is possible to directly set the area composed of the blue pixel values as the first area and the area composed of the yellow pixel values as the second area.
在其中一个实施例中,终端可在划分好的第一类像素值和第二类像素值中,选择像素点数量少的一类的像素点构成的区域作为第二区域,选择像素点数量多的一类的像素点构成的区域作为第一区域。比如,在动态验证图中,A类别的像素值对应的像素点有100个,B类别的像素值对应的像素点有1000个,那么就将A类别中的像素值对应的像素点确定为第二区域,将B类别中的像素值对应的像素点确定为第一区域。In one embodiment, the terminal may select, as the second region, a region formed by a pixel of a certain type of pixel values and a second type of pixel value, and select a plurality of pixel points. A region of a type of pixel is used as the first region. For example, in the dynamic verification graph, the pixel value of the A category has 100 pixels, and the pixel value of the B category has 1000 pixels, then the pixel corresponding to the pixel value in the A category is determined as the first In the two regions, the pixel corresponding to the pixel value in the B category is determined as the first region.
在本实施例中,在获取了动态验证图中的各个像素值之后,对划分的像素值进行分类,从而能将图中与该像素值对应的像素点划分在第一区域或第二区域中,从而能够确定动态验证图中的第一区域和第二区域。In this embodiment, after the respective pixel values in the dynamic verification map are acquired, the divided pixel values are classified, so that the pixel points corresponding to the pixel values in the graph can be divided into the first region or the second region. Thus, the first region and the second region in the dynamic verification map can be determined.
在其中一个实施例中,第一区域和第二区域组成圆形或圆环,第二区域是扇形或扇环;获取第二区域相对于默认位置的偏离角度范围的步骤具体包括:从圆形或圆环的同心圆周上选取离散点;同心圆周的半径小于或等于圆形或圆环的半径;分别确定各离散点相对于 默认位置的偏离角度;获取各离散点所对应的圆形或圆环中的像素值;筛选所对应的像素值属于第二区域的离散点;在筛选出的离散点对应的偏离角度中确定最大偏离角度和最小偏离角度;将最大偏离角度和最小偏离角度分别作为第二区域的两条直线段各自相对于默认位置的偏离角度。In one embodiment, the first area and the second area form a circle or a ring, and the second area is a sector or a fan ring; the step of obtaining an off-angle range of the second area relative to the default position comprises: Or a discrete point on the concentric circumference of the ring; the radius of the concentric circle is less than or equal to the radius of the circle or the ring; respectively determine the deviation angle of each discrete point from the default position; obtain the circle or circle corresponding to each discrete point The pixel value in the ring; the pixel value corresponding to the filtering belongs to the discrete point of the second region; the maximum deviation angle and the minimum deviation angle are determined in the deviation angle corresponding to the selected discrete points; the maximum deviation angle and the minimum deviation angle are respectively taken as The angle between the two straight segments of the second region relative to the default position.
如图6所示,为一个实施例中获取动态验证图中的第二区域相对于默认位置的偏离角度的原理示意图。参照图6,圆形601由动态验证图中的第一区域6011和第二区域6012组成,同心圆周602是圆形601的同心圆,且半径小于圆形601的半径。终端可以以预设角度10°为间隔从同心圆周602上选取离散点6031、6032、603k、603(k+m)、603(k+n),确定各个离散点相对于默认位置的偏离角度分别为10°、20°、……、360°,获取同心圆周602上选取的离散点的像素值分别为A、……、A、B、B、……、B、B、A……A,并根据选取的离散点的像素值,从所有的离散点中筛选出像素值属于第二区域的离散点603k、603(k+m)、603(k+n)。在筛选出的离散点中,筛选出离散点对应的偏离角度中最大偏离角度(k+n)*10°和最小偏离角度k*10°那么这将得到的这两个角度分别作为第二区域的两条直线段各自相对于默认位置的偏离角度。As shown in FIG. 6, a schematic diagram of obtaining a deviation angle of a second region in a dynamic verification map from a default position is performed in one embodiment. Referring to Figure 6, the circle 601 is comprised of a first region 6011 and a second region 6012 in a dynamic verification map, the concentric circles 602 being concentric circles of the circle 601 and having a radius less than the radius of the circle 601. The terminal may select discrete points 6031, 6032, 603k, 603(k+m), 603(k+n) from the concentric circumference 602 at intervals of a preset angle of 10°, and determine deviation angles of the respective discrete points from the default position. For 10°, 20°, ..., 360°, the pixel values of the discrete points selected on the concentric circle 602 are respectively A, ..., A, B, B, ..., B, B, A...A, And according to the pixel values of the selected discrete points, the discrete points 603k, 603(k+m), 603(k+n) whose pixel values belong to the second region are selected from all the discrete points. In the selected discrete points, the maximum deviation angle (k+n)*10° and the minimum deviation angle k*10° of the deviation angle corresponding to the discrete points are selected, and then the two angles obtained as the second region are respectively obtained. The deviation of each of the two straight segments from the default position.
在其中一个实施例中,同心圆周的半径等于圆形或圆环的半径;获取各离散点所对应的圆形或圆环中的像素值,包括:在小于离散点所在同心圆周的、且穿过圆形或圆环的同心圆周上,选取与离散点位于相同半径的参考点;选取参考点所处位置处的像素值;将选取的像素值作为离散点所对应的圆形或圆环中的像素值。In one embodiment, the radius of the concentric circumference is equal to the radius of the circle or the ring; obtaining the pixel values in the circle or the ring corresponding to each discrete point, including: being smaller than the concentric circumference of the discrete point, and wearing On a concentric circumference of a circle or a circle, select a reference point that is at the same radius as the discrete point; select a pixel value at a position where the reference point is located; and select the selected pixel value as a circle or circle corresponding to the discrete point The pixel value.
在本实施例中,通过获取圆形内部的同心圆周上的离散点的像素值,能够避免从圆形的圆周上取像素值可能造成的取值模糊的影响,从而就可以根据像素值的分类准确地确定第二区域的两条直线段各自相对于默认位置的偏离角度。In this embodiment, by acquiring the pixel values of the discrete points on the concentric circumference inside the circle, it is possible to avoid the influence of the value blur caused by taking the pixel values from the circular circumference, so that the classification can be based on the pixel values. The angle of deviation of each of the two straight segments of the second region with respect to the default position is accurately determined.
在其中一个实施例中,动态验证图包括从待爬取网站获取的多个动态验证图;验证图处理方法还包括以下步骤:分别计算获取的各个动态验证图的哈希值;将各个动态验证图的哈希值和待转动角度对应存储。In one embodiment, the dynamic verification map includes a plurality of dynamic verification maps acquired from the website to be crawled; the verification map processing method further includes the following steps: respectively calculating the hash values of the acquired dynamic verification maps; The hash value of the graph is stored corresponding to the angle to be rotated.
动态验证图的哈希值是通过对图片内容进行加密运算得到的一组二进制值。不同内容的动态验证图的哈希值是不相同的。比如,若两个验证动态图的第一区域相同、第二区域也相同,但这两个验证动态图的第二区域的两条直线段相对于默认位置的偏离角度不一样,那么这两个验证动态图对应的哈希值也不相同。也就是说,每个动态验证图的哈希值可以用于唯一标识该动态验证图。The hash value of the dynamic verification graph is a set of binary values obtained by encrypting the image content. The hash values of the dynamic verification graphs of different content are not the same. For example, if the first regions of the two verification dynamic images are the same and the second regions are the same, but the two straight segments of the second region of the two verification dynamic images are different from each other with respect to the default position, then the two Verify that the hash value corresponding to the dynamic graph is also different. That is, the hash value of each dynamic verification graph can be used to uniquely identify the dynamic verification map.
具体地,终端获取待爬取网站的URL地址来对网站进行爬取,以获得该网站的资源。终端在爬取到该网站中需要验证登录的网页之后,就将该网页中的多个动态验证图下载下来,采用哈希算法获得下载的各个动态验证图的哈希值,采用验证图处理方法对下载的各个验证动态图进行处理,得到各个验证图对应的待转动角度,将每个验证动态图的哈希值和待转动角度对应存储。采用的哈希算法可以是MD4(Message-Digest Algorithm 4,信息摘要算法4)、MD5或SHS(Secure Hash Algorithm,安全散列算法)等。Specifically, the terminal acquires a URL address of the website to be crawled to crawl the website to obtain resources of the website. After the terminal crawls to the website and needs to verify the login webpage, the multiple dynamic verification maps in the webpage are downloaded, and the hash value of each dynamic verification graph downloaded is obtained by using a hash algorithm, and the verification graph processing method is adopted. The downloaded verification dynamic graphs are processed to obtain the to-be-rotated angles corresponding to the respective verification maps, and the hash values of each verification dynamic graph are correspondingly stored with the to-be-rotated angles. The hash algorithm used may be MD4 (Message-Digest Algorithm 4), MD5 or SHS (Secure Hash Algorithm).
在其中一个实施例中,终端也可在获取了待爬取网站的所有动态验证图后,将获取的所有动态验证图发送至服务器,由服务器采用验证图处理方法对各个验证图进行处理并获取相应的待转动角度、相应的哈希值,并将各个验证图的待转动角度和哈希值对应存储在本地。In one embodiment, the terminal may also send all the obtained dynamic verification maps to the server after acquiring all the dynamic verification maps of the website to be crawled, and the server processes and obtains each verification map by using the verification map processing method. The corresponding angle to be rotated, the corresponding hash value, and the corresponding rotation angle and the hash value of each verification map are stored locally.
在本实施例中,通过采用验证图处理方法获得各个验证图的待转动角度,并将能够唯一标识该动态验证图的哈希值与待转动角度对应存储,能够在遇到该验证动态图时根据哈希值索引到该图片的待转动角度。In this embodiment, by using the verification map processing method, the to-be-rotation angle of each verification map is obtained, and the hash value capable of uniquely identifying the dynamic verification map is stored corresponding to the to-be-rotated angle, and the verification dynamic graph can be encountered when the verification dynamic image is encountered. The angle to be rotated of the picture is indexed according to the hash value.
在其中一个实施例中,验证图处理方法还包括以下步骤:获取与待爬取网站相应的用户登录信息;向待爬取网站的服务器发起动态验证图拉取请求;动态验证图拉取请求用于指示服务器在响应动态验证图拉取请求时返回动态验证图;计算返回的动态验证图所对应的哈希值;查找与哈希值对应存储的待转动角度;将用户登录信息和查找到的待转动角度提交至服务器进行验证。In one embodiment, the verification map processing method further includes the steps of: acquiring user login information corresponding to the website to be crawled; initiating a dynamic verification drawing pull request to the server to be crawled; and dynamically verifying the pull request Instructing the server to return a dynamic verification map in response to the dynamic verification map pull request; calculating a hash value corresponding to the returned dynamic verification map; finding a to-be-rotated angle stored corresponding to the hash value; and logging the user login information and the searched The angle to be rotated is submitted to the server for verification.
用户登录信息是登录该网页所需要的身份信息。用户登录信息比如可以是用户标识以及相应的登录密码等。具体地,终端在获取到与待爬取网站相应的用户登录信息之后,就像待爬取的网站的服务器发起动态验证图拉取请求,服务器在接收到该请求时,随机返回一张动态验证图,终端在获取到该动态验证图后,就采用哈希算法来得到该验证动态图对应的哈希值,并依据存储的哈希值与待转动角度的对应关系,查找到该验证动态图对应的待转动角度,将查询到的待转到角度提交至服务器,服务器对提交的待转动角度进行验证。服务器若验证通过,终端就能够继续对该网站进行爬取,能够获取该网站的资源。User login information is the identity information required to log in to the web page. The user login information may be, for example, a user identifier and a corresponding login password. Specifically, after the terminal obtains the user login information corresponding to the website to be crawled, the server initiates a dynamic verification map pull request, just like the server of the website to be crawled, and the server randomly returns a dynamic verification when receiving the request. After obtaining the dynamic verification map, the terminal uses a hash algorithm to obtain a hash value corresponding to the verification dynamic graph, and finds the verification dynamic graph according to the correspondence between the stored hash value and the angle to be rotated. Corresponding to be rotated, the queried to-be-turned angle is submitted to the server, and the server verifies the submitted to-be-turned angle. If the server passes the verification, the terminal can continue to crawl the website and obtain the resources of the website.
在其中一个实施例中,验证图处理方法还包括以下步骤:获取静态验证图;从静态验证图中分割出多个带有字符的字符图片;对各字符图片进行归一化处理,得到具有相同像素矩阵的字符图片;获取经过归一化处理后的各个字符图片对应的特征向量;分别将各个字符图片对应的特征向量输入至训练好的分类模型中,输出得到相应的字符;将各个字符图片的字符拼合得到静态验证图对应的验证码。In one embodiment, the verification map processing method further includes the steps of: obtaining a static verification map; separating a plurality of character images with characters from the static verification image; and normalizing each character image to obtain the same a character picture of the pixel matrix; obtaining a feature vector corresponding to each character image after normalization; respectively inputting the feature vector corresponding to each character picture into the trained classification model, and outputting the corresponding character; The characters are combined to obtain the verification code corresponding to the static verification map.
静态验证图是需要待识别出验证图中的内容的验证图。静态验证图中的内容比如可以是由汉字、数字或字母组成的字符串等。像素矩阵是图片的像素规格。像素矩阵比如可以是16*16或64*64等。归一化处理是指对大小不同的图片进行调整,使得各个图片具有相同的像素矩阵。The static verification map is a verification map that needs to be identified in the verification map. The content in the static verification map may be, for example, a character string composed of Chinese characters, numbers or letters. The pixel matrix is the pixel specification of the picture. The pixel matrix can be, for example, 16*16 or 64*64. The normalization process refers to adjusting the pictures of different sizes so that each picture has the same pixel matrix.
具体地,终端可在获取了静态验证图后,对静态验证图进行预处理,比如降噪处理和灰度化处理;对预处理后的静态验证图中的字符串进行分割,分割出单个的字符,由于字符的大小不一样,因此切割出的字符图片大小也不一样;终端通过对切割出的字符图片进行归一化处理,得到具有相同像素矩阵的字符图片;获取经过归一化处理后的各个字符图片对应的特征向量,将获取的特征向量输入至训练好的分类器中,输出得到相应的字符;将各个字符图片对应的字符进行拼合得到对应该静态验证图的验证码。Specifically, after obtaining the static verification map, the terminal may perform pre-processing on the static verification map, such as noise reduction processing and grayscale processing; segment the character string in the pre-processed static verification graph, and segment the single Characters, because the size of the characters is different, so the size of the cut characters is different; the terminal normalizes the cut character pictures to obtain character pictures with the same pixel matrix; after normalization processing The feature vector corresponding to each character picture is input into the trained classifier, and the corresponding character is outputted; the characters corresponding to each character picture are combined to obtain a verification code corresponding to the static verification picture.
特征向量是经过归一化处理后的向量对应的特征值。如图7A所示,为一个实施例中 获取特征向量的原理示意图。参照图7A,对该图片进行灰度化处理、归一化处理后,使得该图具有16*16规格的像素矩阵。按照处理后的图片中每个像素块对应的像素值的分类,将该图片中256个像素块分别标记为1或0。比如,黑色对应的像素值标记为1,白色对应的像素值标记为0,按照像素块在图片中的顺序以及对应的标记值,得到相应的维度为256特征向量为。The feature vector is a feature value corresponding to the normalized vector. As shown in FIG. 7A, it is a schematic diagram of the principle of acquiring a feature vector in one embodiment. Referring to FIG. 7A, the picture is subjected to gradation processing and normalization processing so that the picture has a pixel matrix of 16*16 size. According to the classification of the pixel values corresponding to each pixel block in the processed picture, the 256 pixel blocks in the picture are respectively marked as 1 or 0. For example, the pixel value corresponding to black is marked as 1, and the pixel value corresponding to white is marked as 0. According to the order of the pixel block in the picture and the corresponding mark value, the corresponding dimension is 256 feature vector.
如图7B所示,为一个实施例中获取验证图的特征向量的原理示意图。参照图7B,将具有16*16像素矩阵的图片中的256个像素块划分为16个大像素块,每个大像素块包括一个4*4像素矩阵的16个小像素块,将每个大像素块中标记为1的像素块的数量,作为该大像素块对应的标记值,按照大像素块在图片中的顺序以及相应的标记值,得到相应的特征向量为:{1,4,3,0,5,1,2,3,4,13,10,3,0,6,4,0},维度为16。As shown in FIG. 7B, it is a schematic diagram of acquiring a feature vector of a verification map in one embodiment. Referring to FIG. 7B, 256 pixel blocks in a picture having a 16*16 pixel matrix are divided into 16 large pixel blocks, and each large pixel block includes 16 small pixel blocks of a 4*4 pixel matrix, each of which is large. The number of pixel blocks marked as 1 in the pixel block, as the tag value corresponding to the large pixel block, according to the order of the large pixel block in the picture and the corresponding tag value, the corresponding feature vector is: {1, 4, 3 , 0,5,1,2,3,4,13,10,3,0,6,4,0}, dimension is 16.
在本实施例中,通过对静态验证图进行处理后,获得相应的特征向量,利用训练好的分类器的分类能力,输出静态验证图中对应的各个字符,从而实现了对该静态验证图的有效识别。In this embodiment, after the static verification diagram is processed, the corresponding feature vector is obtained, and the corresponding character of the static verification diagram is output by using the classification ability of the trained classifier, thereby realizing the static verification diagram. Effective identification.
在其中一个实施例中,验证图处理方法还包括以下步骤:获取模型训练验证图及对应的验证字符;从模型训练验证图中分割出多个带有字符的字符图片;对各字符图片进行归一化处理,得到具有相同像素点的字符图片;获取经过归一化处理后的各字符图片所对应的特征向量;分别将各个字符图片对应的特征向量输入至分类模型中,获得各个字符图片对应的预测字符;依据预测字符与模型训练图对应的验证字符之间的差异,调整分类模型的模型参数,继续训练直至差异符合预设条件。In one embodiment, the verification map processing method further includes the steps of: acquiring a model training verification map and corresponding verification characters; and dividing a plurality of character images with characters from the model training verification map; The processing is performed to obtain a character picture having the same pixel point; the feature vector corresponding to each character image after normalization is obtained; and the feature vector corresponding to each character picture is respectively input into the classification model, and each character picture is correspondingly obtained. The predicted character; according to the difference between the predicted character and the verification character corresponding to the model training chart, the model parameters of the classification model are adjusted, and the training is continued until the difference meets the preset condition.
具体地,在使用分类器对输入的静态验证图的特征向量进行分类之前,需要预先对分类模型进行训练。终端可预先获取用于对分类模型进行训练的模型训练图以及相应的验证字符,对模型训练图进行降噪、灰度化、分割、归一化处理后获取各个模型训练图对应的特征向量,将特征向量输入至分类模型中,输出相应的预测字符,根据预测字符与验证字符之间的差异来调整分类模型的参数,继续对该分类模型进行训练,直至差异符合预设条件。Specifically, before classifying the feature vectors of the input static verification map using the classifier, it is necessary to train the classification model in advance. The terminal may obtain a model training map for training the classification model and corresponding verification characters in advance, and perform noise reduction, grayscale, segmentation, and normalization processing on the model training map to obtain feature vectors corresponding to the training charts of the respective models. The feature vector is input into the classification model, and the corresponding predicted characters are output. The parameters of the classification model are adjusted according to the difference between the predicted characters and the verification characters, and the classification model is continued to be trained until the difference meets the preset condition.
在本实施例中,通过获取模型训练验证图对分类模型进行训练,使得预测准确度达到预设条件后,再将训练好的分类器应用于静态验证图的识别过程,提高识别的可能性。In this embodiment, the classification model is trained by acquiring the model training verification map, so that the prediction accuracy reaches the preset condition, and then the trained classifier is applied to the identification process of the static verification diagram to improve the possibility of recognition.
如图8所示,在一个具体的实施例中,验证图处理方法具体包括以下步骤:As shown in FIG. 8, in a specific embodiment, the verification map processing method specifically includes the following steps:
S802,获取待爬取网站的多个动态验证图。S802. Acquire multiple dynamic verification maps of the website to be crawled.
S804,对于每个动态验证图,获取动态验证图中的各个像素值。S804. For each dynamic verification map, obtain each pixel value in the dynamic verification map.
S806,按照预设的第一区域像素值特征和第二区域像素值特征,将各个像素值划分为两类。S806. Divide each pixel value into two categories according to a preset first region pixel value feature and a second region pixel value feature.
S808,根据划分为两类的像素值确定第一区域和第二区域;第一区域和第二区域组成圆形或圆环,第二区域是扇形或扇环;动态验证图包括能从默认位置起围绕圆形或圆环的圆心转动的指针;默认位置处于第一区域。S808, determining a first area and a second area according to the pixel values divided into two types; the first area and the second area are circular or circular, and the second area is a sector or a fan ring; the dynamic verification map includes a default position A pointer that rotates around the center of a circle or ring; the default position is in the first area.
S810,从圆形或圆环的同心圆周上选取离散点;同心圆周的半径小于或等于圆形或圆环的半径。S810, selecting discrete points from a concentric circumference of a circle or a ring; a radius of the concentric circumference is less than or equal to a radius of a circle or a ring.
S812,分别确定各离散点相对于默认位置的偏离角度。S812, respectively determining a deviation angle of each discrete point from a default position.
S814,获取各离散点所对应的圆形或圆环中的像素值。S814. Acquire pixel values in a circle or a circle corresponding to each discrete point.
S816,筛选所对应的像素值属于第二区域的离散点。S816. The pixel value corresponding to the screening belongs to a discrete point of the second region.
S818,在筛选出的离散点对应的偏离角度中确定最大偏离角度和最小偏离角度。S818, determining a maximum deviation angle and a minimum deviation angle in the deviation angle corresponding to the selected discrete points.
S820,将最大偏离角度和最小偏离角度分别作为第二区域的两条直线段各自相对于默认位置的偏离角度。S820, the maximum deviation angle and the minimum deviation angle are respectively taken as the deviation angles of the two straight line segments of the second region with respect to the default position.
S822,根据偏离角度,确定第二区域相对于指针的偏离角度范围。S822. Determine a range of deviation angles of the second region from the pointer according to the deviation angle.
S824,从偏离角度范围中选取偏离角度。S824, selecting an off angle from the range of deviation angles.
S826,将选取的偏离角度作为指针的待转动角度;待转动角度用于将指针朝第二区域转动待转动角度以进行验证。S826, the selected deviation angle is used as the angle of the pointer to be rotated; the angle to be rotated is used to rotate the pointer toward the second area to be rotated for verification.
S828,分别计算获取的各个动态验证图的哈希值。S828, respectively calculating a hash value of each obtained dynamic verification map.
S830,将各个动态验证图的哈希值和待转动角度对应存储。S830, storing a hash value of each dynamic verification map and a to-be-rotated angle.
S832,获取与待爬取网站相应的用户登录信息。S832. Acquire user login information corresponding to the website to be crawled.
S834,向待爬取网站的服务器发起动态验证图拉取请求;动态验证图拉取请求用于指示服务器在响应动态验证图拉取请求时返回动态验证图。S834: Initiating a dynamic verification map pull request to the server to be crawled; the dynamic verification pull request is used to instruct the server to return a dynamic verification map when responding to the dynamic verification pull request.
S836,计算返回的动态验证图所对应的哈希值。S836: Calculate a hash value corresponding to the returned dynamic verification map.
S838,查找与哈希值对应存储的待转动角度。S838: Find a to-be-rotated angle stored corresponding to the hash value.
S840,将用户登录信息和查找到的待转动角度提交至服务器进行验证。S840, submitting the user login information and the found to-be-turned angle to the server for verification.
上述验证图处理方法,能够实现对待转动角度的验证图进行自动识别。在确定验证图中的第一区域和第二区域之后,获取第二区域相对于指针的默认位置的偏离角度,就能够确定第二区域相对于指针的偏离角度范围,从该偏离角度范围中选择一个角度,作为将指针的待转动角度,该待转动角度是第二区域中的角度,从而利用该待转动角度就能够模拟用户的转动操作,实现对该验证图的有效自动识别。The above verification map processing method can automatically recognize the verification map of the rotation angle. After determining the first region and the second region in the verification map, obtaining an off angle of the second region relative to the default position of the pointer, it is possible to determine a range of deviation angles of the second region from the pointer, and select from the range of the deviation angle An angle, as the angle to be rotated of the pointer, the angle to be rotated is an angle in the second region, so that the rotation operation of the user can be simulated by using the angle to be rotated, and effective automatic recognition of the verification map is realized.
应该理解的是,虽然图8的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图8中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowchart of FIG. 8 are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and the steps may be performed in other orders. Moreover, at least some of the steps in FIG. 8 may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be executed at different times, and the execution of these sub-steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of the other steps.
在其中一个实施例中,如图9所示,提供了一种验证图处理装置900,包括:动态验证图获取模块902、确定模块904、获取模块906、偏离角度选取模块908和验证模块910:In one embodiment, as shown in FIG. 9, a verification map processing apparatus 900 is provided, including: a dynamic verification map acquisition module 902, a determination module 904, an acquisition module 906, a deviation angle selection module 908, and a verification module 910:
动态验证图获取模块902,用于获取动态验证图。The dynamic verification map obtaining module 902 is configured to obtain a dynamic verification map.
确定模块904,用于确定动态验证图的第一区域和第二区域;第一区域包括能从默认位置起转动至第二区域的指针。The determining module 904 is configured to determine a first area and a second area of the dynamic verification map; the first area includes a pointer that can be rotated from the default position to the second area.
获取模块906,用于获取第二区域相对于默认位置的偏离角度范围。The obtaining module 906 is configured to obtain a range of deviation angles of the second area from the default position.
偏离角度选取模块908,从偏离角度范围中选取偏离角度。The deviation angle selection module 908 selects the deviation angle from the range of deviation angles.
验证模块910,用于将选取的偏离角度作为指针的待转动角度以进行验证。The verification module 910 is configured to use the selected off angle as the angle of the pointer to be rotated for verification.
在其中一个实施例中,确定模块904还用于获取动态验证图中的各个像素值;按照预设的第一区域像素值特征和第二区域像素值特征,将各个像素值划分为两类;根据划分为两类的像素值确定第一区域和第二区域。In one embodiment, the determining module 904 is further configured to obtain each pixel value in the dynamic verification graph; and divide each pixel value into two categories according to the preset first region pixel value feature and the second region pixel value feature; The first area and the second area are determined according to pixel values divided into two types.
在其中一个实施例中,第一区域和第二区域组成圆形或圆环,第二区域是扇形或扇环;获取模块906还用于从圆形或圆环的同心圆周上选取离散点;同心圆周的半径小于或等于圆形或圆环的半径;分别确定各离散点相对于默认位置的偏离角度;获取各离散点所对应的圆形或圆环中的像素值;筛选所对应的像素值属于第二区域的离散点;在筛选出的离散点对应的偏离角度中确定最大偏离角度和最小偏离角度;将最大偏离角度和最小偏离角度分别作为第二区域的两条直线段各自相对于默认位置的偏离角度。In one embodiment, the first area and the second area form a circle or a ring, and the second area is a sector or a fan ring; the acquisition module 906 is further configured to select discrete points from a circle or a concentric circumference of the ring; The radius of the concentric circle is less than or equal to the radius of the circle or the ring; respectively determine the deviation angle of each discrete point from the default position; obtain the pixel value in the circle or the ring corresponding to each discrete point; filter the corresponding pixel The value belongs to a discrete point of the second region; the maximum deviation angle and the minimum deviation angle are determined in the deviation angle corresponding to the selected discrete points; and the maximum deviation angle and the minimum deviation angle are respectively taken as the two straight line segments of the second region The deviation from the default position.
在其中一个实施例中,同心圆周的半径等于圆形或圆环的半径;获取模块906还用于在小于离散点所在同心圆周的、且穿过圆形或圆环的同心圆周上,选取与离散点位于相同半径的参考点;选取参考点所处位置处的像素值;将选取的像素值作为离散点所对应的圆形或圆环中的像素值。In one embodiment, the radius of the concentric circumference is equal to the radius of the circle or the ring; the acquisition module 906 is further configured to select on a concentric circumference that is smaller than the concentric circumference of the discrete point and that passes through the circle or the ring. The discrete points are located at the reference point of the same radius; the pixel value at the position where the reference point is located is selected; and the selected pixel value is taken as the pixel value in the circle or the ring corresponding to the discrete point.
如图10所示,在其中一个实施例中,动态验证图包括从待爬取网站获取的多个动态验证图;验证图处理装置900还包括哈希值计算模块1002和存储模块1004,哈希值计算模块1002用于分别计算获取的各个动态验证图的哈希值;存储模块1004用于将各个动态验证图的哈希值和待转动角度对应存储。As shown in FIG. 10, in one embodiment, the dynamic verification map includes a plurality of dynamic verification maps acquired from the website to be crawled; the verification map processing apparatus 900 further includes a hash value calculation module 1002 and a storage module 1004, and a hash The value calculation module 1002 is configured to separately calculate the hash values of the acquired dynamic verification maps. The storage module 1004 is configured to store the hash values of the dynamic verification maps corresponding to the to-be-rotated angles.
如图11所示,在其中一个实施例中,验证图处理装置900还包括用户登录信息获取模块1102、请求发起模块1104、查询模块1106、提交模块1108,其中:As shown in FIG. 11, in one embodiment, the verification map processing apparatus 900 further includes a user login information acquisition module 1102, a request initiation module 1104, a query module 1106, and a submission module 1108, where:
用户登录信息获取模块1102用于获取与待爬取网站相应的用户登录信息;请求发起模块1104用于向待爬取网站的服务器发起动态验证图拉取请求;动态验证图拉取请求用于指示服务器在响应动态验证图拉取请求时返回动态验证图;哈希值计算模块1004还用于计算返回的动态验证图所对应的哈希值;查询模块1106用于查找与哈希值对应存储的待转动角度;提交模块1108将用户登录信息和查找到的待转动角度提交至服务器进行验证。The user login information obtaining module 1102 is configured to obtain user login information corresponding to the website to be crawled; the request initiation module 1104 is configured to initiate a dynamic verification map pull request to the server to be crawled; the dynamic verification map pull request is used to indicate The server returns a dynamic verification map in response to the dynamic verification map pull request; the hash value calculation module 1004 is further configured to calculate a hash value corresponding to the returned dynamic verification map; the query module 1106 is configured to search for the storage corresponding to the hash value. The angle to be rotated; the submitting module 1108 submits the user login information and the found angle to be rotated to the server for verification.
在其中一个实施例中,验证图处理装置900还包括静态验证图获取模块、分割模块、归一化模块、特征向量获取模块、字符预测模块和拼合模块,其中:In one embodiment, the verification map processing apparatus 900 further includes a static verification map acquisition module, a segmentation module, a normalization module, a feature vector acquisition module, a character prediction module, and a split module, wherein:
静态验证图获取模块用于获取静态验证图;分割模块用于从静态验证图中分割出多个带有字符的字符图片;归一化模块用于对各字符图片进行归一化处理,得到具有相同像素矩阵的字符图片;特征向量获取模块用于获取经过归一化处理后的各个字符图片对应的特 征向量;字符预测模块用于分别将各个字符图片对应的特征向量输入至训练好的分类模型中,输出得到相应的字符;拼合模块用于将各个字符图片的字符拼合得到静态验证图对应的验证码。The static verification map acquisition module is configured to obtain a static verification map; the segmentation module is configured to segment a plurality of character images with characters from the static verification map; the normalization module is configured to normalize each character image to obtain a character picture of the same pixel matrix; the feature vector obtaining module is configured to obtain a feature vector corresponding to each character image after normalization; the character prediction module is configured to respectively input the feature vector corresponding to each character picture into the trained classification model In the output, the corresponding character is obtained; the splitting module is used to flatten the characters of each character picture to obtain the verification code corresponding to the static verification picture.
在其中一个实施例中,验证图处理装置900还包括训练模块,其中:静态验证图获取模块还用于获取模型训练验证图及对应的验证字符;分割模块还用于从模型训练验证图中分割出多个带有字符的字符图片;归一化模块还用于对各字符图片进行归一化处理,得到具有相同像素点的字符图片;特征向量获取模块还用于获取经过归一化处理后的各字符图片所对应的特征向量;字符预测模块还用于分别将各个字符图片对应的特征向量输入至分类模型中,获得各个字符图片对应的预测字符;训练模块用于依据预测字符与模型训练图对应的验证字符之间的差异,调整分类模型的模型参数,继续训练直至差异符合预设条件。In one embodiment, the verification map processing device 900 further includes a training module, wherein: the static verification map acquisition module is further configured to acquire a model training verification map and corresponding verification characters; and the segmentation module is further configured to segment from the model training verification map. a plurality of character pictures with characters; the normalization module is further used for normalizing each character picture to obtain a character picture having the same pixel point; the feature vector obtaining module is further configured to obtain after normalization processing The feature vector corresponding to each character picture; the character prediction module is further configured to input feature vectors corresponding to each character picture into the classification model respectively, and obtain predicted characters corresponding to each character picture; the training module is configured to train according to the predicted characters and models The difference between the verification characters corresponding to the figure, adjust the model parameters of the classification model, and continue training until the difference meets the preset conditions.
上述验证图处理装置900,能够实现对待转动角度的验证图进行自动识别。在确定验证图中的第一区域和第二区域之后,获取第二区域相对于指针的默认位置的偏离角度,就能够确定第二区域相对于指针的偏离角度范围,从该偏离角度范围中选择一个角度,作为将指针的待转动角度,该待转动角度是第二区域中的角度,从而利用该待转动角度就能够模拟用户的转动操作,实现对该验证图的有效自动识别。The verification map processing device 900 described above can automatically recognize the verification map of the rotation angle. After determining the first region and the second region in the verification map, obtaining an off angle of the second region relative to the default position of the pointer, it is possible to determine a range of deviation angles of the second region from the pointer, and select from the range of the deviation angle An angle, as the angle to be rotated of the pointer, the angle to be rotated is an angle in the second region, so that the rotation operation of the user can be simulated by using the angle to be rotated, and effective automatic recognition of the verification map is realized.
关于验证图处理装置的具体限定可以参见上文中对于验证图处理方法的限定,在此不再赘述。上述验证图处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific definition of the verification map processing device, reference may be made to the definition of the verification map processing method in the above, and details are not described herein again. The various modules in the verification map processing device described above may be implemented in whole or in part by software, hardware, and combinations thereof. Each of the above modules may be embedded in or independent of the processor in the computer device, or may be stored in a memory in the computer device in a software form, so that the processor invokes the operations corresponding to the above modules.
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图12所示。该计算机设备包括通过***总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性计算机可读存储介质、内存储器。该非易失性计算机可读存储介质存储有操作***和计算机可读指令。该内存储器为非易失性计算机可读存储介质中的操作***和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种验证图处理方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in FIG. The computer device includes a processor, memory, network interface, display screen, and input device connected by a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-transitory computer readable storage medium, an internal memory. The non-transitory computer readable storage medium stores an operating system and computer readable instructions. The internal memory provides an environment for the operation of an operating system and computer readable instructions in a non-transitory computer readable storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. The computer readable instructions are executed by a processor to implement a verification map processing method. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or may be a button, a trackball or a touchpad provided on the computer device casing. It can also be an external keyboard, trackpad or mouse.
本领域技术人员可以理解,图12中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。It will be understood by those skilled in the art that the structure shown in FIG. 12 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 of the computer device to which the solution of the present application is applied. The specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
在其中一个实施例中,提供了一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时实现本申请任意一个实 施例中提供的验证图处理方法的步骤。In one embodiment, a computer apparatus is provided comprising a memory and one or more processors having stored therein computer readable instructions that are executed by the processor to implement any of the embodiments of the present application The steps provided to validate the graph processing method.
在其中一个实施例中,提供了一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的验证图处理方法的步骤。In one of the embodiments, there is provided one or more non-transitory computer readable storage mediums storing computer readable instructions that, when executed by one or more processors, cause one or more processes The steps of the verification map processing method provided in any one of the embodiments of the present application are implemented.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一个或多个非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person skilled in the art can understand that all or part of the process of implementing the foregoing embodiment method can be completed by instructing related hardware by computer readable instructions, and the computer readable instructions can be stored in one or more non-easy The dysfunctional computer can be readable in a storage medium, which when executed, can include the flow of an embodiment of the methods described above. Any reference to a memory, storage, database or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of formats, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization chain. Synchlink DRAM (SLDRAM), Memory Bus (Rambus) Direct RAM (RDRAM), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM).
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, It is considered to be the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments are merely illustrative of several embodiments of the present application, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the invention. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the present application. Therefore, the scope of the invention should be determined by the appended claims.

Claims (20)

  1. 一种验证图处理方法,包括:A verification map processing method, comprising:
    获取动态验证图;Obtain a dynamic verification map;
    确定所述动态验证图的第一区域和第二区域;所述第一区域包括能从默认位置起转动至所述第二区域的指针;Determining a first region and a second region of the dynamic verification map; the first region including a pointer rotatable from a default position to the second region;
    获取所述第二区域相对于所述默认位置的偏离角度范围;Obtaining a range of deviation angles of the second area relative to the default position;
    从所述偏离角度范围中选取偏离角度;及Selecting a deviation angle from the range of deviation angles; and
    将选取的偏离角度作为所述指针的待转动角度以进行验证。The selected deviation angle is taken as the angle of the pointer to be rotated for verification.
  2. 根据权利要求1所述的方法,其特征在于,所述确定所述动态验证图的第一区域和第二区域包括:The method according to claim 1, wherein the determining the first area and the second area of the dynamic verification map comprises:
    获取动态验证图中的各个像素值;Get each pixel value in the dynamic verification graph;
    按照预设的第一区域像素值特征和第二区域像素值特征,将所述各个像素值划分为两类;及Dividing the respective pixel values into two categories according to a preset first region pixel value feature and a second region pixel value feature; and
    根据划分为两类的像素值确定第一区域和第二区域。The first area and the second area are determined according to pixel values divided into two types.
  3. 根据权利要求1所述的方法,其特征在于,所述第一区域和所述第二区域组成圆形或圆环,所述第二区域是扇形或扇环;所述获取所述第二区域相对于所述默认位置的偏离角度范围包括:The method according to claim 1, wherein the first area and the second area form a circle or a ring, the second area is a sector or a fan ring; and the acquiring the second area The range of deviation angles relative to the default position includes:
    从所述圆形或圆环的同心圆周上选取离散点;所述同心圆周的半径小于或等于所述圆形或圆环的半径;Selecting discrete points from the concentric circumference of the circle or ring; the radius of the concentric circumference is less than or equal to the radius of the circle or ring;
    分别确定各所述离散点相对于所述默认位置的偏离角度;Determining a deviation angle of each of the discrete points from the default position;
    获取各所述离散点所对应的圆形或圆环中的像素值;Obtaining pixel values in a circle or a circle corresponding to each of the discrete points;
    筛选所对应的像素值属于所述第二区域的离散点;Filtering corresponding pixel values belonging to discrete points of the second region;
    在筛选出的离散点对应的偏离角度中确定最大偏离角度和最小偏离角度;Determining a maximum deviation angle and a minimum deviation angle among the deviation angles corresponding to the selected discrete points;
    将所述最大偏离角度和最小偏离角度分别作为所述第二区域的两条直线段各自相对于所述默认位置的偏离角度;及Taking the maximum deviation angle and the minimum deviation angle as the deviation angles of the two straight line segments of the second region with respect to the default position, respectively;
    根据所述偏离角度确定所述第二区域相对于所述默认位置的偏离角度范围。Deviating a range of angles of the second region relative to the default position is determined based on the deviation angle.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述动态验证图包括从待爬取网站获取的多个动态验证图;The method according to any one of claims 1 to 3, wherein the dynamic verification map comprises a plurality of dynamic verification maps obtained from a website to be crawled;
    还包括:Also includes:
    分别计算获取的各个动态验证图的哈希值;及Calculating the hash values of the obtained dynamic verification graphs separately; and
    将所述各个动态验证图的哈希值和待转动角度对应存储。The hash value of each dynamic verification map is stored correspondingly to the angle to be rotated.
  5. 根据权利要求4所述的方法,其特征在于,还包括:The method of claim 4, further comprising:
    获取与所述待爬取网站相应的用户登录信息;Obtaining user login information corresponding to the website to be crawled;
    向所述待爬取网站的服务器发起动态验证图拉取请求;所述动态验证图拉取请求用于指示服务器在响应所述动态验证图拉取请求时返回动态验证图;Initiating a dynamic verification map pull request to the server of the website to be crawled; the dynamic verification map pull request is used to instruct the server to return a dynamic verification map when responding to the dynamic verification map pull request;
    计算返回的动态验证图所对应的哈希值;Calculating the hash value corresponding to the returned dynamic verification graph;
    查找与所述哈希值对应存储的待转动角度;及Finding a to-be-rotated angle stored corresponding to the hash value; and
    将所述用户登录信息和查找到的待转动角度提交至所述服务器进行验证。Submitting the user login information and the found to-be-turned angle to the server for verification.
  6. 根据权利要求1至3中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1 to 3, further comprising:
    获取静态验证图;Obtain a static verification map;
    从所述静态验证图中分割出多个带有字符的字符图片;Separating a plurality of character pictures with characters from the static verification map;
    对各所述字符图片进行归一化处理,得到具有相同像素矩阵的字符图片;Normalizing each of the character pictures to obtain a character picture having the same pixel matrix;
    获取经过归一化处理后的各个字符图片对应的特征向量;Obtaining a feature vector corresponding to each character image after normalization;
    分别将所述各个字符图片对应的特征向量输入至训练好的分类模型中,输出得到相应的字符;及The feature vectors corresponding to the respective character pictures are respectively input into the trained classification model, and the corresponding characters are outputted;
    将各个字符图片的字符拼合得到所述静态验证图对应的验证码。The characters of each character picture are stitched together to obtain a verification code corresponding to the static verification picture.
  7. 根据权利要求6所述的方法,其特征在于,还包括:The method of claim 6 further comprising:
    获取模型训练验证图及对应的验证字符;Obtaining a model training verification map and corresponding verification characters;
    从所述模型训练验证图中分割出多个带有字符的字符图片;Separating a plurality of character pictures with characters from the model training verification map;
    对各所述字符图片进行归一化处理,得到具有相同像素点的字符图片;Normalizing each of the character pictures to obtain a character picture having the same pixel point;
    获取经过归一化处理后的各字符图片所对应的特征向量;Obtaining a feature vector corresponding to each character image after normalization;
    分别将所述各个字符图片对应的特征向量输入至分类模型中,获得各个字符图片对应的预测字符;及And respectively input the feature vectors corresponding to the respective character pictures into the classification model to obtain predicted characters corresponding to the respective character pictures; and
    依据所述预测字符与所述模型训练图对应的验证字符之间的差异,调整所述分类模型的模型参数,继续训练直至所述差异符合预设条件。And adjusting the model parameters of the classification model according to the difference between the predicted characters and the verification characters corresponding to the model training map, and continuing training until the differences meet the preset conditions.
  8. 一种验证图处理装置,包括:A verification map processing device includes:
    动态验证图获取模块,用于获取动态验证图;a dynamic verification map obtaining module, configured to obtain a dynamic verification map;
    确定模块,用于确定所述动态验证图的第一区域和第二区域;所述第一区域包括能从默认位置起转动至所述第二区域的指针;a determining module, configured to determine a first area and a second area of the dynamic verification map; the first area includes a pointer rotatable from a default position to the second area;
    获取模块,用于获取所述第二区域相对于所述默认位置的偏离角度范围;An obtaining module, configured to acquire a range of deviation angles of the second area relative to the default position;
    偏离角度选取模块,用于从所述偏离角度范围中选取偏离角度;及a deviation angle selection module for selecting an off angle from the off angle range; and
    验证模块,用于将选取的偏离角度作为所述指针的待转动角度以进行验证。The verification module is configured to use the selected deviation angle as the angle of the pointer to be rotated for verification.
  9. 根据权利要求8所述的装置,其特征在于,所述确定模块还用于获取动态验证图中的各个像素值;按照预设的第一区域像素值特征和第二区域像素值特征,将所述各个像素值划分为两类;及根据划分为两类的像素值确定第一区域和第二区域。The device according to claim 8, wherein the determining module is further configured to acquire each pixel value in the dynamic verification map; according to the preset first region pixel value feature and the second region pixel value feature, Each pixel value is divided into two categories; and the first region and the second region are determined according to pixel values divided into two types.
  10. 根据权利要求8所述的装置,其特征在于,所述第一区域和所述第二区域组成圆形或圆环,所述第二区域是扇形或扇环;所述获取模块还用于从所述圆形或圆环的同心圆周上选取离散点;所述同心圆周的半径小于或等于所述圆形或圆环的半径;分别确定各所述离散点相对于所述默认位置的偏离角度;获取各所述离散点所对应的圆形或圆环中的像 素值;筛选所对应的像素值属于所述第二区域的离散点;在筛选出的离散点对应的偏离角度中确定最大偏离角度和最小偏离角度;将所述最大偏离角度和最小偏离角度分别作为所述第二区域的两条直线段各自相对于所述默认位置的偏离角度;及根据所述偏离角度确定所述第二区域相对于所述默认位置的偏离角度范围。The apparatus according to claim 8, wherein said first area and said second area form a circle or a ring, said second area is a sector or a fan ring; said acquisition module is further configured to a discrete point is selected on a concentric circumference of the circle or the ring; a radius of the concentric circle is less than or equal to a radius of the circle or the ring; and a deviation angle of each of the discrete points from the default position is determined respectively Obtaining a pixel value in a circle or a circle corresponding to each of the discrete points; filtering corresponding pixel values belonging to discrete points of the second region; determining a maximum deviation in a deviation angle corresponding to the selected discrete points An angle and a minimum deviation angle; respectively, the maximum deviation angle and the minimum deviation angle as deviation angles of the two straight line segments of the second region with respect to the default position; and determining the second according to the deviation angle The range of angular deviations of the region relative to the default position.
  11. 根据权利要求8所述的装置,其特征在于,所述同心圆周的半径等于圆形或圆环的半径;获取模块还用于在小于离散点所在同心圆周的、且穿过圆形或圆环的同心圆周上,选取与离散点位于相同半径的参考点;选取参考点所处位置处的像素值;将选取的像素值作为离散点所对应的圆形或圆环中的像素值。The apparatus of claim 8 wherein said concentric circumference has a radius equal to a radius of a circle or a ring; and the acquisition module is further configured to pass through a circle or circle at a concentric circumference less than the discrete point On the concentric circumference, select a reference point with the same radius as the discrete point; select the pixel value at the position where the reference point is located; and select the selected pixel value as the pixel value in the circle or the ring corresponding to the discrete point.
  12. 根据权利要求8所述的装置,其特征在于,所述动态验证图包括从待爬取网站获取的多个动态验证图,还包括:The device according to claim 8, wherein the dynamic verification map comprises a plurality of dynamic verification maps obtained from a website to be crawled, and further comprising:
    哈希值计算模块,用于分别计算获取的各个动态验证图的哈希值;及a hash value calculation module, configured to separately calculate a hash value of each obtained dynamic verification map; and
    存储模块,用于将各个动态验证图的哈希值和待转动角度对应存储。The storage module is configured to store the hash value of each dynamic verification map and the angle to be rotated.
  13. 根据权利要求12所述的装置,其特征在于,还包括:The device according to claim 12, further comprising:
    用户登录信息获取模块,用于获取与所述待爬取网站相应的用户登录信息;a user login information obtaining module, configured to acquire user login information corresponding to the website to be crawled;
    请求发起模块,用于向所述待爬取网站的服务器发起动态验证图拉取请求;所述动态验证图拉取请求用于指示服务器在响应所述动态验证图拉取请求时返回动态验证图;a request initiation module, configured to initiate a dynamic verification map pull request to the server of the website to be crawled; the dynamic verification map pull request is used to instruct the server to return a dynamic verification map when responding to the dynamic verification map pull request ;
    所述哈希值计算模块还用于计算返回的动态验证图所对应的哈希值;The hash value calculation module is further configured to calculate a hash value corresponding to the returned dynamic verification map;
    查询模块,用于查找与所述哈希值对应存储的待转动角度;及a query module, configured to find a to-be-rotated angle stored corresponding to the hash value; and
    提交模块,用于将所述用户登录信息和查找到的待转动角度提交至所述服务器进行验证。And a submitting module, configured to submit the user login information and the found to-be-turned angle to the server for verification.
  14. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executed by the one or more processors to cause the one or more The processors perform the following steps:
    获取动态验证图;Obtain a dynamic verification map;
    确定所述动态验证图的第一区域和第二区域;所述第一区域包括能从默认位置起转动至所述第二区域的指针;Determining a first region and a second region of the dynamic verification map; the first region including a pointer rotatable from a default position to the second region;
    获取所述第二区域相对于所述默认位置的偏离角度范围;Obtaining a range of deviation angles of the second area relative to the default position;
    从所述偏离角度范围中选取偏离角度;及Selecting a deviation angle from the range of deviation angles; and
    将选取的偏离角度作为所述指针的待转动角度以进行验证。The selected deviation angle is taken as the angle of the pointer to be rotated for verification.
  15. 根据权利要求14所述的计算机设备,其特征在于,所述第一区域和所述第二区域组成圆形或圆环,所述第二区域是扇形或扇环;所述处理器执行所述计算机可读指令时还执行以下步骤:The computer apparatus according to claim 14, wherein said first area and said second area form a circle or a circle, said second area is a sector or a fan ring; said processor executes said The following steps are also performed when the computer readable instructions:
    从所述圆形或圆环的同心圆周上选取离散点;所述同心圆周的半径小于或等于所述圆形或圆环的半径;Selecting discrete points from the concentric circumference of the circle or ring; the radius of the concentric circumference is less than or equal to the radius of the circle or ring;
    分别确定各所述离散点相对于所述默认位置的偏离角度;Determining a deviation angle of each of the discrete points from the default position;
    获取各所述离散点所对应的圆形或圆环中的像素值;Obtaining pixel values in a circle or a circle corresponding to each of the discrete points;
    筛选所对应的像素值属于所述第二区域的离散点;Filtering corresponding pixel values belonging to discrete points of the second region;
    在筛选出的离散点对应的偏离角度中确定最大偏离角度和最小偏离角度;Determining a maximum deviation angle and a minimum deviation angle among the deviation angles corresponding to the selected discrete points;
    将所述最大偏离角度和最小偏离角度分别作为所述第二区域的两条直线段各自相对于所述默认位置的偏离角度;及Taking the maximum deviation angle and the minimum deviation angle as the deviation angles of the two straight line segments of the second region with respect to the default position, respectively;
    根据所述偏离角度确定所述第二区域相对于所述默认位置的偏离角度范围。Deviating a range of angles of the second region relative to the default position is determined based on the deviation angle.
  16. 根据权利要求14所述的计算机设备,其特征在于,所述动态验证图包括从待爬取网站获取的多个动态验证图;所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 14, wherein the dynamic verification map comprises a plurality of dynamic verification maps acquired from a website to be crawled; and the processor further performs the following steps when the computer readable instructions are executed:
    分别计算获取的各个动态验证图的哈希值;及Calculating the hash values of the obtained dynamic verification graphs separately; and
    将所述各个动态验证图的哈希值和待转动角度对应存储。The hash value of each dynamic verification map is stored correspondingly to the angle to be rotated.
  17. 根据权利要求16所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer apparatus according to claim 16, wherein said processor further performs the following steps when said computer readable instructions are executed:
    获取与所述待爬取网站相应的用户登录信息;Obtaining user login information corresponding to the website to be crawled;
    向所述待爬取网站的服务器发起动态验证图拉取请求;所述动态验证图拉取请求用于指示服务器在响应所述动态验证图拉取请求时返回动态验证图;Initiating a dynamic verification map pull request to the server of the website to be crawled; the dynamic verification map pull request is used to instruct the server to return a dynamic verification map when responding to the dynamic verification map pull request;
    计算返回的动态验证图所对应的哈希值;Calculating the hash value corresponding to the returned dynamic verification graph;
    查找与所述哈希值对应存储的待转动角度;及Finding a to-be-rotated angle stored corresponding to the hash value; and
    将所述用户登录信息和查找到的待转动角度提交至所述服务器进行验证。Submitting the user login information and the found to-be-turned angle to the server for verification.
  18. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps:
    获取动态验证图;Obtain a dynamic verification map;
    确定所述动态验证图的第一区域和第二区域;所述第一区域包括能从默认位置起转动至所述第二区域的指针;Determining a first region and a second region of the dynamic verification map; the first region including a pointer rotatable from a default position to the second region;
    获取所述第二区域相对于所述默认位置的偏离角度范围;Obtaining a range of deviation angles of the second area relative to the default position;
    从所述偏离角度范围中选取偏离角度;及Selecting a deviation angle from the range of deviation angles; and
    将选取的偏离角度作为所述指针的待转动角度以进行验证。The selected deviation angle is taken as the angle of the pointer to be rotated for verification.
  19. 根据权利要求18所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:A storage medium according to claim 18, wherein said computer readable instructions, when executed by said processor, further perform the following steps:
    获取动态验证图中的各个像素值;Get each pixel value in the dynamic verification graph;
    按照预设的第一区域像素值特征和第二区域像素值特征,将所述各个像素值划分为两类;及Dividing the respective pixel values into two categories according to a preset first region pixel value feature and a second region pixel value feature; and
    根据划分为两类的像素值确定第一区域和第二区域。The first area and the second area are determined according to pixel values divided into two types.
  20. 根据权利要求18所述的存储介质,其特征在于,所述第一区域和所述第二区域 组成圆形或圆环,所述第二区域是扇形或扇环;所述计算机可读指令被所述处理器执行时还执行以下步骤:A storage medium according to claim 18, wherein said first area and said second area comprise a circle or a circle, said second area being a sector or a fan ring; said computer readable instructions being The processor also performs the following steps when executed:
    从所述圆形或圆环的同心圆周上选取离散点;所述同心圆周的半径小于或等于所述圆形或圆环的半径;Selecting discrete points from the concentric circumference of the circle or ring; the radius of the concentric circumference is less than or equal to the radius of the circle or ring;
    分别确定各所述离散点相对于所述默认位置的偏离角度;Determining a deviation angle of each of the discrete points from the default position;
    获取各所述离散点所对应的圆形或圆环中的像素值;Obtaining pixel values in a circle or a circle corresponding to each of the discrete points;
    筛选所对应的像素值属于所述第二区域的离散点;Filtering corresponding pixel values belonging to discrete points of the second region;
    在筛选出的离散点对应的偏离角度中确定最大偏离角度和最小偏离角度;Determining a maximum deviation angle and a minimum deviation angle among the deviation angles corresponding to the selected discrete points;
    将所述最大偏离角度和最小偏离角度分别作为所述第二区域的两条直线段各自相对于所述默认位置的偏离角度;及Taking the maximum deviation angle and the minimum deviation angle as the deviation angles of the two straight line segments of the second region with respect to the default position, respectively;
    根据所述偏离角度确定所述第二区域相对于所述默认位置的偏离角度范围。Deviating a range of angles of the second region relative to the default position is determined based on the deviation angle.
PCT/CN2019/070129 2018-05-07 2019-01-02 Verification picture processing method and apparatus, and computer device and storage medium WO2019214269A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810426893.4 2018-05-07
CN201810426893.4A CN108920929B (en) 2018-05-07 2018-05-07 Verification graph processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2019214269A1 true WO2019214269A1 (en) 2019-11-14

Family

ID=64403207

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/070129 WO2019214269A1 (en) 2018-05-07 2019-01-02 Verification picture processing method and apparatus, and computer device and storage medium

Country Status (2)

Country Link
CN (1) CN108920929B (en)
WO (1) WO2019214269A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113704532A (en) * 2020-11-25 2021-11-26 天翼智慧家庭科技有限公司 Method and system for improving recall rate of picture retrieval
CN113821786A (en) * 2020-06-18 2021-12-21 中移(苏州)软件技术有限公司 Verification code obtaining and displaying method and related device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108920929B (en) * 2018-05-07 2022-03-01 深圳壹账通智能科技有限公司 Verification graph processing method and device, computer equipment and storage medium
CN110309643B (en) * 2019-05-30 2021-08-06 南京苏宁加电子商务有限公司 Image verification method and system based on rotation matching
CN111079442B (en) 2019-12-20 2021-05-18 北京百度网讯科技有限公司 Vectorization representation method and device of document and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130167074A1 (en) * 2011-12-22 2013-06-27 Kyocera Corporation Device, method, and storage medium storing program
CN105825118A (en) * 2016-03-15 2016-08-03 上海斐讯数据通信技术有限公司 Terminal and method for unlocking based on compass and turntable
CN107358088A (en) * 2017-06-27 2017-11-17 北京亩田新农网络科技有限公司 Verification method and system based on clock
CN108920929A (en) * 2018-05-07 2018-11-30 深圳壹账通智能科技有限公司 Proof diagram processing method, device, computer equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100259475A1 (en) * 2009-04-09 2010-10-14 Chiung-Yau Huang Angle sensor-based pointer and a cursor control system with the same
CN104517094A (en) * 2013-09-30 2015-04-15 阿里巴巴集团控股有限公司 Identity authentication method and identity authentication device
CN105844140A (en) * 2016-03-21 2016-08-10 国家电网公司 Website login brute force crack method and system capable of identifying verification code
CN106980641B (en) * 2017-02-09 2020-01-21 上海媒智科技有限公司 Unsupervised Hash quick picture retrieval system and unsupervised Hash quick picture retrieval method based on convolutional neural network
CN107085730A (en) * 2017-03-24 2017-08-22 深圳爱拼信息科技有限公司 A kind of deep learning method and device of character identifying code identification

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130167074A1 (en) * 2011-12-22 2013-06-27 Kyocera Corporation Device, method, and storage medium storing program
CN105825118A (en) * 2016-03-15 2016-08-03 上海斐讯数据通信技术有限公司 Terminal and method for unlocking based on compass and turntable
CN107358088A (en) * 2017-06-27 2017-11-17 北京亩田新农网络科技有限公司 Verification method and system based on clock
CN108920929A (en) * 2018-05-07 2018-11-30 深圳壹账通智能科技有限公司 Proof diagram processing method, device, computer equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113821786A (en) * 2020-06-18 2021-12-21 中移(苏州)软件技术有限公司 Verification code obtaining and displaying method and related device
CN113821786B (en) * 2020-06-18 2024-05-10 中移(苏州)软件技术有限公司 Verification code obtaining and displaying method and related device
CN113704532A (en) * 2020-11-25 2021-11-26 天翼智慧家庭科技有限公司 Method and system for improving recall rate of picture retrieval
CN113704532B (en) * 2020-11-25 2024-04-26 天翼数字生活科技有限公司 Method and system for improving picture retrieval recall rate

Also Published As

Publication number Publication date
CN108920929B (en) 2022-03-01
CN108920929A (en) 2018-11-30

Similar Documents

Publication Publication Date Title
WO2019214269A1 (en) Verification picture processing method and apparatus, and computer device and storage medium
US10740647B2 (en) Detecting objects using a weakly supervised model
CN109285105B (en) Watermark detection method, watermark detection device, computer equipment and storage medium
JP6633188B2 (en) Image-based CAPTCHA challenge
US20190278994A1 (en) Photograph driven vehicle identification engine
US11074434B2 (en) Detection of near-duplicate images in profiles for detection of fake-profile accounts
US10891476B2 (en) Method, system, and neural network for identifying direction of a document
WO2016177259A1 (en) Similar image recognition method and device
KR102294574B1 (en) Face Recognition System For Real Image Judgment Using Face Recognition Model Based on Deep Learning
Owayjan et al. Face recognition security system
CN109643318B (en) Content-based searching and retrieval of brand images
EP4120106A1 (en) Identity verification method and apparatus based on artificial intelligence, and computer device and storage medium
CN107886082B (en) Method and device for detecting mathematical formulas in images, computer equipment and storage medium
US10878024B2 (en) Dynamic thumbnails
US20180061052A1 (en) Techniques for selecting objects in images
US11086977B2 (en) Certificate verification
CN112613506A (en) Method and device for recognizing text in image, computer equipment and storage medium
CN111832561B (en) Character sequence recognition method, device, equipment and medium based on computer vision
CN112733901A (en) Structured action classification method and device based on federal learning and block chain
CN109564636B (en) Training one neural network using another neural network
Tang et al. The impact of padding on image classification by using pre-trained convolutional neural networks
CN111680181A (en) Abnormal object identification method and terminal equipment
CN112686847B (en) Identification card image shooting quality evaluation method and device, computer equipment and medium
US11734908B2 (en) Randomly generated blobs to improve object-detection training for framed video content
JP6805903B2 (en) Display difference detection programs, devices, and methods

Legal Events

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

Ref document number: 19798943

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 19798943

Country of ref document: EP

Kind code of ref document: A1