A method and system for accurate comparison of Chinese examination and approval documents and actual seal documents

By combining multi-region similarity measurement and TextBoxes character recognition methods with super-resolution reconstruction technology, the problem of inaccurate file comparison in the printing control instrument was solved, achieving efficient and accurate file matching while reducing computational resource consumption.

CN115311673BActive Publication Date: 2026-04-17BEIJING WILION TIME TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING WILION TIME TECH
Filing Date
2022-08-09
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In existing technologies, when comparing approved documents with actual documents used for stamping, the seal control device cannot achieve accurate and efficient matching, which leads to document replacement and causes harm.

Method used

A multi-region similarity measurement method is used for pre-judgment. Combined with TextBoxes character recognition and super-resolution recognition methods, the system achieves accurate file comparison through steps such as sparse coding, Euclidean distance calculation, region partitioning, character recognition, and super-resolution reconstruction.

Benefits of technology

It improves the accuracy of document comparison, reduces the consumption of computing resources, and ensures the accurate and efficient use of the printing control instrument.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115311673B_ABST
    Figure CN115311673B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for accurately comparing Chinese approval documents and actual stamped documents, relating to the field of document recognition technology. The system includes: a first encoding module, a first similarity module, a first judgment module, a second judgment module, a region division module, a second encoding module, a second similarity module, a third judgment module, a character recognition module, a first recognition and judgment module, an image reconstruction module, and a second recognition and judgment module. This invention utilizes multi-region similarity measurement to pre-judge whether Chinese approval documents and actual stamped documents match, and uses the TextBoxes character recognition method and a super-resolution-based accurate recognition method to complete the accurate comparison of Chinese approval documents and actual stamped documents.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of document recognition technology, and more specifically, to a method and system for accurately comparing Chinese approval documents and documents with actual seals. Background Technology

[0002] With technological innovation, more and more government departments, well-known enterprises, prestigious universities, medical institutions, and financial institutions are using seal control devices to control seals, complete remote approval and remote stamping, effectively solve many problems of traditional manual stamping, and maximize stamping efficiency.

[0003] However, during the use of seal control devices, approval documents and actual stamped documents are sometimes replaced, causing significant harm. Although traditional comparison methods can detect errors and provide early warnings to some extent, their overall accuracy is not high, failing to maximize the precision and efficiency of seal control device use. Therefore, how to accurately detect the differences between approval documents and actual stamped documents has become an urgent problem to be solved. Summary of the Invention

[0004] To overcome or at least partially solve the above problems, embodiments of the present invention provide a method and system for accurate comparison of Chinese approval documents and actual stamped documents. The method uses multi-region similarity measurement to pre-determine whether Chinese approval documents and actual stamped documents match, and uses TextBoxes character recognition method and super-resolution-based accurate recognition method to complete the accurate comparison of Chinese approval documents and actual stamped documents.

[0005] The embodiments of the present invention are implemented as follows:

[0006] In a first aspect, embodiments of the present invention provide a method for accurately comparing Chinese approval documents and documents actually bearing seals, comprising the following steps:

[0007] S1. Obtain and sparsely encode the Chinese approval document image and the actual seal document image to obtain the Chinese approval document encoded image and the actual seal document encoded image;

[0008] S2. Calculate and determine the similarity between the Chinese approval document image and the actual seal document image based on the Euclidean distance between them, and generate image similarity results;

[0009] S3. Determine whether the image similarity result is greater than the preset first reference threshold. If yes, then the Chinese approval document image and the actual seal document image are considered to match, and an accurate matching result is generated; otherwise, proceed to step S4.

[0010] S4. Determine whether the image similarity result is less than the preset second reference threshold. If yes, it is determined that the Chinese approval document image and the actual seal document image do not match, and an inaccurate matching result is generated; otherwise, proceed to step S5.

[0011] S5. Divide the Chinese approval document image and the actual seal document image into multiple equal regions to obtain multiple Chinese approval document region images and multiple actual seal document region images.

[0012] S6. Perform sparse encoding on each Chinese approval document area image and each actual seal document area image to obtain multiple Chinese approval document area encoded images and multiple actual seal document area encoded images.

[0013] S7. Calculate the similarity between the Chinese approval document area code image and the actual seal document area code image in the same area, and generate multiple area image similarity results;

[0014] S8. Determine whether the similarity result of each region image is greater than the preset first reference threshold. If yes, the corresponding Chinese approval document region image and the actual seal document region image will be considered to match, and a region accurate matching result will be generated. If no, proceed to step S9.

[0015] S9. Using the TextBoxes detection method, the text in the corresponding Chinese approval document area image and the actual seal document area image are recognized respectively, and the text recognition results of the corresponding Chinese approval document area image and the actual seal document area image are generated.

[0016] S10. Determine whether the text recognition result of the corresponding Chinese approval document area image is the same as the text recognition result of the actual seal document area image. If yes, then the corresponding Chinese approval document area image and the actual seal document area image are considered to match. If no, proceed to step S11.

