Field extraction method and device, computer equipment and storage medium

By using character recognition, matching rules and positioning in image field extraction technology, combined with a pre-trained judgment model, the problems of information positioning mismatch and multiple matching in complex scenarios are solved, and more accurate and reliable field extraction is achieved.

CN119107665APending Publication Date: 2024-12-10PING AN BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411206515.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

Existing image field extraction technology is prone to information positioning mismatch or multiple matching problems in complex scenarios, resulting in the inclusion of non-related information or the omission of important information in the extraction results.

Method used

Using the field extraction method, the field extraction judgment model is determined through character recognition, matching rules, position information positioning and pre-trained field extraction, and structured document field key-value pairs, and precise screening is carried out in combination with semantic information to ensure that the field key-value pairs and images are in The exact correspondence of actual content.

Benefits of technology

It improves the accuracy of information extraction, reduces the occurrence of mismatch and multiple matching situations, and improves the reliability and practicality of overall field extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107665A_ABST
    Figure CN119107665A_ABST
Patent Text Reader

Abstract

The invention discloses a field extraction method and device, computer equipment and a storage medium, and belongs to the technical field of artificial intelligence. Firstly, text fields on a document are identified by utilizing a character identification technology; then, field key-value pair matching is carried out on the document fields through a matching rule, and structured document field key-value pairs are constructed; then, the location of each field key value pair in the image is captured using a location information localization technique. And constructing a candidate extraction value array based on the position information of the field key value pair. And finally, through a pre-trained field extraction judgment model, comprehensively considering the field position information and the semantic information, and obtaining a field extraction result of the document image. The invention also relates to the technical field of block chains, and the to-be-processed document image is stored on a block chain network node. According to the method, the problems of mismatching and multi-matching in a complex scene are effectively solved, and the reliability and practicability of overall field extraction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of artificial intelligence technology, and specifically relates to a field extraction method, apparatus, computer equipment and storage medium. Background Art

[0002] In the commercial banking industry, image field extraction is a key technology that helps to structure bank document information and is of great significance in improving business efficiency, reducing manual errors, and optimizing customer experience. Image field extraction technology mainly relies on advanced technologies such as OCR (Optical Character Recognition) and NLP (Natural Language Processing), which can automatically recognize and process text information in images and convert it into editable and analyzable data formats, such as bill amount recognition and contract text processing.

[0003] However, when OCR and NLP are faced with image field extraction in complex scenes, there are usually problems with information positioning mismatch or multiple matching. Specifically, when there are multiple similar text areas in the image or the text layout is complex, OCR may find it difficult to accurately distinguish and locate the target information, resulting in the mixing of irrelevant information in the extraction results or the omission of important information. At the same time, when NLP processes these mixed text data, it may also make misjudgments due to semantic understanding deviations, affecting subsequent information analysis and utilization. Summary of the invention

[0004] The purpose of the embodiments of the present application is to propose a field extraction method, apparatus, computer equipment and storage medium to solve the technical problems of positioning mismatch or multiple matching existing in the existing image field extraction methods.

[0005] In order to solve the above technical problems, the present application embodiment provides a field extraction method, which adopts the following technical solution:

[0006] A field extraction method, comprising:

[0007] Obtain the document image to be processed, perform character recognition on the document image to be processed, and obtain several document fields;

[0008] Match several document fields to obtain document field key-value pairs;

[0009] Determine the position of the document field key-value pair in the document image to be processed, and obtain the position information of the document field key-value pair;

[0010] Construct an array of candidate extraction values ​​based on the position information of the document field key-value pairs;

[0011] The document image to be processed and the candidate extraction value array are input into the pre-trained field extraction judgment model, and the field extraction result of the document image to be processed is output.

[0012] Furthermore, the steps of matching several document fields to obtain document field key-value pairs specifically include:

[0013] Identify the field type of each document field, where field types include key fields and value fields;

[0014] Obtain the key value matching rules corresponding to the key field from the preset key value matching rule engine;

[0015] Based on the key-value matching rules, the key fields are matched with each value field one by one to obtain the field key-value matching results;

[0016] According to the field key value matching result, the key type fields and value type fields that match each other are obtained to obtain the document field key value pairs.

[0017] Furthermore, the step of determining the position of the document field key-value pair in the document image to be processed and obtaining the position information of the document field key-value pair specifically includes:

[0018] Construct a plane coordinate system on the plane where the document image to be processed is located;

[0019] Identify the position coordinates of the key class field in the plane coordinate system, and identify the position coordinates of the value class field in the plane coordinate system;

[0020] Combine the position coordinates of the key field and the value field to obtain the position information of the document field key-value pair.

[0021] Furthermore, the step of constructing a candidate extraction value array based on the position information of the document field key-value pairs specifically includes:

[0022] Calculate the field key value distance based on the location coordinates of the key field and the location coordinates of the value field;

[0023] Import the field key value distance into the preset initial array to obtain the candidate extraction value array;

[0024] The field key value distance is calculated based on the following formula:

[0025]

[0026] Where L is the field key value distance, the position coordinates of the key field are (x1, y1), and the position coordinates of the value field are (x2, y2).

[0027] Furthermore, the field extraction determination model is a determination model obtained by pre-training a large language model, and the step of inputting the document image to be processed and the candidate extraction value array into the pre-trained field extraction determination model and outputting the field extraction result of the document image to be processed specifically includes:

[0028] Acquire a first input template and a second input template prepared in advance, wherein the first input template is an input template used to indicate outputting an optimal extraction result, and the second input template is an input template used to indicate outputting a sorting of the extraction results;

[0029] Filling the document image to be processed and the candidate extraction value array into the first input template to obtain the first input information;

[0030] Inputting the first input information into the field extraction determination model, and outputting the first field extraction result;

[0031] Filling the document image to be processed and the candidate extraction value array into the second input template to obtain second input information;

[0032] Inputting the second input information into the field extraction determination model, and outputting the second field extraction result;

[0033] The field extraction result of the document image to be processed is determined according to the first field extraction result and the second field extraction result.

[0034] Furthermore, the second field extraction result is an extraction result sorting sequence, and the step of determining the field extraction result of the document image to be processed according to the first field extraction result and the second field extraction result specifically includes:

[0035] Determine the first sequence position in the sorting sequence of the extraction result, and obtain the document field key-value pair in the first sequence position;

[0036] Compare the document field key-value pairs in the first field extraction result with the document field key-value pairs in the first sequence position;

[0037] According to the document field key value comparison result, the field extraction result of the document image to be processed is determined.

[0038] Further, the step of determining the field extraction result of the document image to be processed according to the document field key value comparison result specifically includes:

[0039] When the document field key-value pair in the first field extraction result is the same as the document field key-value pair in the first sequence position, the document field key-value pair in the first field extraction result or the document field key-value pair in the first sequence position is used as the field extraction result of the document image to be processed;

[0040] When the document field key-value pair in the first field extraction result is different from the document field key-value pair in the first sequence position, the confidence of the document field key-value pair in the first field extraction result is calculated to obtain a first confidence, and the confidence of the document field key-value pair in the first sequence position is calculated to obtain a second confidence;

[0041] Comparing the first confidence level and the second confidence level;

[0042] When the first confidence level is greater than the second confidence level, the document field key-value pair in the first field extraction result is used as the field extraction result of the document image to be processed;

[0043] When the first confidence level is less than the second confidence level, the document field key-value pairs in the first sequence position are used as field extraction results of the document image to be processed.

[0044] In order to solve the above technical problems, the embodiment of the present application further provides a field extraction device, which adopts the following technical solution:

[0045] A field extraction device, comprising:

[0046] A character recognition module is used to obtain a document image to be processed, perform character recognition on the document image to be processed, and obtain a number of document fields;

[0047] The field matching module is used to match several document fields and obtain document field key-value pairs;

[0048] A position identification module is used to determine the position of the document field key-value pair in the document image to be processed and obtain the position information of the document field key-value pair;

[0049] The candidate array module is used to construct an array of candidate extraction values ​​based on the position information of the document field key-value pairs;

[0050] The field extraction module is used to input the document image to be processed and the candidate extraction value array into the pre-trained field extraction judgment model, and output the field extraction result of the document image to be processed.

[0051] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0052] A computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of any of the above-mentioned field extraction methods when executing the computer-readable instructions.

[0053] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0054] A computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of any one of the field extraction methods described above.

[0055] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0056] The present application discloses a field extraction method, device, computer equipment and storage medium, which belongs to the field of artificial intelligence technology. First, the text field on the document is identified by character recognition technology. Then, the document field is matched with field key-value pairs by matching rules to construct a structured document field key-value pair. Then, the position of each field key-value pair in the image is captured by position information positioning technology. An array of candidate extraction values ​​is constructed based on the position information of the field key-value pair. Finally, the field extraction result of the document image is obtained by comprehensively considering the field position information and semantic information through a pre-trained field extraction judgment model. The present application effectively constructs a structured document field key-value pair through a document field key-value pair matching mechanism, which not only improves the accuracy of information extraction, but also greatly reduces the occurrence of mismatches and multiple matches. Combined with the position information positioning technology, it further ensures the accurate correspondence between the field key-value pair and the actual content in the image. Finally, the semantic information and position information are integrated through a machine learning model to accurately screen the extraction results, effectively solving the problem of mismatches and multiple matches in complex scenarios, and improving the reliability and practicality of the overall field extraction. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0058] Figure 1 An exemplary system architecture diagram is shown in which the present application can be applied;

[0059] Figure 2 A flow chart showing an embodiment of a field extraction method according to the present application is shown;

[0060] Figure 3 A schematic structural diagram of an embodiment of a field extraction device according to the present application is shown;

[0061] Figure 4 A schematic structural diagram of an embodiment of a computer device according to the present application is shown. DETAILED DESCRIPTION

[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0063] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0064] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0065] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables.

[0066] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0067] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing. In addition to the laptop computer 1011, the tablet computer 1012 or the mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer and a desktop computer, etc.

[0068] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .

[0069] It should be noted that the field extraction method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the field extraction device is generally set in the server / terminal device.

[0070] It should be understood that Figure 1 The numbers of terminal devices, networks and servers in the embodiment are merely illustrative. The above system may have any number of terminal devices, networks and servers according to implementation requirements.

