Method and apparatus for extracting document information

CN123016448APending Publication Date: 2026-10-30CHINA ACAD OF TRANSPORTATION SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611274477.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

部分方案会引入多次OCR重试或多图像增强,但通常仍然以直接识别结果为主,难以实现识别结果的合法性和准确验证,导致文档信息提取的准确性较低

Benefits of technology

本发明实施例提供的一种文档信息的提取方法及装置,能够读取待处理文档,将待处理文档按页渲染为预设分辨率的待处理图像;定位待处理图像中包含的印章区域,对印章区域进行抑制处理;对于抑制处理后的待处理图像,基于预设的目标字段生成多个感兴趣区域;其中,此处的感兴趣区域包括待处理图像中包含日期字段的候选感兴趣区域,以及,日期字段中,包含申请日期场景下的签署区对应的附加感兴趣区域;对感兴趣区域执行多版本局部增强识别以解析出多个日期候选项;依据格式完整性、年份范围及上下文约束对日期候选项进行评分,选取评分最高的日期候选项作为最优识别结果;将该最优识别结果映射为基础信息,并将基础信息与目标对象进行绑定,输出包含基础信息和目标对象的结构化数据;相较于传统的OCR处理方法,本发明实施例总共,可以通过增加附加感兴趣区域可以降低相邻日期之间吸附效应,并且,通过对多个日期候选项的识别过程可以提升文档信息提取的准确性,进而提升文档处理效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123016448A_ABST
    Figure CN123016448A_ABST
Patent Text Reader

Abstract

The application provides a document information extraction method and device, and relates to the technical field of information processing.The method comprises the following steps: rendering a to-be-processed document into a to-be-processed image with a preset resolution according to pages, performing suppression processing on a seal area, and generating a plurality of regions of interest based on a target field; the regions of interest comprise a candidate region of interest of a date field and an additional region of interest in an application date scene; performing multi-version local enhancement recognition on the regions of interest to parse a plurality of date candidates and identify an optimal recognition result; mapping the optimal recognition result to basic information, binding the basic information with a target object, and outputting structured data containing the basic information and the target object.The document information extraction method and device provided by the application can reduce the adsorption effect between adjacent dates by adding the additional region of interest, and the accuracy of document information extraction can be improved by recognizing the plurality of date candidates, thereby improving the document processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information processing technology, and in particular to a method and apparatus for extracting document information. Background Technology

[0002] Existing document OCR (Optical Character Recognition) technologies typically employ a processing model of full-page preprocessing, full-page OCR recognition, and local rule extraction when processing documents. Furthermore, in scenarios involving handwritten dates covered by red stamps, common processing solutions include red pixel removal, fixed-position ROI (Region of Interest) cropping, local binarization enhancement, keyword anchor point localization, and simple backtracking prioritizing full-page results. Some solutions introduce multiple OCR retries or multi-image enhancement, but they generally still rely primarily on direct recognition results, making it difficult to verify the legitimacy and accuracy of the recognition results, leading to low accuracy in document information extraction. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a method and apparatus for extracting document information, so as to alleviate the above-mentioned technical problems and improve the accuracy of document information extraction and recognition.

[0004] In a first aspect, embodiments of the present invention provide a method for extracting document information, the method comprising: reading a document to be processed; rendering the document to be processed page by page into an image to be processed at a preset resolution; locating a stamp region contained in the image to be processed; suppressing the stamp region; generating multiple regions of interest (ROIs) for the suppressed image to be processed based on a preset target field; wherein the ROIs include candidate ROIs containing a date field in the image to be processed, and additional ROIs corresponding to the signature area in the application date scenario in the date field; performing multi-version local enhancement recognition on the ROIs to parse out multiple date candidates; scoring the date candidates according to format integrity, year range, and context constraints, and selecting the date candidate with the highest score as the optimal recognition result; mapping the optimal recognition result to basic information, binding the basic information to a target object, and outputting structured data containing the basic information and the target object.

