An electronic seal analysis and verification method based on AI and cryptography fusion

By integrating AI and cryptography, and combining convolutional neural networks and national cryptographic algorithms, the security and multi-dimensional recognition problems in electronic seal verification have been solved, achieving highly secure and accurate electronic seal verification.

CN122372207APending Publication Date: 2026-07-10
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Filing Date
2026-02-25
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing electronic seal parsing and verification technologies are insufficient in high-security scenarios, making it difficult to effectively resist forgery, tampering, and replay attacks. Furthermore, the verification dimensions are limited, making it impossible to effectively identify seal forgery and position tampering.

Method used

A method based on the integration of AI and cryptography is adopted. The geometric features, texture features and positional offset features of the seal are extracted through a convolutional neural network model. The SM2 and SM3 national cryptographic algorithms are combined for digital signature and hash value verification. Blockchain notarization and dynamic token defense against replay attacks are used to comprehensively determine the validity of the electronic seal.

Benefits of technology

It achieves accurate verification of multi-dimensional visual features of seals, enhances signature anti-counterfeiting capabilities, significantly improves the security and accuracy of electronic seal verification, and effectively resists forgery, tampering, and replay attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122372207A_ABST
    Figure CN122372207A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of electronic seal security, and more particularly to an electronic seal analysis and verification method based on AI and cryptography fusion. The AI feature extraction and comparison steps locate the seal area and extract multi-dimensional features by means of a pre-trained convolutional neural network model, realize accurate verification at the level of seal visual features, and break through the limitation of single verification dimension of traditional technology. Then, SM2 and SM3 national encryption algorithms are used for signature verification and hash value verification respectively, the signature anti-counterfeiting capability is strengthened, and the risks of forgery and tampering are resisted. Finally, the effectiveness is determined by combining the two-dimensional verification results, the reliability of the verification conclusion is ensured, the security and accuracy of the electronic seal verification are significantly improved, and malicious behaviors such as forgery, tampering and replay attacks are effectively resisted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of electronic seal security technology, and more specifically, relates to an electronic seal parsing and verification method based on the integration of AI and cryptography. Background Technology

[0002] With the deepening of digital transformation, electronic seals, with their advantages of efficiency and convenience, are increasingly widely used in many fields such as government approval, financial contract signing, and medical document confirmation, gradually replacing traditional physical seals as the core support for the legal circulation of documents. However, existing electronic seal parsing and verification technologies still have many shortcomings and cannot meet the needs of high-security scenarios. First, their security defense capabilities are weak. Traditional seal verification mostly relies on static anti-counterfeiting codes or simple parameter checks, lacking mature cryptographic algorithm support. Digital signatures are easily forged and tampered with, and cannot effectively resist malicious attacks such as replay attacks. Second, the verification dimensions are relatively simple. Most existing systems only focus on the single verification of digital signature integrity or timestamp, ignoring the visual dimensions such as geometric and texture features of the seal image itself, making it difficult to identify problems such as seal forgery and position tampering. Summary of the Invention

[0003] This invention provides a method for parsing and verifying electronic seals based on the integration of AI and cryptography, which aims to solve the technical problems mentioned in the background.

[0004] On the one hand, this invention provides a method for parsing and verifying electronic seals based on the integration of AI and cryptography, including the following steps: File reception and parsing: Receive the layout file to be verified, parse the structural information of the layout file, and extract the seal image, digital signature and file metadata from it; AI Feature Extraction and Comparison: The extracted seal image is processed by a pre-trained convolutional neural network model. The seal detection algorithm is used to locate the seal region in the image. The geometric features, texture features and position offset features of the seal region are extracted to generate a feature vector. The feature vector is then compared with the preset seal feature template to calculate the similarity and obtain the feature matching result. Cryptographic verification: The SM2 algorithm is used to verify the validity of the extracted digital signature, and the hash value of the file to be verified is calculated based on the SM3 algorithm. The hash value is then checked for consistency with the hash information associated with the digital signature and the file timestamp. Comprehensive decision-making: Combining feature matching results and cryptographic verification results, the validity of the electronic seal is comprehensively determined, and the corresponding verification conclusion is output.

