Method and device for automatically examining seal in contract and storage medium

The intelligent seal review method, which combines deep learning and large language models, solves the problems of low efficiency in traditional manual review and limited automation methods. It achieves full-dimensional automated and intelligent contract seal review, improving the accuracy of review and the security of contracts.

CN121861684APending Publication Date: 2026-04-14BEIJING TCHZT INFO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING TCHZT INFO TECH CO LTD
Filing Date
2026-01-14
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Traditional contract seal review relies on manual labor, which is inefficient and prone to errors. Furthermore, existing automated methods cannot comprehensively and intelligently review seal compliance, especially in areas such as cross-sealing seal detection, seal type differentiation, rule association, and historical consistency verification.

Method used

It employs deep learning technology to detect seal areas, combines large language models to understand contract text, achieves seal category recognition and rule comparison, integrates cross-sealing seal detection, fine classification, historical seal comparison, and generates intelligent review reports.

Benefits of technology

It has achieved full-dimensional automated seal review, improving the accuracy and flexibility of the review, dynamically adapting to specific contract stipulations, preventing the risk of seal forgery, and significantly improving the work efficiency and security of the contract management system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121861684A_ABST
    Figure CN121861684A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic examination method and device for a seal in a contract and a storage medium, and belongs to the technical field of image processing and artificial intelligence. The method comprises the following steps: acquiring a contract document image; performing seal area detection and positioning on the image, and identifying all seal areas including a complete seal and an incomplete perforation seal; performing seal surface character and category identification on the positioned seal area, and determining that the seal belongs to an official seal, a name seal, a contract seal or a project seal; meanwhile, extracting a contract text through an OCR (Optical Character Recognition) technology, and analyzing specified terms about seal use in the text by utilizing a large language model; and based on the seal specified terms and the identified seal information, automatic compliance examination is executed, and examination items comprise perforation seal existence judgment, seal type compliance judgment, seal name and contract subject relevance verification, seal color compliance judgment and counterparty seal consistency comparison based on a historical seal database. According to the invention, automation, intelligence and standardization of contract seal examination are realized, the examination efficiency and accuracy are obviously improved, and the legal risk of the contract is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of image processing, computer vision, and artificial intelligence; more specifically, it relates to a method combining deep learning and OCR. A method, device, and storage medium for automated intelligent review of contract seals using large language model technology. Background Technology

[0002] In commercial and legal activities, contracts are key documents establishing the rights and obligations of all parties, and seals are an important manifestation of their legal validity. Traditional contract seal verification relies heavily on manual labor, requiring reviewers to visually check whether the seal's integrity, type, name, color, and other elements conform to regulations. This method, according to company internal regulations or contractual agreements, has significant drawbacks: firstly, it is inefficient, especially in scenarios involving the review of large volumes of contracts; Secondly, it is highly subjective and prone to omissions and misjudgments due to fatigue or negligence; finally, it requires specialized expertise in areas such as authenticating seals and cross-stitch seals. Reviewing projects requires a high level of experience from the reviewers. Summary of the Invention

[0003] Existing technologies include several methods for seal recognition or document analysis. For example, some solutions use image processing techniques to locate documents. Circular or oval areas in the document can be used as candidates for a seal, or OCR can be used to recognize words such as "official seal". However, these methods have limitations: (1) (1) Incomplete seals cannot be effectively detected; (2) The granularity of seal category recognition is coarse, making it difficult to distinguish specific types such as official seals, contract seals, and project seals; (3) The review rules are isolated and cannot be dynamically linked to the specific provisions of the contract text (such as "this contract must be affixed with the official red seals of both parties and the seal across the seam"); ​​(4) lacking The ability to track and compare the historical consistency of seals is insufficient to prevent the risk of seal forgery.

[0004] Therefore, there is an urgent need for a technical solution that can comprehensively, automatically, and intelligently review the compliance of contract seals.

[0005] This invention aims to provide an automatic seal verification method, apparatus, and storage medium for contracts, to solve the problem of inefficiency in manual verification in the prior art. The efficiency is low, error-prone, and existing automated methods suffer from limited review dimensions and inability to associate with contextual rules.

[0006] To achieve the above objectives, the first aspect of the present invention provides an automatic seal verification method in contracts, comprising: Step S1: Obtain an image of the contract document to be reviewed.

[0007] Step S2: Detect and locate the seal area in the contract document image, and output the location of both complete and incomplete seal areas. The result is a partial result, in which the incomplete seal area specifically refers to the area of ​​the seal across the seam.

[0008] Step S3: Identify the seal type in the located seal area and output category information such as official seal, personal name seal, contract seal, project seal, etc.

[0009] Step S4: Perform OCR text recognition on the contract document image to extract the full text content, and use a pre-trained large language model to intelligently parse the text. This tool accurately extracts all clauses in contracts concerning the use of seals.

