Verification method, device and equipment for verification code

By generating and verifying color blocks and interfering color blocks, the problem of verification codes being easily identified by machines and short-term interactions between users is solved, and the diversity of verification codes and cracking difficulty is improved.

CN113868621BActive Publication Date: 2025-08-26MIGU CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111198469.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-14
Publication Date
2025-08-26
Estimated Expiration
2041-10-14

AI Technical Summary

Technical Problem

The existing verification code is easily recognized by the machine, the user interaction process is short, it cannot effectively prevent malicious behavior and the interaction form is single.

Method used

After generating the verification code picture, the verification is generated based on the color information and the different interfering color blocks are sent to the client in combination with the prompt rule information. The client selects the target color block and verifies.

Benefits of technology

It improves the difficulty of cracking and interactions of verification codes, realizes the diversity of verification code styles and displays, and enhances the difficulty of machine recognition and the complexity of user interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113868621B_ABST
    Figure CN113868621B_ABST
Patent Text Reader

Abstract

The present invention discloses a verification method, device, and apparatus for verifying a verification code. The method comprises: generating a verification code image; generating a verification-passing color block based on the color information of the verification code image; comparing the verification-passing color block to generate an interference color block different from the verification-passing color block; sending prompt rule information, the verification code image, the verification-passing color block, and the interference color block to a client; receiving at least one target color block selected from the verification-passing color block and the interference color block sent by the client; verifying whether the target color block is the same as the verification-passing color block, obtaining a verification result, and sending the result to the client. Through the above-mentioned method, the present invention realizes the diversity of verification code styles and displays, increases the difficulty of cracking the verification code, and increases the number of interactions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of verification codes, and in particular to a verification method, device and equipment for verification codes. Background Art

[0002] Current technology generates verification codes in many forms, such as random combinations of numbers and letters, images containing specific text or elements, randomly generated binary arithmetic operations, and sliding verification codes. Among the numerous verification code input schemes, the majority are numbers and letters. Given the randomness of the verification code, most schemes require relatively few user actions, such as entering numbers and letters or sliding a slider to a specific position, thus reducing machine processing costs. Furthermore, even verification codes that require searching for specific objects in an image or selecting images containing objects, while requiring more user actions, have significantly advanced object detection and recognition due to advances in machine learning. Consequently, existing verification code display formats inevitably present the following issues: First, verification codes are easily recognized by machines, leading to cracking and failing to effectively prevent malicious activities such as automated batch registrations. Second, each verification code type is formatted specifically. For example, numeric verification codes are fixed-length, while image verification codes often rely on a matching principle, resulting in a shorter user interaction process. Summary of the Invention

[0003] In view of the above problems, embodiments of the present invention are proposed to provide a verification code verification method that overcomes the above problems or at least partially solves the above problems.

[0004] According to one aspect of an embodiment of the present invention, a verification code verification method is provided, which is applied to a server, and the method includes:

[0005] Generate verification code image;

[0006] Generate a verification pass color block based on the color information of the verification code image;

[0007] Comparing the verified color block, generating an interference color block different from the verified color block;

[0008] Sending the prompt rule information, the verification code image, the verification-passed color block, and the interference color block to the client;

[0009] receiving at least one target color block selected from the verified color block and the interference color block and sent by the client;

[0010] Verify whether the target color block is the same as the verified color block, obtain a verification result, and send it to the client.

[0011] According to another aspect of an embodiment of the present invention, a verification code verification method is provided, which is applied to a client, and the method includes:

[0012] Receive prompt rule information, verification code image, verification pass color block and interference color block;

[0013] According to the verification code image, the verification-passed color block, and the interference color block, at least one target color block is selected according to the prompt rule information, and sent to the server;

[0014] Receive a verification result of the at least one target color block from the server.

[0015] According to another aspect of an embodiment of the present invention, a verification code verification device is provided, which is applied to a server, and the device includes:

[0016] Generation module, used to generate verification code images;

[0017] a processing module, configured to generate a verification-passing color block based on the color information of the verification code image; compare the verification-passing color block to generate an interference color block different from the verification-passing color block; and send prompt rule information, the verification code image, the verification-passing color block, and the interference color block to the client;

[0018] A receiving module, configured to receive at least one target color block selected from the verified color block and the interference color block and sent by the client;

[0019] The processing module is further configured to verify whether the target color block is the same as the verified color block, obtain a verification result, and send the result to the client.

[0020] According to another aspect of an embodiment of the present invention, a verification code verification device is provided, which is applied to a client, and the device includes:

[0021] A receiving module, used to receive the verification code image, the verification passed color block and the interference color block;

[0022] A processing module, which selects at least one target color block according to the verification code image, the verification-passed color block, and the interference color block according to prompt rule information, and sends the selected target color block to the server;

[0023] The receiving module is further configured to receive a verification result of the at least one target color block from the server.

[0024] According to another aspect of an embodiment of the present invention, there is provided a computing device, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0025] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the verification method of the verification code.

[0026] According to another aspect of the embodiments of the present invention, a computer storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a processor to execute operations corresponding to the verification method of the verification code as described above.

[0027] According to the solution provided by the above-mentioned embodiment of the present invention, the verification of the verification code can be carried out by generating a verification code picture; generating a verification-passing color block based on the color information of the verification code picture; comparing the verification-passing color block to generate an interference color block different from the verification-passing color block; sending the prompt rule information, the verification code picture, the verification-passing color block and the interference color block to the client; receiving at least one target color block selected from the verification-passing color block and the interference color block sent by the client; verifying whether the target color block is the same as the verification-passing color block, obtaining a verification result, and sending it to the client, thereby solving the problems of the verification code being easily recognized by the machine and the user interaction process being short, achieving the diversity of the style and display of the verification code, and increasing the difficulty of cracking the verification code and the beneficial effect of the number of interactions.

[0028] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to more clearly understand the technical means of the embodiments of the present invention, they can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiments of the present invention more obvious and easy to understand, the specific implementation methods of the embodiments of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the embodiments of the present invention. The same reference numerals are used throughout the accompanying drawings to denote the same components. In the accompanying drawings:

[0030] Figure 1 A flowchart of a verification code verification method applied to a server provided by an embodiment of the present invention is shown;

[0031] Figure 2 A schematic diagram showing a verification code image, a verification-passing color block, and an interference color block in a verification code verification method provided by an embodiment of the present invention is shown;

[0032] Figure 3 A schematic diagram of color clustering processing provided by an embodiment of the present invention is shown;

[0033] Figure 4 A schematic diagram of color clustering processing provided by an embodiment of the present invention is shown;

[0034] Figure 5 A schematic diagram showing the use of a verification code in a verification code verification method provided by an embodiment of the present invention is shown;

[0035] Figure 6 A color block diagram obtained by performing verification using a circular color block in a verification method for a verification code provided by an embodiment of the present invention is shown;

[0036] Figure 7 The figure shows a color block diagram obtained by performing verification by selecting the color system of the verification code image in the verification method provided by the embodiment of the present invention;

[0037] Figure 8 A color block diagram is shown, obtained by performing verification based on color selection in a color wheel in a verification code verification method provided by an embodiment of the present invention;

[0038] Figure 9 A schematic diagram illustrating adjusting the number of cluster centers and thus adjusting the verification difficulty of a verification code in a verification method for a verification code provided by an embodiment of the present invention is shown;

[0039] Figure 10 A schematic diagram illustrating adjusting the verification difficulty of a verification code image by adjusting the shape of a color block in a verification code verification method provided by an embodiment of the present invention is shown;

[0040] Figure 11 A schematic diagram showing verification by selecting the color of a color block in a verification code verification method provided by an embodiment of the present invention is shown;

[0041] Figure 12 A flowchart of a verification code verification method applied to a client provided by another embodiment of the present invention is shown;

[0042] Figure 13 A schematic diagram of the structure of a verification code verification device applied to a server provided by an embodiment of the present invention is shown;

[0043] Figure 14 A schematic diagram of the structure of a verification code verification device applied to a client provided by an embodiment of the present invention is shown;

[0044] Figure 15 A schematic structural diagram of a computing device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0045] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0046] Figure 1 FIG. 1 shows a flow chart of a verification method for a verification code applied to a server according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0047] Step 11, generate a verification code image;

[0048] Step 12: Generate a verification pass color block based on the color information of the verification code image;

[0049] Step 13, generating an interference color block different from the verification-passed color block based on the verification-passed color block;

[0050] Step 14: Send the prompt rule information, the verification code image, the at least one color block, and the interference color block to the client;

[0051] Step 15, receiving at least one target color block selected by the user from the at least one color block and the interference color blocks;

[0052] Step 16: perform verification based on the at least one target color block, obtain a verification result, and send it to the client.

