Document AI system based on deep learning

Through the document AI system based on deep learning, it solves the problems of low recognition accuracy and insufficient multi-lingual support of existing technologies in complex structure and multi-modal data processing, achieves efficient document information extraction and multi-language processing, and reduces processing costs and manual intervention.

CN118470730BActive Publication Date: 2024-09-27YOUDINGTE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410922217.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-09-27
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

Existing automated document processing systems have low recognition accuracy when processing complex structures and multi-modal data. They lack multi-lingual support, leading to information loss or misidentification, and manual verification is not efficient enough, increasing processing time and costs.

Method used

Adopt a document AI system based on deep learning, including data preprocessing module, OCR recognition module, table detection module, document classification module, field information extraction module and manual verification module, using deep learning network for text recognition and table detection, combined with BERT The model performs document classification, supports multi-language processing, and optimizes multi-language models through federated learning.

Benefits of technology

It improves document processing speed, reduces manual intervention, can process complex layouts and poor-quality images more accurately, recognizes documents in multiple languages, reduces misrecognition and information omission, adapts to global business needs, and reduces processing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470730B
    Figure CN118470730B
Patent Text Reader

Abstract

The present invention relates to the technical field of data processing, and discloses a document AI system based on deep learning. The document AI system based on deep learning includes: a data preprocessing module, an OCR recognition module, a table detection module, a document classification module, a field information extraction module, and a manual verification module; the data preprocessing module is used to perform format conversion and image rotation angle detection on the trade document PDF or picture file uploaded by the user, and generate corresponding image data; the OCR recognition module is used to recognize and extract the text content in the image data through a preset deep learning network, and generate a corresponding document image; the system of the present invention can adapt to various types of trade document files, such as PDF or picture formats, and shows good flexibility and compatibility. The system can recognize and process complex table structures, support in-depth understanding and analysis of table contents, and is suitable for a variety of business scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a document AI system based on deep learning. Background Art

[0002] In the context of the digital age, document automation technology has become an important research field in information management systems. Different from traditional document processing methods, modern document intelligence (Document AI) systems automatically process document information by utilizing artificial intelligence technology, especially deep learning models. This includes but is not limited to using optical character recognition (OCR) technology to extract text, using natural language processing (NLP) for semantic understanding, and parsing complex structures such as tables and images within documents. The core goal of Document AI technology is to improve the efficiency and accuracy of data processing while reducing the manual burden.

[0003] In the prior art, document automatic processing systems generally use OCR technology combined with template matching or rule engines to parse documents in specific formats. This technology has a certain effect when processing standardized format documents, but it relies on predefined templates and rules. Therefore, when processing documents with complex structures, diverse formats or containing diverse elements, the recognition accuracy and adaptability are usually insufficient. In addition, the prior art often lacks effective multimodal data processing capabilities and support for multilingual documents.

[0004] The technical defects of the existing technology are that it has poor adaptability when processing diverse document structures, especially when there is no fixed template, the recognition accuracy drops significantly; when processing multimodal data, it lacks efficient integration and understanding capabilities, resulting in information loss or misrecognition; and its ability to process multilingual documents is limited and cannot meet global business needs. In addition, existing methods are usually not efficient enough in the manual verification and review stages, which increases processing time and costs. These limitations have become the main obstacles to the development of Document AI technology, limiting its effectiveness and popularity in complex practical application scenarios. Summary of the invention

[0005] The present invention provides a document AI system based on deep learning to solve the above-mentioned technical problems.

[0006] A first aspect of the present invention provides a document AI system based on deep learning, the document AI system based on deep learning comprising: a data preprocessing module, an OCR recognition module, a table detection module, a document classification module, a field information extraction module, and a manual verification module;

[0007] The data preprocessing module is used to perform format conversion and image rotation angle detection on the trade document PDF or picture file uploaded by the user, and generate corresponding image data;

[0008] The OCR recognition module is used to recognize and extract text content in image data through a preset deep learning network to generate a corresponding document image;

[0009] The table detection module is used to detect the table frame and border in the document image through a preset deep learning model, output structured information, and convert the structured information into text data; wherein the structured information at least includes the table frame and border, cell text content, table title, and the relationship between columns and rows in the table;

[0010] The document classification module is used to classify the text data through the trained BERT classification model to obtain a first text data set and a second text data set; identify the first text data set and output a structural component category label of a table in a document image, identify the second text data set and output a semantic category label of the table content in the document image; wherein the first text data set is the table structure information of the table in the document image; and the second text data set is the table content information of the table in the document image;

[0011] The field information extraction module is used to extract target field information from the document image based on the semantic category label, the structural component category label and the preset field information;

[0012] The manual verification module is used to verify and review the target field information extracted from the document image.

[0013] Optionally, in a first implementation of the first aspect of the present invention, the deep learning-based documentAI system further includes: a multi-language support module;

[0014] The multilingual support module is used to train a preset multilingual initial model based on the created multilingual data set to obtain a trained multilingual model, and extract information from multilingual documents based on the trained multilingual model.

[0015] Optionally, in a second implementation of the first aspect of the present invention, the training process of the multilingual model includes:

[0016] Receiving a multilingual database sent by a cloud server; wherein the multilingual database stores multilingual document data and corresponding tag information;

[0017] Acquire the multilingual document data of the user's history, and annotate the multilingual document data of the user's history based on the multilingual database to generate training samples;

[0018] Obtaining a multilingual initial model sent by a cloud server, and training the multilingual initial model based on the training sample to obtain a trained multilingual initial model;

[0019] Obtaining model parameters of the trained multilingual initial model; uploading the model parameters of the trained multilingual initial model to a cloud server; wherein the cloud server receives the model parameters sent by multiple terminals, and performs aggregation operation on all received model parameters based on a preset federated learning algorithm to generate aggregated model parameters;

