Seal identification and original discrimination method and device

By using a feature-driven multi-strategy recognition method, multiple recognition sub-strategy engines are adaptively selected or triggered in parallel, and multi-source evidence is combined for fusion adjudication. This solves the problem of insufficient adaptability and accuracy of seal recognition and discrimination in existing technologies, and achieves efficient and reliable original seal identification under complex conditions.

CN120997855BActive Publication Date: 2026-04-14INSPUR SOFTWARE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR SOFTWARE CO LTD
Filing Date
2025-10-22
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies for seal recognition and discrimination suffer from insufficient adaptability, inadequate discrimination dimensions, and insufficient business applicability. In particular, they have low accuracy in scenarios involving photocopies and distorted seals, making it difficult to meet the automated processing needs of complex documents.

Method used

A feature-driven multi-strategy recognition method is adopted. Through seal detection and feature generation, multiple recognition sub-strategy engines are adaptively selected or triggered in parallel. Combined with multi-source evidence, the method performs fusion adjudication, outputs seal recognition text, and distinguishes between original and copy.

Benefits of technology

It maintains high recognition accuracy and stability under complex conditions, provides structured output, improves the reliability and interpretability of discrimination, adapts to different sources and seal forms, and significantly improves the discrimination accuracy in photocopy scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997855B_ABST
    Figure CN120997855B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image processing and pattern recognition, and specifically provides a seal recognition and original discrimination method and device, which has the following steps: S1, input and preprocessing, receiving an input file image, and completing standardization and targeted enhancement processing before entering the seal detection link; S2, seal detection and feature generation, automatically positioning the seal area in the preprocessed image, extracting the seal block, performing feature analysis, and generating a seal feature vector; S3, on the basis of the seal feature vector output in the seal detection and feature generation, adaptively selecting or parallel triggering multiple recognition sub-strategy engines through a routing decision unit, and outputting a candidate recognition result set; S4, on the basis of the multi-strategy recognition result, generating the final seal recognition text, and completing the discrimination of the original / copy in combination with multi-source evidence. Compared with the prior art, the present application can significantly improve the accuracy and robustness of seal recognition, and has good engineering application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing and pattern recognition technology, specifically providing a method and apparatus for seal recognition and original document identification. Background Technology

[0002] In scenarios such as official document and contract management, seal recognition and authentication are crucial steps in automated document processing. Beyond recognizing the text and shape of the seal, practical business operations also require determining whether the seal on a document is a direct stamp of the original or a copy / reprint. Distinguishing between originals and copies directly impacts the legal validity of documents and business approval processes, thus creating an urgent need in intelligent systems.

[0003] Existing technologies mainly focus on the following two aspects:

[0004] Seal content recognition: Common methods include detecting the seal area and then performing OCR recognition, or flattening a circular seal using polar coordinates and then performing text recognition. These methods achieve good results in scenarios with high seal clarity, but the accuracy drops significantly in cases of blurry, photocopied, or overlapping seals.

[0005] Seal authenticity verification: Some studies have attempted to determine the authenticity of seals through template comparison or image similarity, which is suitable for counterfeit detection, but its ability to distinguish between "original and copy" is insufficient and cannot meet the needs of automatic identification of photocopied documents.

[0006] Publication number CN113705330A proposes a method to determine authenticity by comparing the document with a template of retained stamps, combined with local sampling and feature comparison. This method relies on the original template and has limited applicability to existing documents, especially photocopies, where a reference sample is unavailable.

[0007] Publication number CN116778503A uses OCR to recognize the text on the seal and then compares it with a reference image to verify authenticity. This method mainly focuses on the consistency of text content, but it lacks processing for common issues in photocopies such as color degradation, scanning noise, and texture features, making it difficult to distinguish between the original and the photocopy.

[0008] In summary, the existing technology has the following shortcomings:

[0009] Inadequate adaptability: It relies on a single recognition strategy and lacks the ability to adaptively select paths based on image features;

[0010] Insufficient discriminative dimensions: It focuses too much on "authenticity identification through template comparison" and lacks an effective mechanism for determining the authenticity of original documents and photocopies;

[0011] Insufficient business practicality: The output results are usually text information, lacking structured extraction and integration with business logic, making it difficult to directly support government automation applications.

[0012] Therefore, there is an urgent need for a seal recognition method and system that can integrate multiple recognition strategies, support original document identification, and provide structured output to meet the actual needs of processing complex seal documents. Summary of the Invention

[0013] This invention addresses the shortcomings of the prior art by providing a highly practical method for seal recognition and original document identification.

[0014] A further technical objective of this invention is to provide a reasonably designed, safe, and applicable device for seal recognition and original document identification.

[0015] The technical solution adopted by this invention to solve its technical problem is:

[0016] A method for seal recognition and original document authentication includes the following steps:

[0017] S1. Input and Preprocessing: Receives the input file image and performs standardization and targeted enhancement processing before entering the seal detection stage;

[0018] S2. Seal detection and feature generation: Automatically locate the seal area in the preprocessed image, extract the seal patch, perform feature analysis on it, and generate seal feature vector.

[0019] S3, Feature-driven multi-strategy recognition: Based on the seal feature vector output in seal detection and feature generation, multiple recognition sub-strategy engines are adaptively selected or triggered in parallel by the routing decision unit to output a set of candidate recognition results.

[0020] S4. Fusion adjudication and original document identification: Based on the multi-strategy identification results, the final seal identification text is generated, and the identification of original documents / copies is completed by combining multi-source evidence.

[0021] Furthermore, step S1 includes:

[0022] S1-1. File format standardization and rendering;

[0023] For PDF files, the built-in rendering engine converts them into image matrices page by page; for image files, they are directly loaded and converted into a unified RGB channel representation.

[0024] S1-2, Resolution Normalization and Scale Adjustment;

[0025] The resolution of the input image is detected and unified, scaled to a preset reference size, and an anti-aliasing interpolation method is used.

[0026] S1-3, Enhanced color and contrast;

[0027] Adaptive channel enhancement is applied to prominent color areas, while histogram equalization and background grayscale suppression are combined to improve the contrast between the stamp area and the background.

[0028] S1-4, Noise Suppression and Edge Enhancement;

[0029] Interference is suppressed by using filtering methods, and the edge area of ​​the seal is lightly enhanced after noise reduction to highlight the seal outline and the strokes of the characters.

[0030] S1-5, Metadata retention;

[0031] When outputting the image tensor, metadata information is retained, including file source, page number, and resolution.

[0032] Furthermore, step S2 includes:

[0033] S2-1, Seal positioning;

