Method and device for extracting loan evidence document information, equipment and medium

By performing document preprocessing, key information extraction and entity relationship identification on loan evidence documents, the problems of inefficiency and accuracy of manual processing in the prior art are solved, automated extraction and verification are achieved, and data accuracy and consistency are improved.

CN119538920APending Publication Date: 2025-02-28SHENZHEN HAIGUI NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411637519.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the prior art, the processing of lending evidence documents relies on manual analysis and entry, resulting in inefficiency and error-prone.

Method used

By obtaining loan evidence documents, document preprocessing such as optical character recognition and text normalization is performed, key information extraction, entity relationship recognition and logical consistency verification are performed, and finally the verification data is stored in the specified database.

Benefits of technology

It realizes the automatic extraction and verification of lending evidence document information, significantly improves processing efficiency, reduces human errors, and ensures the accuracy and consistency of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119538920A_ABST
    Figure CN119538920A_ABST
Patent Text Reader

Abstract

The invention provides a loan evidence document information extraction method and device, equipment and a medium, and relates to the technical field of information extraction, and the method comprises the steps: obtaining a loan evidence document, and carrying out the optical character recognition processing and text normalization and word segmentation processing of the loan evidence document; carrying out key information extraction on the document information after document preprocessing to obtain debit and credit evidence key information; wherein the debit and credit evidence key information comprises information for proving a debit and credit relationship and a debit and credit condition; performing entity relationship identification on the debit and credit evidence key information to obtain an entity identification relationship, and extracting specified terms and obligations in the debit and credit contract based on the debit and credit evidence key information; and performing logic consistency verification on the contract terms and the extracted debit and credit evidence key information, and storing the verified data to a specified database. The information extraction efficiency of the loan evidence document is improved, the error rate of information extraction is reduced, and the method can be suitable for accurate extraction of the complex loan relationship.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of information extraction, and in particular to a method, device, equipment and medium for extracting loan evidence document information. Background Art

[0002] The existing loan evidence document processing method mainly relies on manual analysis and entry of document content. Usually, paper loan documents are scanned into electronic format and converted into text content using OCR technology. Then, staff manually search for key information such as borrowers, lenders, loan amounts, interest rates, etc., and manually enter the data into the system item by item based on the extracted key information to form structured data. However, this method is often inefficient when dealing with loan evidence documents with large amounts of data, and is prone to errors and inaccuracies. Summary of the invention

[0003] The purpose of this application is to provide a method, device, equipment and medium for extracting loan evidence document information to alleviate the above-mentioned technical problems existing in the prior art.

[0004] In a first aspect, the present invention provides a method for extracting loan evidence document information, the method comprising:

[0005] Obtaining loan evidence documents and performing document preprocessing on the loan evidence documents; wherein the document preprocessing includes optical character recognition processing and text normalization and word segmentation processing;

[0006] Extract key information from the document information after document preprocessing to obtain key information of loan evidence; wherein the key information of loan evidence includes information used to prove the loan relationship and loan situation;

[0007] Perform entity relationship recognition on the key information of loan evidence to obtain entity recognition relationship, and extract the specified terms and obligations in the loan contract based on the key information of loan evidence;

[0008] Perform logical consistency check on contract terms and key information of extracted loan evidence, and store the verified data in the designated database.

[0009] In an optional implementation, key information is extracted from the document information after the document preprocessing to obtain key information of the loan evidence, including:

[0010] Based on template recognition and customized processing, the document information after document preprocessing is subjected to feature recognition and classification processing of document type and content to obtain the loan document type;

[0011] Based on the loan document type and the extraction and recognition rules or extraction and recognition models corresponding to the loan document type, the loan entity identification is performed on the loan document type to obtain the key information of the loan evidence; wherein the loan evidence information at least includes the loan entity information, the loan amount, the loan interest rate, the loan date, and the loan contract terms entity.

[0012] In an optional implementation, the document information after document preprocessing is subjected to feature recognition and classification processing of document type and content based on template recognition and customization processing to obtain loan document types, including:

[0013] Pre-establish a loan information template library;

[0014] Using a feature matching algorithm to compare with predefined templates in a loan information template library, the loan document is classified into the first type according to the matched image features;

[0015] A pre-trained loan text classification model is used to perform a second type classification on different types of loan documents to obtain loan document types; wherein the pre-trained loan text classification model is obtained by training the loan text classification model using supervised learning and annotated data sets.

[0016] In an optional embodiment, the method further comprises:

[0017] In response to a template adding request initiated by a user, templates are added and updated to the loan information template library.

[0018] In an optional implementation, based on the loan document type and the extraction and recognition rule or extraction and recognition model corresponding to the loan document type, loan entity recognition is performed on the loan document type to obtain key information of the loan evidence, including:

[0019] Label the lending entity and lending samples. The lending entity at least includes the borrower, lender, loan amount, repayment date, and lending interest rate;

[0020] The pre-selected machine learning model is trained based on the labeled loan samples until the training parameters reach the preset parameter threshold, thereby obtaining the target entity recognition models corresponding to the loan document types;

[0021] The loan entity recognition of the loan document type is performed through the target entity recognition model corresponding to the loan document type and the extraction recognition rules to obtain the key information of the loan evidence.

[0022] In an optional embodiment, the method further comprises:

[0023] After the target entity recognition model performs loan entity recognition, regular expressions are used to perform supplementary matching of key information of loan evidence.

[0024] In an optional embodiment, the method further comprises:

[0025] Based on context understanding, loan entity recognition is performed on loan document types, and ambiguity resolution is performed on key information of loan evidence.

[0026] In a second aspect, the present invention provides a device for extracting loan evidence document information, the device comprising:

[0027] Obtaining loan evidence documents and performing document preprocessing on the loan evidence documents; wherein the document preprocessing includes optical character recognition processing and text normalization and word segmentation processing;

[0028] Extract key information from the document information after document preprocessing to obtain key information of loan evidence; wherein the key information of loan evidence includes information used to prove the loan relationship and loan situation;

[0029] Perform entity relationship recognition on the key information of loan evidence to obtain entity recognition relationship, and extract the specified terms and obligations in the loan contract based on the key information of loan evidence;

[0030] Perform logical consistency check on contract terms and key information of extracted loan evidence, and store the verified data in the designated database.

[0031] In a third aspect, the present invention provides an electronic device including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method for extracting loan evidence document information of any of the aforementioned implementations.

[0032] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method for extracting loan evidence document information of any one of the aforementioned implementations.

[0033] The beneficial effects of the method, device, equipment and medium for extracting loan evidence document information provided by this application are as follows:

[0034] By automating the processing of key information in loan documents, the number of steps involving manual involvement is greatly reduced, thereby significantly improving the overall processing efficiency; using natural language processing technology to automatically identify and verify key information avoids human errors in the manual extraction and entry process and improves data accuracy; customized entity recognition and relationship extraction technology ensures the consistency of key information and avoids data inconsistencies caused by different subjective judgments; through entity relationship extraction technology, the complex relationship between borrowers, lenders, and guarantors is accurately identified to ensure that the obligations and rights of all parties involved in the contract are correctly reflected. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0036] Figure 1 A flowchart of a method for extracting loan evidence document information provided in an embodiment of the present application;

[0037] Figure 2 A flowchart of a specific method for extracting loan evidence document information provided in an embodiment of the present application;

[0038] Figure 3 A structural diagram of a device for extracting loan evidence document information provided in an embodiment of the present application;

[0039] Figure 4 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0041] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0042] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0043] This application embodiment provides a method for extracting loan evidence document information. Figure 1 As shown, the method mainly includes the following steps:

[0044] Step S110, obtaining a loan evidence document, and performing document preprocessing on the loan evidence document; wherein the document preprocessing includes optical character recognition processing and text normalization and word segmentation processing.

[0045] The above-mentioned loan evidence documents may include various types of loan evidence documents such as loan contracts, loan receipts, etc. In one embodiment, the loan evidence documents may be in paper form or in electronic format.

[0046] The optical character recognition processing in the above document preprocessing is for paper documents or scanned copies. First, optical character recognition (OCR) technology is used to convert them into a processable text format. All text content of the document is extracted through OCR processing for subsequent processing.

[0047] The above-mentioned text normalization and word segmentation processing is used to perform normalization operations on the text extracted by OCR, such as character conversion, word segmentation, and stop word removal, so as to facilitate subsequent key information extraction.

[0048] Step S120, extracting key information from the document information after the document preprocessing to obtain key information of loan evidence; wherein the key information of loan evidence includes information used to prove the loan relationship and loan situation.

[0049] The key information of the above-mentioned loan evidence may include information such as the borrower, lender, guarantor, loan amount, repayment terms, interest information, etc.