[0005] In conjunction with the first aspect, this embodiment of the invention provides a first possible implementation of the first aspect, wherein the step of generating multiple regions of interest based on a preset target field includes: searching for a first keyword representing user behavior in the image to be processed, and determining an upper boundary based on the first keyword; and searching for a second keyword representing review behavior in the image to be processed, and determining a lower boundary based on the second keyword; determining the position corresponding to the signature area as the candidate region of interest containing a date field according to the upper boundary and the lower boundary; and determining the right side region of the signature area as an additional region of interest in the application date scenario.

[0006] In conjunction with the first aspect, this embodiment of the invention provides a second possible implementation of the first aspect, wherein the step of performing multi-version local enhancement recognition on the region of interest to parse out multiple date candidates includes: performing image enhancement processing with different parameters on the region of interest to generate multiple local enhancement versions; performing local optical character recognition on each of the multiple local enhancement versions to extract the date candidate corresponding to each local enhancement version.

[0007] In conjunction with the second possible implementation of the first aspect, this embodiment of the invention provides a third possible implementation of the first aspect, wherein the step of scoring the date candidates based on format integrity, year range, and contextual constraints, and selecting the date candidate with the highest score as the optimal recognition result, includes: aggregating the recognition values ​​of the parsed multiple date candidates, calculating the number of times the same recognition value appears in different local enhancement versions and / or different regions of interest, and assigning a consensus score to the date candidate based on the number of occurrences; calculating the format integrity score and year range score for each date candidate; calculating the contextual constraint score for each date candidate based on the contextual information of the image to be processed; and performing a weighted calculation based on the consensus score, the format integrity score, the year range score, and the contextual constraint score, and selecting the date candidate with the highest total score as the optimal recognition result.

[0008] In conjunction with the third possible implementation of the first aspect, this embodiment of the invention provides a fourth possible implementation of the first aspect, wherein the method further includes: determining the document type of the image to be processed based on the header information of the image to be processed; dividing the continuous pages contained in the image to be processed into independent application tasks based on the document type and using a preset type document as the starting anchor point; establishing context information of the image to be processed according to the multiple application tasks, wherein the context information is used to characterize the time logic of business flow in the image to be processed.

[0009] In conjunction with the fourth possible implementation of the first aspect, this embodiment of the invention provides a fifth possible implementation of the first aspect, wherein the step of calculating the context constraint score of each date candidate based on the context information of the image to be processed includes: extracting the recognition results of the adjacent fields of the date candidate from the context information, wherein the recognition results record context date information; determining, based on the business flow time logic corresponding to the image to be processed, whether there is a time inversion or logical conflict between the date candidate and the recognition results of the adjacent fields; if so, reducing the context constraint rate score of the date candidate; if not, increasing the context constraint rate score of the date candidate.

[0010] In conjunction with the fourth possible implementation of the first aspect, this embodiment of the invention provides a sixth possible implementation of the first aspect, wherein the above method further includes: if the occlusion degree of the signing area exceeds a preset occlusion range, or the date candidate does not satisfy the time logic of the business flow in the image to be processed represented by the context information, then extract a legitimate source date that is strongly associated with the date candidate from multiple legal credential fields in the same application task; when at least two legitimate source dates give the same date, determine the date as the legitimate source consensus date, and use the legitimate source consensus date as a date candidate.

[0011] In conjunction with the fourth possible implementation of the first aspect, this embodiment of the invention provides a seventh possible implementation of the first aspect, wherein the above method further includes: when a conflict is detected in the day number or month of the date candidate, constructing a valid repair item based on the context information, and repairing the day number or month of the date candidate based on the valid repair item.

[0012] In conjunction with the first aspect, this embodiment of the invention provides an eighth possible implementation of the first aspect, wherein the step of locating the stamp region contained in the image to be processed and suppressing the stamp region includes: locating the stamp region in the image to be processed in the HSV color space to obtain the bounding box of the stamp region; and suppressing the bounding box of the stamp region.

