Optical character recognition method, device, equipment and medium during credit card stamping

By using an optical character recognition engine and raw pixel data from the stamped area image of a credit card application form, character encoding and positional relationship recognition are performed. Anchor point fields are matched with a list of card issuers, solving the problem of low character recognition accuracy in credit card application stamping scenarios and achieving efficient automated document processing and information extraction.

CN121582937APending Publication Date: 2026-02-27THE BANK OF CHONGQING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511779277.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing technologies have low character recognition accuracy in credit card application stamping scenarios, failing to effectively distinguish target fields from interfering information, leading to misidentification or omission, which affects the efficiency of automated document processing and the accuracy of information extraction.

Method used

By using the raw pixel data of the stamped area image of the credit card application form based on the optical character recognition engine, the character encoding and positional relationship are identified, the character coordinate extraction results are determined, anchor point field matching is performed, target fields are filtered, and the matching is performed in conjunction with the list of valid names entered by the pre-set card issuer to generate field confirmation display information, and finally the information is archived.

Benefits of technology

It improves the accuracy and completeness of optical character recognition in credit card application stamping scenarios, avoids misidentification or omission, and enhances the efficiency of on-site document automation processing and the accuracy of information extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121582937A_ABST
    Figure CN121582937A_ABST
Patent Text Reader

Abstract

The invention discloses an optical character recognition method and device during credit card stamping, equipment and a medium, and relates to the technical field of image recognition, and the method comprises the steps: determining a character coordinate extraction result based on an optical character recognition engine and original pixel data of a credit card application form stamping region image; target fields are screened and verified based on the character coordinate extraction result, so that a seal field positioning result is determined; matching a target field in the seal field positioning result with an effective name list of a preset card issuing mechanism, and determining a field screening result; on the basis of a field set meeting a preset confidence coefficient condition in the field screening result, field confirmation display information is obtained; and on the basis of field image association information corresponding to the field confirmation display information, information filing is carried out, so that optical character recognition operation of the credit card application form stamping area image is completed, and a credit card stamping recognition result is obtained. And the recognition accuracy, integrity and effectiveness in the credit card application stamping scene are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image recognition, in particular to an optical character recognition method, device and equipment for credit card stamping and a medium. BACKGROUND

[0002] At present, for the credit card application stamping scene, the existing related scheme has obvious limitations in identifying character information under such a complex background, relies on the binarization and feature segmentation processing of the character region, and makes the recognition accuracy significantly decrease under the conditions of stamping, mixed handwriting and printing, character overlapping or position offset, etc. Especially in the image containing the stamping area of the credit card application form, the character positioning is not accurate due to the irregular boundary and complex underprint of the stamping image, which affects the integrity and effectiveness of the subsequent identification. At the same time, the traditional method cannot effectively distinguish the target field and the interference information, lacks the content screening ability based on semantics and structure, and is easy to cause the phenomenon of misidentification or missed identification, which finally affects the overall scene document automation processing efficiency and information extraction accuracy.

[0003] Therefore, how to improve the accuracy, integrity and effectiveness of optical character recognition in the credit card application stamping scene, avoid the phenomenon of misidentification or missed identification, and thus improve the scene document automation processing efficiency and information extraction accuracy is a problem to be solved by those skilled in the art. SUMMARY

[0004] Therefore, the purpose of the present application is to provide an optical character recognition method, device and equipment for credit card stamping, which can improve the accuracy, integrity and effectiveness of optical character recognition in the credit card application stamping scene, avoid the phenomenon of misidentification or missed identification, and thus improve the scene document automation processing efficiency and information extraction accuracy. The specific scheme is as follows:

[0005] In a first aspect, the present application provides an optical character recognition method for credit card stamping, comprising:

[0006] Based on the original pixel data of the optical character recognition engine and the credit card application form stamping area image, the character encoding and position relationship are identified to determine the character coordinate extraction result; wherein the credit card application form stamping area image is the image corresponding to the stamping area in the credit card application form scanning image; the original pixel data is the pixel data obtained based on the preset color standard;

[0007] Based on the character coordinate extraction result, the anchor point field is matched, and according to the corresponding field matching result, the credit card application form stamping area image is screened and verified for the target field to determine the stamping field positioning result; the target field is a field with continuous Chinese characters and containing the text content consistent with the anchor point field in the field matching result.

[0008] Based on the target field in the seal field positioning result, match with a preset valid name list entered by a card issuing institution, and process the target field in the seal field positioning result that is not matched successfully to determine a field screening result;

[0009] Based on the field set that meets a preset confidence condition in the field screening result, generate text prompt content and embed structured task instructions to obtain field confirmation display information;

[0010] Based on field image associated information corresponding to the field confirmation display information, determine a field recognition structure record set, and archive the field recognition structure record set to complete the optical character recognition operation of the credit card application form seal area image and obtain a credit card seal recognition result.

[0011] Optionally, based on the optical character recognition engine and the original pixel data of the credit card application form seal area image, character encoding and position relationship are recognized to determine a character coordinate extraction result, including:

[0012] Obtain original pixel data of a seal area in a credit card application scan image;

[0013] Based on the original pixel data, respectively perform gray scale conversion on each pixel point of the credit card application form seal area image to determine a converted gray scale image;

[0014] Based on the gray scale image, determine a gray scale mutation coordinate set;

[0015] Based on image coordinates in the gray scale mutation coordinate set, construct a contour closed path to obtain a constructed boundary path;

[0016] Extract a rectangular area with the smallest area surrounded by the boundary path to determine a region extraction result;

[0017] Based on the region extraction result and a preset character detection coordinate frame, perform overlap matching, and when the matching is successful, determine whether a corresponding overlap area is greater than a preset coordinate frame overlap rate threshold to obtain an overlap rate determination result;

[0018] If the overlap rate determination result is yes, the region extraction result is determined as an effective character area, and an effective character area coordinate set corresponding to the effective character area is obtained;

[0019] Based on the coordinates in the effective character area coordinate set, cut the credit card application form seal area image to determine an image cutting result;

[0020] Based on the optical character recognition engine, the image cropping result is subjected to pixel structure feature extraction to determine a feature extraction result;

[0021] Based on the feature extraction result and a preset character template library, matching is performed to determine a character matching result;

[0022] Based on the encoding index and the position sequence corresponding to the target character in the character matching result, a character coordinate extraction result is determined.

[0023] Optionally, the determination of the gray scale mutation coordinate set based on the gray scale image comprises:

[0024] A first-order difference operation is performed on the gray scale image to obtain a one-dimensional gray scale sequence;

[0025] Based on the one-dimensional gray scale sequence, the size relationship between the gray scale difference between adjacent pixel points in the gray scale image and a preset gray scale mutation judgment threshold is compared to determine a gray scale mutation point;

[0026] Based on the image coordinates corresponding to the gray scale mutation point, a gray scale mutation coordinate set is determined.

[0027] Optionally, based on the character coordinate extraction result, anchor point field matching is performed, and based on the corresponding field matching result, target field screening and verification are performed on the credit card application form stamping area image to determine a stamping field positioning result, comprising:

[0028] Based on the encoding information and image coordinate values corresponding to each character in the character coordinate extraction result, the encoding information is sequentially subjected to literal matching to determine a literal matching result;

[0029] Based on the literal matching result, a character combination consistent with a preset anchor point keyword is identified to determine a field matching result; the preset anchor point keyword includes an applicant, an authorized signature, and a keyword related to a unit stamp;

[0030] Based on the center position coordinate information and the position index information corresponding to each character combination in the field matching result, an anchor point position coordinate list is determined;

[0031] Based on the coordinate data in the anchor point position coordinate list, character coordinate points in an anchor point associated area corresponding to the credit card application form stamping area image are searched to determine a coordinate point search result; the anchor point associated area is an area within a range of a preset number of pixel units to the right of the coordinate data;

[0032] The characters in the coordinate point search result are subjected to region clustering processing to determine a clustering processing result;

[0033] Based on the clustering processing result, encoding splicing is performed, and the continuous screening is performed by using the spliced character sequence to determine the target field screening result;

[0034] Based on the consistency index value corresponding to each target field in the target field screening result, the index value comparison result is compared with the preset position stability threshold to determine the index value comparison result;