[0017] S11. Perform super-resolution reconstruction on the corresponding Chinese approval document area image and the actual seal document area image to obtain and perform character recognition on the corresponding Chinese approval document area reconstruction image and the actual seal document area reconstruction image to generate the character recognition results of the corresponding Chinese approval document area reconstruction image and the actual seal document area reconstruction image.

[0018] S12. Determine whether the text recognition result of the reconstructed image of the corresponding Chinese approval document area is completely the same as the text recognition result of the reconstructed image of the actual seal document area. If so, the corresponding Chinese approval document image and the actual seal document image are considered to match, and an exact matching result is generated. If not, the Chinese approval document image and the actual seal document image are considered to not match, and an inaccurate matching result is generated.

[0019] To address the technical problem in existing technologies that cannot accurately compare approval documents and actual stamped documents, thus failing to maximize the accuracy and efficiency of the seal control device, this invention utilizes a multi-region similarity measurement method to pre-judge whether Chinese approval documents and actual stamped documents match. If a match cannot be determined, a more complex method is then employed, significantly reducing computational resource consumption. Simultaneously, the invention employs TextBoxes character recognition and a super-resolution-based accurate recognition method to achieve accurate comparison between Chinese approval documents and actual stamped documents, improving the accuracy of the comparison.

[0020] Based on the first aspect, in some embodiments of the present invention, the following steps are further included after step S10 and before step S11:

[0021] Multi-scale image enhancement processing is performed on the corresponding Chinese approval document area image and the actual seal document area image to obtain and perform character recognition on the corresponding enhanced Chinese approval document area image and the actual seal document area image to generate the corresponding character recognition results.

[0022] Determine whether the text recognition result of the enhanced image of the corresponding Chinese approval document area is completely the same as the text recognition result of the enhanced image of the actual seal document area. If so, determine that the corresponding Chinese approval document image and the actual seal document image match and generate an accurate matching result; otherwise, proceed to step S11.

[0023] Based on the first aspect, in some embodiments of the present invention, the method for performing multi-scale image enhancement processing on the corresponding Chinese approval document area image and the actual stamped document area image includes the following steps:

[0024] Gaussian blurring at multiple scales was applied to the corresponding Chinese approval document area image and the actual seal document area image to obtain the corresponding blurred Chinese approval document area image and blurred actual seal document area image.

[0025] Calculate the detail difference values ​​between the blurred image and the Chinese approval document region image at each scale, generate and weight the detail information of Chinese approval documents at multiple scales into the corresponding Chinese approval document region image to obtain the corresponding enhanced image of the Chinese approval document region;

[0026] Calculate the detail difference values ​​between the blurred image and the actual stamped document area image at each scale, generate and weight the actual stamped document detail information at multiple scales into the corresponding actual stamped document area image to obtain the corresponding enhanced image of the actual stamped document area.

[0027] Based on the first aspect, in some embodiments of the present invention, the method for calculating the detail difference value between the blurred image of the Chinese approval document region and the Chinese approval document region image at various scales includes the following steps:

[0028] Subtract the pixels of the blurred image of the Chinese approval document region at each scale from the pixels of the Chinese approval document region image.

[0029] Based on the first aspect, in some embodiments of the present invention, the method for super-resolution reconstruction of the corresponding Chinese approval document area image and the actual stamped document area image includes the following steps:

[0030] The back projection method was used to perform super-resolution reconstruction of the corresponding Chinese approval document area image and the actual stamped document area image.

[0031] Based on the first aspect, in some embodiments of the present invention, the method for accurately comparing Chinese approval documents and actual stamped documents further includes the following steps:

[0032] Generate and send a rejection instruction based on the non-exact match results.

[0033] Secondly, embodiments of the present invention provide a system for accurately comparing Chinese approval documents and documents bearing official seals, comprising a first encoding module, a first similarity module, a first judgment module, a second judgment module, a region division module, a second encoding module, a second similarity module, a third judgment module, a character recognition module, a first recognition and judgment module, an image reconstruction module, and a second recognition and judgment module, wherein:

[0034] The first encoding module is used to acquire and sparsely encode the Chinese approval document image and the actual seal document image to obtain the Chinese approval document encoded image and the actual seal document encoded image.

[0035] The first similarity module is used to calculate and determine the similarity between the Chinese approval document image and the actual seal document image based on the Euclidean distance between them, and generate image similarity results.

[0036] The first judgment module is used to determine whether the image similarity result is greater than a preset first reference threshold. If it is, the Chinese approval document image and the actual seal document image are considered to match, and an accurate matching result is generated; if not, the second judgment module is executed.

[0037] The second judgment module is used to determine whether the image similarity result is less than the preset second reference threshold. If it is, the Chinese approval document image and the actual seal document image are considered to be mismatched, and an imprecise matching result is generated; if not, the region division module is executed.

[0038] The region division module is used to divide the Chinese approval document image and the actual seal document image into multiple equal regions to obtain multiple Chinese approval document region images and multiple actual seal document region images.