[0020] Receive the aggregate model parameters returned by the cloud server, and update the aggregate model parameters to the multilingual initial model to obtain a trained multilingual model.

[0021] Optionally, in a third implementation of the first aspect of the present invention, the field information extraction module further includes: a field information encryption module, and the field information encryption model is used to encrypt the extracted target field information.

[0022] Optionally, in a fourth implementation of the first aspect of the present invention, the field information encryption module is specifically used to:

[0023] Perform field segmentation on the extracted target field information to obtain multiple sub-target fields;

[0024] Based on a preset character combination rule, characters at designated positions of a plurality of sub-target fields are combined to obtain an identification character combination; wherein the identification character combination is each component element of a table, and the component element at least includes a structural element of the table and a content element of the table;

[0025] Based on the identification character combination, a preset coding table is rearranged to obtain an arranged coding table;

[0026] Encode the extracted target field information based on the compiled coding table to obtain the corresponding coding value;

[0027] Based on a preset character selection rule, characters are selected from the code value, and the selected characters are combined in sequence to obtain an encrypted password;

[0028] The extracted target field information is encrypted based on the encryption password to obtain the encrypted target field information.

[0029] Optionally, in a fifth implementation of the first aspect of the present invention, the preset coding table is rearranged based on the identification character combination to obtain an arranged coding table:

[0030] Obtain a first character set corresponding to the content elements of the table in the identification character combination, and obtain a second character set corresponding to the structural elements of the table in the identification character combination; the first character set is multiple

[0031] uppercase English characters, the second character set is a plurality of numeric characters;

[0032] Obtain a preset coding table; wherein the preset coding table includes 32 serial numbers and 32 coding characters; the coding characters include digital coding characters and uppercase English letter coding characters;

[0033] Eliminate the coded characters in the preset coding table that are identical to the numeric characters in the second character set, leaving a plurality of spaces at the end of the coded characters;

[0034] Inserting a plurality of uppercase English characters of the first character set into a plurality of vacancies in sequence to fill all the vacancies, thereby obtaining an arranged encoding table.

[0035] Optionally, in a sixth implementation of the first aspect of the present invention, the BERT classification model includes an input layer, a first embedding layer, a second embedding layer, a fusion layer, an intermediate layer and a classification layer, and the training process of the BERT classification model includes:

[0036] Collecting text training data of a plurality of document images; wherein the text training data includes table structure information and table content information in the document images;

[0037] Inputting the text training data into the input layer for information extraction to obtain first text information and second text information;

[0038] Inputting the first text information into the first embedding layer for processing to obtain a table structure feature vector;

[0039] Inputting the second text information into the second embedding layer for processing to obtain a table content feature vector;

[0040] Inputting the table structure feature vector and the table content feature vector into the fusion layer for vector fusion to obtain a fused feature vector of the entire text;

[0041] Inputting the fused feature vector into the intermediate layer for extraction to obtain a high-dimensional feature representation;

[0042] The high-dimensional feature representation is input into the classification layer, combined with the pre-labeled semantic category information and the structural component category information of the table, and the loss function of the model is iterated until the loss function converges to obtain the trained BERT classification model.

[0043] A second aspect of the present invention provides a document AI method based on deep learning, and the document AI method based on deep learning includes:

[0044] Perform format conversion and image rotation angle detection on the trade document PDF or image files uploaded by the user to generate corresponding image data;

[0045] The text content in the image data is extracted through the preset deep learning network to generate the corresponding document image;

[0046] Detecting the table frame and border in the document image through a preset deep learning model, outputting structured information, and converting the structured information into text data; wherein the structured information includes at least the table frame and border, cell text content, table title, and the relationship between columns and rows in the table;

[0047] The text data is classified by the trained BERT classification model to obtain a first text data set and a second text data set; the first text data set is identified and a structural component category label of a table in a document image is output; the second text data set is identified and a semantic category label of the table content in the document image is output; wherein the first text data set is table structure information of a table in a document image; and the second text data set is table content information of a table in a document image;

[0048] Extracting target field information from the document image based on the semantic category label, the structural component category label and the preset field information;

[0049] Verify and review the target field information extracted from the document image.

[0050] A third aspect of the present invention provides a document AI device based on deep learning, comprising: a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor calls the instructions in the memory so that the document AI device based on deep learning executes the above-mentioned document AI method based on deep learning.

[0051] A fourth aspect of the present invention provides a computer-readable storage medium, which stores instructions that, when executed on a computer, enable the computer to execute the above-mentioned deep learning-based document AI method.

[0052] In the technical solution provided by the present invention, the beneficial effects are as follows: the document AI system based on deep learning described in the present invention includes: a data preprocessing module, an OCR recognition module, a table detection module, a document classification module, a field information extraction module, and a manual verification module; the data preprocessing module is used to perform format conversion and image rotation angle detection on the trade document PDF or picture file uploaded by the user to generate corresponding image data; the OCR recognition module is used to recognize and extract the text content in the image data through a preset deep learning network to generate a corresponding document image; the table detection module is used to detect the table frame and boundary in the document image through a preset deep learning model, output structured information, and convert the structured information into text data; the document classification module is used to classify the text data through the trained BERT classification model to obtain a first text data set and a second text data set; identify the first text data set and output the structural component category label of the table in the document image, identify the second text data set, and output the semantic category label of the table content in the document image; The field information extraction module is used to extract the target field information from the document image based on the semantic category label, the structural component category label and the preset field information; the manual verification module is used to verify and audit the target field information extracted from the document image. The data preprocessing module of the present invention automatically processes the files uploaded by the user, and the OCR recognition module efficiently extracts the text content, thereby greatly improving the document processing speed and reducing manual intervention. The use of deep learning networks for text recognition and table detection can more accurately process complex layouts and images of poor quality compared to traditional OCR technology. The table detection module not only identifies the table frame and boundaries, but also understands the cell text content and its logical relationship in the table, and outputs structured information that is easier to operate. The document classification module uses a pre-trained BERT model to intelligently identify the semantic categories in the document, making the field information extraction more targeted and accurate. The semantic category labels extracted by document classification provide precise guidance for field information extraction, thereby reducing the risk of misidentification and information omission. The manual verification module provides subsequent quality control for automated processing, ensuring that the information extracted from the document image is accurate. The design of the system enables it to potentially integrate multi-language processing functions to adapt to global document processing needs. The system can adapt to various types of trade documents, such as PDF or image formats, showing good flexibility and compatibility. The system can recognize and process complex table structures, support in-depth understanding and analysis of table contents, and is suitable for a variety of business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 Schematic diagram of an embodiment of a document AI system based on deep learning in an embodiment of the present invention;