[0035] If the index value comparison result indicates that the consistency index value is not less than the preset position stability threshold, the corresponding target field is removed;

[0036] If the index value comparison result indicates that the consistency index value is less than the preset position stability threshold, the corresponding target field is retained to determine the seal field positioning result.

[0037] Optionally, the target field in the seal field positioning result is matched with the valid name list input by the preset card issuing institution, and the target field in the seal field positioning result that fails to match is processed to determine the field screening result, including:

[0038] Determine whether the character value of each target field in the seal field positioning result belongs to a preset interval to determine an interval determination result;

[0039] If the interval determination result is no, the corresponding target field is removed;

[0040] If the interval determination result is yes, the corresponding target field is retained to determine the target field screening result;

[0041] The target field screening result is matched with the valid name list input by the preset card issuing institution, and the target field in the target field screening result that matches successfully is recorded to determine an effective name matching set;

[0042] The target field in the target field screening result that fails to match is divided to determine a field division result;

[0043] Based on the field division result, the analysis of Chinese naming structure is performed to determine a Chinese name structure field set;

[0044] Based on each field structure in the Chinese name structure field set, the identification and removal of structure incomplete fields are performed to determine a structure field screening result;

[0045] Based on the structure field screening result and the effective name matching set, the field screening result is determined.

[0046] Optionally, based on the field set meeting the pre-set confidence condition in the field screening result, text prompt content is generated and structured task instruction embedding is performed to obtain field confirmation display information, including:

[0047] It is judged whether the confidence parameter value corresponding to each field in the field screening result is less than the pre-set confidence reference threshold to determine a confidence judgment result.

[0048] If the confidence judgment result is yes, the corresponding field is retained to obtain a field set.

[0049] Based on the upper left corner coordinates and the lower right corner coordinates of each field in the field set, a coordinate matrix is constructed to determine a low-confidence field coordinate set.

[0050] By mapping the coordinate data in the low-confidence field coordinate set to the credit card application form stamping area image, a rectangular annotation box with a pre-set color is constructed to obtain a target annotation box.

[0051] The field text content in the target annotation box is superimposed on the upper right corner of the target annotation box in the form of equidistant offset to determine a field highlighted image area box.

[0052] The number identification, content string and image coordinate area information of the field in the field highlighted image area box are extracted, and the data structure and instruction block are assembled using the corresponding information extraction result and pre-set data identification method to obtain a structured interactive task instruction block set.

[0053] Based on the structured interactive task instruction block set, field confirmation display information is determined.

[0054] Optionally, based on the field image association information corresponding to the field confirmation display information, a field recognition structure record set is determined, and the field recognition structure record set is information-archived to complete the optical character recognition operation of the credit card application form stamping area image and obtain a credit card stamping recognition result, including:

[0055] The field text content corresponding to the to-be-processed field in the field confirmation display information is determined as a field name.

[0056] Based on the image coordinates corresponding to the to-be-processed field, image source file path information is located, and an image name is determined using the corresponding location result.

[0057] The field number corresponding to the to-be-processed field is obtained.

[0058] Based on the field number and the corresponding field name and image name, a triple mapping relationship is constructed, and the field name and the image name are organized into a double-field association structure to determine field image association information.

[0059] Based on the field record data in the field image association information, a field recognition structure body corresponding to each field record data is determined; the field record data includes the image name and the field text content;

[0060] Based on the preset data structure and the field confirmation state information in the field confirmation display information, the corresponding field recognition structure body is aggregated to determine a field recognition structure record set;

[0061] For each target structure body in the field recognition structure record set, an archive label attribute field is added to determine a field addition result,

[0062] Based on the field addition result, information archiving is performed to complete the optical character recognition operation corresponding to the credit card application scan image and obtain a credit card seal recognition result.

[0063] In a second aspect, the present application provides an optical character recognition device for credit card handling and sealing, comprising:

[0064] A coordinate extraction module is configured to identify character encoding and position relationship based on an optical character recognition engine and original pixel data of a credit card application form seal area image to determine a character coordinate extraction result; wherein the credit card application form seal area image is an image corresponding to a seal area in a credit card application form scan image; and the original pixel data is pixel data obtained based on a preset color standard;

[0065] A field positioning module is configured to match anchor fields based on the character coordinate extraction result, and filter and verify target fields in the credit card application form seal area image according to the corresponding field matching result to determine a seal field positioning result; the target field is a field with continuous Chinese characters and containing text content consistent with the anchor field in the field matching result;

[0066] A field filtering module is configured to match the target field in the seal field positioning result with a valid name list entered by a preset card issuing institution, and process the target field in the seal field positioning result that fails to match successfully to determine a field filtering result;

[0067] A display information determination module is configured to generate text prompt content and embed structured task instructions based on a field set in the field filtering result that meets a preset confidence condition to obtain field confirmation display information.

[0068] A result determination module is configured to determine the field recognition structure record set based on the field confirmation information corresponding to the field image associated information of the display information, and perform information archiving on the field recognition structure record set to complete the optical character recognition operation of the credit card application form stamping area image and obtain the credit card stamping recognition result.

[0069] In a third aspect, the present application provides an electronic device, comprising:

[0070] A memory is configured to save a computer program;

[0071] A processor is configured to execute the computer program to realize the steps of the optical character recognition method for credit card stamping as described above.

[0072] In a fourth aspect, the present application provides a computer readable storage medium configured to save a computer program, and the computer program is executed by a processor to realize the steps of the optical character recognition method for credit card stamping as described above.

[0073] As can be seen, in this application, character encoding and positional relationships are identified based on the optical character recognition engine and the original pixel data of the stamped area image of the credit card application form to determine the character coordinate extraction result; wherein, the stamped area image of the credit card application form is the image corresponding to the stamped area in the scanned image of the credit card application form; the original pixel data is pixel data obtained based on a preset color standard; based on the character coordinate extraction result, anchor point field matching is performed, and according to the corresponding field matching result, the target field of the stamped area image of the credit card application form is filtered and verified to determine the stamped field positioning result; the target field is a continuous Chinese character, and there exists text content that matches the anchor point field in the field matching result. The process involves: identifying the target field in the stamp field location result; matching it with a list of valid names entered by a pre-set card issuer; processing any unmatched target fields in the stamp field location result to determine the field filtering result; generating text prompts and embedding structured task instructions based on the set of fields in the field filtering result that meet pre-set reliability conditions to obtain field confirmation display information; determining the field recognition structure record set based on the field image association information corresponding to the field confirmation display information, and archiving the field recognition structure record set to complete the optical character recognition operation of the stamp area image of the credit card application form and obtain the credit card stamp recognition result. In other words, this application first uses the raw pixel data of the stamped area image of the credit card application form to identify character encoding and positional relationships. Then, using the obtained character coordinate extraction results, anchor point fields are matched. Based on the field matching results, target fields are filtered and verified in the stamped area image of the credit card application form to determine the stamp field location results. Next, the stamp field location results are matched with a pre-set list of valid names entered by the card issuer to determine the field filtering results. Then, based on the set of fields in the field filtering results that meet pre-set confidence conditions, field confirmation display information is obtained. Finally, based on the field image association information corresponding to the field confirmation display information, information is archived to obtain the credit card stamp recognition result of the stamped area image of the credit card application form. This improves the accuracy, completeness, and effectiveness of optical character recognition in credit card application stamping scenarios, avoids misidentification or omissions, and thus improves the efficiency of automated document processing and the accuracy of information extraction in the scenario. Attached Figure Description

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

[0075] Figure 1 An optical character recognition method flow chart when a credit card is handled for stamping is provided for the present application;

[0076] Figure 2 An optical character recognition device structure schematic diagram when a credit card is handled for stamping is provided for the present application;

[0077] Figure 3 An electronic equipment structure diagram is provided for the present application. DETAILED DESCRIPTION

[0078] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0079] At present, for the credit card application stamping scene, the existing related scheme has obvious limitations in identifying character information under such a complex background, relies on the binarization and feature segmentation processing of the character region, and makes the recognition accuracy significantly decrease under the conditions of stamp, mixed handwriting and printing, character overlapping or position offset, etc. Especially in the image containing the stamping area of the credit card application form, the character positioning is not accurate due to the irregular boundary and complex underprint of the stamping image, which affects the integrity and effectiveness of subsequent identification. At the same time, the traditional method cannot effectively distinguish the target field and interference information, lacks the content screening ability based on semantics and structure, is easy to cause misidentification or missed identification phenomenon, and finally affects the overall scene document automation processing efficiency and information extraction accuracy.