[0005] This invention utilizes AI feature extraction and comparison steps, employing a pre-trained convolutional neural network model to locate the seal area and extract multi-dimensional features, achieving precise verification at the visual feature level of the seal and overcoming the limitations of traditional technologies with their single verification dimension. Then, it employs the SM2 and SM3 national cryptographic algorithms for signature verification and hash value verification respectively, strengthening the signature's anti-counterfeiting capabilities and resisting the risks of forgery and tampering. Finally, it combines the dual-dimensional verification results to determine validity, ensuring the reliability of the verification conclusion and significantly improving the security and accuracy of electronic seal verification, effectively resisting malicious behaviors such as forgery, tampering, and replay attacks.

[0006] Preferably, the AI ​​feature extraction and comparison step also includes a feature fusion process, in which the extracted geometric features, texture features and positional offset features are weighted and fused, and then a feature vector is generated and its similarity is calculated with a preset seal feature template.

[0007] Preferably, the cryptographic verification step further includes a blockchain evidence verification process, in which the hash value of the seal generation parameter corresponding to the version file to be verified is uploaded to the blockchain for storage, and during verification, the parameter hash value stored on the blockchain is retrieved and compared with the hash value of the version file to be verified and the hash information associated with the digital signature obtained locally.

[0008] Preferably, the cryptographic verification step further includes a dynamic token verification process, which generates one-time verification information in the form of a dynamic token based on the system time, and uses the dynamic token for verification to prevent replay attacks.

[0009] Preferably, in the comprehensive decision-making step, the specific logic for determining that the electronic seal is invalid or suspected of being tampered with is as follows: if the feature matching result obtained from the AI ​​feature extraction and comparison step does not reach the preset threshold, or if there is a failure in SM2 signature verification, inconsistency between SM3 hash value and associated hash information and timestamp in the cryptographic verification step, or mismatch in blockchain evidence verification data, or failure of dynamic token verification, the seal is determined to be invalid or suspected of being tampered with, a risk warning is triggered simultaneously, and relevant verification log information is recorded.

[0010] In another aspect, this invention provides an electronic seal parsing and verification system based on the fusion of AI and cryptography, comprising: The file parsing module is used to receive layout files to be verified, parse the layout file structure information, and extract images, digital signatures, and metadata from the layout file. AI Feature Extraction Module: Equipped with a pre-trained neural network model, it is used to locate the seal region in the seal image, extract the geometric features, texture features and position-related features of the seal and generate feature vectors, and compare the feature vectors with the preset seal feature templates to output the feature matching results. Cryptographic verification module: It uses the SM2 algorithm to verify digital signatures, calculates file hash value based on SM3 algorithm, and performs consistency verification between file hash value and hash information associated with digital signature and file timestamp; Decision Engine Module: This module receives the feature matching results from the AI ​​feature extraction module and the verification results from the cryptographic verification module. It then comprehensively determines the validity of the electronic seal based on preset judgment rules and outputs the corresponding conclusion.

[0011] Preferably, the AI ​​feature extraction module includes a seal positioning submodule and a feature fusion submodule. The seal positioning submodule is used to identify the seal area in the layout document page, and the feature fusion submodule is used to perform weighted fusion processing on the extracted multiple seal features.

[0012] Preferably, the cryptographic verification module includes a blockchain unit and a dynamic token unit. The blockchain unit is used to store the hash value of the seal generation parameters corresponding to the version file to be verified and to provide verification and comparison services. The dynamic token unit is used to generate one-time verification information to prevent replay attacks.

[0013] Preferably, the file parsing module adopts a page-based file structure hierarchical parsing logic to extract the page data and signature-related data of the file in layers, and separate the seal image, digital signature and metadata.

[0014] Preferably, the decision engine module includes a risk warning function, which triggers a warning and records a verification log when the seal is determined to be invalid or tampered with.

[0015] The beneficial effects of this invention include: This invention utilizes AI feature extraction and comparison steps, employing a pre-trained convolutional neural network model to locate the seal area and extract multi-dimensional features, achieving precise verification at the visual feature level of the seal and overcoming the limitations of traditional technologies with their single verification dimension. Then, it employs the SM2 and SM3 national cryptographic algorithms for signature verification and hash value verification respectively, strengthening the signature's anti-counterfeiting capabilities and resisting the risks of forgery and tampering. Finally, it combines the dual-dimensional verification results to determine validity, ensuring the reliability of the verification conclusion and significantly improving the security and accuracy of electronic seal verification, effectively resisting malicious behaviors such as forgery, tampering, and replay attacks. Attached Figure Description

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