[0054] Figure 2 Schematic diagram of another embodiment of the document AI method based on deep learning in an embodiment of the present invention. DETAILED DESCRIPTION

[0055] An embodiment of the present invention provides a document AI system based on deep learning. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way are interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0056] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the document AI system based on deep learning in an embodiment of the present invention includes:

[0057] The document AI system based on deep learning includes: a data preprocessing module, an OCR recognition module, a table detection module, a document classification module, a field information extraction module, and a manual verification module;

[0058] The data preprocessing module is used to perform format conversion and image rotation angle detection on the trade document PDF or picture file uploaded by the user, and generate corresponding image data;

[0059] The OCR recognition module is used to recognize and extract text content in image data through a preset deep learning network to generate a corresponding document image;

[0060] The table detection module is used to detect the table frame and border in the document image through a preset deep learning model, output structured information, and convert the structured information into text data; wherein the structured information at least includes the table frame and border, cell text content, table title, and the relationship between columns and rows in the table;

[0061] The document classification module is used to classify the text data through the trained BERT classification model to obtain a first text data set and a second text data set; identify the first text data set and output a structural component category label of a table in a document image, identify the second text data set and output a semantic category label of the table content in the document image; wherein the first text data set is the table structure information of the table in the document image; and the second text data set is the table content information of the table in the document image;

[0062] The field information extraction module is used to extract target field information from the document image based on the semantic category label, the structural component category label and the preset field information;

[0063] The manual verification module is used to verify and review the target field information extracted from the document image.

[0064] Specifically, the main modules of the deep learning-based Document AI system and their respective technical features can be detailed as follows:

[0065] Data preprocessing module:

[0066] This module is responsible for converting files uploaded by users (such as PDF or images) into a format that can be processed by the machine, such as converting PDF to image format. At the same time, this module will detect and correct the rotation angle of the image to ensure the correct direction of the text, which is convenient for text recognition in subsequent modules. This preprocessing may also include steps such as denoising, binarization, edge cropping, and scale normalization.

[0067] OCR recognition module:

[0068] This module uses deep learning networks (such as convolutional neural networks (CNNs)) to recognize text content in image data. OCR technology can convert text in images into machine-readable text. The recognized document image will contain the original image and the recognized text.

[0069] Table detection module:

[0070] This module detects the table frame and boundaries in the document image through a deep learning model (such as using R-CNN or similar detection algorithms), and identifies the individual cells in the table and their contents. After the table structured information is detected, it will be converted into text data, including the table's row and column structure, title, and cell text content.

[0071] Document Classification Module:

[0072] This module uses a classifier trained based on the BERT (Bidirectional Encoder Representations from Transformers) model to classify the extracted text data. It can divide the text dataset into subsets with different structural information (such as table framework, content information, etc.) and provide classified semantic category labels for subsequent module processing.

[0073] Field information extraction module:

[0074] Based on the semantic category labels output by the document classification module, this module will extract specific field information from the document image. This usually involves matching and finding predefined field names and data items, which may use methods such as rule matching, regular expressions, keyword searches, etc.

[0075] Manual verification module:

[0076] This module is the back-end verification link, where human auditors accurately verify the field information extracted by the AI ​​system. The purpose is to ensure that the extracted information is correct and to correct those parts that the AI ​​system may be uncertain or misjudged.

[0077] Further, this embodiment is described by way of example:

[0078] Data preprocessing module: For example, if a user uploads a scanned invoice that is tilted, the data preprocessing module will first detect that the image is tilted and then correct it to the standard document orientation. In addition, if the original document is in color, the module may also convert it to grayscale so that the OCR module can recognize the text more easily.

[0079] OCR recognition module: For example, for a pre-processed document image, the OCR module uses a deep learning algorithm to recognize the text in the image. For example, for an invoice image, OCR can recognize the company name, date, amount, and product list on the invoice, and convert the text in these images into an editable and searchable electronic format.

[0080] Table Detection Module: For example, a financial report image may contain a complex table structure. The table detection module will identify the borders, rows and columns of each table, and the position of each cell. For each cell, it will also try to identify the text content inside. Then this information is structured and can be directly used for database entry or spreadsheet generation.

[0081] Document classification module: For example, if the system processes multiple types of documents at the same time (such as invoices, receipts, contracts, etc.), the document classification module can classify the extracted text data into different categories. Using the BERT model for text understanding, you can classify based on the context of the content, such as classifying documents with "invoice number" into the invoice category.

[0082] Field information extraction module: For example: After receiving a specific invoice document, based on the label "invoice" obtained by the previous classification, the field information extraction module will extract specific field information from the document for subsequent use according to the preset field template (such as invoice number, date, total amount, etc.).

[0083] Manual verification module: For example, although the accuracy of the AI ​​system is already very high, there may still be some situations that require human intervention, such as understanding some handwritten content or documents in non-standard formats. The verifier will review the target field information extracted by the AI ​​system from the document image through the manual verification module to ensure the accuracy of the data.

[0084] Another embodiment of the document AI method based on deep learning in the embodiment of the present invention includes:

[0085] The deep learning-based document AI system further includes: a multi-language support module;

[0086] The multilingual support module is used to train a preset multilingual initial model based on the created multilingual data set to obtain a trained multilingual model, and extract information from multilingual documents based on the trained multilingual model.

[0087] Specifically, in multinational trade and international business, processing documents in multiple languages ​​has become a common and important task. The multilingual support module plays a key role here. The following is a detailed description and expansion of the multilingual support module:

[0088] Create a multilingual dataset:

[0089] Refinement: First, we need to build a large-scale document dataset in multiple languages. The dataset includes various types of documents (such as invoices, contracts, technical documents, etc.) and their corresponding versions in multiple languages. The dataset should cover various language features, such as different alphabetic systems (Latin, Chinese, Arabic, etc.), as well as differences in language grammar and sentence structure.

[0090] Training of multilingual initial models:

[0091] Refinement: The multilingual initial model may be an existing pre-trained model (such as multilingual BERT, mBERT) designed to adapt to multilingual tasks through transfer learning. The model will be further trained or fine-tuned on the created multilingual dataset to improve its ability to understand and process different languages. The training process needs to take into account the shared features between various languages ​​and their respective uniqueness.

[0092] Federated Learning of Multilingual Documents:

[0093] Refinement: After the multilingual model is trained, it can be used for joint learning, that is, considering document features and information in multiple language contexts at the same time. The purpose of this learning is to improve the generalization ability of the entire model by jointly learning the correlations and differences between different languages. In practical applications, when the model receives a new multilingual document, it can accurately perform text recognition, classification, and information extraction tasks regardless of the language of the document.

[0094] An example to illustrate the use of the multi-language support module:

[0095] For example, an international logistics company needs to process shipping documents from all over the world, which may contain multiple languages ​​such as English, Spanish, Chinese, Russian, etc. The multilingual support module will be able to recognize text content in various languages ​​and structure it so that the company can quickly understand and process these documents, thereby improving business efficiency and customer satisfaction.

[0096] In the embodiment of the present invention, the beneficial effect is: through the training and joint learning of the multi-language support module, the DocumentAI system becomes more global and adaptable, can cope with diversified language environments, and maximize the advantages of automated document processing.

[0097] Another embodiment of the document AI system based on deep learning in the embodiment of the invention includes:

[0098] The training process of the multilingual model includes:

[0099] Receiving a multilingual database sent by a cloud server; wherein the multilingual database stores multilingual document data and corresponding tag information;

[0100] Acquire the multilingual document data of the user's history, and annotate the multilingual document data of the user's history based on the multilingual database to generate training samples;

[0101] Obtaining a multilingual initial model sent by a cloud server, and training the multilingual initial model based on the training sample to obtain a trained multilingual initial model;

[0102] Obtaining model parameters of the trained multilingual initial model; uploading the model parameters of the trained multilingual initial model to a cloud server; wherein the cloud server receives the model parameters sent by multiple terminals, and performs aggregation operation on all received model parameters based on a preset federated learning algorithm to generate aggregated model parameters;

[0103] Receive the aggregate model parameters returned by the cloud server, and update the aggregate model parameters to the multilingual initial model to obtain a trained multilingual model.

[0104] Specific, important term explanation:

[0105] Multilingual database: A collection of document data in multiple languages ​​and their related tag information, which facilitates multilingual processing and information extraction.

[0106] Training samples: Data sets consisting of document data and label information used to train machine learning models.

[0107] Multilingual Initial Model: A basic machine learning model that already has certain language processing capabilities and can be optimized through further training.

[0108] Aggregate model parameters: The model parameters uploaded from multiple terminals to the cloud server are aggregated and calculated. These parameters are used to update the multilingual model to enhance its performance.

[0109] Application scenarios:

[0110] This technical solution is suitable for software applications that need to process and understand multiple languages, such as social media platforms for global services, multilingual news aggregation tools, international e-commerce websites, and communication and document management tools within global enterprises.

[0111] Furthermore, a technology company that provides global news aggregation services wants to optimize its multilingual article classification and recommendation system and performs the following steps:

[0112] Get the multilingual database:

[0113] The company receives a multilingual database containing news documents in different languages ​​and related tags (such as politics, economy, entertainment, etc.) from the cloud service.

[0114] Generate training samples:

[0115] Utilize the user's historical reading data on the platform and combine it with the multilingual database to correctly annotate each document to form a training sample set.

[0116] Initial model training:

[0117] Use the provided multilingual initial model and the generated training samples for local training to obtain a tuned multilingual model.

[0118] Model parameter upload:

[0119] Upload the model parameters obtained through local training to the cloud server.

[0120] Aggregate model parameter update:

[0121] The cloud server collects model parameters from the company and multiple other terminals, generates aggregate model parameters after aggregation operations, and then sends them to the company to update the multilingual initial model, ultimately obtaining a more accurate multilingual model.

[0122] Beneficial effects:

[0123] Enhanced model performance: By aggregating model parameters trained with multi-party data in the cloud, the final model is made more powerful and the accuracy of multilingual article classification is improved.

[0124] Improve user experience: Users can receive more relevant and accurate news recommendations, which improves platform user satisfaction.

[0125] Save resources and time: The method of using cloud services for parameter aggregation saves large-scale local computing resources and reduces computing time costs.

[0126] Achieve continuous model optimization: Regularly obtain updated model parameters from the cloud to ensure that the classification and recommendation algorithms can adapt to new data and market changes, so that the system remains continuously optimized.

[0127] Another embodiment of the document AI system based on deep learning in the embodiment of the invention includes:

[0128] The field information extraction module further includes: a field information encryption module, and the field information encryption module is used to encrypt the extracted target field information.

[0129] Another embodiment of the document AI system based on deep learning in the embodiment of the invention includes:

[0130] The field information encryption module is specifically used for:

[0131] Perform field segmentation on the extracted target field information to obtain multiple sub-target fields;

[0132] Based on a preset character combination rule, characters at designated positions of a plurality of sub-target fields are combined to obtain an identification character combination; wherein the identification character combination is each component element of a table, and the component element at least includes a structural element of the table and a content element of the table;

[0133] Based on the identification character combination, a preset coding table is rearranged to obtain an arranged coding table;

[0134] Encode the extracted target field information based on the compiled coding table to obtain the corresponding coding value;

[0135] Based on a preset character selection rule, characters are selected from the code value, and the selected characters are combined in sequence to obtain an encrypted password;

[0136] The extracted target field information is encrypted based on the encryption password to obtain the encrypted target field information.

[0137] Specifically, let’s take an example:

[0138] Suppose a healthcare company wants to strengthen the confidentiality of patient medical records in its document AI system. To this end, the system integrates a field information encryption module to encrypt patient information extracted from medical documents. The following are the specific implementation details of this technical solution:

[0139] Field information extraction:

[0140] The document AI system first extracts the patient’s personal information fields, such as name, medical insurance card number, and treatment history.

[0141] Field segmentation:

[0142] The field information encryption module divides the extracted field information, such as dividing the patient's name into two sub-target fields: last name and first name.

[0143] Identification character combination generation:

[0144] The characters at specific positions in the sub-target field are combined according to the preset rules. For example, a new identification character combination is formed based on the first letter of the patient's last name and the last four digits of the medical insurance card number.

[0145] Code table rearrangement:

[0146] According to the identification character combination, the sorting order of the preset encoding table (such as the ASCII code table) is adjusted to generate a new encoding table.

[0147] Target field information encoding:

[0148] Use the rearranged coding table to encode the entire patient personal information field and convert it into corresponding coding values.

[0149] Encrypted password generation:

[0150] Specific characters in the code value are selected according to preset rules, such as characters with an interval of 3, and then combined into an encrypted password.

[0151] Field information encryption:

[0152] Finally, the extracted patient personal information fields are encrypted using the encryption password to ensure that only authorized users can access the original data.

[0153] Beneficial effects:

[0154] By implementing the technical solutions in the above examples, healthcare companies can ensure the security of patient data and reduce the risk of data leakage, thereby achieving the following benefits:

[0155] Enhanced data privacy protection: Ensure that sensitive information remains encrypted during storage and transmission, in compliance with relevant regulations on medical data privacy.

[0156] Improve information security: Encryption protection can prevent unauthorized access to patient information and reduce the possibility of information being misused or tampered with.

[0157] Improve customer trust: By strictly protecting patient privacy information, patients' trust in the company's storage and processing of personal medical information is enhanced, which helps maintain customer relationships and improve the company's reputation.

[0158] Support compliance requirements: Encryption helps companies comply with various data protection and privacy regulations around the world and avoid penalties for noncompliance.

[0159] Another embodiment of the document AI system based on deep learning in the embodiment of the invention includes: based on the identification character combination, the preset coding table is rearranged to obtain the rearranged coding table:

[0160] Obtain a first character set corresponding to the content elements of the table in the identification character combination, and obtain a second character set corresponding to the structural elements of the table in the identification character combination; the first character set is multiple

[0161] uppercase English characters, the second character set is a plurality of numeric characters;

[0162] Obtain a preset coding table; wherein the preset coding table includes 32 serial numbers and 32 coding characters; the coding characters include digital coding characters and uppercase English letter coding characters;

[0163] Eliminate the coded characters in the preset coding table that are identical to the numeric characters in the second character set, leaving a plurality of spaces at the end of the coded characters;

[0164] Inserting a plurality of uppercase English characters of the first character set into a plurality of vacancies in sequence to fill all the vacancies, thereby obtaining an arranged encoding table.

[0165] Specifically, let’s take an example:

[0166] For example, a financial information processing company developed a document AI system based on deep learning and needed to encrypt the financial data extracted from customer documents, including the structural elements (such as row and column names) and content elements (such as the financial numbers in each cell) of financial statements. The company adopted a field information encryption module and followed the steps below to encrypt the extracted table field information:

[0167] Character set extraction:

[0168] In the extracted financial data table identification character combinations, identify the first character set (REVENUE -> "R,E,V,E,N,U,E") corresponding to the content element (for example: "REVENUE") and the second character set ("1,2,3,4") corresponding to the structure element (for example, the encoding of the table column "1234").

[0169] Get the preset encoding table:

[0170] Obtain the original coding table preset within the company, which consists of 32 serial numbers and 32 coding characters, and the coding characters contain uppercase English letters and numbers.

[0171] Code table rearrangement:

[0172] Eliminate the coding characters that are identical to the numeric characters in the structural elements from the original coding table (for example, remove the coding characters corresponding to "1,2,3,4"), leaving space for uppercase English characters.

[0173] Fill in the blanks to generate a new encoding table:

[0174] The uppercase English characters corresponding to the content elements are inserted into the spaces in the code table in sequence, for example, the remaining spaces are filled in the combination order of "R, E, V, E, N, U, E", and a new code table is generated.

[0175] Beneficial effects:

[0176] Through the above implementation steps, the financial information processing company can generate a dynamically changing coding table for different customer documents. The specific benefits of this process are as follows:

[0177] Personalized encryption rules: Since the compiled coding table is rearranged based on the unique identification characters of each document, each document has a unique set of encryption rules, which enhances the complexity and security of encryption.

[0178] Easy system implementation: The newly compiled coding table can be directly applied to the existing encryption algorithm without adjusting other parts of the system, which facilitates rapid deployment and implementation.

[0179] Reduced risk of data leakage: Personalized encoding rules mean that even if the encryption of a document is cracked, it will not affect other documents in the system, thereby reducing the overall risk of data leakage.

[0180] Another embodiment of the document AI system based on deep learning in the embodiment of the invention includes:

[0181] The BERT classification model includes an input layer, a first embedding layer, a second embedding layer, a fusion layer, an intermediate layer and a classification layer. The training process of the BERT classification model includes:

[0182] Collecting text training data of a plurality of document images; wherein the text training data includes table structure information and table content information in the document images;

[0183] Inputting the text training data into the input layer for information extraction to obtain first text information and second text information;

[0184] Inputting the first text information into the first embedding layer for processing to obtain a table structure feature vector;

[0185] Inputting the second text information into the second embedding layer for processing to obtain a table content feature vector;

[0186] Inputting the table structure feature vector and the table content feature vector into the fusion layer for vector fusion to obtain a fused feature vector of the entire text;

[0187] Inputting the fused feature vector into the intermediate layer for extraction to obtain a high-dimensional feature representation;

[0188] The high-dimensional feature representation is input into the classification layer, combined with the pre-labeled semantic category information, and the loss function of the model is iterated until the loss function converges to obtain the trained BERT classification model.

[0189] Specific, important term explanation:

[0190] BERT classification model: A classification model based on BERT (Bidirectional Encoder Representations from Transformers), which is designed for task-specific training using bidirectional Transformer encoder representations.

[0191] Table structure information: Information related to table layout in the document image, including structural characteristics such as columns, rows, and cells.

[0192] Table content information: The text content inside the table in the document image, which describes the data contained in the cell and its semantics.

[0193] Fusion feature vector: A vector generated by fusing the table structure feature vector and the content feature vector, which represents the comprehensive characteristics of the entire table information.

[0194] High-dimensional feature representation: Higher-level text features extracted from the fused feature vector through a series of transformations for classification tasks.

[0195] Application scenarios:

[0196] This application of the BERT classification model can be useful in scenarios that require extracting and classifying desktop-level information from large amounts of documents, such as legal review, financial analysis, academic research, and any business process involving automated document processing.

[0197] Furthermore, taking a financial data analysis company as an example, the company needs to automatically extract information from thousands of financial statement tables for classification and analysis. The implementation steps are as follows:

[0198] Data collection and preparation:

[0199] The table structure information (such as row and column distribution) and table content information (such as the text in each cell) are collected from historical financial statements as text training data sets.

[0200] Preliminary information extraction:

[0201] The collected text training data is segmented into first text information and second text information using a preprocessing algorithm, wherein the first information focuses on the physical structure of the table and the second information processes the table content.

[0202] Embedding layer processing:

[0203] Through the first and second embedding layers, the table structure information and content information are converted into corresponding feature vectors respectively.

[0204] Fusion layer:

[0205] The structural feature vector and the content feature vector are sent to the fusion layer for merging to obtain a fused feature vector that integrates the structural and content information.

[0206] Middle layer processing:

[0207] The fused feature vector is input into the middle layer to further refine the features and obtain a more abstract and high-dimensional feature representation.

[0208] Classification layer training:

[0209] In the last step, the high-dimensional feature representation is input into the classification layer, combined with the existing labeled data, and iterative training is performed using the loss function until the model converges, thus completing the training of the BERT classification model.

[0210] Beneficial effects:

[0211] Improve information extraction accuracy: The model can understand both the structure and content information of the table, thereby extracting data more accurately.

[0212] Increased document processing speed: Automatic extraction and classification capabilities significantly increase the speed of processing large volumes of documents.

[0213] Save manual workload: It replaces the time-consuming manual extraction and input of data in the past, reducing the labor intensity of employees.

[0214] Support strategic decisions: Accurate and rapid access to classified data can help quickly formulate and optimize business strategies.

[0215] The above describes the document AI system based on deep learning in the embodiment of the present invention. The following describes the document AI method based on deep learning in the embodiment of the present invention. Figure 2 In one embodiment of the present invention, a document AI method based on deep learning includes:

[0216] Step 101: Perform format conversion and image rotation angle detection on the trade document PDF or picture file uploaded by the user to generate corresponding image data;

[0217] Specifically, Step 101: Trade document PDF or image file format conversion and image rotation angle detection

[0218] Data preprocessing and format conversion: a. For the trade document PDF or image files uploaded by the user, first extract and process the image data, and convert the PDF file into an image format, such as JPEG or PNG, for subsequent processing and analysis. b. With the help of image processing libraries, such as OpenCV or Pillow, preprocessing operations such as noise removal, contrast adjustment, brightness, etc. can be performed during the conversion process to improve the accuracy of subsequent processing.

[0219] Image rotation angle detection: a. Perform angle detection on the converted image to ensure the document image is in the correct orientation to avoid errors in subsequent text recognition and table detection. b. Use image processing techniques, such as Hough transform or feature point-based methods, to detect text or structural features in the document image and automatically adjust the image rotation angle so that the document image is in the correct orientation.

[0220] Step 102: Recognize and extract text content from the image data using a preset deep learning network to generate a corresponding document image;

[0221] Specifically, step 102: using a deep learning network to perform text recognition and document image generation

[0222] Text recognition: a. Use pre-trained deep learning models, such as text detection and recognition models based on convolutional neural networks (CNNs), to identify and extract text from image data. b. Use end-to-end text recognition technology, such as text recognition models based on long short-term memory networks (LSTMs), to train and recognize characters and words in images and combine them into text information.

[0223] Document image generation: a. The text content recognized by the deep learning network is combined with the layout structure information of the original image to generate a complete document image containing the recognized text content. b. The recognized text content can be reconstructed according to the typesetting format of the original document using layout analysis technology and natural language processing technology to generate a visual document image.

[0224] For example, we use deep learning object detection models, such as Faster R-CNN or YOLO, to locate and identify text in an image. Then, we use a recurrent neural network (RNN) combined with an attention mechanism to extract and reconstruct the identified text information word by word, and finally generate an analyzed document image that retains the original layout and integrates the identified text content.