[0080] Therefore, the present application provides an optical character recognition scheme when a credit card is handled for stamping, which can improve the accuracy, integrity and effectiveness of optical character recognition in the credit card application stamping scene, and avoid misidentification or missed identification phenomenon, thereby improving the scene document automation processing efficiency and information extraction accuracy.

[0081] Referring to Figure 1 The embodiments of the present application disclose an optical character recognition method when a credit card is handled for stamping, comprising:

[0082] Step S11, based on the optical character recognition engine and the original pixel data of the credit card application form stamping area image, the character encoding and position relationship are identified to determine the character coordinate extraction result; wherein the credit card application form stamping area image is the image corresponding to the stamping area in the credit card application form scanning image; the original pixel data is the pixel data obtained based on the preset color standard.

[0083] In this embodiment, first, the original pixel data of the seal area in the credit card application scan image is acquired, the boundary contour line is extracted according to the gray gradient change, the suspected character area in the image is segmented by setting the coordinate frame of the region of interest, the character code and the position relationship are recognized by using the optical character recognition engine, and the character coordinate extraction result is generated. Specifically: based on the original pixel data, the gray scale conversion is performed on each pixel point of the credit card application seal area image to determine the converted gray scale image; based on the gray scale image, the gray scale mutation coordinate set is determined; based on the image coordinates in the gray scale mutation coordinate set, the closed contour path is constructed to obtain the constructed boundary path; the rectangular area with the smallest area surrounded by the boundary path is extracted to determine the region extraction result; based on the region extraction result and the preset character detection coordinate frame, the overlap matching is performed, and when the matching is successful, it is judged whether the corresponding overlap area is greater than the preset coordinate frame overlap rate threshold to obtain the overlap rate judgment result; if the overlap rate judgment result is yes, the region extraction result is determined as the effective character area, and the effective character area coordinate set corresponding to the effective character area is obtained; based on the coordinates in the effective character area coordinate set, the credit card application seal area image is cut to determine the image cutting result; based on the optical character recognition engine, the pixel structure features of the image cutting result are extracted to determine the feature extraction result; based on the feature extraction result and the preset character template library, the matching is performed to determine the character matching result; based on the encoding index and the position order of the target character in the character matching result, the character coordinate extraction result is determined. Wherein, based on the gray scale image, the gray scale mutation coordinate set is determined, including: performing first order difference operation on the gray scale image to obtain one-dimensional gray scale sequence; based on the one-dimensional gray scale sequence, the size relationship between the gray scale difference between adjacent pixel points in the gray scale image and the preset gray scale mutation judgment threshold is compared to determine the gray scale mutation point; based on the image coordinates corresponding to the gray scale mutation point, the gray scale mutation coordinate set is determined. Wherein, the preset color standard can be RGB three primary colors (Red Greed Blue).

[0084] It needs to be understood that, regarding the determination process of the character coordinate extraction result, first, the RGB original pixel data of the seal area in the credit card application scan image is obtained, the pixel-based gray scale weighted calculation method is converted into a gray scale image, a first-order difference operation is performed on the gray scale image, the size relationship between the gray scale value changes between adjacent pixel points and the boundary mutation threshold is compared, the mutation point position is screened and the coordinates are recorded, and a gray scale mutation coordinate set is generated. Then, the boundary path is constructed according to the position relationship of the image coordinate points in the gray scale mutation coordinate set, the closed region contour in the path is extracted, the contour region is matched with the preset character detection coordinate frame, it is judged whether the overlapping area exceeds the character detection matching threshold, if it is satisfied, the corresponding region is extracted, and the effective character region coordinate set is generated. Then, the image region is cut according to the coordinate information in the effective character region coordinate set, and input to the OCR recognition engine (Optical Character Recognition, optical character recognition), the pixel structure features are extracted and matched with the character template library, the recognition result is output according to the coding index of the matched character and the position order in the image block, and the character coordinate extraction result is generated. The specific related steps are as follows:

[0085] Based on the original pixel data of the seal area image of the credit card application form, all pixel points in the image are processed point by point, the intensity values of red R, green G and blue B three channels are extracted for each pixel, and the standard gray scale conversion formula is adopted:

[0086] ;

[0087] For example, the pixel point number is 1, R=120, G=100, B=95, and the gray scale value G is: Accordingly, the gray scale conversion is performed on all pixel points in the image in turn and a one-dimensional gray scale sequence is constructed, the horizontal difference operation is performed on the sequence and the absolute value is obtained to obtain the gray scale difference value. The gray scale mutation judgment threshold can be defined as 20, if the gray scale difference between a point and the previous pixel point is greater than the threshold, it is marked as a gray scale mutation point, and its image coordinates are recorded as the basis for subsequent processing. For example: the gray scale value of the 3rd pixel point is 113.92, the difference between the previous pixel point 105.93 is 7.99<20, which does not meet the mutation judgment condition, and the gray scale value of the 4th pixel point is 85.92, the difference between the 3rd point is 28.00>20, which meets the mutation judgment condition, so the coordinate information of the 4th pixel point is recorded. The coordinate set of all pixels that meet the mutation judgment condition is extracted. In a specific embodiment, the channel intensity, gray scale value and gray scale difference value of part of the pixels in the seal area image of the credit card application form can be as shown in Table 1.

[0088] Table 1 Gray scale change table of pixel points

[0089]

[0090] According to Table 1, the fourth and fifth pixel points both satisfy the set mutation judgment condition, because their gray scale difference values are 28.00 and 35.93 respectively, both of which are higher than the threshold value 20, which indicates that the gray scale of these points changes abruptly, and the image coordinates of these points need to be retained, and finally the gray scale mutation coordinate set is generated.

[0091] Then, the image coordinate point information in the gray scale mutation coordinate set is read, a path structure is constructed according to spatial adjacency, the continuous coordinates are connected to form a closed contour path, and the minimum enclosing rectangular region surrounded by the path is extracted. For example, if the mutation coordinate points are (50, 100), (51, 101) and (52, 102), a contour rectangular region can be constructed, with the upper left corner being (50, 100) and the lower right corner being (52, 102), the width and height being 2 pixels respectively, and the area being 4 pixels. The rectangular region is compared with a preset character recognition region frame, and the character recognition region frame is (48, 98, 20, 20), i.e. the upper left corner coordinate is (48, 98), the width and height are both 20 pixels, and the total area is 400 pixels. The number of overlapping pixels in the two regions is compared with the total area of the character recognition region, and the overlapping rate is 0.01, which is much lower than the set character detection matching threshold value 0.4, so it is determined that the region is not an effective character region. Conversely, for another group of coordinates such as (80, 200) and (81, 201), the rectangular region formed thereby is 1x1, and the area is 1 pixel. The corresponding character frame region is (78, 198, 30, 30), the total area is 900 pixels, and the overlapping rate is 0.11. If the threshold value is adjusted according to the character size to 0.05, the overlapping rate of 0.11 can be determined as a suspected character region (i.e. an effective character region), and the rectangular region boundary information and number thereof are recorded to generate a suspected character region coordinate set for the input source of OCR.

[0092] According to the boundary coordinate information of each region in the suspected character region coordinate set, the corresponding image blocks are sequentially cut from the original image, and each image block is input into a character recognition module for image structure analysis. In the recognition process, the edge contour features of the pixel points are constructed, and similarity comparison is performed with a preset character template library. For example, in region 1, the image block is extracted by recognizing and matching the character 'K', and the matching degree with the structure features of the 'K' template is 92.4%>80%, which meets the recognition accuracy requirement, and the character barycenter coordinate is extracted as (55, 105). In region 2, the image block is extracted to recognize the character '9', and the matching degree is 88.7%>80%, and the coordinate position is (85, 215). All the recognized characters with a matching degree higher than 80% are retained and recorded in a table. As shown in Table 2, the character recognition results and the coordinate information thereof in the image are shown.