[0053] This embodiment generates a verification code image on a server, processes the verification code image to obtain a verification-passing color block, and then generates an interference color block different from the verification-passing color block. The prompt rule information, the verification code image, the verification-passing color block, and the interference color block are sent to a client. At least one target color block selected by the client from the verification-passing color block and the interference color block based on the verification code image is verified to obtain a verification result, which is then sent to the client. The verification-passing color block is a color block that corresponds to a color in the verification code image, and the color of the interference color block is preferably different from that of the verification-passing color block. By providing verification code images with multiple colors, the complexity and computational process of completing verification code verification for a client user are improved, effectively resolving the issues of verification codes being easily recognized by machines and the short user interaction process. This achieves diversity in the styles and displays of verification codes, increasing the difficulty of cracking the verification code and the number of interactions.

[0054] Figure 2The following is a schematic diagram showing a verification code image, a verification passed color block, and an interference color block in the verification method of the verification code provided by an embodiment of the present invention. Figure 2 As shown, in a specific embodiment 1, box a shows a verification code picture, box b shows a verification passed color block and an interference color block. It can be seen from box a that the verification code picture includes verification passed color block 1, verification passed color block 2 and verification passed color block 3, and box b includes verification passed color block 1, verification passed color block 2, verification passed color block 3, interference color block 4, interference color block 5, interference color block 6, interference color block 7, interference color block 8, interference color block 9, interference color block 10 and interference color block 11.

[0055] In an optional embodiment of the present invention, step 12 includes:

[0056] Step 121: performing color clustering processing on the verification code image to obtain a color clustering result;

[0057] Step 122, setting the color block attributes of the color block that has passed the verification according to the color clustering result;

[0058] Step 123: Generate a verified color block according to the color block attributes.

[0059] Optionally, the color block attribute includes the color of the color block and / or the proportion of the color in the verification code image; the color of the color block is the color in the verification code image or a color of a corresponding hue.

[0060] In this embodiment, a color clustering process is performed on the verification code image, and a color clustering process is performed according to the color of each pixel in the verification code image to obtain a color clustering result. According to the color clustering result, a color block attribute of the verification-passing color block is set, and a verification-passing color block is generated. The color block attribute includes the color of the color block and / or the proportion of the color in the verification code image. The color of the color block is the color in the verification code image or the color of the corresponding hue. The color corresponding hue refers to a hue within a preset offset range from the color hue in the verification code image. The color clustering process preferably uses a k-means clustering algorithm.

[0061] Preferably, it can be achieved by:

[0062] image=image.reshape((image.shape[0]*image.shape[1],3)) converts the verification code image;

[0063] Among them, shape[0] is the width of the verification code image, and shape[1] is the height of the verification code image;

[0064] The converted verification code image is clustered by the k-means clustering algorithm, and the number of cluster centers c∈[2,3,4,…] is the color of the verification color block in the verification code image or the color of the corresponding hue. The more cluster centers there are, the more verification color block colors there are in the verification color block diagram corresponding to the verification code image, and the more difficult it is for the client to process. Each verification color block in the verification color block diagram corresponds to a proportion value, and a matrix can be used to represent the proportion values ​​of all verification color blocks in a verification color block diagram. The sorting of the verification color blocks in the verification color block diagram in the matrix can preferably be sorted from large to small, but this application is not limited to this, and can also be sorted by the order of other rules. The order matrix of each verification color block is recorded as index=[first color block number, second color block number,…,nth color block number], where n is a positive integer.

[0065] According to the matrix generated by the proportion values ​​of all verified color blocks in the verified color block diagram and the color information of all verified color blocks, the attribute [color, proportion] of each verified color block in the verified color block diagram is obtained, and the matrix of the verified color block attributes corresponds to the sequential matrix index of each verified color block.

[0066] Figure 3 FIG. 1 shows a schematic diagram of color clustering processing provided by an embodiment of the present invention. Figure 3 As shown, in a specific embodiment, box a shows a verification code picture, wherein the verification code picture includes verification pass color block 1, verification pass color block 2 and verification pass color block 3, and the verification pass color block 1, verification pass color block 2 and verification pass color block 3 in the verification code picture are converted into a verification pass color block picture according to the proportion of all pixel points corresponding to the color of the verification pass color block in the verification code picture through color clustering processing; wherein the height of the verification pass color block picture is a preset fixed value, and the width of the verification pass color block is determined by the proportion of all pixel points corresponding to the color of the verification pass color block in the verification code picture, and in the three verification When the heights of the color blocks are the same, the proportion of all pixels corresponding to the color of the verified color block 1 in the verification code image is R1, the proportion of all pixels corresponding to the color of the verified color block 2 in the verification code image is R2, and the proportion of all pixels corresponding to the color of the verified color block 3 in the verification code image is R3. It can be seen from the verification code image a that R1>R2>R3. When the height of the three verified color blocks is a preset fixed value, the width of the verified color block 1 is W1, the width of the verified color block 2 is W2, and the width of the verified color block 3 is W3. The widths from large to small are W1>W2>W3.