[0039] The second encoding module is used to perform sparse encoding on each Chinese approval document area image and each actual seal document area image to obtain multiple Chinese approval document area encoded images and multiple actual seal document area encoded images.

[0040] The second similarity module is used to calculate the similarity between the Chinese approval document area code image and the actual seal document area code image in the same area, and generate multiple area image similarity results.

[0041] The third judgment module is used to determine whether the similarity result of each region image is greater than the preset first reference threshold. If it is, the corresponding Chinese approval document region image and the actual seal document region image will be identified as matching, and a region accurate matching result will be generated. If not, the text recognition module will be executed.

[0042] The text recognition module is used to recognize the text in the corresponding Chinese approval document area image and the actual seal document area image using the TextBoxes detection method, and generate the text recognition results of the corresponding Chinese approval document area image and the actual seal document area image.

[0043] The first recognition and judgment module is used to determine whether the text recognition result of the corresponding Chinese approval document area image is the same as the text recognition result of the actual seal document area image. If they are the same, the corresponding Chinese approval document area image and the actual seal document area image are considered to match; otherwise, the image reconstruction module is executed.

[0044] The image reconstruction module is used to perform super-resolution reconstruction on the corresponding Chinese approval document area image and the actual seal document area image to obtain and perform character recognition on the corresponding Chinese approval document area reconstruction image and the actual seal document area reconstruction image, and generate the character recognition results of the corresponding Chinese approval document area reconstruction image and the actual seal document area reconstruction image.

[0045] The second recognition and judgment module is used to determine whether the text recognition result of the reconstructed image of the corresponding Chinese approval document area is completely the same as the text recognition result of the reconstructed image of the actual seal document area. If they are the same, the corresponding Chinese approval document image and the actual seal document image are considered to match, and an accurate matching result is generated. If they are not the same, the Chinese approval document image and the actual seal document image are considered to be mismatched, and an inaccurate matching result is generated.

[0046] To address the technical challenge of existing technologies failing to accurately compare approval documents and actual stamped documents, thus hindering the precision and efficiency of the seal control device, this system combines multiple modules, including a first encoding module, a first similarity module, a first judgment module, a second judgment module, a region division module, a second encoding module, a second similarity module, a third judgment module, a character recognition module, a first recognition and judgment module, an image reconstruction module, and a second recognition and judgment module. It utilizes a multi-region similarity measurement method to pre-judge whether Chinese approval documents and actual stamped documents match. If a match cannot be determined, a more complex method is employed, significantly reducing computational resource consumption. Simultaneously, it employs TextBoxes character recognition and a super-resolution-based precise recognition method to achieve accurate comparison between Chinese approval documents and actual stamped documents, improving the comparison accuracy.

[0047] Based on the second aspect, in some embodiments of the present invention, the Chinese approval document and actual stamped document accurate comparison system further includes an image enhancement module and a third recognition and judgment module, wherein:

[0048] The image enhancement module is used to perform multi-scale image enhancement processing on the corresponding Chinese approval document area image and the actual seal document area image to obtain and perform character recognition on the corresponding Chinese approval document area enhanced image and the actual seal document area enhanced image, and generate the corresponding Chinese approval document area enhanced image and the actual seal document area enhanced image.

[0049] The third recognition and judgment module is used to determine whether the text recognition result of the enhanced image of the corresponding Chinese approval document area is completely the same as the text recognition result of the enhanced image of the actual seal document area. If they are the same, the corresponding Chinese approval document image and the actual seal document image are considered to match, and an accurate matching result is generated; otherwise, the second recognition and judgment module is executed.

[0050] Thirdly, embodiments of this application provide an electronic device including a memory for storing one or more programs; and a processor. When the one or more programs are executed by the processor, they implement the methods described in any of the first aspects above.

[0051] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the first aspects above.

[0052] The embodiments of the present invention have at least the following advantages or beneficial effects:

[0053] This invention provides a method and system for accurately comparing Chinese approval documents and actual stamped documents, solving the technical problem in the prior art that it is impossible to accurately compare approval documents and actual stamped documents, and thus cannot maximize the accuracy and efficiency of the seal control instrument. This invention uses a multi-region similarity measurement method to pre-judge whether Chinese approval documents and actual stamped documents match. If a match cannot be determined, a more complex method is used, greatly reducing the consumption of computing resources. At the same time, it uses the TextBoxes character recognition method and a super-resolution-based accurate recognition method to complete the accurate comparison of Chinese approval documents and actual stamped documents, improving the accuracy of the comparison. Attached Figure Description

[0054] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1 This is a flowchart illustrating a method for accurately comparing Chinese approval documents and actual stamped documents according to an embodiment of the present invention;

[0056] Figure 2 This is a detailed flowchart of a method for accurately comparing Chinese approval documents and actual stamped documents according to an embodiment of the present invention;

[0057] Figure 3 This is a principle framework of a system for accurately comparing Chinese approval documents and actual stamped documents according to an embodiment of the present invention. Figure 1 ;