[0093] Table 2: Character recognition coordinate extraction result table

[0094]

[0095] According to Table 2, the character encoding results and their coordinate positions of the two identified areas are recorded, and the data will be used for coordinate position mapping and subsequent form data association processing to generate character coordinate extraction results.

[0096] In step S12, based on the character coordinate extraction results, the anchor point field matching is performed, and according to the corresponding field matching results, the target field screening and verification of the credit card application form seal area image are performed to determine the seal field positioning result; the target field is a field with continuous Chinese characters and with text content consistent with the anchor point field in the field matching result.

[0097] In this embodiment, after determining the character coordinate extraction result, the anchor point field of 'applicant', 'authorized signature' or 'unit seal' is identified according to the character coordinate extraction result, the character area within 60 pixels to the right of the anchor point is combined, and the text content with continuous Chinese characters and consistent with the anchor point field in the corresponding area is screened as the target field. The seal field positioning result is generated by performing consistency judgment on the X-axis and Y-axis pixel distance between the corresponding position coordinates and the anchor point and retaining the legal field. Specifically: based on the encoding information and image coordinate values of each character in the character coordinate extraction result, the encoding information is sequentially matched in words to determine the word matching result; based on the word matching result, the character combination consistent with the preset anchor point keyword is identified to determine the field matching result; the preset anchor point keyword includes keywords related to applicant, authorized signature and unit seal; based on the center position coordinate information and position index information of each character combination in the field matching result, the anchor point position coordinate list is determined; based on the coordinate data in the anchor point position coordinate list, the character coordinate points in the anchor point associated area in the credit card application form seal area image are searched to determine the coordinate point search result; the anchor point associated area is an area within a range of a preset number of pixel units to the right of the coordinate data; the characters in the coordinate point search result are subjected to region clustering processing to determine the clustering processing result; based on the clustering processing result, the encoding is spliced, and the spliced character sequence is used for continuity screening to determine the target field screening result; based on the consistency index value of each target field in the target field screening result, the consistency index value is compared with the preset position stability threshold to determine the index value comparison result; if the index value comparison result indicates that the consistency index value is not less than the preset position stability threshold, the corresponding target field is removed; if the index value comparison result indicates that the consistency index value is less than the preset position stability threshold, the corresponding target field is retained to determine the seal field positioning result.

[0098] It should be understood that in the process of determining the positioning result of the stamped field, in this embodiment, all character codes and corresponding image coordinate values in the character coordinate extraction result are obtained, and a character-by-character combination matching operation is performed on the character code content. For each group of consecutive character combinations, a window is constructed from the character code sequence, and the length of the matching window is the same as the number of characters in the standard anchor phrase 'Applicant', 'Company Seal', and 'Authorized Signature'. The equal operator is used to compare the content of the current window combination with the anchor phrase. If the characters are exactly the same, it is considered that the recognition is successful, and the central position coordinate of the first character in the current character combination is recorded as the spatial identifier of the anchor point. The character coordinates use the upper left corner as the origin and the unit is pixels. For example, if the character combination 'Applicant' is recognized in the image and its first character '申' is located at the coordinate (120, 200), then the coordinate of the anchor point field 'Applicant' is set to (120, 200). All character combinations in the image are processed in this way to obtain all character blocks that meet the anchor point content, forming the basic data for anchor point positioning. In addition, as shown in Table 3 below, when performing anchor point field recognition for a sample, the corresponding image coordinate information is provided.

[0099] Table 3 Anchor Point Field Positioning Coordinate Table

[0100]

[0101] As shown in Table 3, the starting coordinates of the three matched anchor points in the image are respectively recorded for subsequent field area extraction and position offset judgment, generating a list of anchor point position coordinates.

[0102] After that, extract each set of anchor point image coordinate information in the anchor point position coordinate list, range judgment is carried out on the center coordinates of all characters in the image, if the character horizontal coordinate is located to the right of the anchor point coordinate and the horizontal offset is within 60 pixels, the character is included in the current anchor point associated area, all characters in the area are clustered and arranged in order of X axis from small to large, and the character code content is spliced. For example: the starting coordinates of the anchor point field: 'authorized signature' are (500, 620), the characters at the coordinate positions (510, 620), (520, 620), (532, 620) in the image meet the offset range condition, then the candidate field 'Wang**' is obtained after splicing the character codes in order, then continuous screening is performed on the character sequence, all characters are required to be standard Chinese characters, there are no abnormal symbols or spaces between characters, if there are non-Chinese characters in the field or the distance between characters exceeds 1.5 times the width of the character, it is determined that it is not a continuous field and is rejected. The rule refers to the average width of standard Chinese characters in common scanned images, which is 20 pixels, so the distance between characters exceeding 30 pixels is considered to be discontinuous, and finally the continuous Chinese character field in the content is reserved, and the content contains the anchor point keywords, that is, 'applicant', 'authorized signature', 'unit seal' as keywords, which appear in the field to retain the matching result of the group, form the character matching field set, that is, the target field screening result.

[0103] After that, according to the pixel distance calculation of the coordinate data of each character sequence in the character matching field set and the corresponding anchor point position coordinate in X axis and Y axis direction, the consistency index value is calculated by the following formula:

[0104] .

[0105] Through the operation of the above formula, the value of the character space consistency index , if the consistency index value is lower than the position stability threshold, the current matching field is retained as an effective field, and the seal field positioning result is obtained; wherein, 、 is the center coordinate of the i-th character in the matching field, 、 is the center coordinate of the corresponding anchor point, and N is the number of characters contained in the current matching field.

[0106] Perform a spatial consistency operation based on all candidate fields and their character position coordinates and the corresponding anchor position coordinates in the character matching field set. Select the anchor coordinates as the reference point, calculate the pixel distance between the center point of each character in the field and the anchor in the X-axis and Y-axis directions, and then use the Euclidean distance formula to calculate its character spatial consistency index value. For example, for the field '王**' which contains 3 characters, its character coordinates are (510, 620), (520, 620), (532, 620), and the anchor coordinates are (500, 620), then substitute into the formula for calculation as follows:

[0107] .

[0108] The calculated consistency index value is 20.67. The basis for setting the position stability threshold to 25 pixels is the standard range of the average spacing between characters and the layout tolerance within the character field. According to the average character width of regular Chinese characters in the image at a resolution of 300 dpi (dots per inch) is about 20 to 25 pixels, combined with the variation tolerance of the overall alignment stability of characters, generally allowing the maximum fluctuation range between the center point of the character and the center point of the anchor to be controlled between 1 to 1.2 times the character width, that is, fluctuating within the range of 20 to 30 pixels. Take the more conservative and stable median value of 25 pixels as the position stability threshold. This value increases linearly with the increase of the image resolution, but can remain fixed in a unified sampling environment. After comparison, it can be seen that the current field meets the conditions. Record this field as a valid matching field, calculate the character spatial consistency index value through the operation, and retain the current field according to the judgment standard to obtain the positioning result of the stamped field.

[0109] It is further necessary to understand that the operation logic of the formula is to use the center coordinates of the anchor character as the reference point, and perform a point-by-point offset calculation on the coordinate points of each character in the candidate field. Among them, represents the pixel distance offset of the character in the X-axis direction, represents the pixel distance offset of the character in the Y-axis direction. In order to quantify the two-dimensional offset degree of the character, the Euclidean distance calculation method is adopted, that is, first square the offset amounts in the two directions to prevent the positive and negative values from canceling each other out, and then sum the squared results and perform a square root operation to obtain the true spatial distance of each character relative to the anchor. Finally, sum the distance values of all characters and divide by the number of characters N to obtain the overall average spatial offset value of the field The mean index can stably reflect the consistency degree of the character sequence in space. If all characters are closely arranged around the anchor point, the value is smaller. If there is character drift or cross-line phenomenon, the value increases. Therefore, the operation process comprehensively quantifies the two-dimensional space offset through square root, square, summation and average operation, forming a mathematical evaluation of the stability and space fitting degree of the field.

