Verification Code Image Segmentation for Stronger OCR Resistance

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering Contradiction Analysis

1Ease of operation

If verification code is displayed as a complete image, then user recognition is easy, but OCR resistance is poor

Engineering Contradiction:
Improveuser recognitionVSAvoidOCR resistance
Core Design Contradiction:
Ease of operationVSReliability

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #3Local quality

2Reliability

If verification code is divided into multiple regions with different colors, then OCR resistance is improved, but image complexity increases

Engineering Contradiction:
ImproveOCR resistanceVSAvoidimage structure
Core Design Contradiction:
ReliabilityVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #32Color changes

Data Source

PatentUS12493680B2Verification code processing method and apparatus, and device and storage medium
Publication Date: 2025.12.09 DOUYIN VISION CO LTD
  • US12493680B2 patent drawing
  • US12493680B2 patent drawing
  • US12493680B2 patent drawing

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.