[0058] Figure 4 This is a principle framework of a system for accurately comparing Chinese approval documents and actual stamped documents according to an embodiment of the present invention. Figure 2 ;

[0059] Figure 5This is a structural block diagram of an electronic device provided in an embodiment of the present invention.

[0060] Explanation of reference numerals in the attached figures: 100, First encoding module; 200, First similarity module; 300, First judgment module; 400, Second judgment module; 500, Region segmentation module; 600, Second encoding module; 700, Second similarity module; 800, Third judgment module; 900, Character recognition module; 1000, First recognition and judgment module; 1100, Image reconstruction module; 1200, Second recognition and judgment module; 1300, Image enhancement module; 1400, Third recognition and judgment module; 101, Memory; 102, Processor; 103, Communication interface. Detailed Implementation

[0061] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0062] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0063] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0064] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" or any other variations thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0065] Example:

[0066] like Figure 1 As shown, in a first aspect, embodiments of the present invention provide a method for accurately comparing Chinese approval documents and documents actually bearing seals, comprising the following steps:

[0067] S1. Obtain and sparsely encode the Chinese approval document image and the actual seal document image to obtain the Chinese approval document encoded image and the actual seal document encoded image;

[0068] S2. Calculate and determine the similarity between the Chinese approval document image and the actual seal document image based on the Euclidean distance between them, and generate image similarity results;

[0069] S3. Determine whether the image similarity result is greater than the preset first reference threshold. If yes, then the Chinese approval document image and the actual seal document image are considered to match, and an accurate matching result is generated; otherwise, proceed to step S4.

[0070] S4. Determine whether the image similarity result is less than the preset second reference threshold. If yes, it is determined that the Chinese approval document image and the actual seal document image do not match, and an inaccurate matching result is generated; otherwise, proceed to step S5.

[0071] Based on sparse coding, Euclidean distance is used to calculate the similarity between the Chinese approval document and the actual document bearing the seal. The similarity result is then checked against a preset first reference threshold. If the similarity is greater, it indicates a very high similarity (close to 100%), and the Chinese approval document and the actual document bearing the seal are considered an exact match. If the similarity result is less than a preset second reference threshold, it indicates a very low similarity, and the Chinese approval document and the actual document bearing the seal are considered not an exact match, resulting in a rejection of the seal application. If there is some similarity but it does not reach an extremely high level (between very low and very high), then proceed to step S5. The first reference threshold can be set to 98%, and the second reference threshold can be set to 30%. These reference thresholds can be customized according to user needs.

[0072] S5. Divide the Chinese approval document image and the actual seal document image into multiple equal regions to obtain multiple Chinese approval document region images and multiple actual seal document region images.

[0073] S6. Perform sparse encoding on each Chinese approval document area image and each actual seal document area image to obtain multiple Chinese approval document area encoded images and multiple actual seal document area encoded images.

[0074] S7. Calculate the similarity between the Chinese approval document area code image and the actual seal document area code image in the same area, and generate multiple area image similarity results;

[0075] S8. Determine whether the similarity result of each region image is greater than the preset first reference threshold. If yes, the corresponding Chinese approval document region image and the actual seal document region image will be considered to match, and a region accurate matching result will be generated. If no, proceed to step S9.

[0076] The images of the Chinese approval document and the actual stamped document can be divided into sixteen equal parts, and each of the sixteen parts is sparsely encoded. Within each of the sixteen parts, the similarity between the Chinese approval document and the actual stamped document is calculated at the same location. For example, the similarity between the upper left area of ​​the Chinese approval document and the upper left area of ​​the actual stamped document is calculated. The image similarity result of each region is checked against a preset first reference threshold. If it is, the similarity of that region is very high, and for regions with very high similarity, the corresponding region is directly considered a perfect match and no further detection is performed. For regions where the similarity cannot reach a very high level, the process proceeds to step S9 for further detection. There may be one or more regions where the similarity cannot reach a very high level; if there are multiple regions, they are compared one by one using the same method.

[0077] S9. Using the TextBoxes detection method, the text in the corresponding Chinese approval document area image and the actual seal document area image are recognized respectively, and the text recognition results of the corresponding Chinese approval document area image and the actual seal document area image are generated.

[0078] S10. Determine whether the text recognition result of the corresponding Chinese approval document area image is the same as the text recognition result of the actual seal document area image. If yes, then the corresponding Chinese approval document area image and the actual seal document area image are considered to match. If no, proceed to step S11.

[0079] S11. Perform super-resolution reconstruction on the corresponding Chinese approval document area image and the actual seal document area image to obtain and perform character recognition on the corresponding Chinese approval document area reconstruction image and the actual seal document area reconstruction image to generate the character recognition results of the corresponding Chinese approval document area reconstruction image and the actual seal document area reconstruction image.

[0080] Furthermore, back projection was used to perform super-resolution reconstruction of the corresponding Chinese approval document area image and the actual stamped document area image. For areas where the recognition results of the Chinese approval document and the actual stamped document were inconsistent, back projection was used to perform super-resolution reconstruction separately, so as to facilitate further accurate comparison and judgment in the future.