[0050] In one embodiment, key information extraction may include template recognition and customization processing and named entity recognition customization processing. Template recognition and customization processing is used to perform template matching for common loan document types, so as to facilitate rapid location and extraction of relevant information; named entity recognition customization processing is used to use a customized named entity recognition (NER) model to identify specific entities, such as borrowers, lenders, loan amounts, etc.

[0051] The extraction of the above key information includes borrowers, lenders, loan amounts, etc. The extracted information comes from the combination of template matching and named entity recognition, thereby ensuring the accuracy of information extraction.

[0052] Step S130, performing entity relationship recognition on the key information of the loan evidence to obtain the entity recognition relationship, and extracting the specified terms and obligations in the loan contract based on the key information of the loan evidence.

[0053] In one embodiment, entity relationship identification is used to identify the relationships between different entities such as borrowers, lenders, and guarantors for structured storage in the system; extracting specified terms and obligations in a loan contract may include extracting specific terms and obligations in a loan contract, such as repayment terms, interest information, etc.

[0054] In an optional implementation, data may be filled into corresponding fields of a management system based on the extracted key information and the identified relationships to form structured data.

[0055] Step S140, perform a logical consistency check on the contract terms and the extracted key information of the loan evidence, and store the data that passes the check in a designated database.

[0056] In one embodiment, a logical consistency check is performed on the contract terms and the key information of the extracted loan evidence to ensure that there are no contradictions between the various information in the contract, such as whether the loan amount and the repayment plan are consistent. By performing a comprehensive check on the data filled into the system, its accuracy and validity are ensured to prevent erroneous data from entering the system.

[0057] All the above verified data will be stored and used in the management system for subsequent query, analysis and other business operations.

[0058] For ease of understanding, the specific implementation means of the method for extracting loan evidence document information provided in the embodiment of the present application are described in detail below.

[0059] In one implementation, the above-mentioned key information extraction of the document information after the document preprocessing to obtain the key information of the loan evidence may include the following steps 1 and 2 during the specific implementation:

[0060] Step 1: Based on template recognition and customized processing, the document information after document preprocessing is subjected to feature recognition and classification processing on the document type and content to obtain the loan document type.

[0061] In a specific embodiment, the following steps 1.1 to 1.3 may be further included:

[0062] Step 1.1, pre-establish a loan information template library;

[0063] Step 1.2, using a feature matching algorithm to compare with the predefined templates in the loan information template library, and classifying the loan document into the first type according to the matched image features;

[0064] Step 1.3, using a pre-trained loan text classification model to perform a second type classification on different types of loan documents to obtain loan document types; wherein the pre-trained loan text classification model is obtained by training the loan text classification model using supervised learning and annotated data sets.

[0065] Optionally, in order to improve the coverage of the loan information template library and the accuracy of template recognition, the loan information template library can be updated in response to a template addition request initiated by a user. This method can continuously update and enrich the loan information template library during use, so that various emerging loan templates can be recognized in a timely and accurate manner.

[0066] Step 2: Based on the loan document type and the extraction and recognition rules or extraction and recognition models corresponding to the loan document type, the loan entity is identified on the loan document type to obtain key information of loan evidence; wherein the loan evidence information at least includes loan entity information, loan amount, loan interest rate, loan date, and loan contract terms entity.

[0067] In a specific implementation, the following steps 2.1 to 2.3 may be included:

[0068] Step 2.1, label the lending entity and the lending sample. The lending entity at least includes the borrower, lender, loan amount, repayment date, and lending interest rate;

[0069] Step 2.2, training the pre-selected machine learning model based on the labeled loan samples until the training parameters reach the preset parameter threshold, and obtaining the target entity recognition model corresponding to the loan document types;

[0070] Step 2.3, performing loan entity recognition on the loan document type through the target entity recognition model and extraction recognition rules corresponding to the loan document type to obtain key information of the loan evidence.

[0071] Furthermore, in order to improve the accuracy of key information extraction and extract key information as completely as possible, regular expressions can be used to supplement the key information of loan evidence after the target entity recognition model performs loan entity recognition. In practical applications, regular expressions can be used to match formatted information such as amount (e.g., \d+\.\d{2}) and date (e.g., \d{4}-\d{2}-\d{2}) based on the trained model to further improve the accuracy of extraction.

[0072] In addition, in an optional implementation, in order to accurately handle the ambiguity of certain words in the loan contract (for example, the same name may appear as both a borrower and a guarantor), the loan document type can be identified based on contextual understanding, and the key information of the loan evidence can be resolved to resolve the ambiguity. Through contextual understanding, it is ensured that the corresponding entities are correctly classified in different scenarios.