[0067] Figure 4FIG. 1 shows a schematic diagram of color clustering processing provided by an embodiment of the present invention. Figure 4 As shown, in a specific embodiment, the verification code image includes a verification pass color block 13, a verification pass color block 14, and a verification pass color block 15. The verification pass color block 13, the verification pass color block 14, and the verification pass color block 15 in the verification code image are converted into a verification pass color block image according to the proportion of all pixels corresponding to the color of the verification pass color block in the verification code image through color clustering processing; wherein the height of the verification pass color block image is a preset fixed value, and the width of the verification pass color block is determined by the proportion of all pixels corresponding to the color of the verification pass color block in the verification code image. When the three verification-passed color blocks have the same height, the color of the verification-passed color block 13 is black, and the proportion of all pixels corresponding to the color of the verification-passed color block in the verification code image is R13 = 0.872. The color of the verification-passed color block 14 is yellow, and the proportion of all pixels corresponding to the color of the verification-passed color block in the verification code image is R14 = 0.067. The color of the verification-passed color block 15 is red, and the proportion of all pixels corresponding to the color of the verification-passed color block in the verification code image is R15 = 0.061.

[0068] It can be seen that R13>R14>R15. The matrix obtained by sorting the proportions of all the verified color blocks in the verified color block diagram from large to small is [0.872, 0.067, 0.061]. The order is recorded as index = [13, 14, 15]. The matrix of the verified color block attributes in the verified color block diagram is [[black, 0.872], [yellow, 0.067], [red, 0.061]]. The matrix of the verified color block attributes corresponds to the order matrix.

[0069] If the percentage of all the verified color blocks in the verified color block diagram is sorted according to other rules to obtain a matrix of [0.872, 0.061, 0.067], the order matrix is ​​recorded as index' = [13, 15, 14];

[0070] When the height of the three verified color blocks is a preset fixed value, the width of the verified color block 13 is W13, the width of the verified color block 14 is W14, and the width of the verified color block 15 is W15. The widths from large to small are W13>W14>W15. Therefore, the verified color block diagram is spliced ​​in the order of the size of the verified color blocks from large to small as verified color block 13, verified color block 14 and verified color block 15.

[0071] In an optional embodiment of the present invention, step 13 includes:

[0072] Step 131, using a random function to generate at least one interference color block according to the color of the verification-passed color block, wherein the color of the interference color block is different from the color of the verification-passed color block; or

[0073] Step 132 : generating at least one interference color block according to the color of the verified color block and a preset rule.

[0074] In this embodiment, the color block attributes of the interference color block need to be different from the color attributes of the verification pass color block corresponding to the verification code image. Preferably, at least one interference color block with color block attributes different from the color attributes of the verification pass color block corresponding to the verification code image can be generated by a random function, and at least one interference color block with color attributes different from the color block corresponding to the verification code image can be generated by a preset rule. It should be noted that by adjusting the prompt rule information, the difficulty of using the verification code can be adjusted. The closer the color tone of the generated interference color block is to the color tone of the verification pass color block corresponding to the verification code image, the greater the difficulty of using the verification code. The interference color block can preferably be numbered with "#" as the sequence in the sequential matrix index.

[0075] In an optional embodiment of the present invention, step 16 includes:

[0076] Step 161, obtaining a first order matrix corresponding to the at least one target color block;

[0077] Step 162: splicing the at least one verified color block according to a preset splicing rule to obtain a verified color block diagram and a second sequence matrix corresponding to the verified color block diagram;

[0078] Step 163, verifying the second order matrix corresponding to the verified color block image and the first order matrix corresponding to the at least one target color block. If the verification results are consistent, the verification is successful.

[0079] Step 164: Send the verification result to the client.