[0081] S12. Determine whether the text recognition result of the reconstructed image of the corresponding Chinese approval document area is completely the same as the text recognition result of the reconstructed image of the actual seal document area. If so, the corresponding Chinese approval document image and the actual seal document image are considered to match, and an exact matching result is generated. If not, the Chinese approval document image and the actual seal document image are considered to not match, and an inaccurate matching result is generated.

[0082] At higher resolutions, the TextBoxes character recognition method or other text recognition methods are used to recognize the text in the image. If the recognition results of areas where the original recognition results were inconsistent become completely consistent at higher resolutions, then the Chinese approval document and the actual sealed document are considered to be a match. If the recognition results of areas where the original recognition results were inconsistent still do not become completely consistent at higher resolutions, then the Chinese approval document and the actual sealed document are considered to be a mismatch.

[0083] To address the technical problem in existing technologies that cannot accurately compare approval documents and actual stamped documents, thus failing to maximize the accuracy and efficiency of the seal control device, this invention utilizes a multi-region similarity measurement method to pre-judge whether Chinese approval documents and actual stamped documents match. If a match cannot be determined, a more complex method is then employed, significantly reducing computational resource consumption. Simultaneously, the invention employs TextBoxes character recognition and a super-resolution-based accurate recognition method to achieve accurate comparison between Chinese approval documents and actual stamped documents, improving the accuracy of the comparison.

[0084] like Figure 2 As shown, based on the first aspect, in some embodiments of the present invention, the following steps are included after step S10 and before step S11:

[0085] A1. Perform multi-scale image enhancement processing on the corresponding Chinese approval document area image and the actual seal document area image to obtain and perform character recognition on the corresponding enhanced Chinese approval document area image and the actual seal document area image to generate the corresponding character recognition results.

[0086] Furthermore, Gaussian blurring is applied to the corresponding Chinese approval document area image and the actual seal document area image at multiple scales to obtain the corresponding blurred Chinese approval document area image and blurred actual seal document area image. The detail difference value between the blurred Chinese approval document area image and the actual seal document area image at each scale is calculated (i.e., subtracting the pixels of the blurred Chinese approval document area image from the pixels of the actual seal document area image at each scale; the result of the subtraction is the detail difference value). This multi-scale detail information of the Chinese approval document is then weighted and added to the corresponding Chinese approval document area image to obtain the corresponding enhanced Chinese approval document area image. Similarly, the detail difference value between the blurred actual seal document area image and the actual seal document area image at each scale is calculated, and this multi-scale detail information of the actual seal document is then weighted and added to the corresponding enhanced actual seal document area image to obtain the corresponding enhanced actual seal document area image.

[0087] A2. Determine whether the text recognition result of the enhanced image of the corresponding Chinese approval document area is completely the same as the text recognition result of the enhanced image of the actual seal document area. If so, determine that the corresponding Chinese approval document image and the actual seal document image match and generate an accurate matching result; otherwise, proceed to step S11.

[0088] To further improve the accuracy of the comparison between the Chinese approval document and the actual stamped document, multi-scale image enhancement technology is used to enhance the regions that are inconsistent in step S10. For example, the upper left regions of the Chinese approval document and the actual stamped document are processed separately. Then, for the regions in the enhanced Chinese approval document and the actual stamped document that are inconsistent in the recognition results, the TextBoxes detection method in step S9 is used to perform text recognition. If the Chinese characters recognized by the method in step S9 are completely consistent, it is determined that the Chinese approval document and the actual stamped document are a match; otherwise, proceed to step S11.

[0089] Based on the first aspect, in some embodiments of the present invention, the method for accurately comparing Chinese approval documents and actual stamped documents further includes the following steps:

[0090] Generate and send a rejection instruction based on the non-exact match results.

[0091] To ensure the safety, accuracy, and efficiency of the printing control device, when a mismatch occurs, a rejection instruction is immediately generated and sent to the printing control device, thereby stopping its operation.

[0092] like Figure 3As shown, in a second aspect, embodiments of the present invention provide a system for accurately comparing Chinese approval documents and documents with actual seals, including a first encoding module 100, a first similarity module 200, a first judgment module 300, a second judgment module 400, a region division module 500, a second encoding module 600, a second similarity module 700, a third judgment module 800, a character recognition module 900, a first recognition and judgment module 1000, an image reconstruction module 1100, and a second recognition and judgment module 1200, wherein:

[0093] The first encoding module 100 is used to acquire and perform sparse encoding on the Chinese approval document image and the actual seal document image to obtain the Chinese approval document encoded image and the actual seal document encoded image.

[0094] The first similarity module 200 is used to calculate and determine the similarity between the Chinese approval document image and the actual seal document image based on the Euclidean distance between them, and generate image similarity results.

[0095] The first judgment module 300 is used to determine whether the image similarity result is greater than a preset first reference threshold. If it is, the Chinese approval document image and the actual seal document image are considered to match, and an accurate matching result is generated. If not, the second judgment module 400 is executed.