[0110] Furthermore, the consistency index value is a numerical parameter for measuring the position offset degree of each character in the character field relative to the specified anchor point in two-dimensional space. Its specific meaning is to reflect the aggregation degree and arrangement stability of the field characters in space distribution. The smaller the value, the closer the spatial distance between the characters in the field and the anchor point, the more concentrated the distribution, and the character sequence has good arrangement consistency. On the contrary, if the value is larger, it means that there is a large degree of dispersion, drift or cross-line misplacement phenomenon between the characters in the field and the anchor point, and the consistency is poor, which cannot be considered as a structurally effective associated field. Therefore, the consistency index value can be used as an important basis for judging the spatial continuity and structural reliability of the field, and is a core space evaluation quantity in the image field recognition process.

[0111] In step S13, based on the target field in the seal field positioning result, the valid name list entered by the preset card issuing institution is matched, and the target field in the seal field positioning result that is not matched successfully is processed to determine the field screening result.

[0112] In this embodiment, after obtaining the seal field positioning result, the field character content in the seal field positioning result is selected, the content items with a length of 3-8 characters (which can be configured as other character length ranges according to actual needs) are matched with the valid name list entered by the bank, the word combination logic structure is applied to the remaining field content, only the field structure that meets the Chinese name or unit naming rules is reserved, and the non-target field is filtered to generate the structure field screening result, that is, the field screening result. Specifically: judging whether the character value of each target field in the seal field positioning result belongs to a preset interval to determine an interval judgment result; if the interval judgment result is no, the corresponding target field is excluded; if the interval judgment result is yes, the corresponding target field is reserved to determine a target field screening result; the target field screening result is matched with a preset valid name list entered by a card issuing institution, and the target field in the target field screening result that matches successfully is recorded to determine an effective name matching set; the target field in the target field screening result that does not match successfully is divided to determine a field division result; based on the field division result, the Chinese naming structure is analyzed to determine a Chinese name structure field set; based on each field structure in the Chinese name structure field set, the structure incomplete field is identified and excluded to determine a structure field screening result; and based on the structure field screening result and the effective name matching set, a field screening result is determined.

[0113] It should be understood that, regarding the determination process of the field screening result, in this embodiment, based on the entire field content in the seal field positioning result, the character value of each field is first extracted, the character length information of each field is obtained by using a string length calculation method, and it is judged whether the value is located in a standard matching interval of 3-8. If the field length is less than 3 characters or greater than 8 characters, it is determined that it does not meet the length rule and is excluded. For example, ‘Zhang’ is 2 characters and ‘Wang ** Technology Co., Ltd.’ is 9 characters, both of which are excluded. The remaining fields that meet the conditions are reserved for subsequent processing. Then, the characters of each field that meets the length requirement are matched with the standard names in the valid name list provided by the bank at the character level. The matching method is that the character sequences are completely consistent. For example, if the list contains ‘Zhang **’ and ‘Wang **’, the fields ‘Zhang **’ and ‘Wang **’ can match successfully, and ‘Li **’ is not considered as a hit because it does not appear in the list. Table 4 shows the verification results of the field character number, whether it meets the length requirement, and whether it matches successfully:

[0114] Table 4: Field content matching example table

[0115]

[0116] As shown in Table 4, the fields 'Zhang' and 'Wang' satisfy the length and list hit conditions at the same time, and are therefore marked as valid matching records, and a valid name matching set is finally generated.

[0117] After that, based on the field content that is not hit in the valid name matching set, character structure extraction and subunit division operations are performed thereon, the complete field is sliced and combined to build a combined subsequence according to two or three character lengths, and whether it conforms to the Chinese name structure rule is judged in sequence, and the rule is that the first character should be a high-frequency surname character, and the subsequent characters constitute a two-character name or a one-character name. For example, the field 'Li' can be divided into 'Li', '*', and 'Li', according to the Chinese naming structure, it is judged that 'Li' in 'Li' is a surname and '*' is a name, and the structure is established, the field '** City Chaoyang Company' does not conform to the name structure and needs to be excluded, and further, through comparison of Chinese character word nature, only the structure type field with a prefix of a common Chinese surname, an infix of a noun combination, and a length of 2 or 3 characters is reserved, and a Chinese name structure field set is finally generated.

[0118] After that, according to the character arrangement of the fields in the Chinese name structure field set, the semantic features of the beginning, middle and end of the field are partitioned, the prefix part is aligned with 'A place', '* iron', 'B place' and other words in the common naming keyword table of the unit, the middle part is judged whether there are industry description keywords such as 'technology', 'education', 'electric power', and the suffix is identified 'company', 'limited liability', 'office' and other unit marker words, the overall field is compared in naming structure, if the character combination in the field can be divided into the above structure order, that is, it conforms to the Chinese unit naming logic, it is reserved as a legal field, otherwise if there is a naming fracture, a missing keyword, an abnormal order or a special symbol, it is marked as a structure illegal field and excluded, for example, '* iron group co., ltd.' conforms to the prefix + industry + unit suffix structure and is reserved, while 'Zhang technology Wang' is excluded because it does not have a suffix naming keyword, and finally only the field content that satisfies the naming logic is reserved to generate a structure field screening result.

[0119] Step S14, based on the field set in the field screening result that satisfies the pre-set confidence condition, the generation of the text prompt content and the embedding of the structured task instruction are performed to obtain field confirmation display information.

[0120] In this embodiment, after determining the field filtering results, the positions of the fields on the image and their recognition confidence scores are used to select the coordinates of fields with confidence scores lower than the standard threshold, construct the image highlighting area bounding box, embed the recognized field content as text prompt content into the structured task instruction, generate a prompt component that can be confirmed by the user, and use it for the interactive system to generate field confirmation display information. Specifically: The confidence parameter value corresponding to each field in the field filtering result is determined to be less than a preset confidence benchmark threshold to determine the confidence judgment result; if the confidence judgment result is yes, the corresponding field is retained to obtain a field set; based on the upper left and lower right corner coordinates of each field in the field set, a coordinate matrix is ​​constructed to determine the low-confidence field coordinate set; by mapping the coordinate data of the low-confidence field coordinate set to the stamped area image of the credit card application form, a rectangular annotation box with a preset color is constructed to obtain the target annotation box; the field text content within the target annotation box is superimposed on the upper right corner of the target annotation box in an equidistant offset form to determine the field highlighted image area box; the field number identifier, content string, and image coordinate area information in the field highlighted image area box are extracted, and data structures and instruction blocks are assembled using the corresponding information extraction results and preset data identification methods to obtain a structured interactive task instruction block set; based on the structured interactive task instruction block set, the field confirmation display information is determined.

[0121] It is important to understand that, regarding the process of determining the information displayed for field confirmation, in this embodiment, based on the character content, recognition confidence score, and image coordinate information of each field in the field filtering results, the field recognition confidence score parameter is first compared numerically. A confidence score baseline threshold of 0.85 is set (this value originates from the performance boundary of the recognition engine, verified on a standard training set, which can maintain a character recognition error rate within 5%, and can be adjusted based on actual needs). Recognition results below this threshold have high uncertainty and need further localization and labeling. A step-by-step comparison strategy is used during the judgment operation; if the field recognition confidence score is less than 0.85, it is marked as an abnormal character. The image coordinates of the segment are used to extract the top-left and bottom-right pixels to form the boundary of a rectangular region. For example, the recognition confidence of the field '*Iron Electric' is 0.76, which is less than the threshold of 0.85. Its top-left corner coordinates are (300, 210), and its bottom-right corner coordinates are (400, 250). The calculated region width is 100 pixels and the height is 40 pixels. This region is recorded as an abnormal recognition region, forming the basis for constructing a highlighted rectangle annotation. The field 'A Technology Company' also meets the screening criteria. Other fields such as 'Zhang*' and 'A Petrochemical Group' have confidence scores of 0.91 and 0.93 respectively, exceeding the threshold and are therefore excluded from subsequent processing steps. Table 5 below lists the fields, recognition confidence scores, and their coordinate ranges.

[0122] Table 5 Recognition field confidence and coordinate table

[0123]

[0124] As shown in Table 5, the fields ‘*Ferrous gas’ and ‘Some Technology Company’ both have a confidence of less than 0.85 and have successfully located the boundary coordinates, and the system extracts the pixel area position of the corresponding field according to this to generate a low-confidence field coordinate set.