[0034] The image is scanned frame by frame using a deep learning-based object detection algorithm to identify potential stamp regions. The detection model is trained by introducing diverse stamp samples and data augmentation is used to improve robustness. The localization results are output in the form of bounding boxes or segmentation masks.

[0035] S2-2, Patch Extraction and Geometric Correction;

[0036] Based on the test results, the stamp image is cut out, and geometric correction is performed when necessary. For stamp areas that are skewed in the photograph or scan, affine transformation or perspective transformation can be used to correct them so that the stamp shape is restored to be close to the original structure.

[0037] S2-3, Color and Texture Analysis: Analyze the significant color areas and texture features in the extracted stamp blocks;

[0038] S2-4, Seal Feature Vector Generation;

[0039] S2-5, Final output of the seal detection and feature generation module.

[0040] Furthermore, in steps S2-3, the following is included:

[0041] Main color distribution: The main channel for identifying red, blue, or other common stamp colors;

[0042] Texture complexity: statistical stroke density and boundary sharpness;

[0043] Background interference assessment: Detect the presence of common photocopying patterns or grayscale residues;

[0044] Step S2-4 includes:

[0045] Image sharpness index;

[0046] Texture complexity metrics;

[0047] Geometric distortion index;

[0048] Color and background indicators;

[0049] Steps S2-5 include:

[0050] The positioned seal image block;

[0051] The corresponding seal feature vector;

[0052] Metadata.

[0053] Furthermore, step S3 includes:

[0054] S3-1. Based on the seal feature vector, the downstream recognition sub-strategy engine is triggered individually or in parallel. The system forms an interpretable and scalable scheduling strategy by quantitatively calculating the clarity, noise level and geometric distortion indicators, combined with the threshold range and probability scoring.

[0055] In step S3-2, for typical scenes with clear images and low noise, a convolutional neural network or Transformer structure is used to directly output the recognition result;

[0056] For seals with obvious bending and distortion, such as those with seam-seam seals and edge seals, curve fitting is used to correct the seals.

[0057] For circular or ring-shaped seals, when the confidence level of the ring structure is high, the image is expanded from the Cartesian coordinate system to the polar coordinate system;

[0058] For low-resolution scans or photocopies, perform image enhancement processing;

[0059] For fixed-format seals, the process is triggered when the template similarity is ≥ P, and the similarity is calculated using cosine similarity.

[0060] S3-3. Unify and organize the outputs of multiple sub-strategy engines to form a candidate recognition result set;

[0061] S3-4. Set and dynamically adjust the thresholds used in the aforementioned routing decisions and feature discrimination.

[0062] Furthermore, step S3-3 includes:

[0063] After each triggered sub-strategy engine completes its identification process, it will output the following:

[0064] Text recognition results R i The character sequence recognized by this engine;

[0065] Confidence score C i The engine's confidence assessment of the results is obtained by Softmax probability or sequence score normalization;

[0066] Meta information M i This includes engine type, processing procedure, and time overhead.

[0067] Construction of the result set;

[0068] The routing module collects the results from all triggering engines and forms a candidate set:

[0069] R={(R1, C1, M1), (R2, C2, M2),..., (R k C k M k );

[0070] Where: R i For the text result output by the i-th engine, C i The confidence score for this result is given, with a value ranging from [0,1], M. i This is metadata used for subsequent fusion and adjudication;

[0071] Confidence level standardization;

[0072] The confidence scores are normalized using Min-Max standardization:

[0073] i (C i -C min ) / (C max -C min );

[0074] Where: C min C max C represents the minimum and maximum confidence scores in the current candidate set, respectively. i The standardized confidence level is used for subsequent adjudication;

[0075] Output a list of candidate texts, their corresponding confidence scores, and metadata.

[0076] Furthermore, steps S3-4 include:

[0077] (1) Offline calibration:

[0078] The specific method is as follows: plot the ROC curves corresponding to different feature indicators on the development set, and select the maximum point of YoudenIndex or the optimal point of F1-score as the threshold benchmark;

[0079] (2) Lightweight online updates:

[0080] After deployment, the system uses real-time operational data to perform lightweight updates to the thresholds;

[0081] The update rules use sliding window statistics:

[0082] ;

[0083] in, The current threshold, The recommendation threshold is calculated based on the new data. To update the coefficients;

[0084] (3) If the accuracy of the updated threshold in the validation set or online monitoring drops below the set threshold, it will automatically roll back to the threshold of the previous version.

[0085] The final output is a set of dynamic threshold tables, including thresholds for sharpness, noise level, and geometric distortion, which are used to guide the routing decision module and the component discrimination module. The threshold tables are gradually adjusted according to the environment during runtime.

[0086] Furthermore, step S4 includes:

[0087] S4-1. Input the candidate recognition result set, seal image block, and page context;

[0088] S4-2, Recognition Result Fusion Unit;

[0089] Input a set of candidate recognition results, perform confidence-weighted averaging, text consistency comparison, and semantic rule verification on multiple results, and calculate the fused text using confidence-weighted voting:

[0090] ;

[0091] Among them, R i For the first i Each engine outputs text, W i The weights are based on confidence levels. If there are synonyms or slight differences, they are further compared and corrected with the rule base by editing distance.

[0092] The final output is the intermediate text result and the credibility score. The output result is directly passed to the semantic consistency verification unit and the evidence fusion unit for further verification and judgment.

[0093] Color texture feature unit:

[0094] Input a stamp image patch, extract its color histogram and texture details, calculate the distribution difference between the foreground and background, calculate the histogram in the HSV / Lab color space, and use the Bhattacharyya distance to represent the separability of color distribution.

[0095] ;

[0096] Where P(i) and q(i) are the color histogram distributions of the foreground and background, respectively. The larger the value, the more obvious the distinction between the foreground and background. In addition, the texture complexity index is calculated using the local binary mode and gray-level co-occurrence matrix and then normalized.

[0097] Output color / texture evidence scores and pass the evidence scores to the evidence fusion unit;

[0098] Overprinting relationship feature unit:

[0099] Input page context information, analyze the coverage relationship between the stamp and the text, and quantify the clarity and grayscale gradient of the edge transition;

[0100] In the area where the seal edge meets the text, calculate the Sobel gradient and grayscale profile, quantize the transition width and contrast. If the edge is sharp and the gradient value is large, the seal is more likely to be on top; if the edge is smooth and the transition is blurry, it is more likely to be a photocopy.

[0101] Output the score of the overprint relationship evidence and pass the score to the evidence fusion unit;

[0102] Frequency domain noise analysis unit:

[0103] Input a stamp image patch, extract high-frequency noise and moiré features through Fourier transform or wavelet decomposition, and calculate the high-frequency energy ratio and narrowband peak ratio of the image using Fast Fourier Transform (FFT) or wavelet decomposition.

[0104] ;

[0105] in, F ( f ) represents the frequency domain component, HF represents the high frequency band. If the high frequency energy is significantly concentrated at certain narrow frequency points, it indicates the presence of copying / scanning moiré patterns.

[0106] Output noise feature evidence scores and pass the scores to the evidence fusion unit;

[0107] Semantic consistency verification unit;

[0108] The intermediate text output by the input recognition result fusion unit is compared with the rule base for information such as serial numbers, dates, and unit names. Regular expressions, dictionaries, and the rule base are used for comparison, and a semantic verification score is output and passed to the evidence fusion unit;

[0109] Evidence fusion unit:

[0110] Input scores from the recognition result fusion unit, color texture feature unit, overprint relationship feature unit, frequency domain noise analysis unit, and semantic consistency verification unit, synthesize multi-source evidence, and output the original document discrimination result.

[0111] Sum the multi-source evidence with weights to calculate the original document confidence score:

[0112] ;

[0113] where, is the score of the j-th type of evidence, c is the text credibility score output by the recognition result fusion unit, , are weight parameters that satisfy , the threshold is jointly determined by offline calibration and online lightweight update. When , it is judged as the original document, otherwise it is judged as a copy;

[0114] Output the original document / copy discrimination result and the corresponding confidence, and pass it to the system interface as the final discrimination output result;

[0115] S4-3. Introduce anomaly detection, fallback processing, and closed-loop feedback mechanisms during the discrimination process;

[0116] S4-4. Output the result;

[0117] Furthermore, in step S4-3, it includes:

[0118] When any of the following situations occurs, the system determines that the current output result has anomalies or uncertainties:

[0119] Low confidence: The final text credibility <A, or the original document discrimination confidence <B;

[0120] Conflicting results: The outputs of different evidence units are mutually contradictory, and the difference exceeds the threshold δ;

[0121] Timeout / failure: A certain sub-engine fails to complete the output within the specified time limit;

[0122] When an anomaly is detected, the system will trigger the following fallback strategies in order of priority:

[0123] Append quality enhancement: Perform contrast stretching and resolution improvement on the input seal tile, and re-recognize;

[0124] Template alignment verification: When the similarity between the candidate result and the standard template is ≥C, an additional template alignment engine is added for verification;

[0125] Multi-engine parallel re-judgment: Simultaneously schedule end-to-end recognition and polar coordinate unfolding recognition, introducing more candidate results for fusion;

[0126] Secondary fusion and correction:

[0127] After implementing the above rollback strategy, the system will re-enter the fusion adjudication process, forming a new candidate set and evidence score, and recalculate the final judgment result:

[0128] ;

[0129] in, For the secondary discrimination result, E j The score of evidence added or revised during the rollback phase;

[0130] If the result after secondary fusion is still lower than the set confidence level, the file will be automatically marked as "requires manual review" and the relevant inputs, candidate results, and discrimination evidence will be archived for manual confirmation.

[0131] Abnormal samples and the rollback process are recorded in the log and fed back to the model optimization module for subsequent threshold adjustment and model retraining;

[0132] In step S4-4, the final output includes the recognized text, text confidence score, original / copy discrimination result, and discrimination score.

[0133] A seal recognition and original document identification device includes: at least one memory and at least one processor;

[0134] The at least one memory is used to store a machine-readable program;

[0135] The at least one processor is used to call the machine-readable program to execute a seal recognition and original document identification method.

[0136] Compared with the prior art, the seal recognition and original document identification method and apparatus of the present invention have the following outstanding advantages:

[0137] This invention, through a feature-driven routing decision-making mechanism, adaptively selects or schedules multiple recognition engines in parallel, effectively solving the problem of insufficient accuracy of a single path in scenarios involving low-quality scanned documents, photocopies, and distorted seals. This invention maintains high recognition accuracy and stability under various complex conditions.

[0138] By integrating multi-source evidence such as color texture, overprinting relationship, frequency domain noise, and semantic consistency, the system can not only output the classification results and confidence scores of the original / copy, but also provide the basis for judgment, thus improving the reliability and interpretability of the judgment.

[0139] Through resolution normalization, geometric correction, noise suppression and threshold adaptation mechanisms, this invention can maintain stable performance under different sources (PDF, scanned documents, photographs) and different seal shapes (circular, elliptical, and seals across the seam). Compared with existing schemes based on single features or template matching, this invention significantly improves the discrimination accuracy in photocopy scenarios and maintains high robustness under distortion and low resolution conditions. Attached Figure Description

[0140] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0141] Figure 1 This is a flowchart illustrating a method for seal recognition and original document authentication;

[0142] Figure 2 This is a schematic diagram of feature-driven multi-strategy recognition in a seal recognition and original document identification method;

[0143] Figure 3 This is a schematic diagram illustrating the integration of adjudication and original document identification in a seal recognition and original document identification method. Detailed Implementation

[0144] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0145] The following is a preferred embodiment:

[0146] Example 1: As Figure 1-3 As shown, the seal recognition and original document identification method in this embodiment has the following steps:

[0147] S1. Input and Preprocessing: Receives the input file image and performs standardization and targeted enhancement processing before entering the seal detection stage to ensure that the seal area has stable recognizability under different sources and quality conditions.

[0148] include:

[0149] S1-1. File format standardization and rendering;

[0150] It supports multiple source formats such as PDF, JPG, and PNG. For PDF files, it converts them into image matrices page by page using a built-in rendering engine; for image files, it loads them directly and converts them into a unified RGB channel representation. This process ensures that inputs of different file types can enter subsequent stages with a unified image structure.

[0151] S1-2, Resolution Normalization and Scale Adjustment;

[0152] The resolution of the input image is detected and standardized, then scaled to a preset baseline size (e.g., 1024×1024). Anti-aliasing interpolation is used to avoid jagged edges on the stamp or loss of text details during scaling. This method ensures that stamps from different devices and documents of different quality have a consistent input scale during recognition.

[0153] S1-3, Enhanced color and contrast;

[0154] Considering that stamps may be red, blue, or other colors in practical applications, this step does not limit itself to a single channel. Instead, it adaptively enhances prominent color areas, while combining histogram equalization and background grayscale suppression to improve the contrast between the stamp area and the background. This method is particularly effective in photocopies or low-quality scans.

[0155] S1-4, Noise Suppression and Edge Enhancement;

[0156] Copies and scanned documents often contain background haze, streaks, or pixelation. This step uses filtering methods to suppress interference, and after denoising, it applies a light enhancement to the edge area of ​​the seal to highlight the seal outline and the strokes of the characters, thus avoiding missed detections in subsequent inspections due to poor image quality.