[0073] Figure 2 A flowchart of a specific method for extracting loan evidence document information is shown. In this process, each part is executed as follows:

[0074] Loan evidence documents: This is the input part of the system, including loan contracts, loan receipts and other types of loan evidence documents. The documents can be in paper or electronic format.

[0075] Document preprocessing module: responsible for preprocessing the input documents. This module contains the following two sub-steps:

[0076] 1) OCR recognition: For paper documents or scanned copies, optical character recognition (OCR) technology is first needed to convert them into a processable text format.

[0077] 2) Text normalization and word segmentation: Normalize the text extracted by OCR, including character conversion, word segmentation, and stop word removal, so as to facilitate effective information extraction. C: E Extract text content. The OCR module extracts all the text content of the document for use by subsequent processing modules.

[0078] Key information extraction module: further processes the preprocessed text to extract key information from it. This module is divided into the following parts:

[0079] 1) Template recognition and customized processing (G): Template matching is performed for common loan document types to facilitate rapid location and extraction of relevant information.

[0080] 2) Customized Named Entity Recognition (NER) (H): Use customized NER models to identify specific entities, such as borrowers, lenders, loan amounts, etc.

[0081] Key information extraction: Extraction of key information includes borrowers, lenders, loan amounts, etc. This information comes from a combination of template matching and named entity recognition to ensure accuracy.

[0082] Relationship extraction and data filling module: This module is mainly responsible for extracting the relationship between entities from the document and filling the information into the management system. Specifically includes:

[0083] 1) Entity relationship identification: Identify the relationships between different entities such as borrowers, lenders, and guarantors so that they can be stored in a structured manner in the system.

[0084] 2) Identification of contract terms and obligations: Extract specific terms and obligations in the contract, such as repayment terms, interest information, etc.

[0085] Fill data into the management system: Based on the extracted key information and identified relationships, fill the data into the corresponding fields of the management system to form structured data.

[0086] Logical consistency check: Perform logical checks on the contract terms and extracted data to ensure that there are no contradictions between the various information in the contract, such as whether the loan amount and repayment plan are consistent.

[0087] Data verification: Further comprehensive checks are performed on the data filled into the system to ensure its accuracy and validity and to prevent erroneous data from entering the system.

[0088] Data storage and management: All verified data will be stored and used in the management system for subsequent query, analysis and other business operations.

[0089] Furthermore, the technical implementation means of the two parts included in the above-mentioned key information extraction (ie, template recognition and customized processing, and lending entity identification) are described in detail below.

[0090] 1. Template recognition and customized processing

[0091] In the automated processing of loan evidence documents, the role of the model recognition and customization processing module is to perform feature recognition and classification processing on different types of documents and content to achieve more accurate key information extraction. This module combines predefined templates with adaptive models to support the classification and information extraction of documents such as loan contracts and loan receipts, and enhances the ability to process document diversity.

[0092] 1. Design

[0093] 1.1 Template recognition and matching

[0094] Template library establishment: Establish a set of predefined template libraries for common document types such as loan contracts and receipts, and store the characteristic format and information location of each type of document.

[0095] Key content feature extraction: Preliminary classification of document types through image features (such as title, table structure, keywords), and comparison with predefined templates in the template library using feature matching algorithms.

[0096] Dynamic template management: supports the expansion and modification of the template library, making it easier for users to add new document type templates based on business needs.

[0097] 1.2 Machine Learning Model Identification

[0098] Classification model training:

[0099] Use machine learning models (such as text classifiers) to automatically classify different types of documents, such as loan contracts, guarantee agreements, etc.

[0100] Use supervised learning methods to train classification models through labeled data sets to improve the recognition accuracy of various types of loan documents.

[0101] Content feature extraction: After determining the type of document based on the classification results, specific rules or adaptive models are used to identify and extract key parts of the text content for that document type.

[0102] 1.3 Customized processing

[0103] Customized processing for specific areas: Customize the specific information in the identified loan contracts (such as contract terms, amount, repayment plan) to ensure that this key information can be accurately extracted through rules or models.

[0104] Hybrid approach that integrates rule engines and models:

[0105] Combine rule-based specific information positioning (such as amounts within a table, specific keywords) with model-based natural language understanding to enhance recognition accuracy.

[0106] Use natural language parsing tools to deeply parse long texts to capture the context of key information.