[0013] Secondly, embodiments of the present invention also provide a document information extraction device, the device comprising: a reading module, configured to read a document to be processed and render the document to be processed page by page into a processing image of a preset resolution; a positioning module, configured to locate a stamp region contained in the processing image and perform suppression processing on the stamp region; a generation module, configured to generate multiple regions of interest based on a preset target field for the suppressed processing image to be processed; wherein the regions of interest include candidate regions of interest containing a date field in the processing image, and additional regions of interest corresponding to the signature area in the application date scenario in the date field; a recognition module, configured to perform multi-version local enhancement recognition on the regions of interest to parse out multiple date candidates; a scoring module, configured to score the date candidates according to format integrity, year range and context constraints, and select the date candidate with the highest score as the optimal recognition result; and an output module, configured to map the optimal recognition result to basic information, bind the basic information to a target object, and output structured data containing the basic information and the target object.

[0014] The embodiments of the present invention bring the following beneficial effects: This invention provides a method and apparatus for extracting document information. The method reads a document to be processed and renders it page-by-page into an image of a preset resolution. It locates a stamp region within the image and performs suppression processing on the stamp region. For the suppressed image, it generates multiple regions of interest (ROIs) based on preset target fields. These ROIs include candidate ROIs containing a date field in the image, and additional ROIs corresponding to the signature area in the application date scenario within the date field. The method performs multi-version local enhancement recognition on the ROIs to parse out multiple date candidates. It scores the date candidates based on format integrity, year range, and contextual constraints, selecting the highest-scoring date candidate as the optimal recognition result. The optimal recognition result is mapped to basic information, and the basic information is bound to the target object, outputting structured data containing both the basic information and the target object. Compared to traditional OCR processing methods, this invention can reduce the adsorption effect between adjacent dates by adding additional ROIs, and improve the accuracy of document information extraction through the recognition process of multiple date candidates, thereby improving document processing efficiency.

[0015] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0016] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

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

[0018] Figure 1 A flowchart illustrating a method for extracting document information provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of an image to be processed according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a document information extraction device provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Currently, most document information extraction methods rely on OCR recognition. Some solutions introduce multiple OCR retries or multi-image enhancement, but they generally still rely on methods like "adopting the first successfully recognized local area," "directly caching empty results," and "treating all date candidates equally." This approach often leads to the following defects in document information extraction: First, date smearing is prone to occur. For example, when the applicant's signature date and the date of the department's opinion below are adjacent, even with red stamp fading, the department's date below can easily be smeared as the application date. Second, OCR recognition of the entire signature area is prone to misreading the month, such as misreading "November 28th" as "January 28th," but existing solutions lack a mechanism to correct the month using the legal document month and year information of the same application task. Third, when multiple candidate values ​​are obtained from local OCR recognition, there is a lack of a unified evidence fusion mechanism, which can easily lead to the direct adoption of whichever candidate is recognized first. Fourth, if the field's legal source constraint is only used as a post-validation, it cannot provide a stable technical fallback path when the application date is severely obscured.

[0021] Therefore, existing methods for extracting document information have low accuracy.

[0022] Based on this, embodiments of the present invention provide a method and apparatus for extracting document information to alleviate the above-mentioned technical problems and thereby improve the accuracy of document information extraction and recognition.

[0023] To facilitate understanding of this embodiment, a document information extraction method disclosed in this embodiment of the invention will first be described in detail.

[0024] In one possible implementation, embodiments of the present invention provide a method for extracting document information, such as... Figure 1 The flowchart shown illustrates a method for extracting document information, which includes the following steps: Step S102: Read the document to be processed and render it page by page into an image of the document to be processed at a preset resolution. Step S104: Locate the stamp region contained in the image to be processed and perform suppression processing on the stamp region; In this embodiment of the invention, the document to be processed refers to a vehicle-related application document, such as an application document for the scrapping and renewal of operating vehicles. The document to be processed often contains various date-related basic information, such as the application date, review date, signing date, and stamping date. In addition, the signing area is often stamped with the seals of various departments. Therefore, in this embodiment of the invention, when extracting document information, it is necessary to first locate the stamp area in the image to be processed, and then suppress the stamp area.