[0125] After that, the extracted image rectangular boundary coordinates in the low-confidence field coordinate set are mapped to the corresponding image frame based on the image coordinate system, a highlighted rectangular annotation box is constructed, the rectangular border color is selected as the RGB value (255, 0, 0) during the annotation process, that is, the standard red border, the line width is set to 2 pixels, the annotation box is offset by 8 pixels in the right upper corner. (−8) pixel position, embed the recognition field text content, this text can be set to: use the Microsoft Yahei font, font size is 12, color is set to black. In order to avoid shielding the original field content, the rectangular and text position are executed layer drawing through the image rendering interface, the border and text layer are independently drawn for each field, and are identified by area number, such as numbers F01, F02 corresponding to ‘*Ferrous gas’ and ‘Some Technology Company’ fields respectively, to ensure that the image display area is clear, the embedded content is correct, and the image structure is complete. Generate a field highlighted image area box.

[0126] After that, according to the border position and recognized field content in the field highlighted image area box, a structured interactive task instruction set is constructed, the number identification, content string and image coordinate area of each field are extracted, and are assembled into a JSON (JavaScript Object Notation, JavaScript Object Notation) structure block or a KV (Key-Value, Key-Value) structure pair. Each instruction block contains field number, field content, image position index, and task prompt text. The task prompt content format is: “Please confirm whether field FXX is: XXX correct”, for example, the field F01 content is ‘*Ferrous gas’, and its task instruction is “Please confirm whether field F01 is: *Ferrous gas correct”, and its coordinates are (300, 210) - (400, 250). The task structure is used as the data structure received by the user front-end interactive system, embedded into the confirmation interface rendering process for the system to read and display, and finally generates field confirmation display information.

[0127] Step S15, based on the field image associated information corresponding to the field confirmation display information, determine the field recognition structure record set, and perform information archiving on the field recognition structure record set, to complete the optical character recognition operation of the credit card application form stamping area image, and obtain the credit card stamping recognition result.

[0128] In this embodiment, after determining the field confirmation display information, the corresponding field name and image name are recorded according to the field confirmation display information, and the field recognition structure corresponding record is established, the label attribute 'credit card application form-stamp field recognition' is added as the subject archive keyword, the credit card stamp recognition record content is generated, and the credit card stamp recognition result is obtained. Specifically: the field text content corresponding to the to-be-processed field in the field confirmation display information is determined as the field name; based on the image coordinates corresponding to the to-be-processed field, the image source file path information is located, and the corresponding positioning result is used to determine the image name; the field number corresponding to the to-be-processed field is obtained; based on the field number and the corresponding field name and image name, the construction of the triple mapping relationship is carried out, and the field name and the image name are organized as a double-field association structure to determine the field image association information; based on the field record data in the field image association information, the field recognition structure body corresponding to each field record data is determined; the field record data includes the image name and the field text content; based on the preset data structure and the field confirmation state information in the field confirmation display information, the corresponding field recognition structure body is aggregated to determine the field recognition structure record set; the archive label attribute field is added to each target structure body in the field recognition structure record set to determine the field addition result, and information archiving is carried out based on the field addition result to complete the optical character recognition operation of the credit card application scanning image and obtain the credit card stamp recognition result.

[0129] It should be understood that, regarding the determination process of the credit card stamp recognition result, in this embodiment, the text content corresponding to the field is extracted as the field name according to the field number, image coordinates and text content recorded in the field confirmation display information, the image source file path information is located, and the file name is parsed therefrom as the image name, the triple mapping relationship of the field number, the field name and the image file name is established, for example, the field number F01 content is 'iron electricity', the image path is "scan_20251126_001.jpg", the corresponding field number F02 is "a certain technology company", and the image is "scan_20251126_002.jpg". The above field and image name are bound item by item and organized as structured table data, as shown in Table 6 below.

[0130] Table 6: Field and image name correspondence table

[0131]

[0132] As shown in Table 6, a stable correspondence relationship is formed between the field content, the number and the image file name, the field name and the image name jointly constitute the field resource positioning information, the field image binding structure is established, the field image association list is generated, that is, the field image association information.

[0133] After that, according to the combination of each field content and image file name recorded in the field image association list, the structured field recognition record item is constructed correspondingly. Seven components are set in the structure, including field number, field name, image name, upper left and lower right coordinates in the image, field recognition confidence and field confirmation identification bit. The identification bit is assigned as True (yes) or False (no) according to whether the user has confirmed in the previous field confirmation display information. For example, the field '* ferroelectric' recognition confidence is 0.76, the position coordinates are (300, 210)-(400, 250), and the confirmation state is True. The structure is constructed as: {number: F01, name: * ferroelectric, image: scan_20251126_001.jpg, coordinates: [300, 210, 400, 250], confidence: 0.76, confirmation state: True}. All the structures are aggregated and integrated into a set of continuous indexable data sets through the field number for subsequent archiving or system call, generating the field recognition structure record set.

[0134] After that, according to the structure body set in the field recognition structure record set, the structure body is added with a tag attribute field one by one. The tag field is extended and inserted to the end of the structure body in the form of key-value pair, the key is 'archive tag', and the value is 'credit card application form-stamp field recognition'. This field is used as the task theme keyword in the archive index. For example, the structure record item of the field'some technology company' after extension is: {number: F02, name: some technology company, image: scan_20251126_002.jpg, coordinates: [720, 230, 820, 270], confidence: 0.79, confirmation state: True, archive tag: credit card application form-stamp field recognition}. All the structure bodies with added tag attributes are serialized in order as archive storage objects, converted into persistent storage format for subsequent management system call and theme retrieval, generating the credit card stamp recognition record content to obtain the credit card stamp recognition result.

[0135] It can be seen that, in the present application, the original pixel data of the credit card application form seal area image is first used to perform character coding and position relationship recognition, then the obtained character coordinate extraction result is used to match anchor point fields, and based on the field matching result, the target fields of the credit card application form seal area image are screened and verified to determine the seal field positioning result. Then, the seal field positioning result is matched with the valid name list entered by the preset card issuing institution to determine the field screening result. Then, based on the field set in the field screening result that meets the preset confidence condition, the field confirmation display information is obtained. Finally, based on the field image association information corresponding to the field confirmation display information, information archiving is performed to obtain the credit card seal recognition result of the credit card application form seal area image. In this way, the accuracy, completeness and effectiveness of optical character recognition in the credit card application seal scene can be improved, and the phenomenon of misrecognition or missed recognition can be avoided, thereby improving the scene document automatic processing efficiency and information extraction accuracy.

[0136] Referring to Figure 2 The present application also discloses an optical character recognition device for credit card seal processing, as shown in the drawings, which comprises:

[0137] A coordinate extraction module 11 is configured to perform character coding and position relationship recognition based on an optical character recognition engine and original pixel data of a credit card application form seal area image to determine character coordinate extraction results. The credit card application form seal area image is an image corresponding to a seal area in a credit card application form scan image. The original pixel data is pixel data obtained based on a preset color standard.

[0138] A field positioning module 12 is configured to perform anchor point field matching based on the character coordinate extraction results, and perform target field screening and verification on the credit card application form seal area image according to the corresponding field matching results to determine seal field positioning results. The target field is a field with continuous Chinese characters and containing text content consistent with the anchor point field in the field matching result.

[0139] A field screening module 13 is configured to match the target field in the seal field positioning result with a valid name list entered by a preset card issuing institution, and process the target field in the seal field positioning result that fails to match successfully to determine a field screening result.

[0140] An exhibition information determination module 14 is configured to generate text prompt content and embed structured task instructions based on a field set in the field screening result that meets a preset confidence condition to obtain field confirmation display information.

[0141] The recognition result determination module 15 is configured to determine the field recognition structure record set based on the field confirmation display information corresponding to the field image association information, and perform information archiving on the field recognition structure record set, so as to complete the optical character recognition operation of the credit card application form seal area image and obtain the credit card seal recognition result.