[0107] 1.4 Adaptive Learning and Improvement

[0108] Model adaptive learning: Collect document content annotated or modified by users, regularly update and fine-tune the model, and improve the accuracy of recognition and customized processing.

[0109] User feedback mechanism: allows users to manually correct the results of model recognition and incorporate these feedback into subsequent model training to achieve continuous improvement.

[0110] 2. Technical Implementation

[0111] 2.1 Technical Implementation of Template Recognition and Matching

[0112] Feature Engineering and Matching:

[0113] Through image processing libraries such as OpenCV, feature extraction is performed on the document layout features (such as tables and title positions) to assist in classification.

[0114] String matching and TF-IDF algorithm are used to extract key terms in the document, and regular expressions are used to identify important content in the text (such as contract number, party name, etc.).

[0115] Storage and management of template library:

[0116] Use a database (such as MongoDB or SQLite) to store the format and feature information of the document template to facilitate fast query and dynamic expansion.

[0117] Provides a template management interface that supports adding, modifying, and deleting operations, giving the system flexible adaptability.

[0118] 2.2 Technical Implementation of Machine Learning Model Recognition

[0119] Document Classification Model:

[0120] Use a text classification model based on BERT or TF-IDF+SVM to classify documents based on their text content.

[0121] Dataset preparation: Label a large number of different types of loan evidence documents to train the classification model and ensure its accurate recognition of various document types.

[0122] Model implementation:

[0123] fromsklearn.feature_extraction.textimportTfidfVectorizer

[0124] fromsklearn.svmimportSVC

[0125] fromsklearn.pipelineimportPipeline

[0126] #Use TF-IDF and SVM for document classification

[0127] pipeline=Pipeline([

[0128] ('tfidf',TfidfVectorizer()),

[0129] ('clf',SVC(kernel='linear')) ])

[0131] pipeline.fit(train_texts,train_labels)#training model

[0132] Feature extraction based on deep learning:

[0133] For classified documents, use Bi-LSTM or BERT models to further extract features from the text to identify key information such as loan amount and date.

[0134] 2.3 Technical Implementation of Customized Processing

[0135] Rules engine implementation:

[0136] Use open source rule engines (such as Drools) to define rules and extract specific terms information in loan contracts by matching specific keywords and contexts.

[0137] Example of rule:

[0138] rule"ExtractLoanAmount"

[0139] when

[0140] Document(contentmatches".*Loan amount.*(\d+).*")

[0141] then

[0142] / / Extract the amount and store it

[0143] end

[0144] Combining models with rules:

[0145] In a specific recognition step, a machine learning model is first used to extract candidate entities, and then secondary verification and calibration are performed through rules to improve the reliability of the results.

[0146] For example, use a deep learning model to identify the “repayment date” and then use a regular expression to verify whether the format meets the standard (such as yyyy-MM-dd).

[0147] 3. Technical difficulties and solutions

[0148] 3.1 Unified processing of different document formats

[0149] Difficulty: Loan contracts and receipts may come in various formats, and the quality of OCR may vary.

[0150] Solution: Use image quality scoring to screen OCR results and filter out low-quality images, then combine a hybrid approach of template recognition and deep learning models to adapt to different formats.

[0151] 3.2 Dynamic extension of custom templates

[0152] Difficulty: New loan contract types may require manual addition of new templates.

[0153] Solution: Provide a friendly user interface (UI) to support dynamic addition and configuration of templates, and store template information in a database to facilitate expansion and version control.

[0154] 3.3 Combination of rules and models

[0155] Difficulty: Pure rule or pure model methods may perform poorly in some cases.

[0156] Solution: By combining rules with deep learning models, we can improve accuracy while ensuring coverage and flexibility of key content.

[0157] 2. Loan Entity Recognition (also known as Named Entity Recognition NER)

[0158] 1. Module Function

[0159] The main function of this module is to automatically and accurately extract key information from loan contracts, reduce manual participation, improve information processing efficiency, ensure data quality, and provide a reliable foundation for subsequent data filling, logical verification and decision support.

[0160] Lending Entity Identification:

[0161] Identify and extract key entities in documents, including borrowers, lenders, guarantors, etc.

[0162] Identify relevant subject information based on the context in the contract to ensure accurate classification of different roles.

[0163] Amount and interest rate identification:

[0164] Identify the financial data involved in the contract, such as the loan amount, repayment amount, interest rate, etc.