[0025] In specific implementation, the stamp region in the image to be processed can be located in the HSV (Hue-Saturation-Value) color space to obtain the bounding box of the stamp region; then, the bounding box of the stamp region is suppressed. For example, in this embodiment of the invention, the document to be processed can be a PDF, image, or text document, and then rendered page by page, that is, converted into a pre-defined resolution image to be processed page by page, usually converted into a high-resolution page image, while retaining the original document to be processed and the processed image to be processed.

[0026] Furthermore, in this embodiment of the invention, the stamp area includes the red stamp area and other colored stamp areas in the image to be processed. During suppression processing, fading or whitening can be performed, and suppression processing is performed in combination with CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm, adaptive threshold adjustment of binarization processing, and stroke dilation, and multi-recognition variants of each suppression processing are generated.

[0027] Step S106: For the image to be processed after suppression, generate multiple regions of interest based on preset target fields; In this embodiment of the invention, the region of interest includes a candidate region of interest containing a date field in the image to be processed, and an additional region of interest corresponding to the signature area in the application date scenario in the date field; Step S108: Perform multi-version local enhancement recognition on the region of interest to parse out multiple date candidates; Step S110: The date candidates are scored based on format integrity, year range and contextual constraints, and the date candidate with the highest score is selected as the optimal recognition result; Step S112: Map the optimal recognition result to basic information, bind the basic information to the target object, and output structured data containing basic information and target object.

[0028] In specific implementation, since the document to be processed in this embodiment refers to the application document related to the vehicle, the target object in this embodiment refers to the vehicle, such as an operating vehicle to be scrapped. After the optimal identification result is determined in step S110, basic information can be output in step S112. After binding with the vehicle object, structured data is output. For example, the basic information includes fields such as applicant's name, ID number, contact number, application date, and business type. The target object can include fields such as vehicle identification number (VIN), license plate number, vehicle brand and model, engine number, and body color.

[0029] Furthermore, the legitimate sources of each field in the basic information can be restricted. For example, the application date field can only be extracted from the funding application form or business acceptance form; the cancellation date field can only be extracted from the motor vehicle cancellation certificate; the recycling confirmation date field can only be extracted from the "Scrapped Motor Vehicle Recycling Certificate", etc. In other words, by restricting the legitimate sources, the accuracy of the final output structured data can be ensured.

[0030] This invention provides a document information extraction method that can read a document to be processed and render it page by page into an image of a preset resolution; locate the stamp area contained in the image and suppress the stamp area; for the suppressed image, generate multiple regions of interest based on preset target fields; wherein, the regions of interest here include candidate regions of interest containing a date field in the image, and additional regions of interest corresponding to the signature area in the application date scenario within the date field; perform multi-version local enhancement recognition on the regions of interest to parse out multiple date candidates; score the date candidates according to format integrity, year range, and context constraints, and select the date candidate with the highest score as the optimal recognition result; map the optimal recognition result to basic information, bind the basic information to the target object, and output structured data containing basic information and the target object; compared with traditional OCR processing methods, this invention can reduce the adsorption effect between adjacent dates by adding additional regions of interest, and improve the accuracy of document information extraction by recognizing multiple date candidates, thereby improving document processing efficiency.

[0031] In practical use, the region of interest generated in step S106 above is also called the ROI region. Specifically, in this embodiment of the invention, the target field refers to a predefined keyword. Specifically, when generating the ROI, this embodiment of the invention can search for a first keyword representing user behavior in the image to be processed, and determine the upper boundary based on the first keyword; and search for a second keyword representing review behavior in the image to be processed, and determine the lower boundary based on the second keyword; determine the position corresponding to the signing area as the candidate ROI containing the date field according to the upper and lower boundaries; and, in the application date scenario, determine the right side of the signing area as an additional ROI region.

[0032] In specific implementation, the additional region of interest in this embodiment of the invention is also called the narrow ROI of the signing area, which is usually located in the right-hand area of ​​the signing area, for example. In a preferred embodiment, the first keyword is a keyword characterizing user behavior, which may include keywords such as "applicant," "signature," "stamp," "person," and "commitment," and the upper boundary of the signing line is determined based on these keywords; and the second keyword characterizes the review behavior, such as keywords such as "county level," "transportation," "competent authority," and "after review," and these keywords are used to determine the lower boundary, and then the candidate region of interest based on the date field is located between the upper and lower boundaries. By using this method of determining the candidate region of interest, the date of the lower department's opinion can be actively excluded, for example, excluding the situation where "February 8, 2025" is mistakenly selected as the application date.