[0142] In some embodiments, the coordinate extraction module 11 can be specifically configured to: obtain the original pixel data of the seal area in the credit card application scan image; perform gray scale conversion on each pixel point of the credit card application form seal area image based on the original pixel data, so as to determine a converted gray scale image; determine a gray scale mutation coordinate set based on the gray scale image; construct a contour closed path based on the image coordinates in the gray scale mutation coordinate set, so as to obtain a constructed boundary path; extract a rectangular area with the smallest area surrounded by the boundary path, so as to determine a region extraction result; perform overlap matching based on the region extraction result and a preset character detection coordinate frame, and when the matching is successful, determine whether the corresponding overlap area is greater than a preset coordinate frame overlap rate threshold, so as to obtain an overlap rate determination result; if the overlap rate determination result is yes, determine the region extraction result as a valid character area, and obtain a valid character area coordinate set corresponding to the valid character area; perform cutting on the credit card application form seal area image based on the coordinates in the valid character area coordinate set, so as to determine an image cutting result; perform extraction of pixel structure features on the image cutting result based on an optical character recognition engine, so as to determine a feature extraction result; perform matching based on the feature extraction result and a preset character template library, so as to determine a character matching result; and determine a character coordinate extraction result based on the encoding index and position order of the target character in the character matching result.

[0143] In some embodiments, the coordinate extraction module 11 can be specifically configured to: perform a first-order difference operation on the gray scale image, so as to obtain a one-dimensional gray scale sequence; compare the size relationship between the gray scale difference between adjacent pixel points in the gray scale image and a preset gray scale mutation judgment threshold based on the one-dimensional gray scale sequence, so as to determine a gray scale mutation point; and determine a gray scale mutation coordinate set based on the image coordinates corresponding to the gray scale mutation point.

[0144] In some embodiments, the field positioning module 12 can be specifically configured to: sequentially perform literal matching on the encoding information corresponding to each character in the character coordinate extraction result based on the encoding information and image coordinate values of the character coordinate extraction result, to determine a literal matching result; identify character combinations consistent with preset anchor keywords based on the literal matching result, to determine a field matching result; the preset anchor keywords include keywords related to the applicant, the authorized signature, and the unit seal; determine an anchor position coordinate list based on the center position coordinate information and position index information of each character combination in the field matching result; search for character coordinate points in an anchor associated region in the credit card application form seal region image based on coordinate data in the anchor position coordinate list, to determine a coordinate point search result; the anchor associated region is a region within a range of a preset number of pixel units to the right of the coordinate data; perform region clustering processing on the characters in the coordinate point search result, to determine a clustering processing result; perform encoding splicing based on the clustering processing result, and perform continuity screening using the spliced character sequence, to determine a target field screening result; compare a consistency index value corresponding to each target field in the target field screening result with a preset position stability threshold, to determine an index value comparison result; if the index value comparison result indicates that the consistency index value is not less than the preset position stability threshold, the corresponding target field is removed; if the index value comparison result indicates that the consistency index value is less than the preset position stability threshold, the corresponding target field is retained, to determine a seal field positioning result.

[0145] In some embodiments, the field screening module 13 can be specifically configured to: determine an interval judgment result by judging whether the number of characters of each target field in the seal field positioning result belongs to a preset interval; if the interval judgment result is no, the corresponding target field is removed; if the interval judgment result is yes, the corresponding target field is retained, to determine a target field screening result; match the target field screening result with a preset valid name list entered by a card-issuing institution, and record the target fields in the target field screening result that match successfully, to determine a valid name matching set; divide the target fields in the target field screening result that do not match successfully, to determine a field division result; perform Chinese name structure analysis based on the field division result, to determine a Chinese name structure field set; identify and remove structure incomplete fields based on each field structure in the Chinese name structure field set, to determine a structure field screening result; determine a field screening result based on the structure field screening result and the valid name matching set.

[0146] In some embodiments, the display information determination module 14 can be specifically configured to: determine whether the confidence degree parameter value corresponding to each field in the field screening result is less than a preset confidence degree threshold to determine a confidence degree determination result; if the confidence degree determination result is yes, retain the corresponding field to obtain a field set; construct a coordinate matrix based on the upper left corner coordinates and the lower right corner coordinates of each field in the field set to determine a low confidence degree field coordinate set; map the coordinate data in the low confidence degree field coordinate set to the credit card application form stamping area image to construct a rectangular annotation box with a preset color to obtain a target annotation box; superimpose the field text content in the target annotation box on the upper right corner of the target annotation box in the form of equidistant offset to determine a field highlighted image area box; extract the number identification, content string and image coordinate area information of the field in the field highlighted image area box, assemble the data structure and instruction block using the corresponding information extraction result and the preset data identification method to obtain a structured interactive task instruction block set; and determine the field confirmation display information based on the structured interactive task instruction block set.

[0147] In some embodiments, the recognition result determination module 15 can be specifically configured to: determine the field text content corresponding to the field to be processed in the field confirmation display information as a field name; locate the image source file path information based on the image coordinates corresponding to the field to be processed, and determine an image name using the corresponding location result; obtain the field number corresponding to the field to be processed; construct a triple mapping relationship based on the field number, the corresponding field name and the image name, and organize the field name and the image name into a double-field association structure to determine field image association information; determine a field recognition structure body corresponding to each field record data in the field image association information; the field record data includes the image name and the field text content; aggregate the corresponding field recognition structure body based on a preset data structure and the field confirmation state information in the field confirmation display information to determine a field recognition structure record set; add an archiving label attribute field to each target structure body in the field recognition structure record set to determine a field addition result, perform information archiving based on the field addition result to complete the optical character recognition operation on the credit card application scanning image, and obtain a credit card stamping recognition result.

[0148] Further, the embodiment of the present application further discloses an electronic device, Figure 3 is a structural diagram of an electronic device 20 according to an exemplary embodiment, and the content in the figure cannot be considered as any limitation on the use range of the present application.

[0149] Figure 3 A structural schematic diagram of an electronic device 20 is provided in the embodiments of the present application. The electronic device 20 can specifically include at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26. The memory 22 is configured to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the related steps in the optical character recognition method for credit card stamping disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the embodiments of the present application can be specifically an electronic computer.

[0150] In the embodiments of the present application, the power supply 23 is configured to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which is not limited specifically herein; the input / output interface 25 is configured to obtain external input data or output data to the outside, and the specific interface type can be selected according to the specific application needs, which is not limited specifically herein.

[0151] In addition, the memory 22 as a carrier for resource storage can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage mode can be temporary storage or permanent storage.

[0152] The operating system 221 is configured to manage and control each hardware device on the electronic device 20 and the computer program 222, and can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program capable of completing the optical character recognition method for credit card stamping performed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 can further include a computer program capable of completing other specific work.

[0153] Further, the present application further discloses a computer readable storage medium for storing a computer program; wherein the computer program is executed by a processor to implement the optical character recognition method for credit card stamping disclosed above. The specific steps of the method can refer to the corresponding contents disclosed in the foregoing embodiments, which will not be repeated here.

[0154] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can refer to the method part.

[0155] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality, without referring to a specific sequence of operations for implementing the functions. The order of various illustrative blocks, modules, circuits, and steps may be re-arranged or otherwise implemented without departing from the spirit of the application, which is

[0156] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, hard disk can be used as a storage medium.

[0157] Finally, it should be noted that the terms "comprises", "comprising", or other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element. The terms "comprising", "comprises", "including", "includes", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus.

[0158] The above detailed description has set forth various embodiments of the methods taught by the application. The precise details of the application, including the specific embodiments thereof, are not to be construed as limiting the scope of the application. Rather, the essence of the application is to be understood as including any and all embodiments falling within the scope of the application.

Claims

1. An optical character recognition method for credit card processing stamping, characterized by, The method comprises the following steps: Based on the optical character recognition engine and the original pixel data of the credit card application form seal area image, the character encoding and position relationship are recognized to determine the character coordinate extraction result; wherein the credit card application form seal area image is the image corresponding to the seal area in the credit card application form scanned image; the original pixel data is the pixel data obtained based on the preset color standard; Based on the character coordinate extraction result, the anchor point field is matched, and according to the corresponding field matching result, the target field of the credit card application form seal area image is screened and verified to determine the seal field positioning result; the target field is a field of continuous Chinese characters, and there is a text content consistent with the anchor point field in the field matching result; Based on the target field in the seal field positioning result, the effective name list input by the preset card issuing institution is matched, and the target field in the seal field positioning result that fails to match is processed to determine the field screening result; Based on the field set in the field screening result that meets the preset confidence condition, the text prompt content is generated and the structured task instruction is embedded to obtain the field confirmation display information; Based on the field image association information corresponding to the field confirmation display information, the field recognition structure record set is determined, and the field recognition structure record set is information-archived to complete the optical character recognition operation of the credit card application form seal area image and obtain the credit card seal recognition result.