[0096] The second judgment module 400 is used to determine whether the image similarity result is less than the preset second reference threshold. If it is, it is determined that the Chinese approval document image and the actual seal document image do not match, and an imprecise matching result is generated. If not, the region division module 500 is executed.

[0097] The region division module 500 is used to divide the Chinese approval document image and the actual seal document image into multiple equal regions to obtain multiple Chinese approval document region images and multiple actual seal document region images.

[0098] The second encoding module 600 is used to perform sparse encoding on each Chinese approval document area image and each actual seal document area image to obtain multiple Chinese approval document area encoded images and multiple actual seal document area encoded images.

[0099] The second similarity module 700 is used to calculate the similarity between the Chinese approval document area code image and the actual seal document area code image in the same area, and generate multiple area image similarity results.

[0100] The third judgment module 800 is used to determine whether the similarity result of each region image is greater than the preset first reference threshold. If it is, the corresponding Chinese approval document region image and the actual seal document region image will be identified as matching, and a region accurate matching result will be generated. If not, the text recognition module 900 will be executed.

[0101] The text recognition module 900 is used to recognize the text in the corresponding Chinese approval document area image and the actual seal document area image using the TextBoxes detection method, and generate the text recognition results of the corresponding Chinese approval document area image and the actual seal document area image.

[0102] The first recognition and judgment module 1000 is used to determine whether the text recognition result of the corresponding Chinese approval document area image is the same as the text recognition result of the actual seal document area image. If they are the same, the corresponding Chinese approval document area image and the actual seal document area image are considered to match. If not, the image reconstruction module 1100 is executed.

[0103] The image reconstruction module 1100 is used to perform super-resolution reconstruction on the corresponding Chinese approval document area image and the actual seal document area image to obtain and perform character recognition on the corresponding Chinese approval document area reconstruction image and the actual seal document area reconstruction image, and generate the character recognition results of the corresponding Chinese approval document area reconstruction image and the actual seal document area reconstruction image.

[0104] The second recognition and judgment module 1200 is used to determine whether the text recognition result of the reconstructed image of the corresponding Chinese approval document area is completely the same as the text recognition result of the reconstructed image of the actual seal document area. If they are the same, the corresponding Chinese approval document image and the actual seal document image are considered to match, and an accurate matching result is generated. If they are not the same, the Chinese approval document image and the actual seal document image are considered to be mismatched, and an inaccurate matching result is generated.

[0105] To address the technical problem in existing technologies that cannot accurately compare approval documents and actual stamped documents, thus failing to maximize the accuracy and efficiency of the seal control device, this system combines multiple modules, including a first encoding module 100, a first similarity module 200, a first judgment module 300, a second judgment module 400, a region division module 500, a second encoding module 600, a second similarity module 700, a third judgment module 800, a character recognition module 900, a first recognition and judgment module 1000, an image reconstruction module 1100, and a second recognition and judgment module 1200. It utilizes a multi-region similarity measurement method to pre-judge whether Chinese approval documents and actual stamped documents match. If a match cannot be determined, a more complex method is employed, significantly reducing computational resource consumption. Simultaneously, it employs TextBoxes character recognition and a super-resolution-based accurate recognition method to achieve accurate comparison between Chinese approval documents and actual stamped documents, improving the accuracy of the comparison.

[0106] like Figure 4 As shown, based on the second aspect, in some embodiments of the present invention, the Chinese approval document and actual stamped document accurate comparison system further includes an image enhancement module 1300 and a third recognition and judgment module 1400, wherein:

[0107] The image enhancement module 1300 is used to perform multi-scale image enhancement processing on the corresponding Chinese approval document area image and the actual seal document area image to obtain and perform character recognition on the corresponding Chinese approval document area enhanced image and the actual seal document area enhanced image, and generate the corresponding Chinese approval document area enhanced image and the actual seal document area enhanced image.

[0108] The third recognition and judgment module 1400 is used to determine whether the text recognition result of the enhanced image of the corresponding Chinese approval document area is completely the same as the text recognition result of the enhanced image of the actual seal document area. If they are the same, the corresponding Chinese approval document image and the actual seal document image are considered to match, and an accurate matching result is generated. If not, the second recognition and judgment module 1200 is executed.

[0109] To further improve the accuracy of the comparison between the Chinese approval document and the actual stamped document, the image enhancement module 1300 uses multi-scale image enhancement technology to enhance the areas where the recognition is inconsistent. For example, the upper left area of ​​the Chinese approval document and the actual stamped document are processed separately. Then, for the areas where the recognition results of the enhanced Chinese approval document and the actual stamped document are inconsistent, the TextBoxes detection method is used to perform text recognition. The third recognition and judgment module 1400 performs recognition and judgment. If the recognized Chinese characters are completely consistent, the Chinese approval document and the actual stamped document are considered to be a match; otherwise, the second recognition and judgment module 1200 is executed.

[0110] like Figure 5 As shown, in a third aspect, embodiments of this application provide an electronic device including a memory 101 for storing one or more programs; and a processor 102. When the one or more programs are executed by the processor 102, they implement the methods described in any of the first aspects above.