[0080] In this embodiment, the server sends the verification code image, the verification-passed color block and the interference color block to the client, and the client displays the received verification code image, the verification-passed color block and the interference color block. The user selects a target color block from the verification-passed color block and the interference color block according to the prompt rule information, and feeds back at least one selected target color block to the server. The server receives at least one target color block selected by the user according to the prompt rule information based on the verification code image, and obtains a first order matrix corresponding to the target color block fed back by the client according to the order corresponding to the color block attributes of the target color block. The server verifies the at least one target color block, that is, verifies the first order matrix. If it is the same as the second order matrix generated by the verification-passed color block in the verification code image, the splicing is successful and the verification is passed; if it is different from the second order matrix generated by the verification-passed color block in the verification code image, the splicing is unsuccessful and the verification cannot be passed, and the server sends the verification result to the client.

[0081] Figure 5 FIG1 shows a schematic diagram of the use of a verification code in a verification method of a verification code provided by an embodiment of the present invention. Figure 1 and Figure 5 As shown, in a specific embodiment, box a shows a verification code picture, box b shows a verification pass color block and an interference color block. It can be seen from box a that the verification code picture includes verification pass color block 1, verification pass color block 2 and verification pass color block 3, box b includes verification pass color block 1, verification pass color block 2, verification pass color block 3, interference color block 4, interference color block 5, interference color block 6, interference color block 7, interference color block 8, interference color block 9, interference color block 10 and interference color block 11, box c is a target color block selection box. When the client needs to use the verification code, the user needs to select the correct target color block and verify the target color block according to the usage rules. The client will explain the usage rules of the verification code to the user. Figure 5The usage rule of the verification code in is to select all the verification-passing color blocks corresponding to the verification code image from the verification-passing color blocks and the interference color blocks, and arrange them in descending order; the user can select the target color block in box b through the client and move the target color block to the target position in the target color block selection box. The client sends the selected target color block to the server for verification. If the order matrix of the received target color block is index1 = [#,#,#], which is different from the order matrix of the verification-passing color blocks in the verification code image, index = [0,1,2], the splicing is unsuccessful and the verification cannot be passed; if the order matrix of the received target color block is index2 = [0,#,2], which is different from the order matrix of the verification-passing color blocks in the verification code image, index = [0,1,2], the splicing is unsuccessful and the verification cannot be passed; if the order matrix of the received target color block is index3 = [0,1,2], which is the same as the order matrix of the verification-passing color blocks in the verification code image, index = [0,1,2], the splicing is successful and the verification is passed.

[0082] It should be noted that in this application, there is no restriction on the shapes of the verification-pass color blocks and interference color blocks sent by the server to the client. In addition to rectangular color blocks, they can also be triangular color blocks, circular color blocks, square color blocks, ring-shaped color blocks, and irregular shapes, etc. The usage rules of the verification code correspond to the verification method of the verification code, and the usage rules of the verification code and the verification method of the verification code can preferably be adaptively adjusted according to the verification code image, the shape of the verification-pass color block, and the shape of the interference color block.

[0083] Figure 6 FIG1 shows a color block diagram obtained by verifying a verification code using a circular color block in a verification method provided by an embodiment of the present invention. Figure 1 and Figure 6 As shown, Figure 1 In the verification code picture in box a, the verification passed color block and interference color block in box b can also be used to obtain the target color block selected by the user through concentric rings. This method uses the radius of the concentric rings to prompt the user. The user can select the target color block according to the size of the proportion of the corresponding verification passed color block in the verification code picture. After the correct selection, the rings can be interlocked, otherwise the concentric circles cannot be formed. In the verification code picture a, the proportion of verification passed color block 1 R1> the proportion of verification passed color block 2 R2> the proportion of verification passed color block 3 R3, so, Figure 6 The color block diagram in the concentric rings from the outside to the center is verification passed color block 1, verification passed color block 2 and verification passed color block 3, which means that the server verification has been passed.

[0084] Figure 7The figure shows the color block diagram obtained by verifying the color of the verification code image in the verification method provided by the embodiment of the present invention. Figure 7 As shown, in a specific embodiment, box d is a verification code image. The colors shown in the verification code image are gradient colors, and the user cannot intuitively determine the specific color block it corresponds to. Therefore, the verification pass color block and the interference color block are presented in a color wheel of cold and warm tones. The usage rule of this verification code is to select the target color block based on the prompted color wheel. The color wheel has obvious cold and warm color changes. According to the given verification code image, a cold color, a warm color, or a similar color block area selected in the color wheel is selected to complete the verification;

[0085] Figure 8 The figure shows a color block diagram obtained by verifying the color selection in the color wheel in the verification method of the verification code provided by the embodiment of the present invention. Figure 7 and Figure 8 As shown, preferably, the usage rule of the verification code is that when selecting the cold color and warm color information corresponding to the verification code picture, the word "warm" representing the warm color can be moved to the box f according to the prompt, and the verification is successful;

[0086] Preferably, the verification code usage rule is to select three color block areas in the color palette that are similar to the verification code image. If the user selects any three color areas from the color palette of color blocks 16, 17, 18, 19, and 20 that are closest in hue to the verification code image, verification is successful. It should be noted that, by adjusting the preset rules, it is preferred to add verification conditions such as sorting in order according to color proportion values, thereby increasing the difficulty of using the verification code.

[0087] Figure 9 FIG1 shows a schematic diagram of adjusting the number of cluster centers and thus adjusting the verification difficulty of the verification code in the verification method of the verification code provided by the embodiment of the present invention. Figure 1 and Figure 9 As shown, in a specific embodiment, the box g is a verification code picture, and the cluster center of the verification code picture g is compared Figure 1 The verification code image a in the box has more cluster centers, so when selecting the target color block in the color block diagram, the more colors of the verification color blocks and interference color blocks need to be selected, and the greater the difficulty. At the same time, it can be seen from the color block diagram corresponding to the verification code image g in the box h that the difference in adjacent color tones is small and the colors are relatively close, and its difficulty is greater than that of Figure 1 The larger the verification code image a is, the larger the color ratio of the color blocks in the adjacent areas is. Figure 1 The verification code image a is closer and more difficult.

[0088] Figure 10The following is a schematic diagram showing how to adjust the verification difficulty of a verification code image by adjusting the shape of a color block in a verification code verification method provided by an embodiment of the present invention. Figure 1 and Figure 10 As shown, the generated verification-pass color blocks and interference color blocks are not regular rectangles, but combinations of rectangles or irregular shapes, namely, target color block 1-1, target color block 2-1, and target color block 3-1. Color blocks with the same color block attributes [color, proportion] will have multiple styles for the client user to choose. The user selects the appropriate color, width, and shape for splicing according to the prompt rule information to obtain a rectangle or other regular pattern, a color block diagram composed of verification-pass color block 1, verification-pass color block 2, and verification-pass color block 3. According to the prompt rule information, a color block diagram composed of target color block 1-1, target color block 2-1, and target color block 3-1 can be obtained.

[0089] Figure 11 FIG. 1 shows a schematic diagram of a verification method for a verification code provided by an embodiment of the present invention, wherein verification is performed by selecting the color of a color block. Figure 11 As shown, a colorless shape can be provided in the verification code image. The shape has different sizes to correspond to the proportion of the color block to be selected. Through the color editor, the user follows the color required by the prompt rule information, and the server verifies it.

[0090] The solution of the present invention generates a verification code image; generates a verification-pass color block according to color information of the verification code image; compares the verification-pass color block to generate an interference color block different from the verification-pass color block; sends prompt rule information, the verification code image, the verification-pass color block and the interference color block to a client; receives at least one target color block selected from the verification-pass color block and the interference color block and sent by the client; verifies whether the target color block is the same as the verification-pass color block, obtains a verification result, and sends it to the client; realizes the diversity of verification code styles and displays, and increases the difficulty of cracking the verification code and the number of interactions.

[0091] Figure 12 FIG1 shows a flow chart of a verification method for a verification code applied to a client provided by another embodiment of the present invention. Figure 12 As shown, the method includes the following steps:

[0092] Step 12a, receiving prompt rule information, a verification code image, at least one color block, and an interference color block;

[0093] Step 12b, selecting at least one target color block based on the verification code image, the at least one color block, and the interference color block according to the prompt rule information, and sending the selected target color block to the server;

[0094] Step 12c: Receive verification results of the at least one target color block from the server.

[0095] It should be noted that this method is a client method corresponding to the verification code verification method of the above-mentioned server. All implementation methods in the above-mentioned verification code verification method embodiment are applicable to the embodiment of the client method and can also achieve the same technical effect.

[0096] Figure 13 FIG. 1 shows a schematic diagram of a verification device for a verification code applied to a server according to an embodiment of the present invention. Figure 13 As shown, the device 13a includes:

[0097] Generating module 13b, used to generate a verification code image;

[0098] The processing module 13c is configured to generate a verification-passing color block based on the color information of the verification code image; compare the verification-passing color block with the verification-passing color block to generate an interference color block different from the verification-passing color block; and send the prompt rule information, the verification code image, the verification-passing color block, and the interference color block to the client;

[0099] A receiving module 13d is configured to receive at least one target color block selected from the verified color block and the interference color block and sent by the client;

[0100] The processing module 13c is further configured to verify whether the target color block is the same as the verified color block, obtain a verification result, and send the result to the client.

[0101] Optionally, generating a verification-pass color block according to the color information of the verification code image includes:

[0102] Performing color clustering processing on the verification code image to obtain a color clustering result;

[0103] According to the color clustering result, setting the color block attributes of the color block that passed the verification;

[0104] Generate a verified color block based on the color block attributes.

[0105] Optionally, the color block attribute includes the color of the color block and / or the proportion of the color in the verification code image; the color of the color block is the color in the verification code image or a color of a corresponding hue.

[0106] Optionally, the color block attribute of the interference color block needs to be different from the color attribute of the verification-passed color block corresponding to the verification code image.

[0107] Optionally, verifying whether the target color block is identical to the verified color block, obtaining a verification result, and sending the verification result to the client includes:

[0108] Obtaining a first sequence matrix corresponding to the at least one target color block; splicing the at least one verified color block according to a preset splicing rule to obtain a verified color block diagram and a second sequence matrix corresponding to the verified color block diagram;

[0109] Verifying the second order matrix corresponding to the verified color block image and the first order matrix corresponding to the at least one target color block, and if the verification results are consistent, the verification is passed;

[0110] Sending a verification result to the client.

[0111] It should be noted that the device is a device corresponding to the above method, and all implementation methods in the above verification code verification method embodiment are applicable to the embodiment of the device and can achieve the same technical effect.

[0112] Figure 14 FIG. 1 shows a schematic diagram of a verification device for a verification code applied to a client provided by an embodiment of the present invention. Figure 14 As shown, the device 14a includes:

[0113] Receiving module 14b, used to receive prompt rule information, verification code image, at least one color block and interference color block;

[0114] The processing module 14c selects at least one target color block according to the verification code image, the at least one color block, and the interference color block, and sends the selected at least one target color block to the server according to the prompt rule information;

[0115] The receiving module 14b is further configured to receive a verification result of the at least one target color block from the server.

[0116] It should be noted that the device is a device corresponding to the above method, and all implementation methods in the above verification code verification method embodiment are applicable to the embodiment of the device and can achieve the same technical effect.

[0117] An embodiment of the present invention provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the verification code verification method in any of the above method embodiments.

[0118] Figure 15 The schematic diagram of the structure of the computing device provided by the embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computing device.

[0119] like Figure 15As shown, the computing device may include: a processor, a communication interface, a memory, and a communication bus.

[0120] The processor, communication interface, and memory communicate with each other via a communication bus. The communication interface is used to communicate with other devices, such as clients or other server network elements. The processor is used to execute a program, specifically the steps described in the embodiment of the verification method for calculating a verification code for a device.

[0121] Specifically, the program may include program codes including computer operation instructions.

[0122] The processor may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs, or processors of different types, such as one or more CPUs and one or more ASICs.

[0123] Memory is used to store programs. The memory may include high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk storage.

[0124] The program can be specifically used to cause the processor to execute the verification method of the verification code in any of the above-mentioned method embodiments. The specific implementation of each step in the program can refer to the corresponding description of the corresponding steps and units in the above-mentioned verification code verification embodiment, and will not be repeated here. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working process of the above-mentioned device and module can refer to the corresponding process description in the above-mentioned method embodiment, and will not be repeated here.

[0125] The algorithm or display provided herein is not inherently related to any particular computer, virtual system or other device. Various general-purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the embodiment of the present invention is not directed to any specific programming language. It should be understood that various programming languages ​​can be utilized to implement the content of the embodiment of the present invention described herein, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the embodiment of the present invention.

[0126] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0127] Similarly, it should be understood that in order to streamline the embodiments of the invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed approach should not be interpreted as reflecting an intention that the claimed embodiments of the invention require more features than are expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all of the features of the individual embodiments disclosed above. Accordingly, the claims that follow the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of the invention.