[0225] Step 103: Detect the table frame and border in the document image through a preset deep learning model, output structured information, and convert the structured information into text data; wherein the structured information at least includes the table frame and border, cell text content, table title, and the relationship between columns and rows in the table;

[0226] Specifically, step 103: using a deep learning model to perform table detection and structured information extraction

[0227] Table detection: a. Detect and locate tables in document images based on pre-trained deep learning models, such as a table detection model based on a convolutional neural network (CNN), and identify the frame and boundaries of the table. b. Analyze document images using object detection techniques, such as a region-based convolutional neural network (R-CNN) or its improved version, to determine the location and boundaries of the table.

[0228] Structured information extraction: a. Extract cell text content, table titles, and the relationship between columns and rows in the table from the detected table frame and boundaries to generate structured information. b. Use text layout analysis technology and natural language processing technology to segment, parse, and classify the text in the table to extract complete structured information.

[0229] For example: Use a region-based deep neural network (RCNN) to detect the location and boundaries of a table in a document image, and then combine it with a table analysis algorithm to extract and parse the text content of the cells in the table, identify the table title, and analyze the relationship between the rows and columns in the table, ultimately generating structured information containing the table structure and content.

[0230] Step 104: classify the text data by the trained BERT classification model to obtain a first text data set and a second text data set; identify the first text data set and output a structural component category label of the table in the document image, identify the second text data set and output a semantic category label of the table content in the document image; wherein the first text data set is the table structure information of the table in the document image; and the second text data set is the table content information of the table in the document image;

[0231] Specifically, step 104: Use the trained BERT classification model to classify structure and content information

[0232] Text classification: a. Use the trained BERT (Bidirectional Encoder Representations from Transformers) model to classify the extracted text data, and identify it based on the structural information of the text data to obtain the first text dataset. b. At the same time, perform semantic classification on the table content information in the document image, and use the BERT model to identify and classify the text data to obtain the second text dataset.

[0233] Category label output: a. Output the structural information category label of the first text dataset, describing the structural composition of the table in the document image. b. Output the content information category label of the second text dataset, describing the semantic category of the table content in the document image.

[0234] For example, the trained BERT model can be used to classify table text. For example, the structural composition categories may include "static table", "dynamic table", etc., while the content information categories may include "sales data", "financial data", etc. These category labels describe the structure and content characteristics of the table in the document image.

[0235] Step 105: extracting target field information from the document image based on the semantic category label, the structural component category label and the preset field information;

[0236] Specifically, step 105: extracting target field information based on semantic category labels and structural component category labels

[0237] Document image field information extraction: a. Based on the preset field information and the semantic category labels and structural component category labels obtained in the previous step, natural language processing and image processing technology are used to extract the target field information from the document image. b. Combined with the semantic category labels, the specific semantic information of the table content in the document image is identified, such as product name, quantity, price, etc.

[0238] Target field information extraction: a. Identify the structural features of the table in the document image, such as table headers, column names, etc., based on the structural component category labels, and extract the corresponding field information. b. Use natural language processing technology to extract the semantic information of the table content in the document image, such as sales data, date, location and other important information, based on the semantic category labels.

[0239] For example: Using named entity recognition (NER) technology and table analysis algorithms, target field information is extracted from document images based on semantic category labels and structural component category labels. For example, specific content such as product name, quantity, and price can be extracted from a table. At the same time, structural information such as table headers and column names can be identified and extracted.

[0240] Step 106: Verify and review the target field information extracted from the document image.

[0241] Specifically, step 106: target field information verification and review

[0242] Target field information verification: a. Establish a manual verification system to display the target field information extracted from the document image through the interface, including structure and content, and provide manual verification function to ensure the accuracy and completeness of the information. b. Based on the natural language processing model and image processing technology of deep learning, assist the manual verification system to perform preliminary automatic proofreading of the extracted information to improve the verification efficiency.

[0243] Verification result review: a. Design the review process to ensure that the target field information that has been manually verified can be reviewed by multiple reviewers to avoid subjective misjudgment by a single reviewer. b. Continuously optimize the verification system based on the review results, and use supervised learning and feedback mechanisms to train the automatic proofreading model to improve the accuracy and efficiency of verification.

[0244] For example, a manual verification platform is set up to display the target field information extracted from the document image in the form of an interface and conduct manual verification. At the same time, a deep learning model is used to perform preliminary automatic proofreading of the information, and then the audit results are reviewed by multiple people to finally form the final verification and audit results.

[0245] The present invention also provides a document AI device based on deep learning, which includes a memory and a processor, wherein computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the document AI method based on deep learning in the above-mentioned embodiments.

[0246] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the deep learning-based document AI method.

[0247] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0248] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0249] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A document AI system based on deep learning, characterized in that: The documentAI system based on deep learning includes: a data preprocessing module, an OCR recognition module, a table detection module, a document classification module, a field information extraction module, and a manual verification module; The data preprocessing module is used to perform format conversion and image rotation angle detection on the trade document PDF or picture file uploaded by the user, and generate corresponding image data; The OCR recognition module is used to recognize and extract text content in image data through a preset deep learning network to generate a corresponding document image; The table detection module is used to detect the table frame and border in the document image through a preset deep learning model, output structured information, and convert the structured information into text data; wherein the structured information at least includes the table frame and border, cell text content, table title, and the relationship between columns and rows in the table; The document classification module is used to classify the text data through the trained BERT classification model to obtain a first text data set and a second text data set; identify the first text data set and output the structural component category label of the table in the document image, identify the second text data set and output the semantic category label of the table content in the document image; wherein the first text data set is the table structure information of the table in the document image; the second text data is the table content information of the table in the document image; wherein the BERT classification model includes an input layer, a first embedding layer, a second embedding layer, a fusion layer, an intermediate layer and a classification layer, and the training process of the BERT classification model includes: collecting text training data of multiple document images; wherein the text training data includes the table structure information and the table content in the document image content information; inputting the text training data into the input layer for information extraction to obtain the first text information and the second text information; inputting the first text information into the first embedding layer for processing to obtain the table structure feature vector; inputting the second text information into the second embedding layer for processing to obtain the table content feature vector; inputting the table structure feature vector and the table content feature vector into the fusion layer for vector fusion to obtain the fusion feature vector of the entire text; inputting the fusion feature vector into the intermediate layer for extraction to obtain a high-dimensional feature representation; inputting the high-dimensional feature representation into the classification layer, combining the pre-labeled semantic category information and the structural composition category information of the table, and iterating the model loss function until the loss function converges to obtain the trained BERT classification model; The field information extraction module is used to extract target field information from the document image based on the semantic category label, the structural component category label and the preset field information; The manual verification module is used to verify and review the target field information extracted from the document image.