[0033] Furthermore, in this embodiment of the invention, in step S108 above, performing multi-version local enhancement recognition on the region of interest to parse out multiple date candidates can be achieved by performing image enhancement processing with different parameters on each region of interest to generate multiple local enhancement versions; performing local optical character recognition on each of the multiple local enhancement versions to extract the date candidates corresponding to each local enhancement version.

[0034] Specifically, in this embodiment of the invention, the multi-version local enhancement does not merely include suppression processing of the stamp region, but rather constructs multiple variations for the same ROI, such as the original image, enlarged image, faded red stamp image, thresholded image, stroke expansion image, and local histogram enhancement image. Considering that external OCR interfaces may produce momentary empty results under complex samples, this embodiment of the invention sets up an empty result retry strategy for key enhancement versions and explicitly stipulates that empty results are not written to the long-term cache. This avoids the enhancement version becoming permanently invalid in subsequent decisions due to a single jitter.

[0035] Furthermore, in step S110 above, when determining the optimal recognition result, the recognition values ​​of multiple parsed date candidates can be aggregated, and the number of times the same recognition value appears in different local enhancement versions and / or different regions of interest can be calculated. Based on this number, a consensus score is given to the date candidate. The format integrity score and year range score of each date candidate are calculated separately. The context constraint score of each date candidate is calculated based on the context information of the image to be processed. This facilitates the weighted calculation based on the consensus score, format integrity score, year range score, and context constraint score, and the date candidate with the highest total score is selected as the optimal recognition result.

[0036] That is, in this embodiment of the invention, the optimal identification result is not determined based on a single region of interest or a single local enhancement version. Instead, date candidates with the same identification value are aggregated among different regions of interest or local enhancement versions and different local sources to determine the number of times the same identification value appears, the number of local enhancement versions covered, and the number of regions of interest covered, thereby obtaining a consensus score. For example, the more times the same identification value appears, the more local enhancement versions covered, and the more regions of interest covered, the higher the consensus score.

[0037] Furthermore, when calculating the format integrity score and year range score of the date candidates, the format of the identified date candidates can be matched with the pre-set date format template. If the matching degree is high, the format integrity score of the candidate will be higher. The year range score is determined by analyzing the reasonable range of the year of the date candidates, such as whether the year in the identified date candidates is within the preset year range. If it is, a larger year range score is given; otherwise, a smaller year range score is given.

[0038] Furthermore, the aforementioned context constraint score is based on the context information of the image to be processed. Specifically, in this embodiment of the invention, the document type of the image to be processed can also be determined based on the header information of the image to be processed; based on the document type, taking a preset type document as the starting anchor point, the continuous pages contained in the image to be processed are divided into independent application tasks; the context information of the image to be processed is established according to multiple application tasks, wherein the context information is used to characterize the time logic of business flow in the image to be processed.

[0039] For ease of understanding, Figure 2 A schematic diagram of an image to be processed is shown, wherein, Figure 2 The image shows header area 20, which typically records header information used to record document type-related content. Further, Figure 2 The image also shows multiple candidate regions of interest 21 and stamp regions 22; and, there can be multiple regions of interest in the same image to be processed, and their specific locations can be determined based on the layout relative coordinates of the image to be processed and the location of the keyword anchor points.

[0040] In actual use, the process of determining the document type and page segmentation of the image to be processed can be performed after step S102. The specific implementation depends on the actual usage, and this embodiment of the invention does not impose any restrictions on this.

[0041] Specifically, vehicle-related application documents typically include multiple application tasks. Taking the application document for the scrapping and renewal of operating vehicles as an example, it may include application tasks such as a funding application form, a recycling certificate, and a deregistration certificate. These application tasks are often summarized into one application document, namely the document to be processed in this embodiment of the invention. Different application tasks have a certain time logic when conducting business flow, for example, the date in the funding application form is the earliest, etc. Therefore, in this embodiment of the invention, a preset type of document can be used as the starting anchor point, such as using the funding application form as the application starting anchor point, to divide multiple application tasks. Furthermore, context information can be established based on the time logic of business flow between multiple application tasks.

