Method and system for improving identification difficulty of graphic verification code machine
By adding similar or confusing letter combinations and random noise or interference elements to the graphic verification code, and using image editing software to adjust letter attributes and interframe differences to achieve dynamic display, the shortcomings of existing graphic verification codes in terms of user experience and security are solved, and the difficulty and security of machine recognition are significantly improved.
Patent Information
- Application Number
- CN202411521642.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-03-18
AI Technical Summary
Existing graphic verification codes have shortcomings in user experience and security, especially the risks of being easily cracked and privacy leaks, as well as the limitations of biometric recognition.
By adding similar or confusing letter combinations to the image and adding random noise or interference elements, the position, size, color and shape of letters in each frame are adjusted using image editing software, and the differences between frames are fine-tuned to meet the perceptual threshold of human visual retention, realizing dynamic display and increasing the difficulty of machine recognition.
It effectively improves the difficulty of machine recognition of graphic verification codes, enhances security, and maintains a good user experience, reducing the risk of cracking and privacy leakage.
Smart Images

Figure CN119646791A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method and a system for improving the difficulty of machine recognition of a graphic verification code, and belongs to the field of graphic recognition. Background Art
[0002] The use of human-computer identification such as graphic verification codes in the process of information system interaction is of great significance, such as:
[0003] Prevent malicious intrusion: With the increasing popularity of the Internet and digital devices, human-machine recognition technology can serve as an important security line of defense, effectively distinguishing real users from automated attack tools such as malware and robots, thereby preventing illegal intrusion and data leakage.
[0004] Enhanced identity authentication: In scenarios that require high security, such as bank transfers, online payments, and access to sensitive information, human-machine recognition technology can provide a more secure and reliable authentication method than traditional passwords, ensuring that only legitimate users can access and operate.
[0005] Improve security monitoring: By real-time monitoring and identifying user behavior characteristics, human-machine recognition technology can promptly detect abnormal operations, such as unauthorized access attempts, malware activities, etc., providing strong support for security monitoring and response.
[0006] Commonly used human-machine identification methods include:
[0007] Biometrics:
[0008] Face recognition: It uses facial features for identity authentication. It has the advantages of being contactless, natural, and not easily forgotten. It is widely used in access control systems, payment verification, and other scenarios.
[0009] Fingerprint recognition: Identity verification is performed by comparing fingerprint patterns. It has high accuracy and stability and is commonly used in mobile phone unlocking, access control systems, etc.
[0010] Iris recognition: It uses the uniqueness of the iris for identity authentication. It has high recognition accuracy, but the equipment cost is relatively high. It is suitable for scenarios with extremely high security requirements.
[0011] Behavioral feature recognition:
[0012] Slide verification: Requires users to slide a slider or puzzle along a specific trajectory to complete verification. By analyzing the user's sliding behavior, it is determined whether it is a real user operation, effectively preventing automated attacks.
[0013] Keyboard tapping pattern recognition: Identity authentication is performed by analyzing the user's keyboard tapping speed, force and other characteristics. It is suitable for scenarios that require long-term continuous input.
[0014] Mouse movement trajectory analysis: monitor the user's mouse movement trajectory on the computer and identify abnormal behavior patterns, such as fast and irregular movements, to determine whether it is a real user operation. Intelligent verification code: Traditional image verification codes have gradually been replaced by intelligent verification codes. The latter can generate more complex verification codes that are difficult to be recognized by automated tools by introducing machine learning algorithms, such as distorted text and overlapping graphics, thereby improving the security of verification.
[0015] Common methods to increase the difficulty of machine recognition for graphic verification include:
[0016] Add interference elements: Add interference lines, noise, background patterns, etc. to the verification code to make the verification code image more complex and increase the difficulty of machine recognition.
[0017] Diversify fonts and colors: Use a variety of fonts, sizes, colors, and random arrangements to make it difficult for machines to accurately recognize the characters in the verification code.
[0018] Image deformation: The verification code image is deformed by rotation, distortion, scaling, etc., making the shape and position of the characters unpredictable and increasing the difficulty of recognition.
[0019] Existing technologies do have some drawbacks in the field of human-machine recognition, mainly including:
[0020] Poor user experience: Graphic verification codes often cause inconvenience to users due to their complexity, especially for users with poor vision or using assistive devices, it becomes difficult to identify and enter verification codes.
[0021] Easy to crack: With the development of machine learning technology, automated scripts can already identify graphic verification codes more accurately, greatly reducing their protective effectiveness.
[0022] Privacy leakage risk: Graphic verification codes contain a large amount of user interaction data. If this data is obtained by criminals, it may lead to user privacy leakage.
[0023] Limitations of biometrics: Although biometrics technologies (such as fingerprint recognition and face recognition) are widely used, they are also inaccurate and easy to be copied and deceived. In addition, the leakage of biometric data may lead to serious privacy and security issues. Summary of the invention
[0024] In order to overcome the defects of the prior art, the present invention provides a method for improving the difficulty of machine recognition of graphic verification codes. The technical solution of the present invention is:
[0025] A method for increasing the difficulty of machine recognition of a graphic verification code comprises the following steps:
[0026] a. Add similar or easily confused letter combinations to the image, and add random noise or interference elements to increase the difficulty of computer recognition;
[0027] b. Use image editing software to adjust the position, size, color and shape of the letters in each frame to ensure that human observers can recognize the letters through the persistence of vision effect, while hindering the computer from quickly recognizing them;
[0028] c. Fine-tune the differences between frames to ensure that the changes are subtle and meet the perception threshold of human visual persistence to achieve dynamic display and increase the difficulty of machine recognition.
[0029] The step a is specifically:
[0030] 1.1 Select a set of basic letters, denoted as set A = {a1, a2, ..., an};
[0031] 1.2 Define a confusion metric function F(ai,aj) to calculate the visual confusion between any two different letters ai and aj in set A, where i≠j. The larger the value of F(ai,aj), the easier it is to confuse letters ai and aj.
[0032] 1.3 According to the preset confusion threshold θ, select the letter pair (ai, aj) that satisfies F(ai, aj)>θ as the confusion letter combination;
[0033] 1.4 Introduce a random noise generation algorithm. For each image frame, generate N random noise points according to the probability distribution P(N), where N = Poisson(λ), λ is the average density of the noise points;
[0034] 1.5 An interference element generation algorithm is introduced. According to the type of interference elements (such as interference lines, background patterns, etc.), interference elements are added to the image frame at a preset frequency f, and the frequency f is adjusted according to the visual impact of the interference elements.
[0035] The step b is specifically:
[0036] 2.1 Position adjustment:
[0037] Use the free transform tool of your image editing software to manually adjust the position of each letter. The new position can be calculated using the following formula:
[0038] xnew=xold+Δx; ynew=yold+Δy;
[0039] Where (x old ,y old ) is the original position, (x new ,y new ) is the new position, Δx and Δy are the changes on the x-axis and y-axis;
[0040] 2.2 Size Adjustment:
[0041] Through the scaling function, the letters in each frame are scaled to different degrees, and the scaling ratio is calculated by the following formula: where Δsize is the percentage change in size.
[0042] 2.3 Color adjustment:
[0043] Use the color adjustment tool of the image editing software to adjust the color of the letters in each frame. The color change is adjusted through the hue, saturation, and brightness model:
[0044] Hnew=Hold+ΔH;
[0045]
[0046] Among them, H old ,S old ,V old is the original hue, saturation, and brightness, H new ,S new ,V new are the new hue, saturation, and brightness, and ΔH, ΔS, and ΔV are the changes.
[0047] 2.4 Morphological adjustment: Use the distortion or liquefaction tool of the image editing software to adjust the shape of the letters. The morphological changes are approximately calculated using the following formula:
[0048] shapenew=shapeold×(1+Δshape), where shape old is the original shape, shapenew is the new shape, and Δshape is the ratio of the shape change.
[0049] The step c is specifically as follows:
[0050] 3.1 Inter-frame difference analysis: Analyze the differences between consecutive frames to ensure that the changes are subtle and meet the perception threshold of human visual persistence. The inter-frame difference is calculated using the following formula:
[0051] Where xi and yi are the brightness values of corresponding points in consecutive frames, and n is the number of points;
[0052] 3.2 Fine-tuning algorithm: Introduce character position encoding models based on visual vocabulary recognition, such as the open bigram model, spatial encoding model, and overlapping model. These models help recognize and understand the order of characters by encoding character position information, thereby achieving fine-tuning of inter-frame differences.
[0053] 3.3 Dynamic display adjustment: According to the visual persistence effect, adjust the frame rate and the time interval between each frame to achieve dynamic display. The appropriate frame rate is calculated by the following formula:
[0054] Where t is the time interval between each frame, and according to the persistence of vision effect, t is controlled between 0.1 and 0.4 seconds.
[0055] A system based on a method for improving the difficulty of machine recognition of a graphic verification code, comprising:
[0056] An image generation module is used to add similar or easily confused letter combinations to the image, and add random noise or interference elements to increase the difficulty of computer recognition;
[0057] An adjustment module, used for adjusting the position, size, color and shape of letters in each frame through image editing software, so as to ensure that human observers can recognize the letters through the persistence of vision effect, while hindering the computer from quickly recognizing them;
[0058] The fine-tuning module is used to fine-tune the differences between frames to ensure that the changes are subtle and meet the perception threshold of human visual persistence, so as to achieve dynamic display and increase the difficulty of machine recognition.
[0059] The advantages of the present invention are:
[0060] Enhanced security: By introducing similar or easily confused letter combinations, as well as random noise or interference elements, it effectively increases the difficulty for automated scripts and machine learning models to recognize verification codes, thereby improving the security of the system.
[0061] Exploiting the persistence of vision effect: Adjusting the position, size, color, and shape of letters allows human observers to use the persistence of vision effect to identify dynamically changing verification codes, while computer vision systems find it difficult to capture and process such rapidly changing information.
[0062] Improve user experience: Fine-tuning the difference between frames to meet the perception threshold of human visual persistence can increase the difficulty of machine recognition without significantly affecting the recognition ability of human users, thereby improving security while maintaining a good user experience.
[0063] Dynamic display increases difficulty: Through dynamic display technology, the verification code has subtle changes between consecutive frames. Such dynamic changes are more difficult for machines to capture and recognize, while human users can recognize them by relying on the visual persistence effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a schematic diagram of the main structure of the system of the present invention. DETAILED DESCRIPTION
[0065] The present invention will be further described below in conjunction with specific embodiments, and the advantages and features of the present invention will become clearer as the description proceeds. However, these embodiments are exemplary only and do not constitute any limitation to the scope of the present invention. It should be understood by those skilled in the art that the details and forms of the technical solution of the present invention may be modified or replaced without departing from the spirit and scope of the present invention, but these modifications and replacements all fall within the scope of protection of the present invention.
[0066] See also Figure 1 The present invention relates to a method for improving the difficulty of machine recognition of graphic verification codes, comprising the following steps:
[0067] a. Add similar or easily confused letter combinations to the image, and add random noise or interference elements to increase the difficulty of computer recognition;
[0068] b. Use image editing software to adjust the position, size, color and shape of the letters in each frame to ensure that human observers can recognize the letters through the persistence of vision effect, while hindering the computer from quickly recognizing them;
[0069] c. Fine-tune the differences between frames to ensure that the changes are subtle and meet the perception threshold of human visual persistence to achieve dynamic display and increase the difficulty of machine recognition.
[0070] In the present invention, persistence of vision, also known as the "afterimage" effect, refers to the time delay required for the brain to process light signals after the human eye observes an object, resulting in the visual image being retained for a short period of time after the light stimulation stops. This phenomenon is the key principle for the formation of a continuous visual experience in media such as animation and movies.
[0071] Compared with traditional static graphic verification codes, dynamic string and image verification codes (hereinafter referred to as "dynamic verification codes") based on the principle of visual persistence have the following significant advantages:
[0072] 1. Enhanced Security
[0073] Strengthening against automated attacks: Dynamic verification codes use the visual persistence of the human eye to allow users to recognize stable information in continuous images. However, it is difficult for computers to accurately extract valid data when processing rapidly switching frames, which significantly increases the difficulty of countering automated attacks such as OCR software and machine learning algorithms.
[0074] Reduce cracking risk: With the advancement of image recognition technology and artificial intelligence, the risk of automatic cracking of static verification codes is increasing. Dynamic verification codes effectively reduce the possibility of being bypassed by automated tools by introducing dynamic changes in the time dimension.
[0075] 2. Improved User Experience
[0076] Reduce user recognition difficulty: Although the complexity of dynamic verification codes has increased, thanks to the visual persistence effect, users can identify information more easily, avoiding the tedious recognition process required for traditional verification codes.
[0077] Improve verification efficiency: The use of the visual persistence effect enables users to continuously identify information in multiple frames in a short period of time, thereby improving the speed and convenience of verification.
[0078] 3. Rich design flexibility
[0079] Diverse display effects: Dynamic verification codes create rich visual effects by adjusting the display speed, position, size and color of characters, providing designers with a wide range of design space to adapt to different application scenarios and needs.
[0080] Integration of visual elements: Dynamic verification codes combine images, animations and other elements to create a more interactive and interesting verification experience, which not only enhances user participation but also increases the attractiveness of the verification code.
[0081] 4. Excellent adaptability
[0082] Adapt to various network environments: Dynamic verification codes can maintain stable display and recognition effects under different network conditions, meet the needs of cross-regional and cross-network environments, and are especially suitable for widely distributed user groups.
[0083] Considering different user needs: The design of the dynamic verification code takes into account the specific needs of different user groups, such as age, vision condition, etc., providing a more humane and convenient verification method.
[0084] The step a is specifically:
[0085] 1.1 Select a set of basic letters, denoted as set A = {a1, a2, ..., an};
[0086] 1.2 Define a confusion metric function F(ai,aj) to calculate the visual confusion between any two different letters ai and aj in set A, where i≠j. The larger the value of F(ai,aj), the easier it is to confuse letters ai and aj.
[0087] 1.3 According to the preset confusion threshold θ, select the letter pair (ai, aj) that satisfies F(ai, aj)>θ as the confusion letter combination;
[0088] 1.4 Introduce a random noise generation algorithm. For each image frame, generate N random noise points according to the probability distribution P(N), where N = Poisson(λ), λ is the average density of the noise points;
[0089] 1.5 An interference element generation algorithm is introduced. According to the type of interference elements (such as interference lines, background patterns, etc.), interference elements are added to the image frame at a preset frequency f, and the frequency f is adjusted according to the visual impact of the interference elements.
[0090] The step b is specifically:
[0091] 2.1 Position adjustment:
[0092] Use the free transform tool of your image editing software to manually adjust the position of each letter. The new position can be calculated using the following formula:
[0093] xnew=xold+Δx; ynew=yold+Δy;
[0094] Where (xold, yold) is the original position, (xnew, ynew) is the new position, Δx and Δy are the changes on the x-axis and y-axis;
[0095] 2.2 Size Adjustment:
[0096] Through the scaling function, the letters in each frame are scaled to different degrees, and the scaling ratio is calculated by the following formula: where Δsize is the percentage change in size.
[0097] 2.3 Color adjustment:
[0098] Use the color adjustment tool of the image editing software to adjust the color of the letters in each frame. The color change is adjusted through the hue, saturation, and brightness model:
[0099] Hnew=Hold+ΔH;
[0100]
[0101] Among them, Hold, Sold, Vold are the original hue, saturation, and brightness, Hnew, Snew, Vnew are the new hue, saturation, and brightness, and ΔH, ΔS, ΔV are the changes.
[0102] 2.4 Morphological adjustment: Use the distortion or liquefaction tool of the image editing software to adjust the shape of the letters. The morphological changes are approximately calculated using the following formula:
[0103] shapenew=shapeold×(1+Δshape), where shapeold is the original shape, shapenew is the new shape, and Δshape is the ratio of the shape change.
[0104] The step c is specifically as follows:
[0105] 3.1 Inter-frame difference analysis: Analyze the differences between consecutive frames to ensure that the changes are subtle and meet the perception threshold of human visual persistence. The inter-frame difference is calculated using the following formula:
[0106] Where xi and yi are the brightness values of corresponding points in consecutive frames, and n is the number of points;
[0107] 3.2 Fine-tuning algorithm: Introduce character position encoding models based on visual vocabulary recognition, such as the open bigram model, spatial encoding model, and overlapping model. These models help recognize and understand the order of characters by encoding character position information, thereby achieving fine-tuning of inter-frame differences.
[0108] 3.3 Dynamic display adjustment: According to the visual persistence effect, adjust the frame rate and the time interval between each frame to achieve dynamic display. The appropriate frame rate is calculated by the following formula:
[0109] Where t is the time interval between each frame, and according to the persistence of vision effect, t is controlled between 0.1 and 0.4 seconds.
[0110] The present invention also relates to a system based on a method for improving the difficulty of machine recognition of a graphic verification code, comprising:
[0111] Image generation module 1, used to add similar or easily confused letter combinations to the image, and add random noise or interference elements to increase the difficulty of computer recognition;
[0112] An adjustment module 2 is used to adjust the position, size, color and shape of the letters in each frame through image editing software to ensure that human observers can recognize the letters through the persistence of vision effect, while hindering the computer from quickly recognizing them;
[0113] The fine-tuning module 3 is used to fine-tune the difference between frames to ensure that the changes are subtle and meet the perception threshold of human visual persistence, so as to achieve dynamic display and increase the difficulty of machine recognition.
[0114] The present invention relates to a method of using the persistence of vision effect to confuse computer vision systems while the image content remains recognizable to human observers. Here is how this process works:
[0115] 1. Select letter content: First, select a group of letters that are similar in shape or easily confused, such as 'B' and 'D', 'P' and 'R', etc. The purpose of this is to increase the difficulty of the computer to automatically recognize the letter content.
[0116] 2. Adding distracting elements: Add random noise or other distracting elements such as lines, spots or blur effects to the selected letter images. These distracting elements can further confuse the computer vision system while having less impact on human vision.
[0117] 3. Construct static image frames: Use image editing software to create a series of static image frames. In each frame, the position, size, color, and shape of the letters change slightly. These changes need to be fine-tuned to ensure that human observers can connect these changes and recognize them as the same letter through the persistence of vision effect. At the same time, these changes must be significant enough to hinder the computer's rapid recognition process.
[0118] 4. Fine-tune the differences between frames: Make sure the changes between adjacent frames are subtle enough to meet the human visual persistence perception threshold. Typically, this threshold is between 0.1 and 0.4 seconds. When these frames are played continuously at an appropriate speed (for example, 0.1 seconds per frame), human observers can see them as continuous dynamic images and recognize letters. However, for computers, because the changes between frames are too subtle, it is difficult to accurately recognize letters when analyzing quickly.
[0119] The persistence of vision effect is used to achieve image content that is transparent to humans but challenging to computers. This technology can be applied in situations where automatic content recognition needs to be prevented, such as captchas, copyright protection, or any scenario where human users and automated programs need to be distinguished.
[0120] In summary, dynamic verification codes based on the principle of visual persistence have obvious advantages in improving security, optimizing user experience, enhancing design flexibility and improving adaptability, enabling them to demonstrate excellent performance in preventing automated attacks, ensuring website security and improving user interaction.
[0121] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for increasing the difficulty of machine recognition of a graphic verification code, characterized in that: The following steps are involved: a. Add similar or easily confused letter combinations to the image, and add random noise or interference elements to increase the difficulty of computer recognition; b. Use image editing software to adjust the position, size, color and shape of the letters in each frame to ensure that human observers can recognize the letters through the persistence of vision effect, while hindering the computer from quickly recognizing them; c. Fine-tune the differences between frames to ensure that the changes are subtle and meet the perception threshold of human visual persistence to achieve dynamic display and increase the difficulty of machine recognition.
2. A method for improving the difficulty of machine recognition of graphic verification codes according to claim 1, characterized in that: The step a is specifically: 1.1 Select a set of basic letters, denoted as set A = {a1, a2, ..., an}; 1.2 Define a confusion metric function F(ai,aj) to calculate the visual confusion between any two different letters ai and aj in set A, where i≠j. The larger the value of F(ai,aj), the easier it is to confuse letters ai and aj. 1.3 According to the preset confusion threshold θ, select the letter pair (ai, aj) that satisfies F(ai, aj)>θ as the confusion letter combination; 1.4 Introduce a random noise generation algorithm. For each image frame, generate N random noise points according to the probability distribution P(N), where N = Poisson(λ), λ is the average density of the noise points; 1.5 introduces an interference element generation algorithm. According to the type of interference elements, interference elements are added to the image frame at a preset frequency f, and the frequency f is adjusted according to the visual impact of the interference elements.
3. A method for improving the difficulty of machine recognition of graphic verification codes according to claim 1, characterized in that: The step b is specifically: 2.1 Position adjustment: Use the free transform tool of your image editing software to manually adjust the position of each letter. The new position can be calculated using the following formula: x new =x old +Δx;y new =y old +Δy; Where (x old ,y old ) is the original position, (x new ,y new ) is the new position, Δx and Δy are the changes on the x-axis and y-axis; 2.2 Size Adjustment: Through the scaling function, the letters in each frame are scaled to different degrees, and the scaling ratio is calculated by the following formula: Where Δsize is the percentage of size change; 2.3 Color adjustment: Use the color adjustment tool of the image editing software to adjust the color of the letters in each frame. The color change is adjusted through the hue, saturation, and brightness model: H new =H old ×ΔH; Among them, H old ,S old ,V old is the original hue, saturation, and brightness, H new ,S new ,V new are the new hue, saturation, and brightness, and ΔH, ΔS, and ΔV are the changes. 2.4 Morphological adjustment: Use the distortion or liquefaction tool of the image editing software to adjust the shape of the letters. The morphological changes are approximately calculated using the following formula: shape new =shape old ×(1+Δshape), where shape old is the original shape, shapenew is the new shape, and Δshape is the ratio of the shape change.
4. A method for improving the difficulty of machine recognition of graphic verification codes according to claim 1, characterized in that: The step c is specifically as follows: 3.1 Inter-frame difference analysis: Analyze the differences between consecutive frames to ensure that the changes are subtle and meet the perception threshold of human visual persistence. The inter-frame difference is calculated using the following formula: Where xi and yi are the brightness values of corresponding points in consecutive frames, and n is the number of points; 3.2 Fine-tuning algorithm: Introduce a character position encoding model based on visual vocabulary recognition. The model encodes the character position information; 3.3 Dynamic display adjustment: According to the visual persistence effect, adjust the frame rate and the time interval between each frame to achieve dynamic display. The appropriate frame rate is calculated by the following formula: Where t is the time interval between each frame, and according to the persistence of vision effect, t is controlled between 0.1 and 0.4 seconds.
5. A system for improving the difficulty of machine recognition of graphic verification codes based on any one of claims 1 to 3, characterized in that: include An image generation module is used to add similar or easily confused letter combinations to the image, and add random noise or interference elements to increase the difficulty of computer recognition; An adjustment module, used for adjusting the position, size, color and shape of letters in each frame through image editing software, so as to ensure that human observers can recognize the letters through the persistence of vision effect, while hindering the computer from quickly recognizing them; The fine-tuning module is used to fine-tune the differences between frames to ensure that the changes are subtle and meet the perception threshold of human visual persistence, so as to achieve dynamic display and increase the difficulty of machine recognition.
Citation Information
Cited By
Payment data exception recognition system based on behavior feature recognition
CN122114926A