[0128] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0129] Furthermore, those skilled in the art will appreciate that although some embodiments herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, in the claims below, any of the claimed embodiments may be used in any combination.

[0130] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of the present invention. The embodiments of the present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing an embodiment of the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0131] It should be noted that the above embodiments illustrate rather than limit the embodiments of the invention, and that a person skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The embodiments of the invention may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments should not be understood as limiting the order of execution unless otherwise specified.

Claims

1. A verification code verification method, characterized in that: Applied to a server, the method includes: Generate verification code image; Generate a verification-pass color block based on the color information of the verification code image; wherein the verification-pass color block is a color block that corresponds to the color in the verification code image; Comparing the verified color block, generating an interference color block different from the verified color block; Sending the prompt rule information, the verification code image, the verification-passed color block, and the interference color block to the client; receiving at least one target color block selected from the verified color block and the interference color block and sent by the client; Verify whether the target color block is the same as the verified color block, obtain a verification result, and send it to the client; wherein, the verified color blocks are spliced ​​according to a preset splicing rule to obtain a verified color block diagram and a second sequence matrix corresponding to the verified color block diagram; verify the second sequence matrix and the first sequence matrix corresponding to the at least one target color block obtained, and if the verification results are consistent, the verification is passed.

2. The verification code verification method according to claim 1, characterized in that: Generating a verification-pass color block according to the color information of the verification code image includes: Performing color clustering processing on the verification code image to obtain a color clustering result; According to the color clustering result, setting the color block attributes of the color block that passed the verification; Generate a verified color block based on the color block attributes.