[0017] Figure 1A flowchart is provided for an embodiment of the present invention. Detailed Implementation

[0018] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.

[0019] Example 1 See Figure 1 As shown, this embodiment provides a method for parsing and verifying electronic seals based on the integration of AI and cryptography, including the following steps: Document Reception and Parsing: Staff upload government documents (such as administrative approval forms) to be verified to the ESR electronic seal recognition system via a client. The system then triggers the document parsing module to start working. First, it performs a format legality check, eliminating damaged or non-standard format files. Then, it parses layer by layer: The first layer parses the page data, locating the page and approximate position of the signature; the second layer parses the signature-related data, extracting the seal image and uniformly converting it to 300 DPI resolution (for subsequent AI feature extraction), while also extracting the digital signature generated by the SM2 algorithm; the third layer parses the metadata, obtaining the signature time, certificate information, signature algorithm, etc. All extraction results are stored in a temporary database to provide data support for subsequent steps, solving the problems of insufficient parsing capabilities and poor compatibility of traditional technologies. In this embodiment, the layered parsing logic is adapted to the layered storage structure of PDF / OFD files to avoid mutual interference during data extraction and ensure information integrity.

[0020] AI Feature Extraction and Comparison: After file parsing, the temporary database pushes the seal image to the AI ​​feature extraction module. Leveraging the strong feature capture capabilities of the CNN model, accurate visual verification is achieved, overcoming the limitations of traditional single-parameter verification. Details are as follows: The seal localization submodule first scales the seal image to A4 size (to eliminate the influence of size differences), then scans pixel by pixel using a pre-trained CNN model, and locates the seal area based on a 0.65 confidence threshold. After localization, the image is automatically cropped and background interference is removed.

[0021] The feature fusion submodule extracts multi-dimensional features, including geometric features (shape, size, and corner curvature), texture features (text strokes and pattern details), and position offset features (the ratio of coordinate offset relative to the top left corner reference point (0,0) of the page). After extraction, the three types of features are weighted and fused to generate a unified dimensional feature vector. Since the texture feature has the highest distinguishability for the uniqueness of the seal, its weight is set to 40%, while the geometric features and position offset features each account for 30%.

[0022] The system calls the seal feature template library and calculates the matching degree between the generated vector and the template vector using the cosine similarity algorithm. The qualified threshold for government affairs scenarios is set to 95%, and the matching results are synchronously pushed to the decision engine module.

[0023] Cryptographic verification: This step can be performed in parallel with the AI ​​feature extraction and comparison steps, which can improve efficiency and shorten the overall verification time; specifically, cryptographic verification includes the following steps: The first step of verification is to call the national cryptographic algorithm library to calculate the full-text SM3 hash value of the file to be verified, and at the same time decrypt the ciphertext digital signature using the SM2 algorithm to obtain the file hash value corresponding to the signature. The consistency of the two hash values ​​is compared to verify whether the file has been tampered with.

[0024] The second step is verification: The hash value of the seal generation parameters (including basic seal parameters, generation time, and issuing entity information) stored in the consortium blockchain is retrieved through the blockchain unit and compared with the locally calculated hash value of the seal parameters to confirm the legality of the seal's origin.

[0025] The third step of verification: The dynamic token unit generates a one-time verification code based on the current second-level timestamp and the preset key. The client submits the corresponding token synchronously, and the module compares the client token with the locally generated token to resist replay attacks.

[0026] If all three verification steps pass, a qualified result will be output; if any one verification step fails, an unqualified result will be output, and the verification details will be stored in the system log.

[0027] Comprehensive Decision Making: The decision engine module receives two types of verification results and makes a comprehensive judgment based on preset rules. The use of dual-dimensional cross-validation logic can avoid misjudgment based on a single dimension and improve the reliability of the conclusion. The specific judgment rules are as follows: The seal is deemed valid only when the AI ​​feature matching degree is ≥95% and all three steps of cryptographic verification pass, and a valid conclusion is output, allowing the document to proceed to the next stage. If the AI ​​feature matching degree is <95%, or any step of cryptographic verification fails, the seal is deemed invalid or suspected of being tampered with, and a risk warning is immediately triggered. At the same time, detailed information such as the non-compliant items, verification data, and warning time is recorded to facilitate staff to trace and investigate.