2. The method of claim 1, wherein, The method comprises the following steps: Obtain the original pixel data of the seal area in the credit card application scanned image; Based on the original pixel data, the gray scale conversion is performed on each pixel point of the credit card application form seal area image respectively to determine the converted gray scale image; Based on the gray scale image, the gray scale mutation coordinate set is determined; Based on the image coordinates in the gray scale mutation coordinate set, the contour closed path is constructed to obtain the constructed boundary path; Extract the rectangular area with the smallest area surrounded by the boundary path to determine the area extraction result; Based on the area extraction result and the preset character detection coordinate frame, the overlap matching is performed, and when the matching is successful, it is judged whether the corresponding overlap area is greater than the preset coordinate frame overlap rate threshold to obtain the overlap rate judgment result; If the overlap rate judgment result is yes, the area extraction result is determined as the effective character area, and the effective character area coordinate set corresponding to the effective character area is obtained; Based on the coordinates in the effective character area coordinate set, the credit card application form seal area image is cut to determine the image cutting result; Based on the optical character recognition engine, the pixel structure features of the image cutting result are extracted to determine the feature extraction result; Based on the feature extraction result and the preset character template library, the matching is performed to determine the character matching result; Determine a character coordinate extraction result based on the encoding index and the position sequence of the target character in the character matching result.

3. The method of claim 2, wherein the credit card is a VISA card. The method comprises the following steps: ​ Performing a first-order difference operation on the gray image to obtain a one-dimensional gray sequence; Comparing the gray difference between adjacent pixel points in the gray image with the size relationship between the preset gray mutation judgment threshold based on the one-dimensional gray sequence to determine the gray mutation point; Determine the gray mutation coordinate set based on the image coordinates corresponding to the gray mutation point.

4. The method of claim 1, wherein the credit card transaction is a credit card transaction. The method comprises the following steps: Based on the encoding information and image coordinate values of each character in the character coordinate extraction result, sequentially perform literal matching on the encoding information to determine the literal matching result; Based on the literal matching result, identify the character combination consistent with the preset anchor keyword to determine the field matching result; the preset anchor keyword includes the applicant, the authorized signature and the unit seal related keywords; Determine the anchor position coordinate list based on the center position coordinate information and the position index information corresponding to each character combination in the field matching result; Based on the coordinate data in the anchor position coordinate list, search for the character coordinate points in the anchor associated region corresponding to the credit card application form seal area image to determine the coordinate point search result; the anchor associated region is the region within the range of the coordinate data right by a preset number of pixel units; Perform regional clustering processing on the characters in the coordinate point search result to determine the clustering processing result; Based on the clustering processing result, perform encoding splicing, and use the spliced character sequence to perform continuity screening to determine the target field screening result; Compare the consistency index value corresponding to each target field in the target field screening result with the preset position stability threshold to determine the index value comparison result; If the index value comparison result indicates that the consistency index value is not less than the preset position stability threshold, the corresponding target field is removed; If the index value comparison result indicates that the consistency index value is less than the preset position stability threshold, the corresponding target field is retained to determine the seal field positioning result.

5. The method of claim 1, wherein the credit card transaction is a credit card transaction. The method comprises the following steps: Determine the field screening result by matching the target field in the seal field positioning result with the valid name list input by the preset card issuing institution, and processing the target field in the seal field positioning result that fails to match successfully. Determine the interval judgment result by judging whether the character value of each target field in the seal field positioning result belongs to the preset interval; If the interval judgment result is no, the corresponding target field is removed; If the interval judgment result is yes, the corresponding target field is retained to determine the target field screening result; The target field screening result is matched with a preset valid name list entered by a card issuing institution, and the target fields in the target field screening result that are successfully matched are recorded to determine a valid name matching set; The target fields in the target field screening result that are not successfully matched are divided to determine a field division result; Based on the field division result, Chinese name structure analysis is performed to determine a Chinese name structure field set; Based on each field structure in the Chinese name structure field set, a structure missing field is identified and removed to determine a structure field screening result; Based on the structure field screening result and the valid name matching set, a field screening result is determined.

6. The method of claim 1, wherein the credit card transaction stamping optical character recognition method is characterized by, Based on the field set in the field screening result that meets a preset confidence condition, text prompt content is generated and structured task instructions are embedded to obtain field confirmation display information, including: It is judged whether the confidence parameter value corresponding to each field in the field screening result is less than a preset confidence reference threshold to determine a confidence judgment result; If the confidence judgment result is yes, the corresponding field is retained to obtain a field set; Based on the upper left corner coordinates and the lower right corner coordinates of each field in the field set, a coordinate matrix is constructed to determine a low confidence field coordinate set; By mapping the coordinate data in the low confidence field coordinate set to the credit card application form stamping area image, a rectangular annotation box with a preset color is constructed to obtain a target annotation box; The field text content in the target annotation box is superimposed on the upper right corner of the target annotation box in the form of equidistant offset to determine a field highlighted image area box; The number identification, content string and image coordinate area information of the field in the field highlighted image area box are extracted, and the data structure and instruction block are assembled using the corresponding information extraction result and the preset data identification method to obtain a structured interactive task instruction block set; Based on the structured interactive task instruction block set, field confirmation display information is determined.

7. The method of claim 1 to 6, wherein, Based on the field image association information corresponding to the field confirmation display information, a field recognition structure record set is determined, and the field recognition structure record set is information-archived to complete the optical character recognition operation of the credit card application form stamping area image and obtain a credit card stamp recognition result, including: The field text content corresponding to the field to be processed in the field confirmation display information is determined as a field name; Based on the image coordinates corresponding to the field to be processed, image source file path information is located, and an image name is determined using the corresponding location result; The field number corresponding to the field to be processed is obtained; Based on the field number and the corresponding field name and image name, a triple mapping relationship is constructed, and the field name and the image name are organized into a double-field association structure to determine field image association information; Determine a field recognition structure corresponding to each field record data in the field image association information based on the field record data; the field record data includes the image name and the field text content; Aggregate the corresponding field recognition structure based on a preset data structure and field confirmation state information in the field confirmation display information, to determine a field recognition structure record set; Add an archive label attribute field to each target structure in the field recognition structure record set, to determine a field addition result, Perform information archiving based on the field addition result, to complete the optical character recognition operation corresponding to the credit card application scan image, and obtain a credit card seal recognition result.

8. An optical character recognition device for use in the stamping of credit cards, characterized in that Comprise: A coordinate extraction module, configured to determine a character coordinate extraction result by performing character encoding and position relationship recognition based on an optical character recognition engine and original pixel data of a credit card application form seal area image; the credit card application form seal area image is an image corresponding to a seal area in a credit card application form scan image; the original pixel data is pixel data obtained based on a preset color standard; A field positioning module, configured to perform anchor point field matching based on the character coordinate extraction result, and perform target field screening and verification on the credit card application form seal area image according to a corresponding field matching result, to determine a seal field positioning result; the target field is a field with continuous Chinese characters and having text content consistent with the anchor point field in the field matching result; A field screening module, configured to match the target field in the seal field positioning result with a valid name list input by a preset card issuing institution, and process the target field in the seal field positioning result that fails to match, to determine a field screening result; A display information determination module, configured to generate text prompt content and embed structured task instructions based on a field set in the field screening result that meets a preset confidence condition, to obtain field confirmation display information; An identification result determination module, configured to determine a field recognition structure record set based on field image association information corresponding to the field confirmation display information, and perform information archiving on the field recognition structure record set, to complete the optical character recognition operation of the credit card application form seal area image, and obtain a credit card seal recognition result.

9. An electronic device, comprising: Comprise: A memory, configured to save a computer program; A processor, configured to execute the computer program to implement the optical character recognition method for credit card seal processing according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A memory, configured to save a computer program; the computer program is executed by a processor to implement the optical character recognition method for credit card seal processing according to any one of claims 1 to 7.