[0071] At present, when OCR and NLP are faced with image field extraction in complex scenes, there are usually problems with information positioning mismatch or multiple matching. Specifically, when there are multiple similar text areas in the image or the text layout is complex, OCR may find it difficult to accurately distinguish and locate the target information, resulting in the mixing of irrelevant information in the extraction results or the omission of important information. At the same time, when NLP processes these mixed text data, it may also make misjudgments due to semantic understanding deviations, affecting subsequent information analysis and utilization.

[0072] In response to the above technical problems, the present application discloses a field extraction method, device, computer equipment and storage medium, which belongs to the field of artificial intelligence technology. The present application effectively constructs a structured document field key-value pair through a document field key-value pair matching mechanism, which not only improves the accuracy of information extraction, but also greatly reduces the occurrence of mismatches and multiple matches. Combined with the position information positioning technology, it further ensures the accurate correspondence between the field key-value pairs and the actual content in the image. Finally, through the machine learning model, the semantic information and position information are integrated to accurately screen the extraction results, which effectively solves the mismatch and multiple matching problems in complex scenarios and improves the reliability and practicality of the overall field extraction.

[0073] Continue to refer Figure 2, shows a flow chart of an embodiment of a method for field extraction according to the present application. The field extraction method comprises the following steps:

[0074] S201, obtaining a document image to be processed, performing character recognition on the document image to be processed, and obtaining a plurality of document fields.

[0075] Specifically, the system obtains the original image of the document from various sources (such as scanning equipment, camera shooting, file upload, etc.) and ensures that the quality of the image meets the system requirements, such as clarity, resolution, etc. Then the system pre-processes the image, such as denoising, adjusting brightness and contrast, cropping, etc., to improve the effect of subsequent character recognition.

[0076] The system uses character recognition (OCR) technology to perform character recognition on the document images to be processed. Character recognition (OCR) technology is the core of this step. OCR technology can convert the text in the image into a computer-editable text format. By combining image acquisition and OCR character recognition technology, it provides basic data support for document automation processing.

[0077] S202, matching several document fields to obtain document field key-value pairs.

[0078] Specifically, the main purpose of this step is to organize the identified document fields into key-value pairs according to certain rules or logic. Key-value pairs are a common data structure, where the "key" is a unique identifier used to represent the attribute or category of the data, and the "value" is the specific data content associated with the key.

[0079] Field matching can be based on the fixed format of the document (such as template matching), the semantic information of the field (such as identifying the field category through natural language processing technology), or a pre-defined keyword list. For documents with fixed formats, such as invoices and contracts, template matching can be used to determine the key-value pairs based on the layout and field position of the document. For documents with non-fixed or complex formats, natural language processing technology can be used to understand the semantic information of the field and match it accordingly.

[0080] During the matching process, the system will traverse each field identified by OCR to determine the field type of each document field. The field type includes key fields and value fields, and the value field corresponding to each key field is determined according to the matching rules.

[0081] If a key field can be matched by multiple value fields, additional logic is required to handle this situation, such as selecting the most appropriate match based on the field's contextual information, data type, or priority.

[0082] S203, determining the position of the document field key-value pair in the document image to be processed, and obtaining the position information of the document field key-value pair.

[0083] Obtaining the location information of document field key-value pairs is crucial for multiple application scenarios. For example, the location information of document field key-value pairs can help users quickly locate specific information in the original document for verification or annotation; in the automated processing flow, the location information can be used for subsequent image cropping, content highlighting or error detection, etc.

[0084] Specifically, it usually relies on OCR technology or its extended functions. The OCR system can not only recognize the text content in the image, but also provide the coordinate position of these texts in the image (such as the coordinates of the upper left corner and the lower right corner). For data that has been recognized by OCR and converted into field key-value pairs, the specific position of each key-value pair in the original image can be determined by tracing back the position information generated during the OCR process.

[0085] Position information is usually expressed in the form of coordinates or areas. For example, a rectangular box (defined by the coordinates of its upper left and lower right corners) can be used to represent the location of a field. This position information can be stored in a data structure (such as a dictionary, list, or database record) to be associated and retrieved with the corresponding field key-value pair.

[0086] S204, constructing a candidate extraction value array based on the position information of the document field key-value pairs.

[0087] Specifically, in this step, the position information is used as an important basis for constructing the candidate extraction value array. The position information not only contains the precise coordinates or area of ​​the field in the document image, but also implies the relative position relationship, layout rules or arrangement order between the fields.

[0088] The candidate extraction value array is a data structure used to store field key-value pairs and the position distance of field key-value pairs after filtering or organizing based on position information. This array may exist in various forms, such as a list, dictionary, or a custom data structure, depending on the requirements of subsequent processing.

[0089] By analyzing the position information of document field key-value pairs, the system can identify which document field key-value pairs' "keys" and "values" are adjacent, belong to the same area, or follow a specific arrangement pattern. This information is crucial for building a more logically reasonable and compact array of candidate extracted values.

[0090] S205, inputting the document image to be processed and the candidate extraction value array into a pre-trained field extraction determination model, and outputting the field extraction result of the document image to be processed.

[0091] Specifically, it relies on a pre-trained field extraction decision model, which can be pre-trained using a large language model. Use a large language model (such as BERT, GPT, etc.) for pre-training to build a decision model for field extraction in document images. Large language models are widely used in NLP tasks due to their powerful context understanding and generation capabilities. In this scenario, the pre-trained knowledge of these models can be used to assist in understanding the text content in the document image.