[0042] Furthermore, when calculating the context constraint score of each date candidate, the recognition results of the adjacent fields of the date candidate can be extracted from the context information. The recognition results record the context date information. Based on the business flow time logic corresponding to the image to be processed, it is determined whether there is time inversion or logical conflict between the recognition results of the date candidate and the adjacent fields. If so, the context constraint rate score of the date candidate is reduced; if not, the context constraint rate score of the date candidate is increased.

[0043] For example, in practical use, a baseline context constraint rate score can be set. When a date candidate has a time inversion or logical conflict with the date candidate identified by the region of interest corresponding to an adjacent field, the baseline context constraint rate score can be reduced. If there is no time inversion or logical conflict, the baseline context constraint rate score can be increased based on the baseline context constraint rate score. The specific increase or decrease in the baseline context constraint rate score can be set according to the actual use situation, and the embodiments of the present invention do not limit this.

[0044] Furthermore, in this embodiment of the invention, if the degree of occlusion of the signing area exceeds the preset occlusion range, or if the date candidate does not meet the time logic of the business flow in the image to be processed as represented by the context information, then a legitimate source date that is strongly associated with the date candidate is extracted from multiple legal credential fields in the same application task; when at least two legitimate source dates give the same date, the date is determined as the legitimate source consensus date, and the legitimate source consensus date is used as the date candidate.

[0045] Typically, when the degree of occlusion exceeds the preset occlusion range, it often leads to the inability to recognize date candidates in the signing area. In this case, a legitimate source date strongly correlated with the date candidate can be extracted from multiple legal document fields in the same application task or image to be processed. Legal document fields can include documents such as recycling certificates, road transport permit cancellations, and vehicle deregistrations, and the corresponding legitimate source dates should at least include the issuance date of the recycling certificate, the cancellation date of the road transport permit, and the deregistration date of the vehicle. When at least two legal document fields provide the same legitimate source date, this legitimate source date can be identified as the multi-legitimate source consensus date for the same application task and used as a date candidate.

[0046] Furthermore, if the date candidate does not meet the time logic of the business flow, it is usually due to misidentification. This situation can also be corrected using the aforementioned legal document fields. For example, if one of the date candidates is found to be significantly inconsistent with the legal source date extracted from the legal document field, further confirmation can be made. If it is confirmed that it is inconsistent with the legal source dates given by at least two legal document fields, then it can be determined that there is misidentification, and the misidentified date candidate can be corrected according to the legal source date.

[0047] Furthermore, in this embodiment of the invention, when a conflict is detected between the day or month in the date candidates, a valid repair item is constructed based on the context information, and the day or month in the date candidates is repaired based on the valid repair item.

[0048] In practical use, such conflicts between day and month are often caused by misidentification. For example, suppose in a typical misidentification scenario, the local OCR in the signing area identifies "November 28, 2025" as "January 28, 2025". The characteristic of this type of error is that the "day" in the year and date is correct, but the month is misread. In this embodiment of the invention, it can be corrected by the legal source month of the legal source date mentioned above. That is, a legal source month correction mechanism is introduced, which counts the dominant year and month of the legal source date from the issuance date of the recovery certificate, the vehicle cancellation date, and the road transport permit cancellation date in the same application; when the year and month of at least two legal source dates are consistent, and the day of the ROI candidate in the signing area is reliable but the month conflicts with the dominant month of the legal source date, then a correction candidate value of "dominant legal month + ROI day" is constructed. For example, if the OCR of the signing area yields "January 28, 2025", while the issuance date of the recycling certificate and the vehicle deregistration date in the same application are both "November 19, 2025", and the road transport permit deregistration date is "November 25, 2025", then the dominant legitimate month can be determined to be November 2025. In this case, the "28th" identified by the ROI can be retained as a reliable date, and the month can be corrected to November, generating "November 28, 2025" as a legitimate correction item, thereby overcoming the problem of misreading the month position.

