Click verification code identification and verification method and system based on time identification
By generating a time grid and adding interference elements, the problems of insufficient security, poor user experience and high maintenance cost of existing verification code technology are solved, and a verification code recognition and verification method with high security, good user experience and low maintenance cost is realized.
Patent Information
- Application Number
- CN202510800931.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-09-30
AI Technical Summary
Existing verification code technology has problems such as insufficient security, poor user experience and high maintenance costs. It also lacks flexibility and is difficult to adapt to the needs of different scenarios.
By randomly generating target time and interference time, a time grid is generated, and an independent picture is generated for each time to add interference elements. After the user selects, it is verified whether the time matches the target time.
It improves the security of verification codes, enhances user experience, reduces maintenance costs, and enhances system flexibility.
Smart Images

Figure CN120729564A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security technology, and more particularly to a method and system for identifying and verifying a click verification code based on time recognition. Background Art
[0002] With the rapid development of Internet technology, network security issues are becoming increasingly prominent. As an important means of preventing automated attacks, the security of verification codes is directly related to the security of network services.
[0003] The current mainstream verification code technologies mainly include:
[0004] Traditional text verification code: digits or letters are processed by distortion, deformation, adding noise, etc., but can be easily recognized by OCR technology;
[0005] Sliding verification code: Verification is performed by aligning the slider with the background image, but there is a risk of being cracked by automated tools;
[0006] Click verification code: requires users to click on a specific element in the image, but the content is simple and easy to be recognized by machine learning models;
[0007] Behavioral verification code: Verification is performed by analyzing user operation behavior, but it is complex to implement and provides a poor user experience.
[0008] These verification code technologies have the following problems:
[0009] Insufficient security: easily cracked by automated tools and machine learning models;
[0010] Poor user experience: The verification process is complicated and time-consuming;
[0011] High maintenance cost: The verification code library needs to be updated regularly to prevent it from being cracked;
[0012] Lack of flexibility: The verification method is fixed and difficult to adapt to the needs of different scenarios. Summary of the Invention
[0013] To address the above issues, the present invention proposes a time-based verification code recognition and verification method, comprising:
[0014] Randomly generate a target time, and based on the target time, generate random interference times, and after sorting the target time and interference times, generate a time grid;
[0015] Generate an independent picture for each time in the time grid, and add interference elements to the independent picture to generate a gridded click verification code;
[0016] After the user selects the verification code, the time corresponding to the verification code clicked by the user is identified, and verification is completed by confirming whether the corresponding time matches the target time.
[0017] Optionally, the target time format is HH:MM;
[0018] Here, HH stands for hours and MM stands for minutes.
[0019] Optionally, the random time includes eight, and the uniform target time is different.
[0020] Optionally, the time grid is a 3×3 time grid.
[0021] Optionally, adding interference elements to the independent image includes:
[0022] Adding random background color blocks to the independent image, including: adding 3-5 rectangles of random positions and random colors;
[0023] Adding interference lines to the independent image, including: adding 5-10 straight lines / curves with random positions and random colors;
[0024] Adding noise to the independent image, including: adding 50-100 points of random positions and random colors;
[0025] Add text distortion to the independent image, including random offset and rotation of the time text.
[0026] Optionally, if the corresponding time does not match the target time, the verification fails;
[0027] Otherwise, the verification succeeds.
[0028] In another aspect, the present invention further proposes a time-based verification code recognition and verification system, comprising:
[0029] A gridding unit is used to randomly generate a target time, and based on the target time, generate random interference times, and generate a time grid after sorting the target time and interference times;
[0030] A verification code generating unit, configured to generate an independent image for each time in the time grid, and add interference elements to the independent image to generate a gridded point-selection verification code;
[0031] The identification and verification unit is used to identify the time corresponding to the verification code clicked by the user after the user selects the verification code, and complete the verification by confirming whether the corresponding time matches the target time.
[0032] Optionally, adding interference elements to the independent image includes:
[0033] Adding random background color blocks to the independent image, including: adding 3-5 rectangles of random positions and random colors;
[0034] Adding interference lines to the independent image, including: adding 5-10 straight lines / curves with random positions and random colors;
[0035] Adding noise to the independent image, including: adding 50-100 points of random positions and random colors;
[0036] Add text distortion to the independent image, including random offset and rotation of the time text.
[0037] In yet another aspect, the present invention further provides a computing device comprising: one or more processors;
[0038] a processor for executing one or more programs;
[0039] When the one or more programs are executed by the one or more processors, the above-described method is implemented.
[0040] In another aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed, the method described above is implemented.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] The present invention provides a time-based verification code recognition and verification method, comprising: randomly generating a target time, and based on the target time, generating random interference times, and sorting the target time and interference times to generate a time grid; generating an independent image for each time in the time grid, and adding interference elements to the independent image to generate a gridded verification code; after the user selects the verification code, identifying the time corresponding to the verification code clicked by the user, and completing verification by confirming whether the corresponding time matches the target time. Compared with existing technologies, the present invention has higher security, better user experience, lower maintenance costs, and higher flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a flow chart of the method of the present invention;
[0044] Figure 2 A flow chart of generating a time verification code according to an embodiment of the method of the present invention;
[0045] Figure 3 This is a sample diagram of a verification code according to an embodiment of the method of the present invention;
[0046] Figure 4 A schematic diagram of a verification process of an embodiment of the method of the present invention;
[0047] Figure 5 This is a schematic diagram of a verification code display interface according to an embodiment of the method of the present invention;
[0048] Figure 6 It is a structural diagram of the system of the present invention. DETAILED DESCRIPTION
[0049] Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings. However, the present invention may be embodied in many different forms and is not limited to the embodiments described herein. These embodiments are provided to provide a thorough and complete disclosure of the present invention and to fully convey the scope of the present invention to those skilled in the art. The terminology used in the exemplary embodiments shown in the accompanying drawings is not intended to limit the present invention. In the accompanying drawings, identical elements are denoted by the same reference numerals.
[0050] Unless otherwise specified, the terms used herein (including technical terms) have the meanings commonly understood by those skilled in the art. In addition, it is understood that terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.
[0051] Example 1:
[0052] The present invention proposes a method for identifying and verifying a click verification code based on time recognition, such as Figure 1 As shown, including:
[0053] Step 1: randomly generate a target time, and based on the target time, generate random interference times, and after sorting the target time and interference times, generate a time grid;
[0054] Step 2: Generate an independent image for each time in the time grid, and add interference elements to the independent image to generate a gridded click verification code;
[0055] Step 3: After the user selects the verification code, the time corresponding to the verification code selected by the user is identified, and verification is completed by confirming whether the corresponding time matches the target time.
[0056] The format of target time is HH:MM;
[0057] Here, HH stands for hours and MM stands for minutes.
[0058] Among them, the random time includes eight, and the uniform target time is different.
[0059] The time grid is a 3×3 time grid.
[0060] Adding interference elements to the independent image includes:
[0061] Adding random background color blocks to the independent image, including: adding 3-5 rectangles of random positions and random colors;
[0062] Adding interference lines to the independent image, including: adding 5-10 straight lines / curves with random positions and random colors;
[0063] Adding noise to the independent image, including: adding 50-100 points of random positions and random colors;
[0064] Add text distortion to the independent image, including random offset and rotation of the time text.
[0065] Among them, if the corresponding time does not match the target time, the verification fails;
[0066] Otherwise, the verification succeeds.
[0067] The present invention will be further described below with reference to specific cases:
[0068] Implementation process such as Figure 2 As shown, including:
[0069] S1: Generate target time: randomly generate a target time in the format of HH:MM;
[0070] S2: Generate interference time: Generate 8 random times different from the target time;
[0071] S3: Time sorting: Randomly sort all times to form a 3x3 grid, such as Figure 3 As shown;
[0072] S4: Image processing: Generate independent images for each time and add interference elements;
[0073] S5: Verification code display: The processed image is displayed to the user in a 3x3 grid format, such as Figure 4 As shown;
[0074] S6: User verification: Receive user selection and verify whether the selected time matches the target time. The verification process is as follows: Figure 5 shown.
[0075] The interference elements in step S4 include:
[0076] 1) Random background color blocks: Generate 3-5 rectangles of random positions and colors;
[0077] 2) Interference lines: Add 5-10 straight and curved lines with random positions and colors;
[0078] 3) Noise: Add 50-100 points of random positions and colors;
[0079] 4) Text distortion: Randomly offset and rotate the time text.
[0080] Compared with the prior art, the present invention has the following beneficial effects:
[0081] High security: Multiple interference technologies make OCR difficult to recognize; dynamic generation prevents pre-cracking; time verification increases the difficulty of recognition.
[0082] Good user experience: the interface is simple and intuitive; the verification process is fast; the operation is simple and easy to use.
[0083] Low maintenance cost: no need to maintain verification code library; the system automatically generates and updates; and supports dynamic adjustment of difficulty.
[0084] Strong flexibility: customizable interference elements; support for multiple time formats; easy integration into existing systems.
[0085] Example 2:
[0086] The present invention also proposes a time-based point-to-point verification code recognition and verification system 200, such as Figure 6 As shown, including:
[0087] The gridding unit 201 is configured to randomly generate a target time, generate random interference times based on the target time, and generate a time grid after sorting the target time and the interference times;
[0088] The verification code generating unit 202 is configured to generate an independent image for each time in the time grid, and add interference elements to the independent image to generate a gridded point-to-point verification code;
[0089] The identification and verification unit 203 is used to identify the time corresponding to the verification code clicked by the user after the user selects the verification code, and complete the verification by confirming whether the corresponding time matches the target time.
[0090] Adding interference elements to the independent image includes:
[0091] Adding random background color blocks to the independent image, including: adding 3-5 rectangles of random positions and random colors;
[0092] Adding interference lines to the independent image, including: adding 5-10 straight lines / curves with random positions and random colors;
[0093] Adding noise to the independent image, including: adding 50-100 points of random positions and random colors;
[0094] Add text distortion to the independent image, including random offset and rotation of the time text.
[0095] Compared with the existing technology, the present invention has higher security, better user experience, lower maintenance cost and higher flexibility.
[0096] Example 3:
[0097] Based on the same inventive concept, the present invention also provides a computer device, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function, so as to implement the steps of the method in the above embodiment.
[0098] Example 4:
[0099] Based on the same inventive concept, the present invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It can be understood that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space that stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space. These instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the steps of the method in the above embodiment.
[0100] It will be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention may be implemented in various computer languages, for example, the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0101] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0102] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0104] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the invention. Thus, the present invention is intended to include such changes and modifications as fall within the scope of the claims and their equivalents.
Claims
1. A method for identifying and verifying a click verification code based on time recognition, characterized in that: include: Randomly generate a target time, and based on the target time, generate random interference times, and after sorting the target time and interference times, generate a time grid; Generate an independent picture for each time in the time grid, and add interference elements to the independent picture to generate a gridded click verification code; After the user selects the verification code, the time corresponding to the verification code clicked by the user is identified, and verification is completed by confirming whether the corresponding time matches the target time.
2. The method for identifying and verifying a click verification code according to claim 1, wherein: The target time format is HH:MM; Here, HH stands for hours and MM stands for minutes.
3. The method for identifying and verifying a click verification code according to claim 1, wherein: The random times include eight, and the uniform target times are different.
4. The method for identifying and verifying a click verification code according to claim 1, wherein: The time grid is a 3×3 time grid.
5. The method for identifying and verifying a click verification code according to claim 1, wherein: Adding interference elements to the independent image includes: Adding random background color blocks to the independent image, including: adding 3-5 rectangles of random positions and random colors; Adding interference lines to the independent image, including: adding 5-10 straight lines / curves with random positions and random colors; Adding noise to the independent image, including: adding 50-100 points of random positions and random colors; Add text distortion to the independent image, including random offset and rotation of the time text.
6. The method for identifying and verifying a click verification code according to claim 1, wherein: If the corresponding time does not match the target time, the verification fails; Otherwise, the verification succeeds.
7. A time-based verification code recognition and verification system, characterized in that: include: A gridding unit is used to randomly generate a target time, and based on the target time, generate random interference times, and generate a time grid after sorting the target time and interference times; A verification code generating unit, configured to generate an independent image for each time in the time grid, and add interference elements to the independent image to generate a gridded point-selection verification code; The identification and verification unit is used to identify the time corresponding to the verification code clicked by the user after the user selects the verification code, and complete the verification by confirming whether the corresponding time matches the target time.
8. The click verification code recognition and verification system according to claim 7, characterized in that: Adding interference elements to the independent image includes: Adding random background color blocks to the independent image, including: adding 3-5 rectangles of random positions and random colors; Adding interference lines to the independent image, including: adding 5-10 straight lines / curves with random positions and random colors; Adding noise to the independent image, including: adding 50-100 points of random positions and random colors; Add text distortion to the independent image, including random offset and rotation of the time text.
9. A computer device, characterized in that: include: one or more processors; a processor for executing one or more programs; When the one or more programs are executed by the one or more processors, the method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed, the method according to any one of claims 1 to 6 is implemented.