[0165] Use regular expressions to further verify the amount and percentage format to ensure data standardization.

[0166] Date recognition:

[0167] Automatically extract important time information such as borrowing date, repayment date, and loan release date.

[0168] Supports recognition and standardized conversion of multiple date formats so that they can be represented uniformly in the system.

[0169] Entity identification of contract terms:

[0170] Identify contract content related to repayment plans, guarantee terms, interest rate terms, etc., and extract descriptive information of key terms.

[0171] Use template matching and natural language understanding to locate the start and end points of common clauses in contracts.

[0172] Context-based ambiguity resolution:

[0173] Deal with the ambiguity of certain words in the contract (for example, the same name may appear as both a borrower and a guarantor).

[0174] Through context understanding, ensure that the corresponding entities are correctly classified in different scenarios.

[0175] Enhanced recognition combining regularization and deep learning:

[0176] Use domain-specific regular expressions, such as matching amounts and dates, combined with deep learning NER models to enhance the ability to extract structured data.

[0177] High-precision matching is performed on fields in specific formats (such as ID card number, bank account number, etc.).

[0178] Identification and correction of typos:

[0179] For possible typos or character recognition errors in the text content extracted by OCR, contextual relationships and dictionaries are used to automatically correct them to improve the extraction accuracy.

[0180] Add text normalization processing to ensure consistency in contract terms.

[0181] Identify the relationship between entities, such as the loan relationship between a borrower and a lender, the guarantee relationship between a borrower and a guarantor, etc.

[0182] Ensure that the relationship information between all key entities can be presented in a structured form in the system.

[0183] 2. Technical Implementation

[0184] 2.1 Data preparation and annotation tools:

[0185] Use open source annotation tools such as Label Studio or Prodigy to annotate data and ensure that entity boundaries and types are accurate.

[0186] The marked entities include: borrower (PERSON), lender (PERSON), loan amount (MONEY), repayment date (DATE), interest rate (PERCENTAGE), etc.

[0187] 2.2 Model Training

[0188] Use Python’s machine learning library (such as PyTorch or TensorFlow) and the Transformers library to implement fine-tuning of the BERT model.

[0189] Model fine-tuning

[0190] from transformers import BertForTokenClassification,BertTokenizer,Trainer,TrainingArguments

[0191] #Load the BERT pre-trained model and word segmenter

[0192] model_name="bert-base-uncased"

[0193] model=BertForTokenClassification.from_pretrained(model_name,num_labels=num_entity_types)

[0194] tokenizer=BertTokenizer.from_pretrained(model_name)

[0195] #Define training parameters

[0196] training_args=TrainingArguments(

[0197] output_dir='. / results',

[0198] num_train_epochs=3,

[0199] per_device_train_batch_size=16,

[0200] logging_dir = '. / logs',

[0201] learning_rate=5e-5, )

[0203] #Train model

[0204] trainer=Trainer(

[0205] model=model,

[0206] args = training_args,

[0207] train_dataset=train_dataset,

[0208] eval_dataset=eval_dataset, )

[0210] trainer.train()

[0211] Combined use of regular expressions: On top of the trained model, regular expressions are used to match formatting information such as amounts (for example, \d+\.\d{2}) and dates (for example, \d{4}-\d{2}-\d{2}) to further improve the accuracy of extraction.

[0212] Processing of non-standard text: The content format in the loan contract may be inconsistent, such as handwritten amounts, different date formats, etc. In order to solve this problem, the text will be normalized after OCR (such as converting the amount standard to a unified format and the date to ISO format).

[0213] Multi-entity relationship identification: In loan contracts, there are complex relationships between different entities (such as borrowers and guarantors). By using multi-label classification and relationship extraction models, combined with rule engines, the associations between entities can be effectively identified.

[0214] Domain characteristics of data annotation: In view of the domain characteristics of financial loan documents, annotation personnel are required to have a deep understanding of the contract terms to avoid incorrect annotations. To this end, domain experts are arranged to review during the annotation process to ensure data quality.

[0215] In addition, in practical applications, machine learning classification models can be used instead of template matching to achieve automatic classification of different types of loan documents, thereby improving adaptability and generalization capabilities; in addition to rule-based relationship extraction, deep learning bidirectional LSTM networks or graph neural networks (GNNs) can also be used for relationship identification, further improving the ability to understand complex contract terms.

[0216] The beneficial effects of the embodiments of the present application are as follows:

[0217] Automatic extraction of key information based on natural language: Extract key information such as borrowers, lenders, loan amounts, etc. from loan evidence documents through a custom NER model.

[0218] Text processing method combining OCR and content features: Use OCR combined with content feature analysis to locate key information in the text.

[0219] Logical consistency check and relationship extraction: Logical check of the terms in the loan contract and the relationships between the parties involved to ensure data consistency and the legality of the contract.

[0220] Customized template matching and diversified format recognition: Design customized templates and regular expressions for loan documents to ensure accurate extraction of information in various formats.

[0221] In actual applications, it was found that by adopting the above implementation method, the system can achieve more than 95% accuracy in extracting key information for standardized loan contract documents; for loan receipts with complex formats, the system achieved more than 90% data verification consistency through template recognition and regular expression matching.

[0222] Based on the above method embodiment, the present application embodiment also provides a device for extracting loan evidence document information, see Figure 3 As shown, the device mainly includes the following parts:

[0223] The document preprocessing module 310 is used to obtain the loan evidence document and perform document preprocessing on the loan evidence document; wherein the document preprocessing includes optical character recognition processing and text normalization and word segmentation processing;

[0224] The key information extraction module 320 is used to extract key information from the document information after the document preprocessing to obtain the key information of the loan evidence; wherein the key information of the loan evidence includes information used to prove the loan relationship and the loan situation;

[0225] The relationship identification and clause extraction module 330 is used to identify the entity relationship of the loan evidence key information, obtain the entity identification relationship, and extract the specified terms and obligations in the loan contract based on the loan evidence key information;

[0226] The data verification module 340 is used to perform a logical consistency check on the contract terms and the extracted key information of the loan evidence, and store the verified data in a designated database.

[0227] In a feasible implementation manner, the key information extraction module 320 is used to:

[0228] Based on template recognition and customized processing, the document information after document preprocessing is subjected to feature recognition and classification processing of document type and content to obtain the loan document type;

[0229] Based on the loan document type and the extraction and recognition rules or extraction and recognition models corresponding to the loan document type, the loan entity identification is performed on the loan document type to obtain the key information of the loan evidence; wherein the loan evidence information at least includes the loan entity information, the loan amount, the loan interest rate, the loan date, and the loan contract terms entity.

[0230] In a feasible implementation manner, the key information extraction module 320 is used to:

[0231] Pre-establish a loan information template library;

[0232] Using a feature matching algorithm to compare with predefined templates in a loan information template library, the loan document is classified into the first type according to the matched image features;

[0233] A pre-trained loan text classification model is used to perform a second type classification on different types of loan documents to obtain loan document types; wherein the pre-trained loan text classification model is obtained by training the loan text classification model using supervised learning and annotated data sets.

[0234] In a feasible implementation manner, the above device further includes: a template adding module, which is used to:

[0235] In response to a template adding request initiated by a user, templates are added and updated to the loan information template library.

[0236] In a feasible implementation manner, the key information extraction module 320 is used to:

[0237] Label the lending entity and lending samples. The lending entity at least includes the borrower, lender, loan amount, repayment date, and lending interest rate;

[0238] The pre-selected machine learning model is trained based on the labeled loan samples until the training parameters reach the preset parameter threshold, thereby obtaining the target entity recognition models corresponding to the loan document types;

[0239] The loan entity recognition of the loan document type is performed through the target entity recognition model corresponding to the loan document type and the extraction recognition rules to obtain the key information of the loan evidence.

[0240] In a feasible implementation manner, the above device further includes: a supplementary matching module, configured to:

[0241] After the target entity recognition model performs loan entity recognition, regular expressions are used to perform supplementary matching of key information of loan evidence.

[0242] In a feasible implementation manner, the above-mentioned device further includes: an ambiguity resolution processing module, which is used to:

[0243] Based on context understanding, loan entity recognition is performed on loan document types, and ambiguity resolution is performed on key information of loan evidence.

[0244] The device for extracting loan evidence document information provided in the embodiment of the present application has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the device for extracting loan evidence document information, reference may be made to the corresponding contents in the aforementioned method embodiment for extracting loan evidence document information.

[0245] The present application also provides an electronic device, such as Figure 4 As shown, it is a schematic diagram of the structure of the electronic device, wherein the electronic device 100 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 any of the above-mentioned methods for extracting loan evidence document information.

[0246] 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 .