[0157] S1-5, Metadata retention;

[0158] When outputting images in tensor format, metadata information such as file source, page number, and resolution is retained. This metadata is of significant reference value in batch processing, traceability management, and subsequent original / copy identification.

[0159] S2. Seal Detection and Feature Generation: Automatically locates the seal area in the preprocessed image, extracts the seal patch, performs feature analysis on it, and generates a seal feature vector, providing input for the subsequent feature-driven multi-strategy recognition module.

[0160] include:

[0161] S2-1, Seal positioning;

[0162] The system utilizes deep learning-based object detection algorithms (such as YOLO and Faster R-CNN) to scan images frame by frame and identify potential stamp regions. To accommodate different stamp shapes (circular, elliptical, and seals with overlapping seams), the detection model incorporates diverse stamp samples during training and enhances robustness through data augmentation (rotation, scaling, and blurring). The localization results are output as bounding boxes or segmentation masks to ensure effective separation of the stamp region from the background content.

[0163] S2-2, Patch Extraction and Geometric Correction;

[0164] Based on the detection results, the seal image is cut out, and geometric correction is performed if necessary. For seal areas that are skewed in the photograph or scan, affine transformation or perspective transformation can be used for correction to restore the seal shape to a shape close to the original structure, thereby reducing deformation interference in subsequent recognition processes.

[0165] S2-3, Color and Texture Analysis;

[0166] The extracted seal image patches were analyzed for their significant color areas and texture features. This included:

[0167] Main color distribution: The main channel for identifying red, blue, or other common stamp colors;

[0168] Texture complexity: statistical stroke density and boundary sharpness;

[0169] Background interference assessment: Detect the presence of common halftone or grayscale residues found in photocopies.

[0170] These analytical results, as components of the feature vector, can reflect the quality and recognizability of the seal under different imaging conditions.

[0171] S2-4, Seal Feature Vector Generation;

[0172] Based on the above analysis results, a seal feature vector is formed, which includes:

[0173] Image sharpness metrics (such as edge strength and contrast);

[0174] Texture complexity metrics (such as stroke density and star pattern detail);

[0175] Geometric distortion indicators (such as roundness deviation, tilt angle);

[0176] Color and background metrics (such as main channel contrast and background noise level).

[0177] This feature vector, as a standardized output, is passed to the feature-driven multi-policy recognition module to guide routing decisions.

[0178] S2-5, Outputs and Interfaces;

[0179] Final output of the seal detection and feature generation module:

[0180] The positioned seal image block;

[0181] The corresponding seal feature vector;

[0182] Metadata (location coordinates, confidence score).

[0183] These outputs not only ensure the accurate extraction of the stamp area, but also provide quantifiable decision-making basis for subsequent multi-strategy recognition.

[0184] S3. Feature-driven multi-strategy recognition: Based on the seal feature vector output from seal detection and feature generation, multiple recognition sub-strategy engines are adaptively selected or triggered in parallel by the routing decision unit, outputting a set of candidate recognition results. This step addresses the problem of insufficient accuracy of single-path recognition when the seal shape is complex and the image quality varies greatly.

[0185] include:

[0186] S3-1, Routing decision mechanism;

[0187] This system is used to select or trigger downstream recognition sub-strategy engines in parallel based on the seal feature vector. By quantitatively calculating indicators such as sharpness, noise level, and geometric distortion, and combining threshold ranges with probability scoring, the system forms an interpretable and scalable scheduling strategy.

[0188] Eigenvectors constitute;

[0189] The seal detection and feature generation module outputs a set of normalized indices, which form the feature vector F:

[0190] Sharpness index: Measured using the Laplace variance method.

[0191] ;

[0192] in I This is a grayscale image of a seal block. The result of the Laplacian operator for the image. For variance calculation, normalize to [0,1]. The larger the value, the clearer the image.

[0193] Noise level: Calculate the high-frequency energy ratio in the background region:

[0194] ;

[0195] in, For regional high-frequency component energy, This represents the total energy. Normalized to [0,1], the larger the value, the more noise there is.

[0196] Geometric distortion: Resulting from a combination of roundness deviation, tilt angle, and radial undulation.

[0197] ;

[0198] Where A is the area of ​​the seal, and P is the perimeter of the outline. The angle between the main axis of the seal and the horizontal line. For the maximum allowable tilt angle (e.g., 30°), d r Radius volatility , where is the weighting factor (usually taken as 0.3 / 0.3 / 0.4). The larger the value, the more severe the distortion.

[0199] Texture complexity: represented by local binary pattern entropy;

[0200] Template similarity: Measured by the cosine similarity of the feature vectors of the seal to be tested and the standard template;

[0201] Copy raster characteristics: represented by frequency domain energy concentration; the higher the value, the more likely it is a copy.

[0202] These indicators are all normalized to the [0,1] interval for easy comparison.

[0203] Decision-making logic:

[0204] When the resolution is ≥ 0.75 and the noise is ≤ 0.2, the end-to-end engine is triggered;

[0205] When geometric distortion > 0.3, trigger the bending correction or polar coordinate unfolding engine;

[0206] When the sharpness is <0.5 or the noise / copy raster feature is >0.6, the quality enhancement engine must be triggered;

[0207] When the metrics are in the critical range (such as sharpness and noise between 0.4 and 0.6), multiple engines are triggered simultaneously, and the optimal result is determined by the subsequent fusion decision.

[0208] Quantitative description:

[0209] To facilitate implementation, the system quantifies the rules into scores and then uses a weighted combination of the learning model output to obtain the final trigger probability.

[0210] The basic form of the trigger probability is:

[0211] ;

[0212] Where F is the feature vector, W is the weight, and b is the bias term. This refers to the Sigmoid function.

[0213] Then, this probability is weighted and combined with the rule-based score r:

[0214] ;

[0215] in, [0,1] are the adjustment parameters. The final result is based on... The size determines whether a single engine or multiple engines are triggered.

[0216] S3-2, Sub-strategy engine implementation;

[0217] This is used to invoke specific recognition engines based on the characteristics of different seal images. Each sub-strategy engine is designed for a specific problem scenario and provides targeted optimizations.

[0218] End-to-end recognition engine;

[0219] Suitable for general scenes with clear images and low noise (sharpness ≥ 0.75, noise ≤ 0.2). This engine directly outputs the recognition results using a convolutional neural network or Transformer structure; the calculation formula is as follows:

[0220] ;

[0221] Where I is the input image, and Encoder / Decoder represent the feature extraction and sequence decoding networks, respectively.

[0222] Bending correction recognition engine;