[0092] Design a model architecture that can receive image and text input. This may include a CNN to extract image features, an NLP model to process OCR text, and a fusion layer to integrate these two types of information. After the fusion layer, multiple classifiers or regressors can be added, each corresponding to a field to be extracted, to predict the value of the field to determine whether the field can be used as the field extraction result of the document image to be processed.

[0093] In the above embodiments, the present application effectively constructs a structured document field key-value pair through a document field key-value pair matching mechanism, which not only improves the accuracy of information extraction, but also greatly reduces the occurrence of mismatches and multiple matches. Combined with the position information positioning technology, it further ensures the accurate correspondence between the field key-value pairs and the actual content in the image. Finally, the machine learning model integrates semantic information and position information to accurately screen the extraction results, effectively solving the mismatch and multiple match problems in complex scenarios, and improving the reliability and practicality of the overall field extraction.

[0094] Furthermore, the steps of matching several document fields to obtain document field key-value pairs specifically include:

[0095] Identify the field type of each document field, where field types include key fields and value fields;

[0096] Obtain the key value matching rules corresponding to the key field from the preset key value matching rule engine;

[0097] Based on the key-value matching rules, the key fields are matched with each value field one by one to obtain the field key-value matching results;

[0098] According to the field key value matching result, the key type fields and value type fields that match each other are obtained to obtain the document field key value pairs.

[0099] In this embodiment, efficient and accurate extraction of document field key-value pairs is achieved by refining the document field matching problem. First, the system clearly distinguishes between key fields and value fields in the document. Then, the preset key-value matching rule engine is used to flexibly respond to matching requirements in different scenarios. In the matching process, a one-to-one correspondence method is adopted to ensure that each key field can find the most matching value field, and the key field is matched one by one with each value field to obtain the field key-value matching result, thereby reducing the risk of mismatching. Finally, the matching key field and value field are selected as the document field key-value pair according to the matching result.

[0100] Through the above embodiments, the present application improves the intelligence level of document processing. By accurately identifying field types and intelligent matching rules, it realizes the rapid and accurate generation of document field key-value pairs, greatly improves work efficiency, and ensures the integrity and accuracy of the data.

[0101] Furthermore, the step of determining the position of the document field key-value pair in the document image to be processed and obtaining the position information of the document field key-value pair specifically includes:

[0102] Construct a plane coordinate system on the plane where the document image to be processed is located;

[0103] Identify the position coordinates of the key class field in the plane coordinate system, and identify the position coordinates of the value class field in the plane coordinate system;

[0104] Combine the position coordinates of the key field and the value field to obtain the position information of the document field key-value pair.

[0105] In this embodiment, first, a plane coordinate system is constructed on the plane where the document image to be processed is located. This is the basis for determining the position of each element in the image, so that each point in the image can be uniquely identified by coordinates. Next, image processing technology (such as OCR, image recognition algorithm, etc.) is used to identify the position coordinates of key fields and value fields in the plane coordinate system, accurately identify the boundaries of the fields, and calculate the specific coordinate values ​​of these boundaries in the coordinate system. Finally, the position coordinates of the key fields and the position coordinates of the value fields are combined to obtain the position information of the document field key-value pairs, and establish a spatial association between the fields, so that the specific position of each key-value pair in the image can be clearly known during processing or display.

[0106] Through the above embodiments, the present application realizes the accurate determination of the position of the document field key-value pairs in the document image to be processed and the acquisition of the position information through three steps of constructing a plane coordinate system, identifying field position coordinates and combining position coordinates.

[0107] Furthermore, the step of constructing a candidate extraction value array based on the position information of the document field key-value pairs specifically includes:

[0108] Calculate the field key value distance based on the location coordinates of the key field and the location coordinates of the value field;

[0109] Import the field key value distance into the preset initial array to obtain the candidate extraction value array;

[0110] In this embodiment, the candidate extraction value array is constructed by the position information of the field key-value pairs (i.e., the field name and the corresponding value) in the document (such as an invoice, order, etc.), which is mainly used in automated processing or data extraction tasks. First, it is necessary to determine the specific position of each field on the document, including the position coordinates of the key field and the position coordinates of the value field. Then, the physical distance between each key field and its corresponding value field is calculated. The distance between the corresponding coordinate points can be calculated as the field key value distance. For example, the physical distance between the upper left corner coordinate point of the key field and the upper left corner coordinate point of the value field is calculated as the field key value distance. Finally, the calculated field key value distance is imported into the preset array as part of the association information. In this way, each candidate key value pair is accompanied by a quantitative indicator of its positional relationship. The preset initial array is a data structure for storing all possible key value pair candidates. The data structure contains key fields, value fields, and the field key value distances between them.

[0111] Through the above embodiments, the present application provides an effective solution for automated data extraction by utilizing the position information of field key-value pairs in the document to construct a candidate extraction value array.

[0112] The field key value distance is calculated based on the following formula:

[0113]

[0114] Where L is the field key value distance, the position coordinates of the key field are (x1, y1), and the position coordinates of the value field are (x2, y2).