[0247] Among them, the memory 40 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 43 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 42 can 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 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0248] The processor 41 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 41. The above 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 gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor 41 reads the information in the memory and completes the steps of the method for extracting loan evidence document information in the aforementioned embodiment in combination with its hardware.

[0249] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned method for extracting loan evidence document information. The specific implementation can be found in the aforementioned method embodiment, which will not be repeated here.

[0250] The computer program product of the method, device, equipment and medium for extracting loan evidence document information provided in the embodiments of the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.

[0251] Unless otherwise specifically stated, the relative steps, numerical expressions and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present application.

[0252] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.

[0253] In the description of the present application, it should be noted that the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0254] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for extracting loan evidence document information, characterized in that: The method comprises: Obtaining a loan evidence document, and performing document preprocessing on the loan evidence document; wherein the document preprocessing includes optical character recognition processing and text normalization and word segmentation processing; Extract key information from the document information after document preprocessing to obtain key information of loan evidence; wherein the key information of loan evidence includes information used to prove the loan relationship and loan situation; Performing entity relationship recognition on the loan evidence key information to obtain entity recognition relationships, and extracting designated terms and obligations in the loan contract based on the loan evidence key information; Perform logical consistency check on contract terms and key information of extracted loan evidence, and store the verified data in the designated database.

2. The method for extracting loan evidence document information according to claim 1, characterized in that: Extract key information from the document information after document preprocessing to obtain key information of loan evidence, including: Based on template recognition and customized processing, the document information after document preprocessing is subjected to feature recognition and classification processing of document type and content to obtain the loan document type; Based on the loan document type and the extraction and recognition rules or extraction and recognition models corresponding to the loan document type, the loan entity identification is performed on the loan document type to obtain key information of loan evidence; wherein the loan evidence information at least includes loan entity information, loan amount, loan interest rate, loan date, and loan contract terms entity.

3. The method for extracting loan evidence document information according to claim 2, characterized in that: Based on template recognition and customized processing, the document information after document preprocessing is subjected to feature recognition and classification of document type and content to obtain loan document types, including: Pre-establish a loan information template library; Using a feature matching algorithm to compare with the predefined templates in the loan information template library, and classifying the loan document into a first type according to the matched image features; A second type classification is performed on different types of loan documents using a pre-trained loan text classification model to obtain a loan document type; wherein the pre-trained loan text classification model is obtained by training the loan text classification model using supervised learning and annotated data sets.

4. The method for extracting loan evidence document information according to claim 3, characterized in that: The method further comprises: In response to a template adding request initiated by a user, the loan information template library is updated with template additions.

5. The method for extracting loan evidence document information according to claim 2, characterized in that: Based on the loan document type and the extraction and recognition rule or extraction and recognition model corresponding to the loan document type, the loan entity identification is performed on the loan document type to obtain key information of the loan evidence, including: Labeling the lending entity and the lending sample, wherein the lending entity at least includes the borrower, the lender, the loan amount, the repayment date, and the lending interest rate; The pre-selected machine learning model is trained based on the labeled loan samples until the training parameters reach the preset parameter threshold, thereby obtaining the target entity recognition models corresponding to the loan document types; The loan entity recognition is performed on the loan document type by using the target entity recognition model corresponding to the loan document type and the extraction recognition rule to obtain the key information of the loan evidence.

6. The method for extracting loan evidence document information according to claim 5, characterized in that: The method further comprises: After the target entity recognition model performs loan entity recognition, regular expressions are used to perform supplementary matching of key information of loan evidence.

7. The method for extracting loan evidence document information according to claim 5, characterized in that: The method further comprises: Based on context understanding, loan entity recognition is performed on the loan document type, and ambiguity resolution is performed on the key information of the obtained loan evidence.

8. A device for extracting loan evidence document information, characterized in that: The device comprises: Obtaining a loan evidence document, and performing document preprocessing on the loan evidence document; wherein the document preprocessing includes optical character recognition processing and text normalization and word segmentation processing; Extract key information from the document information after document preprocessing to obtain key information of loan evidence; wherein the key information of loan evidence includes information used to prove the loan relationship and loan situation; Performing entity relationship recognition on the loan evidence key information to obtain entity recognition relationships, and extracting designated terms and obligations in the loan contract based on the loan evidence key information; Perform logical consistency check on contract terms and key information of extracted loan evidence, and store the verified data in the designated database.

9. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method for extracting loan evidence document information as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the method for extracting loan evidence document information as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Automobile repayment method and system, electronic equipment and storage medium

    CN120823067A