[0223] Suitable for seals with significant bending distortion (geometric distortion > 0.3), such as those with overlapping seams or edge seals. This engine corrects the seal through curve fitting, for example:

[0224] ;

[0225] Where a, b, and c are the fitting parameters. The corrected image is then input into the recognition network.

[0226] Polar coordinate unfolding recognition engine;

[0227] Suitable for circular or toroidal stamps. When the confidence level of the toroidal structure is high, the image is expanded from Cartesian coordinates to polar coordinates:

[0228] ;

[0229] Where (x0, y0) is the center of the seal. r, θ These are polar coordinates. When expanded, the text is arranged in straight lines to avoid circular distortion.

[0230] Quality Enhancement Recognition Engine;

[0231] Suitable for low-resolution scans or copies (resolution < 0.5 or noise / copy raster feature > 0.6). The engine first performs image enhancement, such as contrast stretching:

[0232] ;

[0233] Where I represents the original image. Average brightness, , To enhance the coefficient, This is the enhanced image. The enhanced result is then input into the recognition network.

[0234] Template alignment recognition engine;

[0235] This applies to fixed-format seals and is triggered when the template similarity is ≥ 0.8. The similarity is defined using cosine similarity.

[0236] ;

[0237] in, , These are the feature vectors of the seal to be tested and the template, respectively. The closer the result S is to 1, the more similar the seal is to the template.

[0238] S3-3, Generation of candidate result set;

[0239] This is used to unify and organize the results output by multiple sub-strategy engines to form a set of candidate recognition results, providing input for subsequent fusion decision and original document discrimination.

[0240] Engine output;

[0241] After each triggered sub-strategy engine completes its identification process, it will output the following:

[0242] Text recognition results R i The character sequence recognized by this engine;

[0243] Confidence score C iThe engine's confidence assessment of the results is obtained by Softmax probability or sequence score normalization;

[0244] Meta information M i This includes engine type (end-to-end, corrective, expansion, etc.), processing procedure (whether corrective or enhancement is required), and time overhead.

[0245] Construction of the result set;

[0246] The routing module collects the results from all triggering engines and forms a candidate set:

[0247] R={(R1, C1, M1), (R2, C2, M2),..., (R k C k M k );

[0248] Where: R i For the text result output by the i-th engine, C i The confidence score for this result is given, with a value ranging from [0,1], M. i This is metadata used for subsequent fusion and adjudication, such as source engine number, time taken, and whether enhancement was applied.

[0249] This structure ensures that all candidate results have a traceable source, facilitating weighting or adjudication in subsequent steps.

[0250] Confidence level standardization;

[0251] The confidence scores are normalized using Min-Max standardization:

[0252] i (C i -C min ) / (C max -C min );

[0253] Where: C min C max C represents the minimum and maximum confidence scores in the current candidate set, respectively. i The standardized confidence level is used for subsequent adjudication;

[0254] Standardization can avoid biases caused by different scoring systems and make the results of different engines comparable.

[0255] Output interface;

[0256] The candidate result set is finally passed to the next module in the form of a unified interface, and the output includes:

[0257] Candidate text list (distinguished by engine source);

[0258] Corresponding confidence score (after normalization);

[0259] Meta information (engine source, processing tags, processing time).

[0260] This set can be used directly for result display, or it can be used as input to the "fusion adjudication and original document discrimination module" to be further integrated into the final recognition output and original / copy judgment.

[0261] S3-4, Threshold calibration and adaptive update;

[0262] This is used to reasonably set and dynamically adjust the thresholds used in the aforementioned routing decisions and feature discrimination, so as to ensure that the system maintains stable performance under different data distributions and application environments.

[0263] Offline calibration;

[0264] The initial threshold was obtained by calibration using the development set data.

[0265] The specific method is as follows: plot ROC curves corresponding to different feature metrics (such as sharpness, noise level, geometric distortion, etc.) on the development set, and select the maximum point of Youden Index or the optimal point of F1-score as the threshold benchmark. For example, the sharpness threshold of 0.75 is derived from the optimal point of ROC calculated in 5000 samples.

[0266] Lightweight online updates:

[0267] After deployment, the system uses real-time operational data to perform lightweight updates to the thresholds.

[0268] The update rules use sliding window statistics:

[0269] ;

[0270] in, The current threshold, The recommendation threshold is calculated based on the new data. The update coefficient is typically set to 0.1; this method avoids drastic fluctuations in the threshold due to a single abnormal data point, thus maintaining stability.

[0271] Rollback mechanism;

[0272] If the accuracy of the updated threshold drops beyond the set threshold (e.g., 5%) in the validation set or online monitoring, it will automatically roll back to the threshold of the previous version. This mechanism ensures that the threshold adapts while not affecting the overall reliability of recognition and judgment.

[0273] Finally, a set of dynamic threshold tables is output, including thresholds for sharpness, noise level, and geometric distortion indicators, which are used to guide the routing decision module and the component discrimination module. The threshold tables are gradually adjusted according to the environment during runtime, thereby improving the robustness of the system in complex application environments.

[0274] S4. Fusion adjudication and original document discrimination: Based on the multi-strategy recognition results, the final seal recognition text is generated, and the original / copy discrimination is completed by combining multi-source evidence. The data starts from the candidate result set and image input, is processed by multiple feature extraction and verification units, and finally completes the unified adjudication in the evidence fusion unit.

[0275] include:

[0276] S4-1, Input Information:

[0277] Candidate recognition result set: the recognized text, confidence scores and meta-information output by multiple sub-policy engines;

[0278] Stamp tiles: provide low-level features such as color distribution and texture details;

[0279] Page context: Reflects the overprinting relationship between the seal and the main text.

[0280] These inputs are fed into different functional units to support subsequent text fusion and original document identification.

[0281] S4-2, Module Functions and Interaction Logic:

[0282] Recognition result fusion unit;

[0283] Input a set of candidate recognition results; perform confidence weighting, text consistency comparison, and semantic rule verification on multiple results; calculate the fused text using confidence weighted voting:

[0284] ;

[0285] Among them, R i For the first i Each engine outputs text, W i The weights are based on confidence levels. If there are synonyms or slight differences, they are further compared and corrected with the rule base by editing distance.

[0286] The final output text intermediate results and credibility scores are directly passed to the semantic consistency verification unit and the evidence fusion unit for further verification and judgment.

[0287] Color texture feature unit:

[0288] Input a stamp image patch, extract its color histogram and texture details, calculate the distribution difference between the foreground and background, calculate the histogram in the HSV / Lab color space, and use the Bhattacharyya distance to represent the separability of color distribution.

[0289] ;

[0290] Where P(i) and q(i) are the color histogram distributions of the foreground and background, respectively. The larger the value, the more obvious the distinction between the foreground and background. In addition, the texture complexity index is calculated using the local binary mode and gray-level co-occurrence matrix and then normalized.

[0291] Output color / texture evidence scores and pass the evidence scores to the evidence fusion unit.

[0292] Overprinting relationship feature unit:

[0293] Input page context information, analyze the coverage relationship between the stamp and the text, and quantify the clarity and grayscale gradient of the edge transition;

[0294] In the area where the seal edge meets the text, calculate the Sobel gradient and grayscale profile, quantize the transition width and contrast. If the edge is sharp and the gradient value is large, the seal is more likely to be on top; if the edge is smooth and the transition is blurry, it is more likely to be a photocopy.

[0295] Output the score of the overprint relationship evidence and pass the score to the evidence fusion unit.

[0296] Frequency domain noise analysis unit:

[0297] Input a stamp image patch, extract high-frequency noise and moiré features through Fourier transform or wavelet decomposition, and calculate the high-frequency energy ratio and narrowband peak ratio of the image using Fast Fourier Transform (FFT) or wavelet decomposition.

[0298] ;

[0299] in, F ( f ) represents the frequency domain component, HF represents the high frequency band. If the high frequency energy is significantly concentrated at certain narrow frequency points, it indicates the presence of copying / scanning moiré patterns.

[0300] Output noise feature evidence scores and pass the scores to the evidence fusion unit.

[0301] Semantic consistency verification unit;

[0302] The intermediate text output by the input recognition result fusion unit is compared with the rule base for information such as numbers, dates, and unit names. Regular expressions, dictionaries, and the rule base are used for comparison. For example, the date must conform to the format of "YYYY-MM-DD" or "YYYY年MM月DD日", and the number needs to match a fixed pattern. If a conflict is detected, a penalty score is output.

[0303] Output the semantic verification score and pass the score to the evidence fusion unit.

[0304] Evidence fusion unit:

[0305] Input the scores from the recognition result fusion unit, color texture feature unit, overprint relationship feature unit, frequency domain noise analysis unit, and semantic consistency verification unit. Synthesize multi-source evidence and output the original document discrimination result.

[0306] Sum the multi-source evidence with weights and calculate the confidence score of the original document:

[0307] ;

[0308] where e j is the score of the j-th type of evidence, c is the text credibility score output by the recognition result fusion unit, , are weight parameters that satisfy , and the threshold is jointly determined by offline calibration and online lightweight update. When , it is judged as the original document, otherwise it is judged as a copy;

[0309] Output the original document / copy discrimination result and the corresponding confidence, and pass it to the system interface as the final discrimination output result.

[0310] S4-3, Abnormality and fallback mechanism;

[0311] To ensure the stability of the system in a complex environment, this step is used to introduce an abnormality detection, fallback processing, and closed-loop feedback mechanism during the discrimination process. Its process includes:

[0312] When any of the following situations occurs, the system determines that the current output result has an abnormality or uncertainty:

[0313] Low confidence: The final text credibility < 0.6, or the original document discrimination confidence < 0.7;

[0314] Conflicting results: The outputs of different evidence units (such as color texture and frequency domain noise) are contradictory, and the difference exceeds the threshold δ;

[0315] Timeout / failure: A certain sub-engine fails to complete the output within the specified time limit.

[0316] When an anomaly is detected, the system will trigger the following rollback strategies in order of priority:

[0317] Additional quality enhancements: Contrast stretching and resolution enhancement are performed on the input stamp image, followed by re-identification;

[0318] Template alignment verification: When the similarity between the candidate result and the standard template is ≥0.8, an additional template alignment engine is added for verification;

[0319] Multi-engine parallel re-judgment: Simultaneously schedule end-to-end recognition and polar coordinate expansion recognition, and introduce more candidate results for fusion.

[0320] Secondary fusion and correction;

[0321] After implementing the above rollback strategy, the system will re-enter the fusion adjudication process, forming a new candidate set and evidence score, and recalculate the final judgment result:

[0322] ;

[0323] in, For the secondary discrimination result, E j The score of evidence added or revised during the rollback phase;

[0324] If the result after secondary fusion is still lower than the set confidence level (e.g., <0.6), the file will be automatically marked as "requires manual review" and the relevant inputs, candidate results, and discrimination evidence will be archived for manual confirmation.

[0325] Abnormal samples and the rollback process are logged and fed back to the model optimization module for subsequent threshold adjustment and model retraining.

[0326] In step S4-4, the final output includes the recognized text, text confidence score, original / copy discrimination result, and discrimination score.

[0327] S5, System Output and Interface: The processing results are uniformly encapsulated and provided to external systems for calls through the interface.

[0328] include:

[0329] S5-1 Input Information: Results from the Fusion Adjudication and Original Document Discrimination Module: including the final recognized text, text confidence score, original / copy discrimination result and discrimination score;

[0330] Auxiliary information from seal detection and feature extraction, including seal location coordinates, bounding boxes, and detection confidence scores, is uniformly organized within this module for subsequent interface output.

[0331] S5-2, Functional Design and Interaction Logic;

[0332] Result encapsulation unit:

[0333] The results from various upstream modules are structured and organized, combining the identified text, confidence score, discrimination label, discrimination score, and seal location information into a unified data object to ensure the consistency and traceability of the output.

[0334] Interface Management Unit;

[0335] The results data are provided to external systems through a standardized interface, supporting the following interaction methods:

[0336] API Interface: Provides JSON / RESTful format for easy direct calls from the system or third-party applications;

[0337] File interface: Output is in standardized document formats (such as XML, CSV, PDF), suitable for batch processing or archiving;

[0338] Message queue interface: Push results through Kafka or RabbitMQ message middleware, suitable for large-scale concurrent scenarios;

[0339] Access and security control unit;

[0340] Perform permission verification and security control on API calls to prevent unauthorized access and ensure that sensitive files and judgment results are not illegally obtained.

[0341] Log and feedback unit;

[0342] It records the input and output of each interface call, supports anomaly tracking and performance monitoring, and can also send back usage feedback from external systems to upstream modules to provide a reference for subsequent model optimization.

[0343] S5-3, Output Results:

[0344] Ultimately, the following content will be provided to external parties:

[0345] Final identified text: The seal text result confirmed by the fusion adjudication module;

[0346] Text credibility score: A quantitative indicator of the reliability of the recognition results;

[0347] Original / Copy Discrimination Results: Classified output used for determining the authenticity of documents;

[0348] Discrimination score: a quantified score of the credibility of the original document;

[0349] Seal location and detection information: including bounding box coordinates and detection confidence level;

[0350] API call status: success / failure flags and error messages.

[0351] Example 2: Input: 300dpi scanned PDF, page contains a single red circular official seal, clean background.

[0352] deal with:

[0353] Preprocessing is unified to RGB, and the resolution is normalized to 1024×1024;

[0354] The detection module outputs bounding boxes with a confidence score of 0.98; features are generated. ;

[0355] Routing determination triggers the end-to-end engine, and a single engine completes the identification;

[0356] The text in the fusion module is consistent; the semantic verification passed; the evidence fusion score S=0.81, indicating it is the original document.

[0357] Output: Text “×× official seal”, text confidence score 0.94; original document identification = yes, identification score 0.81; seal coordinates and confidence score are returned by the interface.

[0358] Results: In this scenario, the latency is less than 120ms / page, and the accuracy is significantly higher than that of the fixed single-path strategy. Compared with the traditional template comparison method, this embodiment has higher recognition efficiency in clear scenarios and does not rely on the retention of the imprint.

[0359] Example 3: Photocopy identification

[0360] Input: Photocopied or scanned document (with moiré patterns and haze).

[0361] deal with:

[0362] Feature F indicates noise / raster > 0.6, indicating route-triggered quality enhancement + end-to-end parallelism;

[0363] Text consistency is passed, but the color texture score is low, the frequency domain noise feature is high, and the overprinting feature is insufficient.

[0364] Evidence fusion yielded S=0.38< =0.6, therefore it is determined to be a photocopy.

[0365] Output: Text confidence score 0.82; Original document discrimination = No; Discrimination score 0.38; Interface returns an interpretable label "Frequency domain noise dominant".

[0366] Results: Compared to solutions based solely on dot features, this embodiment significantly reduces the misclassification rate of photocopies through multi-source evidence fusion.

[0367] Example 4: A seal recognition and original document identification device, comprising: at least one memory and at least one processor;

[0368] The at least one memory is used to store a machine-readable program;

[0369] The at least one processor is used to call the machine-readable program to execute a seal recognition and original document identification method.

[0370] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for seal recognition and original document identification, characterized in that, It has the following steps: S1. Input and Preprocessing: Receives the input file image and performs standardization and targeted enhancement processing before entering the seal detection stage; S2. Seal detection and feature generation: Automatically locate the seal area in the preprocessed image, extract the seal patch, perform feature analysis on it, and generate seal feature vector. S3, Feature-driven multi-strategy recognition: Based on the seal feature vector output in seal detection and feature generation, multiple recognition sub-strategy engines are adaptively selected or triggered in parallel by the routing decision unit to output a set of candidate recognition results. S4. Integrate the adjudication and original document identification. Based on the multi-strategy identification results, generate the final seal identification text and combine it with multi-source evidence to complete the identification of original documents / copies. include: S4-1. Input the candidate recognition result set, seal image block, and page context; S4-2, Recognition Result Fusion Unit; Input a set of candidate recognition results, perform confidence-weighted averaging, text consistency comparison, and semantic rule verification on multiple results, and calculate the fused text using confidence-weighted voting: ; Among them, R i For the first i Each engine outputs text, W i The weights are based on confidence levels. If there are synonyms or slight differences, they are further compared and corrected with the rule base by editing distance. The final output is the intermediate text result and the credibility score. The output result is directly passed to the semantic consistency verification unit and the evidence fusion unit for further verification and judgment. Color texture feature unit: Input a stamp image, extract its color histogram and texture details, calculate the distribution difference between the foreground and background, calculate the histogram in the HSV / Lab color space, and use the Bhattacharyya distance to represent the separability of color distribution. ; Where p(i) and q(i) are... A larger value indicates a more distinct distinction between the foreground and background. Furthermore, this is achieved by utilizing local binary patterns and the gray-level co-occurrence matrix. And perform normalization processing; Output color / texture evidence scores and pass the evidence scores to the evidence fusion unit; Overprinting relationship feature unit: Input page context information, analyze the coverage relationship between the stamp and the text, and quantify the clarity and grayscale gradient of the edge transition; In the area where the seal edge meets the text, calculate the Sobel gradient and grayscale profile, quantize the transition width and contrast. If the edge is sharp and the gradient value is large, the seal is more likely to be on top; if the edge is smooth and the transition is blurry, it is more likely to be a photocopy. Output the score of the overprint relationship evidence and pass the score to the evidence fusion unit; Frequency domain noise analysis unit: Input a stamp image patch, extract high-frequency noise and moiré features through Fourier transform or wavelet decomposition, and calculate the high-frequency energy ratio and narrowband peak ratio of the image using Fast Fourier Transform (FFT) or wavelet decomposition. ; in, F ( f ) represents the frequency domain component, HF represents the high frequency band. If the high frequency energy is significantly concentrated at certain narrow frequency points, it indicates the presence of copying / scanning moiré patterns. Output noise feature evidence scores and pass the scores to the evidence fusion unit; Semantic consistency verification unit; The intermediate text output by the input recognition result fusion unit is compared with the rule base information of number, date and unit name. The semantic verification score is output by comparing the regular expression and dictionary with the rule base and then passing the score to the evidence fusion unit. Evidence fusion unit: The input consists of scores from the recognition result fusion unit, color and texture feature unit, overprint relationship feature unit, frequency domain noise analysis unit, and semantic consistency verification unit. By integrating multi-source evidence, the output is the original document discrimination result. The confidence score of the original document is calculated by weighted summation of the evidence from multiple sources. ; Among them, e j Let be the score of the j-th type of evidence, and c be the text credibility score output by the recognition result fusion unit. , For the weight parameters, satisfying threshold Determined by both offline calibration and online lightweight updates, when If the document is original, it will be considered an original; otherwise, it will be considered a photocopy. Output the original / copy identification result and the corresponding confidence level, and transmit it to the system interface as the final identification output result; S4-3. Introduce anomaly detection, rollback processing and closed-loop feedback mechanisms during the discrimination process; S4-4, Output Results.

2. The method for seal recognition and original document identification according to claim 1, characterized in that, Step S1 includes: S1-1. File format standardization and rendering; For PDF files, the built-in rendering engine converts them into image matrices page by page; for image files, they are directly loaded and converted into a unified RGB channel representation. S1-2, Resolution Normalization and Scale Adjustment; The resolution of the input image is detected and unified, scaled to a preset reference size, and an anti-aliasing interpolation method is used. S1-3, Enhanced color and contrast; Adaptive channel enhancement is applied to prominent color areas, while histogram equalization and background grayscale suppression are combined to improve the contrast between the stamp area and the background. S1-4, Noise Suppression and Edge Enhancement; Interference is suppressed by using filtering methods, and the edge area of ​​the seal is lightly enhanced after noise reduction to highlight the seal outline and the strokes of the characters. S1-5, Metadata retention; When outputting the image tensor, metadata information is retained, including file source, page number, and resolution.

3. The method for seal recognition and original document identification according to claim 2, characterized in that, Step S2 includes: S2-1, Seal positioning; The image is scanned frame by frame using a deep learning-based object detection algorithm to identify potential stamp regions. The detection model is trained by introducing diverse stamp samples and data augmentation is used to improve robustness. The localization results are output in the form of bounding boxes or segmentation masks. S2-2, Patch Extraction and Geometric Correction; Based on the test results, the stamp image is cut out, and geometric correction is performed when necessary. For stamp areas that are skewed in the photograph or scan, affine transformation or perspective transformation can be used to correct them so that the stamp shape is restored to be close to the original structure. S2-3, Color and Texture Analysis: Analyze the significant color areas and texture features in the extracted stamp blocks; S2-4, Seal Feature Vector Generation; S2-5, Final output of the seal detection and feature generation module.

4. The method for seal recognition and original document identification according to claim 3, characterized in that, Step S2-3 includes: Main color distribution: The main channel for identifying red, blue, or other common stamp colors; Texture complexity: statistical stroke density and boundary sharpness; Background interference assessment: Detect the presence of common photocopying patterns or grayscale residues; Step S2-4 includes: Image sharpness index; Texture complexity metrics; Geometric distortion index; Color and background indicators; Steps S2-5 include: The positioned seal image block; The corresponding seal feature vector; Metadata.

5. The method for seal recognition and original document identification according to claim 4, characterized in that, Step S3 includes: S3-1. Based on the seal feature vector, the downstream recognition sub-strategy engine is triggered individually or in parallel. The system forms an interpretable and scalable scheduling strategy by quantitatively calculating the clarity, noise level and geometric distortion indicators, combined with the threshold range and probability scoring. In step S3-2, for typical scenes with clear images and low noise, a convolutional neural network or Transformer structure is used to directly output the recognition result; For seals with obvious bending and distortion, such as those with seam-seam seals and edge seals, curve fitting is used to correct the seals. For circular or ring-shaped seals, when the confidence level of the ring structure is high, the image is expanded from the Cartesian coordinate system to the polar coordinate system; For low-resolution scans or photocopies, perform image enhancement processing; For fixed-format seals, the process is triggered when the template similarity is ≥ P, and the similarity is calculated using cosine similarity. S3-3. Unify and organize the outputs of multiple sub-strategy engines to form a candidate recognition result set; S3-4. Set and dynamically adjust the thresholds used in the aforementioned routing decisions and feature discrimination.

6. The method for seal recognition and original document identification according to claim 5, characterized in that, Step S3-3 includes: After each triggered sub-strategy engine completes its identification process, it will output the following: Text recognition results R i The character sequence recognized by this engine; Confidence score C i The engine's confidence assessment of the results is obtained by Softmax probability or sequence score normalization; Meta information M i This includes engine type, processing procedure, and time overhead. Construction of the result set; The routing module collects the results from all triggering engines and forms a candidate set: R={(R1,C1,M1),(R2,C2,M2),...,(R k ,C k ,M k ); Where: R i For the text result output by the i-th engine, C i The confidence score for this result is given, with a value ranging from [0,1], M. i This is metadata used for subsequent fusion and adjudication; Confidence level standardization; The confidence scores are normalized using Min-Max standardization: i (C i -C min ) / (C max -C min ) ; Where: C min C max C represents the minimum and maximum confidence scores in the current candidate set, respectively. i The standardized confidence level is used for subsequent adjudication; Output a list of candidate texts, their corresponding confidence scores, and metadata.

7. The method for seal recognition and original document identification according to claim 6, characterized in that, Steps S3-4 include: (1) Offline calibration: The specific method is as follows: plot the ROC curves corresponding to different feature indicators on the development set, and select the maximum point of Youden Index or the optimal point of F1-score as the threshold benchmark; (2) Lightweight online updates: After deployment, the system uses real-time operational data to perform lightweight updates to the thresholds; The update rules use sliding window statistics: ; in, The current threshold, The recommendation threshold is calculated based on the new data. To update the coefficients; (3) If the accuracy of the updated threshold in the validation set or online monitoring drops below the set threshold, it will automatically roll back to the threshold of the previous version. The final output is a set of dynamic threshold tables, including thresholds for sharpness, noise level, and geometric distortion, which are used to guide the routing decision module and the component discrimination module. The threshold tables are gradually adjusted according to the environment during runtime.

8. The method for seal recognition and original document identification according to claim 7, characterized in that, Step S4-3 includes: The system determines that the current output result is abnormal or uncertain when any of the following conditions occur: Low confidence: The confidence level of the final text is less than A, or the confidence level of the original document is less than B; Conflict Result: The outputs of different evidence units contradict each other, and the difference exceeds the threshold δ; Timeout / Failure: A sub-engine failed to complete the output within the specified time limit; When an anomaly is detected, the system will trigger the following rollback strategies in order of priority: Additional quality enhancements: Contrast stretching and resolution enhancement are performed on the input stamp image, followed by re-identification; Template alignment verification: When the similarity between the candidate result and the standard template is ≥C, an additional template alignment engine is added for verification; Multi-engine parallel re-judgment: Simultaneously schedule end-to-end recognition and polar coordinate unfolding recognition, introducing more candidate results for fusion; Secondary fusion and correction: After implementing the above rollback strategy, the system will re-enter the fusion adjudication process, forming a new candidate set and evidence score, and recalculate the final judgment result: ; in, For the secondary discrimination result, E j The score of evidence added or revised during the rollback phase; If the result after secondary fusion is still lower than the set confidence level, the file will be automatically marked as "requires manual review" and the relevant inputs, candidate results, and discrimination evidence will be archived for manual confirmation. Abnormal samples and the rollback process are recorded in the log and fed back to the model optimization module for subsequent threshold adjustment and model retraining; In step S4-4, the final output includes the recognized text, text confidence score, original / copy discrimination result, and discrimination score.

9. A seal recognition and original document identification device, characterized in that, include: At least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Seal authenticity identification method and system

    CN113705330A

  • Seal authenticity identification method and system based on OCR (Optical Character Recognition)

    CN116778503A

  • Image processing apparatus and a control method therefor

    US20070091352A1

  • Computer implemented method for aligning flexible molecules by performing ensemble alignment in the internal coordinate space followed by rigid body alignment in cartesian space

    US20070143030A1