[0028] This embodiment achieves accurate extraction of key data from PDF / OFD files through the layered parsing logic of the file parsing module, solving the problem of poor cross-platform compatibility and adapting to the needs of various document formats in government scenarios. Through multi-dimensional feature fusion and CNN model application in the AI ​​feature extraction module, it overcomes the limitations of traditional single-dimensional verification technology, accurately identifying issues such as seal forgery and location tampering. By combining the SM2 / SM3 algorithm, blockchain notarization, and dynamic token technology in the cryptographic verification module, a multi-layered security defense system is constructed, effectively resisting malicious behaviors such as forgery, tampering, and replay attacks, thus solving the problem of insufficient security. Simultaneously, the parallel processing design shortens verification time, and the early warning and logging functions enhance the system's practicality, fully meeting the high-security and high-efficiency requirements of government scenarios.

[0029] Example 2 This embodiment provides an electronic seal parsing and verification system based on the integration of AI and cryptography, including a document parsing module, an AI feature extraction module, a cryptographic verification module, and a decision engine module. Each module communicates through the internal bus of the government cloud server, and data transmission is protected by an encrypted channel to ensure data security between modules. At the same time, a temporary database and a seal feature template library are provided to support data storage and feature comparison. The overall architecture is adapted to multi-threaded parallel processing and can efficiently respond to batch document verification requests.

[0030] The file parsing module adopts a layered parsing logic based on a page-based file structure and has a built-in format validity verification unit. It can first exclude damaged or non-standard format files, and then parse the page data, signature-related data and metadata layer by layer. It accurately separates the seal image, digital signature and signing time, certificate information and other contents. After the parsing is completed, the data is synchronously pushed to the temporary database and the corresponding verification module.

[0031] AI Feature Extraction Module: Equipped with a pre-trained CNN model, it includes a stamp localization submodule and a feature fusion submodule. The stamp localization submodule locates the stamp area using a stamp detection algorithm and a confidence threshold of 0.65, automatically cropping and removing background interference. The feature fusion submodule extracts geometric features, texture features, and positional offset features, and generates a feature vector through weighted fusion (geometric features and positional offset features each account for 30%, and texture features account for 40%). Then, it performs cosine similarity comparison with a pre-stored template library.

[0032] Cryptographic verification module: integrates blockchain unit and dynamic token unit. The blockchain unit is connected to the government consortium chain to store and retrieve the hash value of the seal generation parameters; the dynamic token unit generates one-time verification information based on the system timestamp and preset key; the module verifies the validity of digital signature through SM2 algorithm and calculates the file hash value through SM3 algorithm, completing triple security verification of hash verification, blockchain evidence verification and dynamic token verification.

[0033] Decision Engine Module: It has built-in preset judgment rules, receives the matching results from the AI ​​feature extraction module and the verification results from the cryptographic verification module, and comprehensively judges the validity of the seal. It also has risk warning and log recording functions. In invalid or suspicious scenarios, it triggers dual-channel warnings (client pop-up window + background notification) and retains complete verification logs.

[0034] Seal Feature Template Library: Pre-stores feature vectors of compliant registration seals in the government sector. All feature vectors are generated through training with sufficient samples and are updated regularly to adapt to newly added seal types, ensuring the accuracy and applicability of feature comparison.

[0035] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for parsing and verifying electronic seals based on the integration of AI and cryptography, characterized in that, Includes the following steps: File reception and parsing: Receive the layout file to be verified, parse the structural information of the layout file, and extract the seal image, digital signature and file metadata from it; AI Feature Extraction and Comparison: The extracted seal image is processed by a pre-trained convolutional neural network model. The seal detection algorithm is used to locate the seal region in the image. The geometric features, texture features and position offset features of the seal region are extracted to generate a feature vector. The feature vector is then compared with the preset seal feature template to calculate the similarity and obtain the feature matching result. Cryptographic verification: The SM2 algorithm is used to verify the validity of the extracted digital signature, and the hash value of the file to be verified is calculated based on the SM3 algorithm. The hash value is then checked for consistency with the hash information associated with the digital signature and the file timestamp. Comprehensive decision-making: Combining feature matching results and cryptographic verification results, the validity of the electronic seal is comprehensively determined, and the corresponding verification conclusion is output.