[0111] The system also includes a communication interface 103. The memory 101, processor 102, and communication interface 103 are electrically connected directly or indirectly to each other to enable data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines. The memory 101 can be used to store software programs and modules, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101. The communication interface 103 can be used for signaling or data communication with other node devices.

[0112] The memory 101 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0113] The processor 102 can be an integrated circuit chip with signal processing capabilities. The processor 102 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0114] In the embodiments provided in this application, it should be understood that the disclosed methods, systems, and approaches can also be implemented in other ways. The method and system embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods, systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0115] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0116] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon. When executed by processor 102, the computer program implements the methods described in any of the first aspects above. If the functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0117] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0118] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within this application. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. A method for accurately comparing Chinese approval documents and documents actually bearing seals, characterized in that, Includes the following steps: S1. Obtain and sparsely encode the Chinese approval document image and the actual seal document image to obtain the Chinese approval document encoded image and the actual seal document encoded image; S2. Calculate and determine the similarity between the Chinese approval document image and the actual seal document image based on the Euclidean distance between them, and generate image similarity results; S3. Determine whether the image similarity result is greater than the preset first reference threshold. If yes, then the Chinese approval document image and the actual seal document image are considered to match, and an accurate matching result is generated; otherwise, proceed to step S4. S4. Determine whether the image similarity result is less than the preset second reference threshold. If yes, it is determined that the Chinese approval document image and the actual seal document image do not match, and an inaccurate matching result is generated; otherwise, proceed to step S5. S5. Divide the Chinese approval document image and the actual seal document image into multiple equal regions to obtain multiple Chinese approval document region images and multiple actual seal document region images; S6. Perform sparse encoding on each Chinese approval document area image and each actual seal document area image to obtain multiple Chinese approval document area encoded images and multiple actual seal document area encoded images. S7. Calculate the similarity between the Chinese approval document area code image and the actual seal document area code image in the same area, and generate multiple area image similarity results; S8. Determine whether the similarity result of each region image is greater than the preset first reference threshold. If yes, the corresponding Chinese approval document region image and the actual seal document region image will be considered to match, and a region accurate matching result will be generated. If no, proceed to step S9. S9. Using the TextBoxes detection method, the text in the corresponding Chinese approval document area image and the actual seal document area image are recognized respectively, and the text recognition results of the corresponding Chinese approval document area image and the actual seal document area image are generated. S10. Determine whether the text recognition result of the corresponding Chinese approval document area image is the same as the text recognition result of the actual seal document area image. If yes, then the corresponding Chinese approval document area image and the actual seal document area image are considered to match. If no, proceed to step S11. S11. Perform super-resolution reconstruction on the corresponding Chinese approval document area image and the actual seal document area image to obtain and perform character recognition on the corresponding Chinese approval document area reconstruction image and the actual seal document area reconstruction image to generate the character recognition results of the corresponding Chinese approval document area reconstruction image and the actual seal document area reconstruction image. S12. Determine whether the text recognition result of the reconstructed image of the corresponding Chinese approval document area is completely the same as the text recognition result of the reconstructed image of the actual seal document area. If so, the corresponding Chinese approval document image and the actual seal document image are considered to match, and an exact matching result is generated. If not, the Chinese approval document image and the actual seal document image are considered to not match, and an inaccurate matching result is generated.

2. The method for accurately comparing Chinese approval documents and actual stamped documents according to claim 1, characterized in that, The following steps are included after step S10 and before step S11: Multi-scale image enhancement processing is performed on the corresponding Chinese approval document area image and the actual seal document area image to obtain and perform character recognition on the corresponding enhanced Chinese approval document area image and the actual seal document area image to generate the corresponding character recognition results. Determine whether the text recognition result of the enhanced image of the corresponding Chinese approval document area is completely the same as the text recognition result of the enhanced image of the actual seal document area. If so, determine that the corresponding Chinese approval document image and the actual seal document image match and generate an accurate matching result; otherwise, proceed to step S11.

3. The method for accurately comparing Chinese approval documents and actual stamped documents according to claim 2, characterized in that, The method for multi-scale image enhancement processing of the corresponding Chinese approval document area image and the actual stamped document area image includes the following steps: Gaussian blurring at multiple scales was applied to the corresponding Chinese approval document area image and the actual seal document area image to obtain the corresponding blurred Chinese approval document area image and blurred actual seal document area image. Calculate the detail difference values ​​between the blurred image and the Chinese approval document region image at each scale, generate and weight the detail information of Chinese approval documents at multiple scales into the corresponding Chinese approval document region image to obtain the corresponding enhanced image of the Chinese approval document region; Calculate the detail difference values ​​between the blurred image and the actual stamped document area image at each scale, generate and weight the actual stamped document detail information at multiple scales into the corresponding actual stamped document area image to obtain the corresponding enhanced image of the actual stamped document area.