[0049] Furthermore, the aforementioned consensus results on legitimate sources and legitimate repair items can be jointly input into a structured field verification database. When multiple legal credential fields correspond to the same field and conflict, not only can conflict alarms be output, but the final field value can also be retained based on the legal credential field as the legitimate source, combined with local evidence strength, consensus support, character legality, and contextual consistency. Moreover, for the application date field, the "signature area image recognition value," "legitimate source consensus value," and "monthly repair value" can be recorded simultaneously for manual review.

[0050] In summary, the document information extraction method provided in this embodiment of the invention has the following beneficial effects: (1) By attaching the area of ​​interest, it is possible to actively avoid the accidental adsorption of the date of the department's opinion below; (2) It can reliably aggregate date candidates scattered in multiple local enhancement versions, reducing accidental misjudgment in a single instance; (3) Repair conflicting date candidates through legitimate sources. For example, it can recover the correct date candidate in a scenario where the month is misread but the day is reliable. (4) Even when the signing area is severely obscured, a legally binding repair item with legal source can still be obtained to correct unidentifiable or misidentified date candidates.

[0051] Furthermore, based on the above embodiments, this invention also provides a document information extraction device, such as... Figure 3 The diagram shows a structural schematic of a document information extraction device, which includes: The reading module 30 is used to read the image to be processed and render the image to be processed page by page into an image to be processed at a preset resolution; The positioning module 31 is used to locate the stamp area contained in the image to be processed and to suppress the stamp area. The generation module 32 is used to generate multiple regions of interest (ROIs) for the suppressed image to be processed based on a preset target field; wherein, the ROIs include candidate ROIs containing a date field in the image to be processed, and additional ROIs corresponding to the signature area in the application date scenario in the date field; The identification module 33 is used to perform multi-version local enhancement identification on the region of interest to parse out multiple date candidates; The scoring module 34 is used to score the date candidates based on format completeness, year range and context constraints, and select the date candidate with the highest score as the optimal recognition result; The output module 35 is used to map the optimal recognition result to basic information, bind the basic information to the target object, and output structured data containing the basic information and the target object.

[0052] The document information extraction device provided in this embodiment of the invention has the same technical features as the document information extraction method provided in the above embodiments, so it can also solve the same technical problems and achieve the same technical effects.

[0053] Furthermore, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above method.

[0054] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the above-described method.

[0055] Furthermore, embodiments of the present invention also provide a schematic diagram of the structure of an electronic device, such as... Figure 4 The diagram shows the structure of the electronic device, which includes a processor 41 and a memory 40. The memory 40 stores computer-executable instructions that can be executed by the processor 41, and the processor 41 executes the computer-executable instructions to implement the above-described method.

[0056] exist Figure 4 In the illustrated embodiment, the electronic device further includes a bus 42 and a communication interface 43, wherein the processor 41, the communication interface 43, and the memory 40 are connected via the bus 42.

[0057] The memory 40 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 43 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 42 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 42 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0058] Processor 41 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 41 or by software instructions. Processor 41 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory, and the processor 41 reads the information in the memory and uses its hardware to complete the aforementioned method.

[0059] The computer program product of the document information extraction method and apparatus provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0060] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0061] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

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

[0063] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0064] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for extracting document information, characterized in that, The method includes: Read the document to be processed and render it page by page into an image of the desired resolution. Locate the stamp region contained in the image to be processed, and perform suppression processing on the stamp region; For the image to be processed after suppression processing, multiple regions of interest are generated based on preset target fields; wherein, the regions of interest include candidate regions of interest in the image to be processed that contain a date field, and additional regions of interest in the date field that contain the signature area corresponding to the application date scenario; Perform multi-version local enhancement recognition on the region of interest to parse out multiple date candidates; The date candidates are scored based on format completeness, year range, and contextual constraints, and the date candidate with the highest score is selected as the optimal recognition result. The optimal recognition result is mapped to basic information, and the basic information is bound to the target object, outputting structured data containing the basic information and the target object.