3. The verification code verification method according to claim 2, characterized in that: The color block attribute includes the color of the color block and / or the proportion of the color in the verification code image; the color of the color block is the color in the verification code image or the color of the corresponding hue.

4. The verification code verification method according to claim 1, wherein: The color block attribute of the interference color block must be different from the color attribute of the verification pass color block corresponding to the verification code image.

5. A verification code verification method, characterized in that: Applied to a client, the method includes: Receive prompt rule information, verification code image, verification pass color block and interference color block; The server generates a verification code image and generates a verification-pass color block based on the color information of the verification code image; wherein the verification-pass color block is a color block that corresponds to the color in the verification code image; and the server generates an interference color block that is different from the verification-pass color block by comparing the verification-pass color block. According to the verification code image, the verification-passed color block, and the interference color block, at least one target color block is selected according to the prompt rule information, and sent to the server; receiving a verification result of the at least one target color block from the server; Among them, the server will splice the verified color blocks according to the preset splicing rules to obtain the verified color block image and the second order matrix corresponding to the verified color block image; verify the second order matrix and the first order matrix corresponding to the at least one target color block obtained. If the verification results are consistent, the verification is passed.

6. A verification code verification device, characterized in that: Applied to a server, the device includes: Generation module, used to generate verification code images; a processing module, configured to generate a verification-passing color block based on the color information of the verification code image; compare the verification-passing color block to generate an interference color block different from the verification-passing color block; and send prompt rule information, the verification code image, the verification-passing color block, and the interference color block to a client; wherein the verification-passing color block is a color block that corresponds to a color in the verification code image; A receiving module, configured to receive at least one target color block selected from the verified color block and the interference color block and sent by the client; The processing module is also used to verify whether the target color block is the same as the verified color block, obtain a verification result, and send it to the client; wherein, the verified color blocks are spliced ​​according to a preset splicing rule to obtain a verified color block diagram and a second sequence matrix corresponding to the verified color block diagram; the second sequence matrix and the first sequence matrix corresponding to the at least one target color block obtained are verified, and if the verification results are consistent, the verification is passed.