4. The method for accurately comparing Chinese approval documents and actual stamped documents according to claim 3, characterized in that, The method for calculating the detail difference values ​​between the blurred image of the Chinese approval document region and the image of the Chinese approval document region at various scales includes the following steps: Subtract the pixels of the blurred image of the Chinese approval document region at each scale from the pixels of the Chinese approval document region image.

5. The method for accurately comparing Chinese approval documents and actual stamped documents according to claim 1, characterized in that, The method for super-resolution reconstruction of the corresponding Chinese approval document area image and the actual stamped document area image includes the following steps: The back projection method was used to perform super-resolution reconstruction of the corresponding Chinese approval document area image and the actual stamped document area image.

6. The method for accurately comparing Chinese approval documents and actual stamped documents according to claim 1, characterized in that, It also includes the following steps: Generate and send a rejection instruction based on the non-exact match results.

7. A system for accurately comparing Chinese approval documents and actual stamped documents, characterized in that, It includes a first encoding module, a first similarity module, a first judgment module, a second judgment module, a region segmentation module, a second encoding module, a second similarity module, a third judgment module, a character recognition module, a first recognition and judgment module, an image reconstruction module, and a second recognition and judgment module, wherein: The first encoding module is used to acquire and sparsely encode the Chinese approval document image and the actual seal document image to obtain the Chinese approval document encoded image and the actual seal document encoded image. The first similarity module is used to calculate and determine the similarity between the Chinese approval document image and the actual seal document image based on the Euclidean distance between them, and generate image similarity results. The first judgment module is used to determine whether the image similarity result is greater than a preset first reference threshold. If it is, the Chinese approval document image and the actual seal document image are considered to match, and an accurate matching result is generated; if not, the second judgment module is executed. The second judgment module is used to determine whether the image similarity result is less than the preset second reference threshold. If it is, the Chinese approval document image and the actual seal document image are considered to be mismatched, and an imprecise matching result is generated; if not, the region division module is executed. The region division module is used to divide the Chinese approval document image and the actual seal document image into multiple equal regions to obtain multiple Chinese approval document region images and multiple actual seal document region images. The second encoding module is used to perform sparse encoding on each Chinese approval document area image and each actual seal document area image to obtain multiple Chinese approval document area encoded images and multiple actual seal document area encoded images. The second similarity module is used to calculate the similarity between the Chinese approval document area code image and the actual seal document area code image in the same area, and generate multiple area image similarity results. The third judgment module is used to determine whether the similarity result of each region image is greater than the preset first reference threshold. If it is, the corresponding Chinese approval document region image and the actual seal document region image will be identified as matching, and a region accurate matching result will be generated. If not, the text recognition module will be executed. The text recognition module is used to recognize the text in the corresponding Chinese approval document area image and the actual seal document area image using the TextBoxes detection method, and generate the text recognition results of the corresponding Chinese approval document area image and the actual seal document area image. The first recognition and judgment module is used to determine whether the text recognition result of the corresponding Chinese approval document area image is the same as the text recognition result of the actual seal document area image. If they are the same, the corresponding Chinese approval document area image and the actual seal document area image are considered to match; otherwise, the image reconstruction module is executed. The image reconstruction module is used to perform super-resolution reconstruction on the corresponding Chinese approval document area image and the actual seal document area image to obtain and perform character recognition on the corresponding Chinese approval document area reconstruction image and the actual seal document area reconstruction image, and generate the character recognition results of the corresponding Chinese approval document area reconstruction image and the actual seal document area reconstruction image. The second recognition and judgment module is used to determine whether the text recognition result of the reconstructed image of the corresponding Chinese approval document area is completely the same as the text recognition result of the reconstructed image of the actual seal document area. If they are the same, the corresponding Chinese approval document image and the actual seal document image are considered to match, and an accurate matching result is generated. If they are not the same, the Chinese approval document image and the actual seal document image are considered to be mismatched, and an inaccurate matching result is generated.

8. The system for accurately comparing Chinese approval documents and actual stamped documents according to claim 7, characterized in that, It also includes an image enhancement module and a third recognition and judgment module, wherein: The image enhancement module is used to perform multi-scale image enhancement processing on the corresponding Chinese approval document area image and the actual seal document area image to obtain and perform character recognition on the corresponding Chinese approval document area enhanced image and the actual seal document area enhanced image, and generate the corresponding Chinese approval document area enhanced image and the actual seal document area enhanced image. The third recognition and judgment module is used to determine whether the text recognition result of the enhanced image of the corresponding Chinese approval document area is completely the same as the text recognition result of the enhanced image of the actual seal document area. If they are the same, the corresponding Chinese approval document image and the actual seal document image are considered to match, and an accurate matching result is generated; otherwise, the second recognition and judgment module is executed.

9. An electronic device, characterized in that, include: Memory, used to store one or more programs; processor; When the one or more programs are executed by the processor, the method as described in any one of claims 1-6 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Electronic official document classification method based on multi-region features

    CN105389557A

  • Similar housing resource data detection method and device and terminal equipment

    CN109948644A