[0010] Step S5: Based on the extracted regulatory clauses and identified seal information, perform one or more automated compliance reviews. Review items may include... This includes: verifying the existence of the seal across the seam, verifying the conformity of the seal type, verifying the association between the seal name and the contract subject, and verifying the compliance of the seal color. And the consistency verification of the counterparty's seal by comparing historical seal data.

[0011] A second aspect of the present invention provides an electronic device, including a memory, a processor, and a device stored in the memory and operable on the processor. The program, when executed by the processor, implements the above method.

[0012] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, the program being executed by a processor to implement... The method is described.

[0013] The beneficial effects of this invention are as follows: 1. Full-Dimensional Automated Review: Integrates the entire process from location and recognition to rule comparison, covering the core dimensions of seal review and achieving end-to-end automated review. End-to-end automation.

[0014] 2. Innovative Technology Integration: Creatively combining specialized detection algorithms for seals with interlocking seams, deep learning-based refined seal classification, and large language models. The combination of semantic understanding capabilities and historical seal feature comparison technology has solved the bottleneck of single technology.

[0015] 3. Intelligent and Contextual Understanding: By understanding contract text through a large language model, review rules are no longer fixed but dynamically adapt to each contract. The specific agreements between the parties greatly improve the accuracy and flexibility of the review process.

[0016] 4. Strong risk control capabilities: By comparing historical seals for consistency, it can effectively detect seal forgery or unauthorized alterations, enhancing anti-counterfeiting capabilities. Key review dimensions have significantly improved the level of contract security.

[0017] 5. High practicality: This method can be directly integrated into enterprise contract management systems or legal review platforms, significantly improving work efficiency and reducing legal costs. Compliance risks. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the automatic seal verification method in contracts provided by an embodiment of the present invention.

[0019] Figure 2 This is a schematic diagram of the detection and reconstruction of the seal across the seam in an embodiment of the present invention.

[0020] Figure 3 This is a logical architecture diagram of automated compliance review in an embodiment of the present invention. Detailed Implementation

[0021] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. The following embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. This invention pertains to the scope of the invention.

[0022] like Figure 1 As shown, the automatic seal verification method in contracts provided by this embodiment of the invention specifically includes the following steps:

[0023] S101: Enter an image of the contract document. This image can be converted from a scanned PDF document or be a direct image file.

[0024] S102: Seal Region Detection and Localization. This employs improved target detection models such as YOLOv8 or DETR, and during training, it not only labels the complete seal area... The seal also specifically marks the incomplete portions displayed on the single-page document. During inference, the model can output the bounding boxes of both types of regions simultaneously. The seal across the seam of the crossbody, such as Figure 2 As shown, the system will detect the breakage features on the screen edges and, based on the document's QR code information, group seals belonging to the same category. The parts located at the edges of adjacent faces are matched and image stitched together to logically reconstruct the complete seal outline for subsequent analysis.

[0025] S103: Seal Category Recognition. For each seal region image located in S102, a convolutional neural network classifier (e.g., ...) is used. ResNet and EfficientNet are used for fine-grained classification. The training data needs to contain a large number of labeled seals of various types (official seals, contract seals, financial seals, etc.). Images of official seals, personal name seals, project seals, etc. The model learns the macroscopic shape of the seal (such as circle, oval, square), the central five-pointed star and other markings, and the surrounding text content features to classify them.

[0026] S104: Contract Text Analysis and Provision Extraction. First, a high-precision OCR engine (such as PaddleOCR or a high-spec version of Tesseract) is used. The system identifies the full text of the contract. Then, the structured text is input into a large language model (such as ChatGLM, GPT series, or a specially tuned one). (Model). By designing specific prompts, such as: "Please analyze the following contract text and output it strictly in JSON format: 1. 1. Does the contract require a seal across the seam? 2. Are there specific regulations regarding the types of seals used by each party? 3. Are there any regulations regarding the color of the seals? The model accurately captures and structures the relevant clauses.

[0027] S105: Automated compliance review. For example... Figure 3 As shown, this step integrates multiple review engines and performs reviews based on the outputs of S102-S104. judge: - Seal-across Inspection Engine: Receives the seal-across requirement signal from the "Specified Terms" and the seal-across detection result from S102, and outputs "Compliant" or "Missing". The judgment.

[0028] - Type Compliance Engine: Compares the type of each seal identified by S103 with the type required for the subject of the seal in the "Prescribed Terms".

[0029] - Subject Relevance Engine: Performs secondary OCR on the seal image to extract the unit / name on the seal. Utilizes natural language processing technology to associate this with the seal's name. Matching or semantic similarity calculations are performed on the names of entities such as "Party A," "Party B," and "Party C" appearing in the same document (for example, comparing "Beijing XX Technology Co., Ltd."). (The text of "Company" and "Party A: Beijing XX Technology Co., Ltd." in the contract).