[0115] Furthermore, the field extraction determination model is a determination model obtained by pre-training a large language model, and the step of inputting the document image to be processed and the candidate extraction value array into the pre-trained field extraction determination model and outputting the field extraction result of the document image to be processed specifically includes:

[0116] Acquire a first input template and a second input template prepared in advance, wherein the first input template is an input template used to indicate outputting an optimal extraction result, and the second input template is an input template used to indicate outputting a sorting of the extraction results;

[0117] Filling the document image to be processed and the candidate extraction value array into the first input template to obtain the first input information;

[0118] Inputting the first input information into the field extraction determination model, and outputting the first field extraction result;

[0119] Filling the document image to be processed and the candidate extraction value array into the second input template to obtain second input information;

[0120] Inputting the second input information into the field extraction determination model, and outputting the second field extraction result;

[0121] The field extraction result of the document image to be processed is determined according to the first field extraction result and the second field extraction result.

[0122] The first input template is designed to indicate the template that outputs the optimal extraction result of the model. The first input model will directly give the most likely field extraction result based on the input document image to be processed and the candidate extraction value array, without additional sorting or screening. The second input template is designed to indicate the sorting of the model output extraction results. The second input template requires the model to not only give the field extraction results, but also sort these results so that users or subsequent processing processes can more clearly understand which results are more reliable.

[0123] In this embodiment, first, the document image to be processed and the candidate extraction value array are filled into two input templates respectively to generate the first input information and the second input information. Then, the two input information are respectively input into the pre-trained field extraction judgment model. The model will execute different processing logics according to different input information and output the corresponding field extraction results. Finally, according to the first field extraction result (i.e., the optimal extraction result) and the second field extraction result (i.e., the sorted extraction result), the final field extraction result of the document image to be processed is comprehensively determined.

[0124] Through the above embodiments, the present application can flexibly adjust the output format and accuracy of the model by designing different input templates to meet different application scenarios and requirements. The pre-trained field extraction judgment model has an in-depth understanding of the document image and the candidate extraction value array, and can output high-quality field extraction results.

[0125] Furthermore, the second field extraction result is an extraction result sorting sequence, and the step of determining the field extraction result of the document image to be processed according to the first field extraction result and the second field extraction result specifically includes:

[0126] Determine the first sequence position in the sorting sequence of the extraction result, and obtain the document field key-value pair in the first sequence position;

[0127] Compare the document field key-value pairs in the first field extraction result with the document field key-value pairs in the first sequence position;

[0128] According to the document field key value comparison result, the field extraction result of the document image to be processed is determined.

[0129] In this embodiment, the second field extraction result is a sorted sequence, which includes multiple document field key-value pairs, and these key-value pairs are sorted according to a certain confidence or accuracy. In the sorted sequence, the first sequence position usually represents the highest confidence or the most accurate extraction result. Therefore, this step is to take out the document field key-value pair that is ranked first from the sorted sequence, that is, the key-value pair in the first sequence position.

[0130] Next, the document field key-value pairs in the first field extraction result (i.e., the optimal extraction result) are compared with the key-value pairs in the first sequence position. This comparison may be based on the field name, field value, or a combination of the two. The purpose of the comparison is to evaluate the similarity or consistency between the two results.

[0131] According to the comparison results, different strategies can be adopted to determine the final field extraction results. If the comparison results are consistent, that is, both results point to the same field key-value pair, this key-value pair can be directly used as the final field extraction result. If the comparison results are inconsistent, that is, there is a conflict or uncertainty in the field extraction results corresponding to the two inputs, further comparison and confirmation are required.

[0132] Through the above embodiments, the present application can improve the accuracy of field extraction to a certain extent by combining the optimal extraction results and the sorted extraction results. Even if there are problems with the optimal extraction results, by considering the sorted extraction results, there is still a chance to obtain reliable field extraction results.

[0133] Further, the step of determining the field extraction result of the document image to be processed according to the document field key value comparison result specifically includes:

[0134] When the document field key-value pair in the first field extraction result is the same as the document field key-value pair in the first sequence position, the document field key-value pair in the first field extraction result or the document field key-value pair in the first sequence position is used as the field extraction result of the document image to be processed;

[0135] When the document field key-value pair in the first field extraction result is different from the document field key-value pair in the first sequence position, the confidence of the document field key-value pair in the first field extraction result is calculated to obtain a first confidence, and the confidence of the document field key-value pair in the first sequence position is calculated to obtain a second confidence;

[0136] Comparing the first confidence level and the second confidence level;

[0137] When the first confidence level is greater than the second confidence level, the document field key-value pair in the first field extraction result is used as the field extraction result of the document image to be processed;

[0138] When the first confidence level is less than the second confidence level, the document field key-value pairs in the first sequence position are used as field extraction results of the document image to be processed.

[0139] In this embodiment, when the document field key-value pair in the first field extraction result is the same as the document field key-value pair in the first sequence position (i.e., the highest confidence after sorting), it means that the extraction results corresponding to the two inputs are consistent. At this time, any result can be directly selected as the final field extraction result. This processing method is simple and direct, and avoids unnecessary calculations.

[0140] When the document field key-value pair in the first field extraction result is the same as the document field key-value pair in the first sequence position, the concept of confidence is introduced to further evaluate the reliability of the two results. Confidence is an indicator to measure the accuracy of the extraction result, which is usually calculated based on the model's predicted probability of the result or other statistical information.