2. The method according to claim 1, characterized in that, The steps for generating multiple regions of interest based on preset target fields include: The process involves: finding a first keyword representing user behavior in the image to be processed; determining an upper boundary based on the first keyword; finding a second keyword representing review behavior in the image to be processed; determining a lower boundary based on the second keyword; and determining the position corresponding to the signature area as the candidate region of interest containing the date field based on the upper and lower boundaries. In the application date scenario, the right-hand area of ​​the signing area is identified as the additional region of interest.

3. The method according to claim 1, characterized in that, The steps of performing multi-version local enhancement recognition on the region of interest to parse multiple date candidates include: For the region of interest, image enhancement processing with different parameters is performed to generate multiple locally enhanced versions; Local optical character recognition is performed on each of the multiple locally enhanced versions to extract the date candidates corresponding to each locally enhanced version.

4. The method according to claim 3, characterized in that, The steps of scoring the date candidates based on format completeness, year range, and contextual constraints, and selecting the date candidate with the highest score as the optimal recognition result, include: The identified values ​​of multiple date candidates are aggregated, and the number of times the same identified value appears in different local enhancement versions and / or different regions of interest is calculated. A consensus score is given to the date candidate based on the number of occurrences. Calculate the format integrity score and year range score for each of the date candidates; Calculate the context constraint score for each date candidate based on the context information of the image to be processed; The date candidate with the highest total score is selected as the optimal recognition result based on a weighted calculation of the consensus score, the format integrity score, the year range score, and the context constraint score.

5. The method according to claim 4, characterized in that, The method further includes: The document type of the image to be processed is determined based on the header information of the image to be processed; Based on the document type, using a preset type document as the starting anchor point, the continuous pages contained in the image to be processed are divided into independent application tasks; The context information of the image to be processed is established based on multiple application tasks, wherein the context information is used to characterize the time logic of the business flow in the image to be processed.

6. The method according to claim 5, characterized in that, The step of calculating the context constraint score of each date candidate based on the context information of the image to be processed includes: The recognition results of adjacent fields of the date candidates are extracted from the context information, and the recognition results record the context date information; Based on the business flow time logic corresponding to the image to be processed, determine whether there is a time inversion or logical conflict between the date candidate and the recognition result of the adjacent field; If so, reduce the context constraint rate score of the date candidate; If not, increase the context constraint rate score of the date candidate.

7. The method according to claim 5, characterized in that, The method further includes: If the occlusion of the signing area exceeds the preset occlusion range, or if the date candidate does not meet the time logic of the business flow in the image to be processed as represented by the context information, then a legitimate source date that is strongly associated with the date candidate is extracted from multiple legal certificate fields in the same application task. When at least two of the legitimate source dates give the same date, that date is determined as the legitimate source consensus date, and the legitimate source consensus date is used as a date candidate.

8. The method according to claim 5, characterized in that, The method further includes: When a conflict is detected between the day or month in the date candidates, a valid repair item is constructed based on the context information, and the day or month in the date candidates is repaired based on the valid repair item.

9. The method according to claim 1, characterized in that, The step of locating the stamp region contained in the image to be processed and suppressing the stamp region includes: Locate the stamp region in the image to be processed in the HSV color space to obtain the bounding box of the stamp region; The boundary frame of the stamp area is suppressed.

10. A document information extraction device, characterized in that, The device includes: The reading module is used to read the document to be processed and render the document to be processed page by page into an image to be processed at a preset resolution; The positioning module is used to locate the stamp area contained in the image to be processed and to suppress the stamp area. The generation module is used to generate multiple regions of interest (ROIs) based on preset target fields for the suppressed image to be processed; wherein, the ROIs include candidate ROIs containing a date field in the image to be processed, and additional ROIs corresponding to the signature area in the application date scenario in the date field; The identification module is used to perform multi-version local enhancement identification on the region of interest to parse out multiple date candidates; The scoring module is used to score the date candidates based on format completeness, year range and contextual constraints, and select the date candidate with the highest score as the optimal recognition result; The output module is used to map the optimal recognition result to basic information, bind the basic information to the target object, and output structured data containing the basic information and the target object.