2. The electronic seal parsing and verification method based on the fusion of AI and cryptography as described in claim 1, characterized in that, The AI ​​feature extraction and comparison steps also include a feature fusion process, which involves weighted fusion of the extracted geometric features, texture features, and positional offset features, and then generating a feature vector and calculating its similarity with a preset seal feature template.

3. The electronic seal parsing and verification method based on the fusion of AI and cryptography as described in claim 1, characterized in that, The cryptographic verification step also includes a blockchain evidence verification process, in which the hash value of the seal generation parameter corresponding to the version file to be verified is uploaded to the blockchain for storage. During verification, the parameter hash value stored on the blockchain is retrieved and compared with the hash value of the version file to be verified and the hash information associated with the digital signature obtained locally.

4. The electronic seal parsing and verification method based on the fusion of AI and cryptography as described in claim 1, characterized in that, The cryptographic verification step also includes a dynamic token verification process, which generates one-time verification information in the form of a dynamic token based on the system time, and uses this dynamic token for verification to prevent replay attacks.

5. The electronic seal parsing and verification method based on the fusion of AI and cryptography as described in claim 1, characterized in that, In the comprehensive decision-making process, the specific logic for determining whether an electronic seal is invalid or suspected of being tampered with is as follows: if the feature matching result obtained from the AI ​​feature extraction and comparison step does not reach the preset threshold, or if there is a failure in SM2 signature verification, inconsistency between SM3 hash value and associated hash information and timestamp in the cryptographic verification step, or if the blockchain evidence verification data does not match or the dynamic token verification fails, the seal is determined to be invalid or suspected of being tampered with, a risk warning is triggered simultaneously, and relevant verification log information is recorded.

6. An electronic seal parsing and verification system based on the integration of AI and cryptography, characterized in that, include: The file parsing module is used to receive layout files to be verified, parse the layout file structure information, and extract images, digital signatures, and metadata from the layout file. AI Feature Extraction Module: Equipped with a pre-trained neural network model, it is used to locate the seal region in the seal image, extract the geometric features, texture features and position-related features of the seal and generate feature vectors, and compare the feature vectors with the preset seal feature templates to output the feature matching results. Cryptographic verification module: It uses the SM2 algorithm to verify digital signatures, calculates file hash value based on SM3 algorithm, and performs consistency verification between file hash value and hash information associated with digital signature and file timestamp; Decision Engine Module: This module receives the feature matching results from the AI ​​feature extraction module and the verification results from the cryptographic verification module. It then comprehensively determines the validity of the electronic seal based on preset judgment rules and outputs the corresponding conclusion.

7. The electronic seal parsing and verification system based on the fusion of AI and cryptography as described in claim 6, characterized in that, The AI ​​feature extraction module includes a seal positioning submodule and a feature fusion submodule. The seal positioning submodule is used to identify the seal area in the layout document page, and the feature fusion submodule is used to perform weighted fusion processing on the extracted multiple seal features.

8. The electronic seal parsing and verification system based on the fusion of AI and cryptography as described in claim 6, characterized in that, The cryptographic verification module includes a blockchain unit and a dynamic token unit. The blockchain unit is used to store the hash value of the seal generation parameters corresponding to the version file to be verified and to provide verification and comparison services. The dynamic token unit is used to generate one-time verification information to prevent replay attacks.

9. The electronic seal parsing and verification system based on the fusion of AI and cryptography as described in claim 6, characterized in that, The file parsing module adopts a hierarchical parsing logic based on a page-based file structure, extracting page data and signature-related data in layers, and separating the seal image, digital signature, and metadata.

10. The electronic seal parsing and verification system based on the fusion of AI and cryptography as described in claim 6, characterized in that, The decision engine module includes a risk warning function, which triggers a warning and records a verification log when the seal is determined to be invalid or tampered with.