[0141] For the document field key-value pairs in the first field extraction result and the second field extraction result, their confidences are calculated respectively to obtain the first confidence and the second confidence. According to the comparison result of the confidences, the document field key-value pair with a higher confidence is selected as the final field extraction result of the document image to be processed. This processing method can ensure the reliability of the final result and reduce subsequent problems caused by extraction errors.

[0142] Specifically, when calculating the confidence of the document field key-value pairs in the first field extraction result and the second field extraction result, the specific implementation method depends on the machine learning model or algorithm used. Confidence is a quantitative indicator to measure the reliability or accuracy of the model for a specific output result.

[0143] For example, the first field extraction result and the second field extraction result are both given by the model. Usually, when the model gives a specific result, it also outputs one or more scores or probability values ​​related to the result. These scores or probability values ​​can be used directly or indirectly to calculate confidence.

[0144] Suppose there is an OCR (optical character recognition) model based on deep learning, which is used to extract field key-value pairs from document images. When the model recognizes each field, in addition to giving the specific field value and key name, it also outputs a probability value indicating the confidence level of the recognition result of the field.

[0145] The first field extraction result of the model output is: "Field key - Name", "Field value - Zhang San" and "Confidence score - 0.95";

[0146] The model outputs the second field extraction results as: "field key - amount", "field value - 1000 yuan", and "confidence score - 0.88";

[0147] In this example, the first confidence level is 0.95 and the second confidence level is 0.88. When the final extraction result needs to be determined, the two confidence scores can be directly compared and the result with higher confidence level can be selected as the final output.

[0148] Through the above embodiments, the present application can more accurately determine the final field extraction result by introducing a confidence evaluation and comparison mechanism, reducing errors caused by extraction errors. Even when the optimal extraction result and the sorted extraction result are inconsistent, a more reliable result can be selected through confidence comparison, thereby enhancing the robustness of the technical solution.

[0149] In the above embodiment, the present application discloses a field extraction method, which belongs to the field of artificial intelligence technology. First, the text field on the document is identified by character recognition technology. Subsequently, the document field is matched with field key-value pairs by matching rules to construct a structured document field key-value pair. Then, the position of each field key-value pair in the image is captured by using the position information positioning technology. An array of candidate extraction values ​​is constructed based on the position information of the field key-value pair. Finally, the field extraction result of the document image is obtained by comprehensively considering the field position information and semantic information through a pre-trained field extraction judgment model. The present application effectively constructs a structured document field key-value pair through a document field key-value pair matching mechanism, which not only improves the accuracy of information extraction, but also greatly reduces the occurrence of mismatches and multiple matches. Combined with the position information positioning technology, it further ensures the accurate correspondence between the field key-value pair and the actual content in the image. Finally, the semantic information and position information are integrated through a machine learning model to accurately screen the extraction results, effectively solving the mismatch and multiple matching problems in complex scenarios, and improving the reliability and practicality of the overall field extraction.

[0150] In this embodiment, the field extraction method is executed on the electronic device (eg Figure 1 The server shown in the figure can receive instructions or obtain data through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G connection, Wi-Fi connection, Bluetooth connection, Wi MAX connection, Zigbee connection, UWB (Ultra Wi-Fi Band) connection, and other wireless connection methods currently known or to be developed in the future.

[0151] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned document image information, the above-mentioned document image information can also be stored in a blockchain node.

[0152] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0153] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0154] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0155] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0156] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0157] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a field extraction device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0158] like Figure 3 As shown, the field extraction device 300 described in this embodiment includes:

[0159] The character recognition module 301 is used to obtain a document image to be processed, perform character recognition on the document image to be processed, and obtain a number of document fields;

[0160] The field matching module 302 is used to match several document fields to obtain document field key-value pairs;

[0161] A position identification module 303 is used to determine the position of the document field key-value pair in the document image to be processed and obtain the position information of the document field key-value pair;

[0162] A candidate array module 304 is used to construct a candidate extraction value array based on the position information of the document field key-value pairs;

[0163] The field extraction module 305 is used to input the document image to be processed and the candidate extraction value array into the pre-trained field extraction judgment model, and output the field extraction result of the document image to be processed.

[0164] Furthermore, the field matching module 302 is specifically used for:

[0165] Identify the field type of each document field, where the field type includes key fields and value fields; obtain the key-value matching rules corresponding to the key fields from the preset key-value matching rule engine; based on the key-value matching rules, match the key fields with each value field one by one to obtain the field key-value matching results; obtain the key fields and value fields that match each other according to the field key-value matching results to obtain the document field key-value pairs.

[0166] Furthermore, the location identification module 303 is specifically used for:

[0167] Construct a plane coordinate system on the plane where the document image to be processed is located; identify the position coordinates of the key field in the plane coordinate system, and identify the position coordinates of the value field in the plane coordinate system; combine the position coordinates of the key field and the position coordinates of the value field to obtain the position information of the document field key-value pair.

[0168] Furthermore, the candidate array module 304 is specifically used for:

[0169] The field key value distance is calculated based on the position coordinates of the key field and the position coordinates of the value field; the field key value distance is imported into a preset initial array to obtain a candidate extraction value array.

[0170] Furthermore, the field key value distance is calculated based on the following formula:

[0171]

[0172] Where L is the field key value distance, the position coordinates of the key field are (x1, y1), and the position coordinates of the value field are (x2, y2).

[0173] Furthermore, the field extraction decision model is a decision model obtained by pre-training a large language model, and the field extraction module 305 is specifically used for:

[0174] Obtain a pre-prepared first input template and a second input template, wherein the first input template is an input template for indicating the output of the optimal extraction result, and the second input template is an input template for indicating the output extraction result sorting; fill the document image to be processed and the candidate extraction value array into the first input template to obtain the first input information; input the first input information into the field extraction judgment model to output the first field extraction result; fill the document image to be processed and the candidate extraction value array into the second input template to obtain the second input information; input the second input information into the field extraction judgment model to output the second field extraction result; determine the field extraction result of the document image to be processed according to the first field extraction result and the second field extraction result.

[0175] Furthermore, the second field extraction result is an extraction result sorting sequence, and the field extraction module 305 is further used to:

[0176] Determine the first sequence position in the sorting sequence of the extraction result, and obtain the document field key-value pair in the first sequence position; compare the document field key-value pair in the first field extraction result with the document field key-value pair in the first sequence position; determine the field extraction result of the document image to be processed based on the document field key value comparison result.

[0177] Furthermore, the field extraction module 305 is also used for:

[0178] When the document field key-value pair in the first field extraction result is the same as the document field key-value pair in the first sequence position, the document field key-value pair in the first field extraction result or the document field key-value pair in the first sequence position is used as the field extraction result of the document image to be processed; when the document field key-value pair in the first field extraction result is different from the document field key-value pair in the first sequence position, the confidence of the document field key-value pair in the first field extraction result is calculated to obtain a first confidence, and the confidence of the document field key-value pair in the first sequence position is calculated to obtain a second confidence; the first confidence and the second confidence are compared; when the first confidence is greater than the second confidence, the document field key-value pair in the first field extraction result is used as the field extraction result of the document image to be processed; when the first confidence is less than the second confidence, the document field key-value pair in the first sequence position is used as the field extraction result of the document image to be processed.

[0179] In the above embodiment, the present application discloses a field extraction device, which belongs to the field of artificial intelligence technology. First, the text field on the document is identified by character recognition technology. Then, the document field is matched with field key-value pairs by matching rules to construct a structured document field key-value pair. Then, the position of each field key-value pair in the image is captured by using the position information positioning technology. An array of candidate extraction values ​​is constructed based on the position information of the field key-value pair. Finally, the field extraction result of the document image is obtained by comprehensively considering the field position information and semantic information through the pre-trained field extraction judgment model. The present application effectively constructs a structured document field key-value pair through the document field key-value pair matching mechanism, which not only improves the accuracy of information extraction, but also greatly reduces the occurrence of mismatches and multiple matches. Combined with the position information positioning technology, it further ensures the accurate correspondence between the field key-value pair and the actual content in the image. Finally, the semantic information and position information are integrated through the machine learning model to accurately screen the extraction results, effectively solving the mismatch and multiple matching problems in complex scenarios, and improving the reliability and practicality of the overall field extraction.

[0180] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0181] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 4 having a memory 41, a processor 42, and a network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital processor (DSP), an embedded device, etc.

[0182] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0183] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the field extraction method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0184] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the computer-readable instructions stored in the memory 41 or process data, such as the computer-readable instructions for running the field extraction method.

[0185] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0186] In the above embodiment, the present application discloses a computer device, which belongs to the field of artificial intelligence technology. First, the text field on the document is identified by character recognition technology. Subsequently, the document field is matched with field key-value pairs by matching rules to construct a structured document field key-value pair. Then, the position of each field key-value pair in the image is captured by using the position information positioning technology. An array of candidate extraction values ​​is constructed based on the position information of the field key-value pair. Finally, the field extraction result of the document image is obtained by comprehensively considering the field position information and semantic information through the pre-trained field extraction judgment model. The present application effectively constructs a structured document field key-value pair through the document field key-value pair matching mechanism, which not only improves the accuracy of information extraction, but also greatly reduces the occurrence of mismatches and multiple matches. Combined with the position information positioning technology, it further ensures the accurate correspondence between the field key-value pair and the actual content in the image. Finally, the semantic information and position information are integrated through the machine learning model to accurately screen the extraction results, effectively solving the mismatch and multiple matching problems in complex scenarios, and improving the reliability and practicality of the overall field extraction.

[0187] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the field extraction method as described above.

[0188] In the above embodiment, the present application discloses a computer-readable storage medium, which belongs to the field of artificial intelligence technology. First, the text field on the document is identified by character recognition technology. Then, the document field is matched with field key-value pairs by matching rules to construct a structured document field key-value pair. Then, the position of each field key-value pair in the image is captured by using the position information positioning technology. The candidate extraction value array is constructed based on the position information of the field key-value pair. Finally, the field extraction result of the document image is obtained by comprehensively considering the field position information and semantic information through the pre-trained field extraction judgment model. The present application effectively constructs a structured document field key-value pair through the document field key-value pair matching mechanism, which not only improves the accuracy of information extraction, but also greatly reduces the occurrence of mismatches and multiple matches. Combined with the position information positioning technology, it further ensures the accurate correspondence between the field key-value pair and the actual content in the image. Finally, the semantic information and position information are integrated through the machine learning model to accurately screen the extraction results, effectively solving the mismatch and multiple matching problems in complex scenarios, and improving the reliability and practicality of the overall field extraction.