[0030] - Color Compliance Engine: Converts the stamp area image from RGB to color spaces such as HSV, and statistically analyzes the distribution of major color channels. Determines whether it conforms to color standards. It falls within the characteristic value range corresponding to the specified colors such as "red" and "blue".

[0031] - Historical Consistency Comparison Engine: This is the core anti-counterfeiting step. The system maintains a historical seal feature database. When reviewing contracts, the system first... First, identify the counterparty entity corresponding to the current seal. Then, retrieve the standard seal image or feature vector (such as a pass) that the entity has registered from the database. Embedded features extracted by a pre-trained neural network. Feature matching algorithms or cosine similarity calculations between feature vectors are used to evaluate the current... The seal is checked for consistency with historical seals. If the similarity is below a set threshold, an alert is issued stating "Seal inconsistency, risk exists".

[0032] S106: Generate a review report. This summarizes the results from all review engines and generates a structured review report, clearly listing each review item. Conclusions and anomalies discovered (e.g., missing seal across the seam, the seal used by Party B should be 'Contract Seal' instead of the detected 'Official Seal', the counterparty) (Inconsistencies between the seal and historical records, etc.), and attached relevant images and textual evidence.

[0033] This invention also provides an electronic device and a storage medium capable of performing the above methods, which will not be described in detail here.

[0034] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can apply this description. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this invention should be included within the protection scope of this invention.

Claims

1. A method for automatically verifying seals in contracts, characterized in that, include: S1: Obtain an image of the contract document to be reviewed; S2: Perform seal area detection and localization on the contract document image, and output the localization of both complete and incomplete seal areas. As a result, the incomplete seal area includes the area of ​​the seal across the seam. S3: Recognize the seal text and category in the located seal area, and output seal category information, wherein the seal category includes... This includes: official seal, personal seal, contract seal, and project seal; S4: Perform OCR text recognition on the contract document image to extract the contract text content, and analyze it using a pre-trained large language model. Describe the contents of the contract and extract the clauses regarding the use of seals. S5: Based on the aforementioned provisions, the seal category information, and the seal area image, perform at least one automated compliance review; S6: Generate a review report, including visualized comparison results and structured review conclusions.

2. The method according to claim 1, characterized in that, In step S2, the process of detecting and defining the seal area of ​​the contract document image is described. The position specifically includes: S21: Using a deep learning-based object detection model, preliminary location of candidate regions in the image that may contain the seal; S22: For the incomplete seal area, especially the seal across the seam, by detecting the continuity pattern breakage characteristics at the edge of the contract image, combined with... The screen splicing information is used to match and merge the seal areas across the screen to reconstruct the complete outline of the seal across the seam.

3. The method according to claim 1, characterized in that, In step S3, the seal category identification is based on the seal's shape and the text within it. The content and central identifier features are implemented through a convolutional neural network classification model.

4. The method according to claim 1, characterized in that, In step S4, the analysis of the contract text using a pre-trained large language model... The content extracts the regulations regarding the use of seals, specifically: inputting the text paragraphs recognized by OCR into the large language model, and extracting them through instructions. The model is required to identify and structure the contract's provisions regarding "seal type," "seal subject," "seal color," and "requirements for seals across the seam." content.

5. The method according to claim 1, characterized in that, In step S5, the automated compliance review includes at least one of the following: S51: Determination of the existence of a seal across the seam: Based on whether a seal across the seam is required in the stipulated terms, and combined with the seal area detected in step S2. The result is used to determine whether the contract has been stamped with a seal across the seam as required. S52: Seal Type Compliance Judgment: Compare the seal category identified in step S3 with the seal type required in the prescribed clauses, and determine... Determine whether the type of seal actually used conforms to the contract stipulations; S53: Seal Name and Subject Relationship Verification: Perform text recognition on the image of the seal area, extract the seal name, and compare it with the contract text. The semantic relevance of the names of parties such as Party A and Party B appearing in the document is calculated to determine whether the subject of the seal matches. S54: Seal Color Compliance Assessment: Analyze the color space characteristics of the seal area image to determine whether the seal imprint color complies with regulations. The color requirements specified in the contract; S55: Counterparty seal consistency comparison: Retrieve images of standard seals previously used by the current contract's counterparty from the historical contract database. For example, the image of the counterparty's seal area detected in the current contract is compared with historical standard seal images to determine its feature similarity. Check if the seals match to identify the risk of forgery or alteration.

6. The method according to claim 5, characterized in that, In step S55, the feature similarity comparison includes: shape contour feature comparison. The similarity calculation includes text layout feature comparison and imprint detail feature embedding vector similarity calculation based on Siamese network.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. Its features are, When the processor executes the program, it performs automatic seal verification in the contract as described in any one of claims 1 to 6. method.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the following: The method for automatic verification of seals in contracts as claimed in any one of claims 1 to 6.