Verification Code Image Segmentation for Stronger OCR Resistance
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Verification codes are easily cracked by machine learning and computer vision technologies, leading to poor OCR resistance and ineffective interception of malicious behaviors.
Innovation Solution
The verification code image is divided into multiple regions with different colors, and the input prompt information is used to guide the user in inputting specified verification codes, breaking the overall structure and improving OCR resistance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If verification code is displayed as a complete image, then user recognition is easy, but OCR resistance is poor
Solution Approach 1:
The verification code image is divided into multiple regions (first region and second region), with each region containing parts of the verification code. This segmentation makes it difficult for OCR to recognize the complete verification code while still allowing users to see and input the code by selecting specific regions.
Solution Approach 2:
Different regions of the verification code image are assigned different colors (first color for first region, second color for second region). This creates local quality differences that disrupt the overall structure, making OCR recognition difficult while maintaining user ability to distinguish and select specific regions.
2Reliability
If verification code is divided into multiple regions with different colors, then OCR resistance is improved, but image complexity increases
Solution Approach 1:
The verification code image is divided into multiple regions with different colors, creating a segmented structure that disrupts OCR recognition. The segmentation is performed in a controlled manner to balance OCR resistance with manageable complexity.
Solution Approach 2:
Different regions of the verification code image are assigned different colors to create visual distinction and disrupt OCR recognition. The color changes are applied systematically to regions rather than randomly, controlling the complexity while achieving the desired OCR resistance.
Data Source
AI summary
Provided are a verification code processing method and apparatus, and a device and a storage medium. The method comprises: upon receiving a trigger operation for verification code display, firstly acquiring a verification code image and verification code input prompt information; and then displaying the verification code image and the verification code input prompt information for verification code input. In the embodiments of the present disclosure, since a verification code image comprises one or more verification codes, at least one verification code is divided into a plurality of areas, and at least two areas are different in color, the overall structure of the verification code is destroyed, thereby improving the OCR resistance performance of the verification code, and achieving the purpose of effectively intercepting malicious behavior.