[0189] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0190] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0191] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A field extraction method, characterized in that: include: Acquire a document image to be processed, perform character recognition on the document image to be processed, and obtain a plurality of document fields; Matching a number of the document fields to obtain document field key-value pairs; Determine the position of the document field key-value pair in the document image to be processed, and obtain the position information of the document field key-value pair; Constructing an array of candidate extracted values ​​based on the position information of the document field key-value pairs; The document image to be processed and the candidate extraction value array are input into a pre-trained field extraction judgment model, and the field extraction result of the document image to be processed is output.

2. The field extraction method according to claim 1, characterized in that: The step of matching a plurality of the document fields to obtain document field key-value pairs specifically includes: Identify the field type of each of the document fields, wherein the field type includes a key field and a value field; Obtaining the key value matching rule corresponding to the key class field from a preset key value matching rule engine; Based on the key-value matching rule, the key-type fields are matched one by one with each of the value-type fields to obtain a field key-value matching result; According to the field key-value matching result, the key-type fields and value-type fields that match each other are obtained to obtain the document field key-value pairs.

3. The field extraction method according to claim 2, characterized in that: The step of determining the position of the document field key-value pair in the document image to be processed and obtaining the position information of the document field key-value pair specifically includes: Constructing a plane coordinate system on the plane where the document image to be processed is located; Identify the position coordinates of the key field in the plane coordinate system, and identify the position coordinates of the value field in the plane coordinate system; The position coordinates of the key field and the position coordinates of the value field are combined to obtain the position information of the document field key-value pair.

4. The field extraction method according to claim 3, characterized in that: The step of constructing a candidate extraction value array based on the position information of the document field key-value pairs specifically includes: Calculate the field key value distance based on the position coordinates of the key field and the position coordinates of the value field; Importing the field key value distance into a preset initial array to obtain the candidate extraction value array; The field key value distance is calculated based on the following formula: Where L is the field key value distance, the position coordinates of the key field are (x1, y1), and the position coordinates of the value field are (x2, y2).

5. The field extraction method according to claim 1, characterized in that: The field extraction determination model is a determination model obtained by pre-training a large language model. The step of inputting the document image to be processed and the candidate extraction value array into the pre-trained field extraction determination model and outputting the field extraction result of the document image to be processed specifically includes: Acquire a first input template and a second input template prepared in advance, wherein the first input template is an input template used to indicate outputting an optimal extraction result, and the second input template is an input template used to indicate outputting a sorting of the extraction results; Filling the document image to be processed and the candidate extraction value array into the first input template to obtain first input information; Inputting the first input information into the field extraction determination model, and outputting a first field extraction result; Filling the document image to be processed and the candidate extraction value array into the second input template to obtain second input information; Inputting the second input information into the field extraction determination model, and outputting a second field extraction result; The field extraction result of the document image to be processed is determined according to the first field extraction result and the second field extraction result.

6. The field extraction method according to claim 5, characterized in that: The second field extraction result is an extraction result sorting sequence, and the step of determining the field extraction result of the to-be-processed document image according to the first field extraction result and the second field extraction result specifically includes: Determine a first sequence position in the sorted sequence of the extraction result, and obtain a document field key-value pair in the first sequence position; Compare the document field key-value pairs in the first field extraction result with the document field key-value pairs in the first sequence position; According to the document field key value comparison result, the field extraction result of the document image to be processed is determined.

7. The field extraction method according to claim 6, characterized in that: The step of determining the field extraction result of the document image to be processed according to the document field key value comparison result specifically includes: When the document field key-value pair in the first field extraction result is the same as the document field key-value pair in the first sequence position, the document field key-value pair in the first field extraction result or the document field key-value pair in the first sequence position is used as the field extraction result of the document image to be processed; When the document field key-value pair in the first field extraction result is different from the document field key-value pair in the first sequence position, calculating the confidence of the document field key-value pair in the first field extraction result to obtain a first confidence, and calculating the confidence of the document field key-value pair in the first sequence position to obtain a second confidence; comparing the first confidence level and the second confidence level; When the first confidence level is greater than the second confidence level, taking the document field key-value pair in the first field extraction result as the field extraction result of the document image to be processed; When the first confidence level is less than the second confidence level, the document field key-value pairs in the first sequence position are used as field extraction results of the document image to be processed.

8. A field extraction device, characterized in that: include: A character recognition module is used to obtain a document image to be processed, perform character recognition on the document image to be processed, and obtain a plurality of document fields; A field matching module, used to match a number of the document fields to obtain document field key-value pairs; A position identification module, used to determine the position of the document field key-value pair in the document image to be processed, and obtain the position information of the document field key-value pair; A candidate array module, used to construct a candidate extraction value array based on the position information of the document field key-value pairs; The field extraction module is used to input the document image to be processed and the candidate extraction value array into a pre-trained field extraction judgment model, and output the field extraction result of the document image to be processed.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the field extraction method according to any one of claims 1 to 7 when executing the computer-readable instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the field extraction method according to any one of claims 1 to 7 are implemented.