A method and apparatus for authentication
By introducing complex object image filling rules into image CAPTCHAs, users fill in candidate object images and satisfy preset mathematical rules, which solves the problem of low security of image CAPTCHAs, improves the anti-scraping effect, and reduces the risk of data leakage and server load.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CORP LTD
- Filing Date
- 2022-07-06
- Publication Date
- 2026-05-19
AI Technical Summary
Image verification codes in existing technologies have low security and are easily cracked by web crawlers, leading to server-side data leakage and increased load pressure.
A complex image verification method is adopted. A first verification image containing X image regions is sent, where Y regions contain object images and Z regions are blank image regions. The user fills in the candidate object images to generate a second verification image, and verification is performed according to preset mathematical rules to ensure that the number of object images at N preset positions meets the rules.
This increases the difficulty of cracking the web crawler, reduces the probability of server-side data being illegally obtained, decreases the number of malicious accesses, and alleviates server load pressure.
Smart Images

Figure CN115270099B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of information security technology, specifically relating to a verification method and apparatus. Background Technology
[0002] Currently, more and more applications are gradually moving towards big data. In the big data environment, data acquisition is crucial. However, with the rise of web scraping technology, server-side information faces significant security challenges. Although some sensitive information, such as images and videos, is stored on the server, web scraping programs can still obtain most of the data, causing many security risks. For example, if a large amount of data from a commercial company is scraped and analyzed by web scraping programs, it may affect the company's business competitiveness; if personal information is scraped and analyzed by web scraping programs, it may lead to the leakage of personal privacy and affect personal life; furthermore, some web scraping programs can make multiple requests to the server in a short period of time, putting enormous load pressure on the server and reducing the server's response efficiency.
[0003] To protect server-side data from unauthorized access and reduce server load, anti-crawler strategies are necessary. Currently, widely used anti-crawler methods typically employ various interactive CAPTCHAs, such as simple object image CAPTCHAs or text image CAPTCHAs. However, these types of CAPTCHAs can be cracked using image matching or Optical Character Recognition (OCR) technologies, and their security needs improvement. Summary of the Invention
[0004] The purpose of this application is to provide a verification method and apparatus to solve the problem of low security of image verification codes in the prior art.
[0005] In a first aspect, embodiments of this application provide a verification method applied to a server, the method comprising:
[0006] Send image verification information to the terminal device; wherein, the image verification information includes: a first verification image and candidate object images; the first verification image includes: X image regions, and each of the Y image regions includes a set of object images, and Z image regions are blank image regions; X = Y + Z, X is greater than or equal to 2, and Y and Z are both greater than or equal to 1 and less than X;
[0007] The receiving terminal device sends a second verification image; wherein the second verification image is generated by the user filling the blank image area in the first verification image with a candidate object image;
[0008] The second verification image is verified according to preset rules; wherein, the preset rules include: the number of object images in the target image region at N preset positions satisfies a preset mathematical rule; N is greater than or equal to 2 and less than or equal to X;
[0009] If the object images within the target image regions at N preset locations in the second verification image satisfy the preset rules, the verification is determined to be successful; otherwise, the verification is determined to be unsuccessful.
[0010] Secondly, embodiments of this application provide a verification method applied to a terminal device, the method comprising:
[0011] The system receives image verification information sent by the server; wherein the image verification information includes: a first verification image and candidate object images; the first verification image includes: X image regions, and each of the Y image regions includes a set of object images, and Z image regions are blank image regions; X = Y + Z, X is greater than or equal to 2, and Y and Z are both greater than or equal to 1 and less than X;
[0012] A second verification image is generated based on the user's selection of candidate object images and the filling operation that fills the blank image area with the selected candidate object images;
[0013] The second verification image is sent to the server so that the server verifies the second verification image according to a preset rule; wherein the preset rule includes: the number of object images in the target image area at N preset locations satisfies a preset mathematical rule; N is greater than or equal to 2 and less than or equal to X.
[0014] Thirdly, embodiments of this application provide a verification device applied to a server, the device comprising:
[0015] The first sending module is used to send image verification information to the terminal device; wherein, the image verification information includes: a first verification image and candidate object images; the first verification image includes: X image regions, and each of the Y image regions includes a set of object images, and Z image regions are blank image regions; X = Y + Z, X is greater than or equal to 2, and Y and Z are both greater than or equal to 1 and less than X;
[0016] The first receiving module is used to receive a second verification image sent by the terminal device; wherein the second verification image is generated by the user filling the blank image area in the first verification image with a candidate object image;
[0017] The verification module is used to verify the second verification image according to preset rules; wherein, the preset rules include: the number of object images in the target image area at N preset positions satisfies a preset mathematical rule; N is greater than or equal to 2 and less than or equal to X;
[0018] The determination module is used to determine that the verification is successful if the object images in the target image areas at N preset positions in the second verification image meet the preset rules; otherwise, it determines that the verification fails.
[0019] Fourthly, embodiments of this application provide a verification device applied to a server, the device comprising:
[0020] The second receiving module is used to receive image verification information sent by the server; wherein, the image verification information includes: a first verification image and candidate object images; the first verification image includes: X image regions, and each of the Y image regions includes a set of object images, and Z image regions are blank image regions; X = Y + Z, X is greater than or equal to 2, and Y and Z are both greater than or equal to 1 and less than X;
[0021] The second generation module is used to generate a second verification image based on the user's selection operation of the candidate object image and the filling operation of filling the selected candidate object image into the blank image area.
[0022] The second sending module is used to send the second verification image to the server so that the server verifies the second verification image according to a preset rule; wherein the preset rule includes: the number of object images in the target image area at N preset locations satisfies a preset mathematical rule; N is greater than or equal to 2 and less than or equal to X.
[0023] Fifthly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions being executed by the processor to implement the steps in the verification method as described in the first or second aspect.
[0024] In a sixth aspect, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps in the verification method as described in the first or second aspect.
[0025] In this embodiment, the image filling rules of the image verification code are complex, requiring that the number of object images within a specific image area meets a preset mathematical rule. Normal users can deduce the filling scheme for blank image areas by observing the image, but web crawlers find it difficult to deduce the filling pattern from image pixel values. Therefore, the verification scheme provided in this embodiment can increase the difficulty of cracking web crawlers, enhance the anti-crawler defense effect, effectively curb web crawling behavior, thereby reducing the probability of server data being illegally obtained, and also reducing the number of malicious accesses and alleviating the server load pressure. Attached Figure Description
[0026] Figure 1 A flowchart illustrating a verification method applied to a server provided in an embodiment of this application;
[0027] Figure 2 A schematic diagram of the first verification image provided in an embodiment of this application;
[0028] Figure 3 A schematic diagram illustrating an example of an image region arrangement provided in an embodiment of this application;
[0029] Figure 4 A schematic diagram of the second verification image provided in an embodiment of this application;
[0030] Figure 5 This is a schematic diagram illustrating the interaction between a terminal device and a server provided in an embodiment of this application.
[0031] Figure 6 A schematic diagram of a 3x3 matrix provided in an embodiment of this application;
[0032] Figure 7 A flowchart illustrating an example of image verification code generation provided in this application embodiment;
[0033] Figure 8 A flowchart illustrating an example of image verification code verification provided in this application embodiment;
[0034] Figure 9 A flowchart illustrating a verification method applied to a terminal device provided in an embodiment of this application;
[0035] Figure 10 A schematic block diagram of a verification device applied to a server provided in an embodiment of this application;
[0036] Figure 11 This is a schematic block diagram of a verification device applied to a terminal device, as provided in an embodiment of this application. Detailed Implementation
[0037] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0038] It should be understood that the phrase "one embodiment" or "an embodiment" in the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0039] In the various embodiments of this application, it should be understood that the sequence number of the steps does not imply an absolute order of execution. The execution order of each step should be determined by its function and internal logic. Therefore, the sequence number of each step should not constitute an absolute limitation on the implementation process of the embodiments of this application.
[0040] The verification method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0041] According to one aspect of the embodiments of this application, a verification method is provided, which is applied to a server.
[0042] like Figure 1 As shown, the verification method may include:
[0043] Step 101: Send image verification information to the terminal device.
[0044] The image verification information mentioned here may include: a first verification image (i.e., an image verification code) and candidate object images.
[0045] The first verification image includes X image regions, where each of the Y image regions contains a set of object images, and Z image regions are blank image regions. X, Y, and Z are all integers greater than 0, X = Y + Z, X is greater than or equal to 2, and Y and Z are both greater than or equal to 1 and less than X. For example, ... Figure 2 As shown, the first verification image 200 includes nine image regions 201. Eight of the nine image regions 201 contain a set of object images, and one image region 201 does not contain any object images and is a blank image region. Within an image region, all object images constitute a set of object images, and a set of object images includes at least one object image, such as... Figure 2The image region 201 shown in the lower left corner contains eight flower images that form a group of object images, with each flower image representing a separate object image. It should be noted that... Figure 2 This is for illustrative purposes only and is not intended to limit the specific embodiments of this application. For example, the arrangement of image regions is not limited to... Figure 2 As shown, other arrangements are also possible, such as... Figure 3 As shown, when X = 3, the image region can be arranged as shown in (A), (B), or (C); for example, when the number of object images in the image region is at least two, the object images in the image region can be... Figure 2 The same object image shown can also be different object images; for example, the shape of the image area is not limited to rectangles, but can also be circles, ellipses, triangles, etc.
[0046] The candidate object image is an object image that the user can select to fill in the blank image area of the first verification image.
[0047] Step 102: Receive the second verification image sent by the terminal device.
[0048] The second verification image described here is a verification code generated after the user fills the blank image areas in the first verification image with candidate object images. Compared to the first verification image, the second verification image fills the blank image areas in the first verification image with object images, while the object images in other image areas remain the same. For example... Figure 2 As shown, in the first verification image 200, the image region 201 in the third row and second column from top to bottom is a blank image region, while as... Figure 4 The second verification image 400 shown is a... Figure 2 The first verification image 200 is generated by filling the blank image region with the object image. Figure 4 It can be seen that, compared with the first verification image 200, the image region 401 in the third row and second column from top to bottom has an added image of a crown, while the object images in the other image regions of the two are the same.
[0049] In this embodiment, after receiving the image verification information sent by the server, the terminal device 501 can display the image verification information, such as through... Figure 5The image display model 5011 displays image verification information, namely, a first verification image and candidate object images, for the user to view. The user can select an object image from the candidate object images, and then fill the blank image area with the selected object image. When the terminal device detects that the image filling is complete (e.g., when the "OK" button is triggered), the terminal device can send the generated second verification image to the server for verification.
[0050] It should be noted that the candidate object images used to fill the blank image areas in the first verification image can be some or all of the candidate object images provided by the server to the terminal device.
[0051] Step 103: Verify the second verification image according to the preset rules.
[0052] The preset rules may include: the number of object images in the target image area at N preset locations satisfies a preset mathematical rule, where N is greater than or equal to 2 and less than or equal to X.
[0053] The preset mathematical rules mentioned here may include, but are not limited to: the sum of the number of object images is a preset value, the difference of the number of object images is a preset value, or the number of object images is an arithmetic sequence, etc.
[0054] The preset position mentioned here can be a coordinate position or a row and column position (such as row and column number). This preset position is determined in advance by the server before sending the image verification information to the terminal device. The N target image regions include at least: the image region corresponding to the blank image region in the first verification image, that is, the image region located at the same position as the blank image region in the first verification image.
[0055] After receiving the second verification image sent by the terminal device, the server can verify the second verification image to determine whether the object images within the target image regions at N preset positions in the second verification image meet preset rules. Specifically, for example... Figure 5 As shown, server 502 can first perform image recognition on the second verification image using image recognition model 5022, identifying the position of each image region in the second verification image and the number of object images within each image region. Then, verification model 5023 verifies the second verification image based on the position of each image region in the second verification image and the number of object images within each image region. For example, image recognition model 5022... Figure 4 Image recognition is performed on the second verification image 400 shown. First, the position of each image region 401 in the second verification image is determined. Then, the number of object images in each image region 401 is stored in a 3*3 matrix, such as... Figure 6As shown. Then, the verification module 5023 verifies the 3x3 matrix to determine whether the object images within the target image regions at N preset positions meet the preset rules.
[0056] Step 104: If the object images in the target image regions at N preset positions in the second verification image meet the preset rules, the verification is confirmed as successful; otherwise, the verification is confirmed as failed.
[0057] If the object images within the N target image regions of the second verification image meet the preset rules, the server determines that the verification is successful and can send a successful verification feedback message to the terminal device to inform the user. At the same time, the terminal device can perform user login operations or information retrieval operations, etc. If the object images within the N target image regions of the second verification image do not meet the preset rules, the server determines that the verification has failed and can send a failed verification feedback message to the terminal device to inform the user. The terminal device can then refuse to perform user login operations or information retrieval operations, etc.
[0058] by Figure 4 Taking the second verification image 400 as an example, assuming the preset rule is: if the sum of the number of object images in the three image regions in the third row from top to bottom is 15, then it can be determined that... Figure 4 Is the sum of the number of object images in the three image regions 401 in the third row from the top of the second verification image 400 shown 15? Figure 4 It can be seen that the number of object images of 401 in the three image regions of the third row from the top are 8, 1, and 6 from left to right, and the sum of the numbers is 15, so the verification is successful.
[0059] In this embodiment, the verification rules for image verification codes are complex, requiring that the number of object images within the image area at a preset location must meet a preset mathematical rule. This makes the image filling rules for image verification codes more complex. Normal users can deduce the filling scheme for blank image areas by observing the image, but web crawlers find it difficult to deduce the filling pattern from image pixel values. Therefore, the verification scheme provided in this embodiment can increase the difficulty of cracking web crawlers, enhance the anti-crawler defense effect, effectively curb web crawling behavior, thereby reducing the probability of server-side data being illegally obtained, and also reducing the number of malicious accesses and alleviating the load pressure on the server.
[0060] Preferably, the image verification information may also include a preset rule prompt. The terminal device displays the prompt while displaying the first verification image and the candidate object image, so that the user can view it and thus make it easier for the user to fill in the object image in the blank image area.
[0061] For example, with Figure 2 Taking the first verification image shown as an example, assuming the preset rule is: the sum of the number of object images in the three image regions in the third row from top to bottom is 15, then the prompt message could be "Please make the sum of the number of object images in the three image regions in the third row 15". According to the prompt message, the user can first determine that the number of object images in the first image region 201 from left to right in the third row is 8, the number of object images in the third image region 201 from left to right in the third row is 6, and then deduce that the number of object images in the second image region 201 from left to right in the third row should be 1. Then, an object image can be selected from the candidate object images to fill the second image region 201.
[0062] Optionally, candidate object images can be displayed around the first verification image, such as above, below, to the left, or to the right. Preferably, a corresponding candidate object image can be set for each blank image area, that is, an association is established between the candidate object image and the blank image area. In this way, when displaying candidate object images, they can be displayed next to their corresponding blank image areas for the user to select.
[0063] As an optional embodiment, the preset rule may also include: object images within each target image region belong to the same category.
[0064] In this embodiment of the application, the difficulty of cracking the image verification code can be further increased. On the basis of satisfying the preset mathematical rules among the number of object images in the target image area at N preset locations, a rule is added that the object images in each target image area belong to the same category.
[0065] Optionally, images of objects of the same category can be images of different objects belonging to the same category, or they can be images of the same object (images of the same object must belong to the same category).
[0066] Optionally, based on the aforementioned preset rules (i.e., the object images in each target image region belong to the same category), the preset rules may also include: the object images in different target image regions belong to different categories, so as to further increase the difficulty of cracking the image verification code.
[0067] As an optional embodiment, the preset rules may further include: object images within each target image region are identical, and object images within different target image regions are different. For example... Figure 2 and Figure 4 As shown, the object images within each image region are the same, but the object images within different image regions are different from each other.
[0068] As an optional embodiment, before step 101: sending image verification information to the terminal device, the verification method may further include:
[0069] Step A1: Receive the verification information retrieval request sent by the terminal device.
[0070] Step A2: Generate image verification information based on the verification information retrieval request.
[0071] For example, such as Figure 5 As shown in this embodiment, after receiving a verification information acquisition request sent by the terminal device 501, the server 502 can generate image verification information through the image generation model 5021, and then send the image verification information to the terminal device 501. The specific generation process of the image verification information is described below.
[0072] Optionally, step A2: generating image verification information based on the verification information acquisition request may include:
[0073] Step A21: Obtain a first preset number of object images based on the verification information acquisition request.
[0074] For example, such as Figure 5 As shown, after receiving the verification information acquisition request sent by the terminal device 501, the server 502 can send the request to the image generation model 5021. After receiving the request, the image generation model 5021 randomly selects a first preset number of object images from the image library 5024.
[0075] Step A22: Fill the first preset number of object images into X blank image areas in the first image according to preset rules to obtain the second image, and record the positions of the image areas involving the preset rules to obtain N preset positions.
[0076] After obtaining a first preset number of object images, the server can fill the first preset number of object images into X blank image areas in the first image according to preset rules to obtain a second image, and record the position of the image area (hereinafter referred to as the target image area) where the object images that meet the preset rules are located to obtain the preset position.
[0077] When the number of target image regions is less than X, object images in other image regions can be randomly filled in. These image regions can act as interference, thereby increasing the difficulty of cracking the web crawler.
[0078] Step A23: Clear the object images in the Z image regions of the second image to obtain the first verification image.
[0079] Among them, Z image regions are all image regions at preset positions.
[0080] In this embodiment of the application, the server can randomly select Z preset positions in the second image, clear the object images in them, and make the image area a blank image area, thereby obtaining the first verification image.
[0081] It should be noted that the number of image regions of the cleared object image should not affect the reasoning of the preset rules based on the first verification image.
[0082] Step A24: Set the object images that fill the Z image regions from the first preset number of object images and the second preset number of interfering object images as candidate object images.
[0083] In this embodiment, while clearing the object images in the Z image regions of the second image, the object images that fill these Z image regions from a first preset number of object images can be set as candidate object images. To increase the difficulty of crawling and cracking, a certain number of interfering object images can also be set as candidate object images. The second preset number is greater than or equal to 0, meaning that interfering object images may or may not be present.
[0084] Step A25: Generate image verification information based on the first verification image and the candidate object image.
[0085] Finally, the server can generate image verification information based on the first verification image and the candidate object image.
[0086] Among them, steps A21 to A25 mentioned above can all be performed by Figure 5 The image generation module 5012 is implemented in the system.
[0087] Optionally, the preset rule further includes the following: if the object images in each target image region are the same, and the object images in different target image regions are different, the first preset number of object images can be X different object images.
[0088] Step A24: Filling the first preset number of object images into X blank image regions in the first image according to preset rules to obtain the second image may include:
[0089] Step A241: Determine the one-to-one correspondence between the X different object images and the X blank image regions in the first image.
[0090] Among them, the object images corresponding to different blank image regions are different.
[0091] Step A242: Determine the required number of object images in each blank image area according to the preset rules.
[0092] Step A243: Based on the correspondence, fill the corresponding blank image areas with X different categories of object images in the required quantity to obtain the second image.
[0093] In this embodiment of the application, the preset rule further includes the following: when the object images in each target image region are the same, and the object images in different target image regions are different, the server can fill X different object images into different blank image regions in the first image. To this end, the server can first determine the one-to-one correspondence between the X different object images and the X blank image regions in the first image; then, according to the preset rule, determine the required number of object images in each blank image region; finally, according to the one-to-one correspondence between the X different object images and the X blank image regions, fill the X different object images into the corresponding blank image regions according to the required number, so as to achieve the different object images in different target image regions.
[0094] Optionally, the preset rules may also include: object images within each target image region belong to the same category, and object images within different target image regions belong to different categories.
[0095] Step A24: Filling the first preset number of object images into X blank image regions in the first image according to preset rules to obtain the second image may include:
[0096] Step A244: Determine the required number of object images in each blank image area according to the preset rules.
[0097] Step A245: Determine the object images belonging to the same category among the first preset number of object images.
[0098] Step A246: Based on the number of object images of the same category and the number of object images required for each blank image area, fill the corresponding blank image areas with object images of the same category to obtain the second image.
[0099] In this embodiment of the application, the preset rules further include: the object images in each target image area belong to the same category, and the object images in different target image areas belong to different categories. The server can first determine the required number of object images in each blank image area according to the preset rules, then determine the object images belonging to the same category among the first preset number of object images, and finally fill the corresponding blank image area with object images of the same category according to the number of object images of the same category and the required number of object images for each blank image area to obtain the second image.
[0100] It should be noted that when the server obtains the first preset number of object images, it can first determine the filling strategy of the object images, such as the required number of object images in each image area. Thus, when obtaining object images, the server can obtain the number of object images of each type according to the requirements.
[0101] As a preferred embodiment, such as Figure 2 As shown, the first verification image may include 9 image regions (i.e., X=9), arranged in a 3x3 grid. The preset rules may further include: the number of object images within the 9 target image regions arranged in a 3x3 grid satisfies 3x3 arithmetic, that is: the numbers in the nine grids are 9 different numbers from 1 to 9, and the sum of the numbers in each row, each column, and each diagonal grid is equal to 15. In other words, in this embodiment, the image verification code can be verified using the 3x3 arithmetic rule. 3x3 arithmetic is relatively complex, thus increasing the difficulty of cracking the image verification code. Figure 4 and Figure 6 As shown, for nine image regions 401 arranged in a 3x3 grid, the number of object images in the nine image regions is nine different values from 1 to 9, and the sum of the number of object images in the three image regions in each row is equal to 15, the sum of the number of object images in the three image regions in each column is equal to 15, and the sum of the number of object images in the three image regions crossed by each diagonal is equal to 15.
[0102] Based on this, the preset rules may also include: the object images in each target image region belong to the same category, and the object images in different target image regions belong to different categories; or the preset rules may also include: the object images in each target image region are the same, and the object images in different target image regions are different.
[0103] Finally, to better understand the process of generating image verification information, the following example illustrates the preferred embodiment described above.
[0104] like Figure 7 As shown, this example may include the following process:
[0105] Step 701: The server receives a verification code retrieval request sent by the terminal device.
[0106] Step 702: The server randomly selects nine object images from the image library.
[0107] Step 703: The server fills the blank image area arranged in a 3x3 grid with nine object images according to the rules of 3x3 arithmetic.
[0108] Step 704: The server randomly selects several grids as empty white grids and saves the object images (hereinafter referred to as unused object images) that were previously filled in the empty white grids from the nine types of object images.
[0109] Step 705: The server saves a nine-square grid image with empty white squares as an image verification code (i.e., the first verification image).
[0110] Step 706: The server sends the image verification code and the image of the unused object as image verification information to the terminal device.
[0111] Finally, to better understand the verification process of the image verification code described above, the following example, using the aforementioned preferred embodiment, will be provided for illustration.
[0112] like Figure 8 As shown, this example may include the following process:
[0113] Step 801: The server receives the verification code verification request sent by the terminal device.
[0114] Step 802: The server uses an object detection algorithm to predict the image CAPTCHA, identifying the category, number, and coordinates of objects in the 3x3 grid.
[0115] Step 803: The server determines whether it has detected 9 types of object images. If yes, proceed to step 804; if no, proceed to step 808.
[0116] Step 804: The server determines whether the coordinates of the predicted images of the same object are all within the same grid. If yes, proceed to step 805; otherwise, proceed to step 808.
[0117] The coordinates of each grid boundary have been saved as global variables.
[0118] Step 805: The server counts the number of objects in each grid and saves it to a 3x3 matrix.
[0119] Step 806: The server performs a 3x3 arithmetic verification based on the numbers in the 3x3 matrix. If the verification is successful, proceed to step 807; if the verification fails, proceed to step 808.
[0120] Step 807: The server returns a successful verification result to the terminal device.
[0121] Step 808: The server returns the result of verification code failure to the terminal device.
[0122] The above is a description of the verification method provided in the embodiments of this application.
[0123] In summary, the verification rules of the image verification code in this embodiment are complex, requiring that the number of object images within the image area at a preset location must meet a preset mathematical rule. This makes the image filling rules of the image verification code more complex. Normal users can deduce the filling scheme for the blank image area by observing the image, but web crawler technology finds it difficult to deduce the filling pattern from the image pixel values. Therefore, the verification scheme provided in this embodiment can increase the difficulty of cracking web crawler programs, enhance the anti-crawler defense effect, effectively curb web crawler behavior, thereby reducing the probability of server data being illegally obtained, and also reducing the number of malicious accesses and alleviating the load pressure on the server.
[0124] According to another aspect of the embodiments of this application, a verification method is provided, applied to a terminal device. For example... Figure 9 As shown, the verification method may include:
[0125] Step 901: Receive image verification information sent by the server.
[0126] The image verification information mentioned here may include: a first verification image (i.e., an image verification code) and candidate object images.
[0127] The first verification image includes X image regions, where each of the Y image regions contains a set of object images, and Z image regions are blank image regions. X, Y, and Z are all integers greater than 0, X = Y + Z, X is greater than or equal to 2, and Y and Z are both less than X and greater than or equal to 1. For example, ... Figure 2 As shown, the first verification image 200 includes nine image regions 201. Eight of these nine image regions 201 contain a set of object images, while one image region 201 does not contain an object image and is a blank image region. It should be noted that... Figure 2 This is for illustrative purposes only and is not intended to limit the specific embodiments of this application. For example, the arrangement of image regions is not limited to... Figure 2 As shown, other arrangements are also possible, such as... Figure 3 As shown, when X = 3, the image region can be arranged as shown in (A), (B), or (C); for example, when the number of object images in the image region is at least two, the object images in the image region can be... Figure 2 The same object image shown can also be different object images; for example, the shape of the image area is not limited to rectangles, but can also be circles, ellipses, triangles, etc.
[0128] The candidate object image is an object image that the user can select to fill in the blank image area of the first verification image.
[0129] Step 902: Generate a second verification image based on the user's selection of candidate object images and the filling operation that fills the selected candidate object images into the blank image area.
[0130] The second verification image described here is a verification code generated after the user fills the blank image areas in the first verification image with candidate object images. Compared to the first verification image, the second verification image fills the blank image areas in the first verification image with object images, while the object images in other image areas remain the same. For example... Figure 2 As shown, in the first verification image 200, the image region 201 in the third row and second column from top to bottom is a blank image region, while as... Figure 4 The second verification image 400 shown is a... Figure 2 The first verification image 200 is generated by filling the blank image region with the object image. Figure 4 It can be seen that, compared with the first verification image 200, the image region 401 in the third row and second column from top to bottom has an added image of a crown, while the object images in the other image regions of the two are the same.
[0131] In this embodiment, after receiving the image verification information sent by the server, the terminal device 501 can display the image verification information, such as through... Figure 5 The image display model 5011 displays image verification information, namely, a first verification image and candidate object images, for the user to view. The user can observe the image, deduce the filling scheme for the blank image area, and then select an object image from the candidate object images to fill the blank image area. For example, three candidate object images are displayed around the first verification image: candidate object image a, candidate object image b, and candidate object image c. The user can first click on candidate object image b, and then click on the blank image area to fill the blank image area with candidate object image b. Alternatively, the user can click on candidate object image b and then drag it towards the blank image area; when it reaches the blank image area, it will fill the blank image area. Of course, the above two operation methods are merely illustrative; the specific operation method can be set according to actual needs, and this application embodiment does not specifically limit it. It is understandable that the candidate object images that are filled into the blank image area can be copied and pasted into the blank image area (in which case the candidate object images displayed around the first verification image remain unchanged), or they can be moved into the blank image area (in which case the number of candidate object images displayed around the first verification image is reduced).
[0132] Step 903: Send the second verification image to the server so that the server can verify the second verification image according to preset rules.
[0133] The preset rules may include: the number of object images in the target image area at N preset locations satisfies a preset mathematical rule, where N is greater than or equal to 2 and less than or equal to X.
[0134] The preset mathematical rules mentioned here may include, but are not limited to: the sum of the number of object images is a preset value, the difference of the number of object images is a preset value, or the number of object images is an arithmetic sequence, etc.
[0135] The preset position mentioned here can be a coordinate position or a row and column position (such as row and column number). This preset position is determined in advance by the server before sending the image verification information to the terminal device. The N target image regions include at least: the image region corresponding to the blank image region in the first verification image, that is, the image region located at the same position as the blank image region in the first verification image.
[0136] Once the terminal device detects that the image filling is complete (e.g., the "OK" button is triggered upon detecting image filling completion), the terminal device can send the generated second verification image to the server for verification. The server's verification process for the second verification image is detailed in the embodiments of the verification method applied to the server, and will not be repeated here.
[0137] In this embodiment, the verification rules for image verification codes are complex, requiring that the number of object images within the image area at a preset location must meet a preset mathematical rule. This makes the image filling rules for image verification codes more complex. Normal users can deduce the filling scheme for blank image areas by observing the image, but web crawlers find it difficult to deduce the filling pattern from image pixel values. Therefore, the verification scheme provided in this embodiment can increase the difficulty of cracking web crawlers, enhance the anti-crawler defense effect, effectively curb web crawling behavior, thereby reducing the probability of server-side data being illegally obtained, and also reducing the number of malicious accesses and alleviating the load pressure on the server.
[0138] Preferably, the image verification information may also include a preset rule prompt. The terminal device displays the prompt while displaying the first verification image and the candidate object image, so that the user can view it and thus make it easier for the user to determine the filling scheme for the blank image area.
[0139] For example, with Figure 2Taking the first verification image shown as an example, assuming the preset rule is: the sum of the number of object images in the three image regions in the third row from top to bottom is 15, then the prompt message could be "Please make the sum of the number of object images in the three image regions in the third row 15". According to the prompt message, the user can first determine that the number of object images in the first image region 201 from left to right in the third row is 8, the number of object images in the third image region 201 from left to right in the third row is 6, and then deduce that the number of object images in the second image region 201 from left to right in the third row should be 1. Then, an object image can be selected from the candidate object images to fill the second image region 201.
[0140] Optionally, candidate object images can be displayed around the first verification image, such as above, below, to the left, or to the right. Preferably, a corresponding candidate object image can be set for each blank image area, that is, an association is established between the candidate object image and the blank image area. In this way, when displaying candidate object images, they can be displayed next to their corresponding blank image areas for the user to select.
[0141] As an optional embodiment, the preset rule may also include: object images within each target image region belong to the same category.
[0142] In this embodiment of the application, the difficulty of cracking the image verification code can be further increased. On the basis of satisfying the preset mathematical rules among the number of object images in the target image area at N preset locations, a rule is added that the object images in each target image area belong to the same category.
[0143] Optionally, images of objects of the same category can be images of different objects belonging to the same category, or they can be images of the same object (images of the same object necessarily belong to the same category), such as... Figure 2 and Figure 4 As shown, the object images within each image region are all the same object images.
[0144] Optionally, based on the aforementioned preset rules (i.e., the object images in each target image region belong to the same category), the preset rules may also include: the object images in different target image regions belong to different categories, so as to further increase the difficulty of cracking the image verification code.
[0145] As an optional embodiment, the preset rules may further include: object images within each target image region are identical, and object images within different target image regions are different. For example... Figure 2 and Figure 4 As shown, the object images within each image region are the same, but the object images within different image regions are different from each other.
[0146] As a preferred embodiment, such as Figure 2 As shown, the first verification image may include nine image regions arranged in a 3x3 grid. The preset rules may include: the number of object images within the nine target image regions arranged in a 3x3 grid satisfies a 3x3 arithmetic rule, that is: the numbers in the nine grids are nine different numbers from 1 to 9, and the sum of the numbers in each row, each column, and each diagonal grid is equal to 15. In other words, in this embodiment, the image verification code can be verified using the 3x3 arithmetic rule. 3x3 arithmetic is relatively complex, thus increasing the difficulty of cracking the image verification code. Figure 4 and Figure 6 As shown, for nine image regions 401 arranged in a 3x3 grid, the number of object images in the nine image regions is nine different values from 1 to 9, and the sum of the number of object images in the three image regions in each row is equal to 15, the sum of the number of object images in the three image regions in each column is equal to 15, and the sum of the number of object images in the three image regions crossed by each diagonal is equal to 15.
[0147] Based on this, the preset rules may also include: the object images in each target image region belong to the same category, and the object images in different target image regions belong to different categories; or the object images in each target image region are the same, and the object images in different target image regions are different.
[0148] In summary, the verification rules of the image verification code in this embodiment are complex, requiring that the number of object images within the image area at a preset location must meet a preset mathematical rule. This makes the image filling rules of the image verification code more complex. Normal users can deduce the filling scheme for the blank image area by observing the image, but web crawler technology finds it difficult to deduce the filling pattern from the image pixel values. Therefore, the verification scheme provided in this embodiment can increase the difficulty of cracking web crawler programs, enhance the anti-crawler defense effect, effectively curb web crawler behavior, thereby reducing the probability of server data being illegally obtained, and also reducing the number of malicious accesses and alleviating the load pressure on the server.
[0149] The verification method provided by the embodiments of this application has been described above. The verification device provided by the embodiments of this application will be described below with reference to the accompanying drawings.
[0150] According to one aspect of the embodiments of this application, a verification device is provided, which is applied to a server.
[0151] like Figure 10 As shown, the verification device may include:
[0152] The first sending module 1001 is used to send image verification information to the terminal device.
[0153] The image verification information includes: a first verification image and candidate object images; the first verification image includes: X image regions, and each of the Y image regions includes a set of object images, and Z image regions are blank image regions; X = Y + Z, Y is less than X, Z is less than X, and X is greater than or equal to 2.
[0154] The first receiving module 1002 is used to receive the second verification image sent by the terminal device.
[0155] The second verification image is generated by the user filling the blank image area in the first verification image with candidate object images.
[0156] The verification module 1003 is used to verify the second verification image according to preset rules.
[0157] The preset rules include: the number of object images within the target image region at N preset locations satisfies a preset mathematical rule; N is greater than or equal to 2 and less than or equal to X.
[0158] The determination module 1004 is used to determine that the verification is successful if the object images in the target image areas at N preset positions in the second verification image meet the preset rules; otherwise, it determines that the verification fails.
[0159] Optionally, the verification device may further include:
[0160] The second receiving module is used to receive the verification information acquisition request sent by the terminal device.
[0161] The first generation module is used to generate the image verification information based on the verification information acquisition request.
[0162] Optionally, the first generation module may include:
[0163] The acquisition unit is used to acquire a first preset number of object images based on the verification information acquisition request.
[0164] The first processing unit is configured to fill the first preset number of object images into X blank image regions in the first image according to the preset rules to obtain the second image, and to record the positions of the image regions involving the preset rules to obtain the N preset positions.
[0165] The second processing unit is used to clear the object images in Z image regions of the second image to obtain the first verification image.
[0166] Wherein, the Z image regions are all image regions located at the preset positions.
[0167] The third processing unit is used to set the object images that fill the Z image regions from the first preset number of object images and the second preset number of interfering object images as the candidate object images.
[0168] The generation unit is configured to generate the image verification information based on the first verification image and the candidate object image.
[0169] Optionally, the first preset number of object images consists of X different object images, and the preset rule further includes: the object images within each target image region are the same, and the object images within different target image regions are different.
[0170] The first processing unit may include:
[0171] The first determining subunit is used to determine the one-to-one correspondence between the X different object images and the X blank image regions.
[0172] The different blank image regions correspond to different object images.
[0173] The second determining subunit is used to determine the required number of object images in each of the blank image regions according to the preset rules.
[0174] The first image acquisition subunit is used to fill the corresponding blank image areas with the X different object images according to the required number, based on the correspondence, to obtain the second image.
[0175] Optionally, the preset rules may further include: object images within each target image region belong to the same category, and object images within different target image regions belong to different categories.
[0176] The first processing unit may include:
[0177] The third determining subunit is used to determine the required number of object images in each of the blank image regions according to the preset rules.
[0178] The fourth determining subunit is used to determine the object images belonging to the same category among the first preset number of object images.
[0179] The second image acquisition subunit is used to fill the corresponding blank image area with object images of the same category according to the number of object images of the same category and the number of object images required for each blank image area, so as to obtain the second image.
[0180] Optionally, the first verification image may include 9 image regions arranged in a 3x3 grid.
[0181] The preset rules may also include: the number of object images in the nine target image regions arranged in a 3x3 grid satisfies the 3x3 arithmetic.
[0182] The verification device provided in this application embodiment can achieve... Figure 1 The various processes of verifying the implementation of the method in the illustrated embodiment will not be repeated here to avoid duplication.
[0183] In this embodiment, the verification rules for image verification codes are complex, requiring that the number of object images within the image area at a preset location must meet a preset mathematical rule. This makes the image filling rules for image verification codes more complex. Normal users can deduce the filling scheme for blank image areas by observing the image, but web crawlers find it difficult to deduce the filling pattern from image pixel values. Therefore, the verification scheme provided in this embodiment can increase the difficulty of cracking web crawlers, enhance the anti-crawler defense effect, effectively curb web crawling behavior, thereby reducing the probability of server-side data being illegally obtained, and also reducing the number of malicious accesses and alleviating the load pressure on the server.
[0184] According to another aspect of the embodiments of this application, a verification device is provided, which is applied to a terminal device.
[0185] like Figure 11 As shown, the verification device may include:
[0186] The second receiving module 1101 is used to receive image verification information sent by the server.
[0187] The image verification information includes: a first verification image and candidate object images; the first verification image includes: X image regions, and each of the Y image regions includes a set of object images, and Z image regions are blank image regions; X = Y + Z, Y is less than X, Z is less than X, and X is greater than or equal to 2.
[0188] The second generation module 1102 is used to generate a second verification image based on the user's selection operation of the candidate object image and the filling operation of filling the selected candidate object image into the blank image area.
[0189] The second sending module 1103 is used to send the second verification image to the server so that the server verifies the second verification image according to preset rules.
[0190] The preset rules include: the number of object images within the target image region at N preset locations satisfies a preset mathematical rule; N is greater than or equal to 2 and less than or equal to X.
[0191] Optionally, the preset rules may further include: object images within each target image region belong to the same category, and object images within different target image regions belong to different categories.
[0192] Optionally, the preset rule may further include: the object images in each of the target image regions are the same, and the object images in different target image regions are different.
[0193] Optionally, the first verification image may include: 9 image regions, which are arranged in a 3x3 grid.
[0194] The preset rules may also include: the number of object images in the nine target image regions arranged in a 3x3 grid satisfies the 3x3 arithmetic.
[0195] The verification device provided in this application embodiment can achieve... Figure 9 The various processes implemented in the verification method embodiment shown are not described again here to avoid repetition.
[0196] In this embodiment, the verification rules for image verification codes are complex, requiring that the number of object images within the image area at a preset location must meet a preset mathematical rule. This makes the image filling rules for image verification codes more complex. Normal users can deduce the filling scheme for blank image areas by observing the image, but web crawlers find it difficult to deduce the filling pattern from image pixel values. Therefore, the verification scheme provided in this embodiment can increase the difficulty of cracking web crawlers, enhance the anti-crawler defense effect, effectively curb web crawling behavior, thereby reducing the probability of server-side data being illegally obtained, and also reducing the number of malicious accesses and alleviating the load pressure on the server.
[0197] This application also provides an electronic device, including a processor and a memory. The memory stores a program or instructions that can run on the processor. When the program or instructions are executed by the processor, they implement the various steps of the verification method embodiments applied to servers or terminal devices described above, and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0198] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the verification method embodiments applied to servers or terminal devices described above, and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0199] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0200] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM, RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0201] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A verification method, characterized in that, Applied to a server, the method includes: Send image verification information to the terminal device; wherein, the image verification information includes: a first verification image and candidate object images; the first verification image includes: X image regions, and each of the Y image regions includes a set of object images, and Z image regions are blank image regions; X=Y+Z, X is greater than or equal to 2, Y and Z are both greater than or equal to 1 and less than X; The terminal device sends a second verification image; wherein the second verification image is generated by the user filling the blank image area in the first verification image with a candidate object image; The second verification image is verified according to preset rules; wherein, the preset rules include: the number of object images in the target image region at N preset positions satisfies a preset mathematical rule; N is greater than or equal to 2 and less than or equal to X; If the object images within the target image regions at N preset locations in the second verification image satisfy the preset rules, the verification is determined to be successful; otherwise, the verification is determined to be unsuccessful. The preset positions are predetermined before the server sends the image verification information to the terminal device; the target image regions at the N preset positions include: the image regions corresponding to the blank image regions in the first verification image, that is, the image regions located at the same positions as the blank image regions in the first verification image.
2. The verification method according to claim 1, characterized in that, Before sending the image verification information to the terminal device, the verification method further includes: Receive the verification information acquisition request sent by the terminal device; The image verification information is generated based on the verification information acquisition request.
3. The verification method according to claim 2, characterized in that, The step of generating the image verification information based on the verification information acquisition request includes: Based on the verification information acquisition request, acquire a first preset number of object images; The first preset number of object images are filled into X blank image regions in the first image according to the preset rules to obtain the second image, and the positions of the image regions involving the preset rules are recorded to obtain the N preset positions; Clear the object images in the Z image regions of the second image to obtain the first verification image; wherein, the Z image regions are all image regions at the preset positions; The object images that fill the Z image regions from the first preset number of object images, along with the second preset number of interfering object images, are set as the candidate object images; The image verification information is generated based on the first verification image and the candidate object image.
4. The verification method according to claim 3, characterized in that, The preset rule further includes: when the object images in each target image region are the same, and the object images in different target image regions are different, the first preset number of object images is X different object images; The step of filling the first preset number of object images into X blank image regions in the first image according to the preset rules to obtain the second image includes: Determine a one-to-one correspondence between the X different object images and the X blank image regions; wherein, the different object images correspond to the different blank image regions; According to the preset rules, the required number of object images in each blank image area is determined; According to the correspondence, the X different object images are filled into the corresponding blank image areas in the required quantities to obtain the second image.
5. The verification method according to claim 3, characterized in that, The preset rule also includes: the object images in each of the target image regions belong to the same category, and the object images in different target image regions belong to different categories; The step of filling the first preset number of object images into X blank image regions in the first image according to the preset rules to obtain the second image includes: According to the preset rules, the required number of object images in each blank image area is determined; Identify object images belonging to the same category among the first preset number of object images; Based on the number of object images of the same category and the number of object images required for each blank image region, object images of the same category are filled into the corresponding blank image regions to obtain the second image.
6. The verification method according to claim 1, characterized in that, The first verification image includes 9 image regions, which are arranged in a 3x3 grid. The preset rules also include: the number of object images in the nine target image regions arranged in a 3x3 grid satisfies the 3x3 arithmetic.
7. A verification method, characterized in that, Applied to a terminal device, the method includes: The system receives image verification information sent by the server; wherein the image verification information includes: a first verification image and candidate object images; the first verification image includes: X image regions, and each of the Y image regions includes a set of object images, and Z image regions are blank image regions; X=Y+Z, X is greater than or equal to 2, and Y and Z are both greater than or equal to 1 and less than X; A second verification image is generated based on the user's selection of candidate object images and the filling operation that fills the blank image area with the selected candidate object images; The second verification image is sent to the server so that the server verifies the second verification image according to preset rules; wherein, the preset rules include: the number of object images in the target image area at N preset locations satisfies a preset mathematical rule; N is greater than or equal to 2 and less than or equal to X; The preset positions are predetermined before the server sends the image verification information to the terminal device; the target image regions at the N preset positions include: the image regions corresponding to the blank image regions in the first verification image, that is, the image regions located at the same positions as the blank image regions in the first verification image.
8. The verification method according to claim 7, characterized in that, The preset rules also include: the object images in each of the target image regions belong to the same category, and the object images in different target image regions belong to different categories.
9. The verification method according to claim 7, characterized in that, The preset rules also include: the object images within each target image region are the same, and the object images within different target image regions are different.
10. The verification method according to claim 7, 8 or 9, characterized in that, The first verification image includes 9 image regions, which are arranged in a 3x3 grid. The preset rules also include: the number of object images in the nine target image regions arranged in a 3x3 grid satisfies the 3x3 arithmetic.
11. A verification device, characterized in that, Applied to a server, the device includes: The first sending module is used to send image verification information to the terminal device; wherein, the image verification information includes: a first verification image and candidate object images; the first verification image includes: X image regions, and each of the Y image regions includes a set of object images, and Z image regions are blank image regions; X=Y+Z, X is greater than or equal to 2, Y and Z are both greater than or equal to 1 and less than X; The first receiving module is configured to receive a second verification image sent by the terminal device; wherein the second verification image is generated by the user filling the blank image area in the first verification image with a candidate object image; A verification module is used to verify the second verification image according to preset rules; wherein, the preset rules include: the number of object images in the target image region at N preset positions satisfies a preset mathematical rule; N is greater than or equal to 2 and less than or equal to X; the preset positions are predetermined by the server before sending the image verification information to the terminal device; the target image region at the N preset positions includes: the image region corresponding to the blank image region in the first verification image, that is, the image region located at the same position as the blank image region in the first verification image; The determination module is used to determine that the verification is successful if the object images in the target image areas at N preset positions in the second verification image meet the preset rules; otherwise, it determines that the verification fails.
12. The verification device according to claim 11, characterized in that, The verification device further includes: The second receiving module is used to receive the verification information acquisition request sent by the terminal device; The first generation module is used to generate the image verification information based on the verification information acquisition request.
13. The verification device according to claim 12, characterized in that, The first generation module includes: The acquisition unit is used to acquire a first preset number of object images based on the verification information acquisition request; The first processing unit is configured to fill the first preset number of object images into X blank image regions in the first image according to the preset rules to obtain the second image, and to record the positions of the image regions involving the preset rules to obtain the N preset positions; The second processing unit is used to clear the object images in Z image regions of the second image to obtain the first verification image; wherein, the Z image regions are all image regions at the preset positions; The third processing unit is used to set the object images that fill the Z image regions from the first preset number of object images and the second preset number of interfering object images as the candidate object images; The generation unit is configured to generate the image verification information based on the first verification image and the candidate object image.
14. The verification apparatus according to claim 13, characterized in that, The first preset number of object images consists of X different object images, and the preset rule further includes: the object images within each target image region are the same, and the object images within different target image regions are different; The first processing unit includes: The first determining subunit is used to determine the one-to-one correspondence between the X different object images and the X blank image regions; wherein, the different object images correspond to the different blank image regions. The second determining subunit is used to determine the required number of object images in each blank image area according to the preset rules; The first image acquisition subunit is used to fill the corresponding blank image areas with the X different object images according to the required number, based on the correspondence, to obtain the second image.
15. The verification apparatus according to claim 13, characterized in that, The preset rule also includes: the object images in each of the target image regions belong to the same category, and the object images in different target image regions belong to different categories; The first processing unit includes: The third determining subunit is used to determine the required number of object images in each blank image area according to the preset rules; The fourth determining subunit is used to determine the object images belonging to the same category among the first preset number of object images; The second image acquisition subunit is used to fill the corresponding blank image area with object images of the same category according to the number of object images of the same category and the number of object images required for each blank image area, so as to obtain the second image.
16. The verification apparatus according to claim 11, characterized in that, The first verification image includes 9 image regions, which are arranged in a 3x3 grid. The preset rules also include: the number of object images in the nine target image regions arranged in a 3x3 grid satisfies the 3x3 arithmetic.
17. A verification device, characterized in that, Applied to a terminal device, the device includes: The second receiving module is used to receive image verification information sent by the server; wherein, the image verification information includes: a first verification image and candidate object images; the first verification image includes: X image regions, and each of the Y image regions includes a set of object images, and Z image regions are blank image regions; X=Y+Z, Y is less than X, Z is less than X, and X is greater than or equal to 2; The second generation module is used to generate a second verification image based on the user's selection operation of the candidate object image and the filling operation of filling the selected candidate object image into the blank image area. The second sending module is used to send the second verification image to the server, so that the server verifies the second verification image according to preset rules; wherein, the preset rules include: the number of object images in the target image area at N preset positions satisfies a preset mathematical rule; N is greater than or equal to 2 and less than or equal to X; the preset positions are predetermined by the server before sending the image verification information to the terminal device; the target image area at the N preset positions includes: the image area corresponding to the blank image area in the first verification image, that is, the image area at the same position as the blank image area in the first verification image.
18. The verification apparatus according to claim 17, characterized in that, The preset rules also include: the object images in each of the target image regions belong to the same category, and the object images in different target image regions belong to different categories.
19. The verification apparatus according to claim 17, characterized in that, The preset rules also include: the object images within each target image region are the same, and the object images within different target image regions are different.
20. The verification apparatus according to claim 17, 18 or 19, characterized in that, The first verification image includes 9 image regions, which are arranged in a 3x3 grid. The preset rules also include: the number of object images in the nine target image regions arranged in a 3x3 grid satisfies the 3x3 arithmetic.
21. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the verification method as described in any one of claims 1 to 6 or 7 to 10.
22. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the verification method as described in any one of claims 1 to 6 or 7 to 10.