2. The deep learning-based document AI system according to claim 1, characterized in that: The deep learning-based document AI system further includes: a multi-language support module; The multilingual support module is used to train a preset multilingual initial model based on the created multilingual data set to obtain a trained multilingual model, and extract information from multilingual documents based on the trained multilingual model.

3. The deep learning-based document AI system according to claim 2, characterized in that: The training process of the multilingual model includes: Receiving a multilingual database sent by a cloud server; wherein the multilingual database stores multilingual document data and corresponding tag information; Acquire the multilingual document data of the user's history, and annotate the multilingual document data of the user's history based on the multilingual database to generate training samples; Obtaining a multilingual initial model sent by a cloud server, and training the multilingual initial model based on the training sample to obtain a trained multilingual initial model; Obtaining model parameters of the trained multilingual initial model; uploading the model parameters of the trained multilingual initial model to a cloud server; wherein the cloud server receives the model parameters sent by multiple terminals, and performs aggregation operation on all received model parameters based on a preset federated learning algorithm to generate aggregated model parameters; Receive the aggregate model parameters returned by the cloud server, and update the aggregate model parameters to the multilingual initial model to obtain a trained multilingual model.

4. The deep learning-based document AI system according to claim 1, characterized in that: The field information extraction module further includes: a field information encryption module, and the field information encryption module is used to encrypt the extracted target field information.

5. The deep learning-based document AI system according to claim 4, characterized in that: The field information encryption module is specifically used for: Perform field segmentation on the extracted target field information to obtain multiple sub-target fields; Based on a preset character combination rule, characters at designated positions of a plurality of sub-target fields are combined to obtain an identification character combination; wherein the identification character combination is each component element of a table, and the component element at least includes a structural element of the table and a content element of the table; Based on the identification character combination, a preset coding table is rearranged to obtain an arranged coding table; Encode the extracted target field information based on the compiled coding table to obtain the corresponding coding value; Based on a preset character selection rule, characters are selected from the code value, and the selected characters are combined in sequence to obtain an encrypted password; The extracted target field information is encrypted based on the encryption password to obtain the encrypted target field information.

6. The deep learning-based document AI system according to claim 5, characterized in that: Based on the identification character combination, the preset coding table is rearranged to obtain the rearranged coding table: Obtain a first character set corresponding to the content elements of the table in the identification character combination, and obtain a second character set corresponding to the structural elements of the table in the identification character combination; the first character set is multiple uppercase English characters, the second character set is a plurality of numeric characters; Obtain a preset coding table; wherein the preset coding table includes 32 serial numbers and 32 coding characters; the coding characters include digital coding characters and uppercase English letter coding characters; Eliminate the coded characters in the preset coding table that are identical to the numeric characters in the second character set, leaving a plurality of spaces at the end of the coded characters; Inserting a plurality of uppercase English characters of the first character set into a plurality of vacancies in sequence to fill all the vacancies, thereby obtaining an arranged encoding table.

7. A document AI method based on deep learning, characterized in that: The documentAI method based on deep learning includes: Perform format conversion and image rotation angle detection on the trade document PDF or image files uploaded by the user to generate corresponding image data; The text content in the image data is extracted through the preset deep learning network to generate the corresponding document image; Detecting the table frame and border in the document image through a preset deep learning model, outputting structured information, and converting the structured information into text data; wherein the structured information includes at least the table frame and border, cell text content, table title, and the relationship between columns and rows in the table; The text data is classified by the trained BERT classification model to obtain a first text data set and a second text data set; the first text data set is identified, and a structural component category label of a table in a document image is output; the second text data set is identified, and a semantic category label of the table content in the document image is output; wherein the first text data set is table structure information of a table in a document image; and the second text data set is table content information of a table in a document image; wherein the BERT classification model includes an input layer, a first embedding layer, a second embedding layer, a fusion layer, an intermediate layer and a classification layer, and the training process of the BERT classification model includes: collecting text training data of a plurality of document images; wherein the text training data includes table structure information and table content information in a document image; Input the text training data into the input layer for information extraction to obtain the first text information and the second text information; input the first text information into the first embedding layer for processing to obtain the table structure feature vector; input the second text information into the second embedding layer for processing to obtain the table content feature vector; input the table structure feature vector and the table content feature vector into the fusion layer for vector fusion to obtain the fusion feature vector of the whole text; input the fusion feature vector into the intermediate layer for extraction to obtain the high-dimensional feature representation; input the high-dimensional feature representation into the classification layer, combine the pre-labeled semantic category information and the structural composition category information of the table, and iterate the loss function of the model until the loss function converges to obtain the trained BERT classification model; Extracting target field information from the document image based on the semantic category label, the structural component category label and the preset field information; Verify and review the target field information extracted from the document image.

8. A document AI device based on deep learning, characterized in that: The deep learning-based documentAI device includes: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the deep learning-based document AI device executes the deep learning-based document AI method as described in claim 7.

9. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the document AI method based on deep learning as described in claim 7 is implemented.