7. A verification code verification device, characterized in that: Applied to a client, the device includes: A receiving module, used to receive the verification code image, the verification passed color block and the interference color block; The server generates a verification code image and generates a verification-pass color block based on the color information of the verification code image; wherein the verification-pass color block is a color block that corresponds to the color in the verification code image; and the server generates an interference color block that is different from the verification-pass color block by comparing the verification-pass color block. A processing module, which selects at least one target color block according to the verification code image, the verification-passed color block, and the interference color block according to prompt rule information, and sends the selected target color block to the server; The receiving module is further configured to receive a verification result of the at least one target color block from the server; Among them, the server will splice the verified color blocks according to the preset splicing rules to obtain the verified color block image and the second order matrix corresponding to the verified color block image; verify the second order matrix and the first order matrix corresponding to the at least one target color block obtained. If the verification results are consistent, the verification is passed.

8. A computing device comprising: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the verification method of the verification code according to any one of claims 1 to 4 or an operation corresponding to the verification method of the verification code according to claim 5.

9. A computer storage medium storing at least one executable instruction, wherein the executable instruction causes a processor to execute an operation corresponding to the verification method of a verification code according to any one of claims 1 to 4 or an operation corresponding to the verification method of a verification code according to claim 5.

Citation Information

Patent Citations

  • Method and system using colors as verification code

    CN103678988A