Methods, systems, and storage media for digitizing offline data based on large models
By using a large-scale model-based method for digitizing offline data, the system automates the processing of offline data, solving the problem of low efficiency in offline data digitization, improving efficiency and stability, and reducing storage costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2026-04-03
AI Technical Summary
Current technologies for digitizing offline documents are inefficient, involve cumbersome manual operations, result in high storage and management costs, and paper documents are easily affected by the natural environment.
We employ a large-model-based method for digitizing offline data. Through text recognition, content extraction, and data verification, we leverage the powerful reasoning capabilities of the large model to automatically process offline data, including text recognition, entity recognition, semantic recognition, and data imputation.
It improves the efficiency of digitizing offline data, reduces manual operations, lowers storage costs, and enhances the long-term preservation stability of data.
Smart Images

Figure CN120011619B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, system, and storage medium for digitizing offline data based on a large model. Background Technology
[0002] In today's information age, despite the rapid development of electronic information technology, a large amount of offline data still exists. Offline data encompasses various paper documents, such as books, archives, contracts, and manuscripts, carrying rich knowledge, historical information, and important business data. However, offline data reveals many problems in its actual use and management. First, in terms of storage, paper data requires a large amount of physical space, and as the amount of data continues to increase, the cost of storage space rises sharply. Simultaneously, paper data is susceptible to natural environmental factors, such as moisture, fire, and insect infestation, leading to damage and information loss, seriously affecting its long-term preservation stability. Therefore, digitizing offline data has become an inevitable trend.
[0003] In the current process of digitizing offline data, the digitization is generally done manually, which leads to cumbersome manual operations and reduces the efficiency of offline data digitization. Summary of the Invention
[0004] The purpose of this invention is to provide a method, system, and storage medium for digitizing offline data based on a large model, so as to solve the problem of low efficiency in the digitization of offline data in the prior art.
[0005] This invention is implemented as follows: a method for digitizing offline data based on a large model, the method comprising:
[0006] Obtain offline materials to be digitized, and perform text recognition on the offline materials to be digitized to obtain offline documents;
[0007] Obtain content extraction requirements and combine them with the offline documents to obtain digital prompts for the data;
[0008] The digitized data prompts are input into a pre-trained large model for content extraction to obtain data extraction data, and the data extraction data is then validated.
[0009] Obtain the online data template and fill the online data template with the data extracted after data verification.
[0010] Preferably, the offline materials to be digitized are subjected to text recognition to obtain offline documents, including:
[0011] The offline data to be digitized is subjected to grayscale processing to obtain a grayscale image of the data, and the grayscale image of the data is normalized to obtain a normalized image;
[0012] The normalized image is convolved according to different convolution scales to obtain convolution features, and the convolution features are fused according to the convolution scale to obtain a feature pyramid.
[0013] Text prediction is performed based on the feature pyramid to obtain the text prediction result, and the target text box is determined based on the text prediction result;
[0014] The offline document is generated based on the target text box.
[0015] Preferably, determining the target text box based on the text prediction result includes:
[0016] Obtain the text existence probability in the text prediction result, and compare the text existence probability with a probability threshold;
[0017] If the probability of the text being present is greater than the probability threshold, then the text box corresponding to the probability of the text being present is determined as a candidate text box, and the overlap between different candidate text boxes is calculated.
[0018] The text box score of the candidate text box is determined based on the overlap and the probability of text presence, and the target text box is determined based on the text box score.
[0019] Preferably, before inputting the digitized data prompts into the pre-trained large model for content extraction, the method further includes:
[0020] A digital prompt sample is obtained and input into the large model for content extraction to obtain sample extraction data. The digital prompt sample includes sample documents and sample prompt words.
[0021] The model loss is determined based on the sample data, and the parameters of the large model are updated based on the model loss until the large model converges, thus obtaining the pre-trained large model.
[0022] Preferably, after performing text recognition on the offline materials to be digitized to obtain offline documents, the method further includes:
[0023] Entity recognition is performed on document paragraphs in the offline document to obtain entity recognition results, and the paragraph object of the document paragraph is determined based on the entity recognition.
[0024] The document paragraphs are classified according to the paragraph objects to obtain a paragraph set, and semantic recognition is performed on the document paragraphs to obtain semantic recognition results;
[0025] Based on the semantic recognition results, the paragraph correlation degree between different document paragraphs in the same paragraph set is determined, and the document paragraphs in the same paragraph set are sorted according to the paragraph correlation degree.
[0026] Preferably, the content extraction requirements are combined with the offline documents to obtain digital information prompts, including:
[0027] Based on the sorting result of the document paragraphs, the document paragraphs in the same paragraph set are combined, and a first identifier is inserted into different document paragraphs to obtain a paragraph string;
[0028] Insert the corresponding paragraph object at the beginning of the paragraph string, and combine the different paragraph strings;
[0029] Insert a second identifier into the different paragraph strings after combination to obtain a string combination, and insert the content extraction requirement at the beginning of the string combination;
[0030] A third identifier is inserted between the beginning and end of the content extraction requirement and the string combination to obtain the digital prompt of the data.
[0031] Preferably, the data extracted after data verification is filled into the online data template, including:
[0032] The data words in the data extracted after data verification are identified by type to obtain the word type, and the word type is matched with the type of the fill column in the online data template;
[0033] The data terms are filled into the corresponding fill fields based on the type matching results.
[0034] Another objective of this invention is to provide a large-scale offline data digitization system, the system comprising:
[0035] The text recognition module is used to acquire offline materials to be digitized and to perform text recognition on the offline materials to be digitized to obtain offline documents;
[0036] The prompt generation module is used to obtain content extraction requirements and combine the content extraction requirements with the offline documents to obtain digital prompts for the materials;
[0037] The content extraction module is used to input the digitized prompts of the data into the pre-trained large model for content extraction, obtain the extracted data, and perform data verification on the extracted data.
[0038] The data filling module is used to obtain online data templates and fill the online data templates with the data extracted after data verification.
[0039] Preferably, the text recognition module is further used for:
[0040] The offline data to be digitized is subjected to grayscale processing to obtain a grayscale image of the data, and the grayscale image of the data is normalized to obtain a normalized image;
[0041] The normalized image is convolved according to different convolution scales to obtain convolution features, and the convolution features are fused according to the convolution scale to obtain a feature pyramid.
[0042] Text prediction is performed based on the feature pyramid to obtain the text prediction result, and the target text box is determined based on the text prediction result;
[0043] The offline document is generated based on the target text box.
[0044] In this embodiment of the invention, text recognition is performed on offline documents to be digitized, eliminating the need for manual copying and pasting of text, thus improving the efficiency of offline document digitization. By inputting the digitization prompts into a pre-trained large model for content extraction, the powerful reasoning ability of the large model is used to automatically extract content from offline documents, further improving the efficiency of offline document digitization without the need for manual content extraction. Attached Figure Description
[0045] Figure 1 This is a flowchart of the offline data digitization method based on a large model provided in the first embodiment of the present invention;
[0046] Figure 2 This is a schematic diagram of the structure of the offline data digitization system based on a large model provided in the second embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram illustrating the specific implementation steps of the offline data digitization system based on a large model provided in the second embodiment of the present invention;
[0048] Figure 4 This is a schematic diagram of the structure of the terminal device provided in the third embodiment of the present invention. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0050] To illustrate the technical solution described in this invention, specific embodiments are described below.
[0051] Example 1
[0052] Please see Figure 1 This is a flowchart of a method for digitizing offline data based on a large model, provided in the first embodiment of the present invention. This method can be applied to any device or system and includes the following steps:
[0053] Step S10: Obtain the offline data to be digitized, and perform text recognition on the offline data to be digitized to obtain offline documents;
[0054] In this step, text recognition of digitized offline materials eliminates the need for manual copying and pasting. Algorithms such as CRNN (Convolutional Recurrent Neural Networks), Attention OCR, and DenseNet-OCR can be used to perform text recognition on the digitized offline materials.
[0055] Specifically, the CRNN algorithm combines Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs). The CNN extracts feature sequences from the input image, the RNN predicts the label distribution of these feature sequences, and finally, a transcription layer (using the CTC algorithm) transforms the label distribution into the final recognition result. Its features include: effectively handling variable-length text recognition, eliminating the need for explicit character segmentation, transforming text recognition into a sequence learning problem, and performing exceptionally well in natural scene text recognition.
[0056] Similar to CRNN, the Attention OCR algorithm uses a CNN+RNN network structure in the feature learning stage, but employs an attention mechanism in the output layer. The attention mechanism allows the model to automatically focus on different parts of the input text during processing, dynamically allocating attention weights according to the current recognition task, thereby better capturing long-sequence dependencies and contextual information in the text. Its advantages include more accurate recognition of long, irregular, and complex texts, and better performance compared to CRNN in certain scenarios.
[0057] The DenseNet-OCR algorithm employs a densely connected convolutional neural network (DenseNet) and a sequence transducer. DenseNet's densely connected structure effectively utilizes feature information, improving feature transfer efficiency and enabling the model to better learn complex features in images. The sequence transducer is used to model and predict text sequences. Features: Improves text recognition accuracy and exhibits strong robustness against text with various fonts, sizes, styles, and complex backgrounds.
[0058] Optionally, text recognition is performed on the offline materials to be digitized to obtain offline documents, including:
[0059] The offline data to be digitized is subjected to grayscale processing to obtain a grayscale image of the data, and the grayscale image of the data is normalized to obtain a normalized image;
[0060] The normalized image is convolved according to different convolution scales to obtain convolutional features. These convolutional features are then fused according to the convolution scales to obtain a feature pyramid. The convolution scales can be set as needed, and the number of convolution scales can be greater than or equal to two. By convolving the normalized image with different convolution scales, convolutional features of different feature scales can be obtained, so that the feature pyramid after feature fusion can effectively contain contextual feature information.
[0061] Text prediction is performed based on the feature pyramid to obtain a text prediction result. A target text box is determined based on the text prediction result, and the offline document is generated based on the target text box. In this process, the feature pyramid features are decoded by the encoder in the large model, and text prediction is performed based on the feature decoding result to obtain a text prediction result.
[0062] Furthermore, determining the target text box based on the text prediction result includes:
[0063] Obtain the text existence probability in the text prediction result and compare the text existence probability with a probability threshold; wherein, the text existence probability is used to represent the probability that text exists at the corresponding position, and the probability threshold can be set according to requirements;
[0064] If the probability of the text existing is greater than the probability threshold, then the text box corresponding to the probability of the text existing is determined as a candidate text box, and the overlap between different candidate text boxes is calculated; wherein, if the probability of the text existing is greater than the probability threshold, then it is determined that there is text at the corresponding position, the text box corresponding to the probability of the text existing is determined as a candidate text box, and the overlap is determined based on the overlapping area between different candidate text boxes.
[0065] The text box scores of the candidate text boxes are determined based on the overlap and the text presence probability, and the target text box is determined based on the text box scores. The text box scores are obtained by weighting the overlap and text presence probability. The weighting coefficients for overlap and text presence probability can be set as needed. In this step, the candidate text boxes are sorted according to their scores, retaining those with higher probabilities and lower overlap with other boxes, while suppressing those with higher overlap, thus obtaining the target text box. Only one optimal target text box is retained for each text region.
[0066] Furthermore, after performing text recognition on the offline materials to be digitized to obtain the offline documents, the process also includes:
[0067] Entity recognition is performed on document paragraphs in the offline document to obtain entity recognition results, and the paragraph object of the document paragraph is determined based on the entity recognition; wherein, by performing entity recognition on document paragraphs in the offline document, the paragraph object of the document paragraph can be effectively determined based on the entity type of each entity in the entity recognition results;
[0068] The document paragraphs are classified according to the paragraph objects to obtain a paragraph set, and the document paragraphs are semantically recognized to obtain a semantic recognition result; wherein, document paragraphs corresponding to the same paragraph object are divided into the same set to obtain a paragraph set;
[0069] Based on the semantic recognition results, the paragraph correlation degree between different document paragraphs in the same paragraph set is determined, and the document paragraphs in the same paragraph set are sorted according to the paragraph correlation degree; wherein, the paragraph semantics between different document paragraphs are combined to obtain a semantic combination, and the semantic combination is matched with a correlation degree lookup table to obtain the paragraph correlation degree.
[0070] Step S20: Obtain content extraction requirements and combine the content extraction requirements with the offline documents to obtain data digitization prompts;
[0071] The content extraction requirement represents the data parameters that the user needs to extract. Optionally, the content extraction requirement can be combined with the offline document to obtain a digital document prompt, including:
[0072] Based on the sorting results of the document paragraphs, the document paragraphs in the same paragraph set are combined, and a first identifier is inserted into different document paragraphs to obtain paragraph strings; wherein, by inserting the first identifier into different document paragraphs, the large model can effectively facilitate the recognition of different document paragraphs;
[0073] Insert the corresponding paragraph object at the beginning of the paragraph string, and combine the different paragraph strings;
[0074] A second identifier is inserted into the different paragraph strings after combination to obtain a string combination, and the content extraction requirement is inserted at the beginning of the string combination; wherein, by inserting the second identifier into the different paragraph strings after combination, the large model can effectively facilitate the recognition between different paragraph strings;
[0075] A third identifier is inserted between the beginning and the end of the content extraction requirement and the string combination to obtain the digital prompt of the data; wherein, by inserting a third identifier between the beginning and the end of the content extraction requirement and the string combination, the large model can effectively facilitate the recognition of the content extraction requirement and the string. The first identifier, the second identifier and the third identifier can all be set according to the requirements.
[0076] Step S30: Input the digitized data prompts into the pre-trained large model for content extraction to obtain data extraction data, and perform data verification on the data extraction data.
[0077] This involves extracting content from offline documents by inputting digitized prompts into a pre-trained large model, leveraging the powerful reasoning capabilities of the large model.
[0078] Optionally, before inputting the digitized data prompts into the pre-trained large model for content extraction, the method further includes:
[0079] A digital prompt sample is obtained and input into the large model for content extraction to obtain sample extraction data. The digital prompt sample includes sample documents and sample prompt words.
[0080] The model loss is determined based on the sample data, and the parameters of the large model are updated based on the model loss until the large model converges, thus obtaining the pre-trained large model.
[0081] The process involves preprocessing the digital prompt samples, including removing special characters, punctuation marks, spaces, and other irrelevant content, standardizing the text format and encoding, and segmenting the digital prompt samples into individual words or phrases using commonly used Chinese word segmentation tools such as Jieba, in preparation for subsequent word extraction.
[0082] In this step, large models can be configured according to requirements, such as BERT, GPT, and ERNIE models. Research and evaluation are needed based on the characteristics of the document and the specific needs of vocabulary extraction. For example, the BERT model excels in natural language understanding and feature extraction, making it suitable for vocabulary extraction tasks with high requirements for text semantic understanding; the GPT series models have advantages in text generation and can also be used for vocabulary extraction, especially in scenarios where word meaning needs to be inferred from context.
[0083] Design appropriate prompts based on the vocabulary extraction objectives and document type. The prompts should clearly express the types, scope, and conditions of the vocabulary to be extracted. For example, if the goal is to extract nouns from a document, the prompt could be "Please extract all nouns from the following text"; if the goal is to extract vocabulary related to a specific topic, such as "artificial intelligence," the prompt could be "Please find all words related to artificial intelligence in the text."
[0084] The pre-processed digital prompt samples and the designed prompt words are input into a large model. The model analyzes and processes the text according to the requirements of the prompt words and outputs the extracted vocabulary results. Based on its understanding and knowledge of language, the model identifies words that meet the criteria.
[0085] Deduplication and filtering: The extracted vocabulary results are deduplicated to remove duplicate words, improving the accuracy and usability of the vocabulary. Simultaneously, the extracted vocabulary can be filtered according to certain rules or conditions, such as removing stop words and low-frequency words, retaining more valuable vocabulary.
[0086] Step S40: Obtain the online data template and fill the online data template with the data extracted after data verification;
[0087] The online document templates can be customized to meet specific needs. By extracting data from the validated documents and filling it into the online document templates, the goal is to digitize offline documents online.
[0088] Optionally, the data extracted after data verification is filled into the online data template, including:
[0089] The data words in the data extracted after data verification are identified by type to obtain word types. The word types are then matched with the fill fields in the online data template, and the data words are filled into the corresponding fill fields according to the type matching results. Specifically, the data words are matched with a type lookup table to obtain word types. By matching the word types with the fill fields in the online data template, the filling correspondence between data words and fill fields can be effectively determined, and the data words are filled into the corresponding fill fields based on the filling correspondence.
[0090] In this embodiment, text recognition is performed on the offline documents to be digitized, eliminating the need for manual copying and pasting of text, thus improving the efficiency of offline document digitization. By inputting the digitization prompts into a pre-trained large model for content extraction, the powerful reasoning ability of the large model is used to automatically extract the content of offline documents, further improving the efficiency of offline document digitization without the need for manual content extraction.
[0091] Example 2
[0092] Please see Figure 2 This is a schematic diagram of the structure of the offline data digitization system 100 based on a large model provided in the second embodiment of the present invention, including:
[0093] The text recognition module 10 is used to acquire offline materials to be digitized and to perform text recognition on the offline materials to be digitized to obtain offline documents.
[0094] Optionally, the text recognition module 10 is further configured to: perform grayscale processing on the offline data to be digitized to obtain a grayscale image of the data, and perform normalization processing on the grayscale image of the data to obtain a normalized image;
[0095] The normalized image is convolved according to different convolution scales to obtain convolution features, and the convolution features are fused according to the convolution scale to obtain a feature pyramid.
[0096] Text prediction is performed based on the feature pyramid to obtain the text prediction result, and the target text box is determined based on the text prediction result;
[0097] The offline document is generated based on the target text box.
[0098] Furthermore, the text recognition module 10 is also used to: obtain the text existence probability in the text prediction result, and compare the text existence probability with a probability threshold;
[0099] If the probability of the text being present is greater than the probability threshold, then the text box corresponding to the probability of the text being present is determined as a candidate text box, and the overlap between different candidate text boxes is calculated.
[0100] The text box score of the candidate text box is determined based on the overlap and the probability of text presence, and the target text box is determined based on the text box score.
[0101] Furthermore, the text recognition module 10 is also used to: perform entity recognition on document paragraphs in the offline document, obtain entity recognition results, and determine the paragraph object of the document paragraph based on the entity recognition;
[0102] The document paragraphs are classified according to the paragraph objects to obtain a paragraph set, and semantic recognition is performed on the document paragraphs to obtain semantic recognition results;
[0103] Based on the semantic recognition results, the paragraph correlation degree between different document paragraphs in the same paragraph set is determined, and the document paragraphs in the same paragraph set are sorted according to the paragraph correlation degree.
[0104] Preferably, the text recognition module 10 is further configured to: combine the document paragraphs in the same paragraph set according to the sorting result of the document paragraphs, and insert a first identifier into different document paragraphs to obtain a paragraph string;
[0105] Insert the corresponding paragraph object at the beginning of the paragraph string, and combine the different paragraph strings;
[0106] Insert a second identifier into the different paragraph strings after combination to obtain a string combination, and insert the content extraction requirement at the beginning of the string combination;
[0107] A third identifier is inserted between the beginning and end of the content extraction requirement and the string combination to obtain the digital prompt of the data.
[0108] The prompt generation module 11 is used to obtain content extraction requirements and combine the content extraction requirements with the offline document to obtain a digital prompt for the data.
[0109] The content extraction module 12 is used to input the digitized prompts of the data into the pre-trained large model for content extraction, obtain the extracted data, and perform data verification on the extracted data.
[0110] Optionally, the content extraction module 12 is further configured to: acquire digital prompt samples, and input the digital prompt samples into the large model for content extraction to obtain sample extraction data, wherein the digital prompt samples include sample documents and sample prompt words;
[0111] The model loss is determined based on the sample data, and the parameters of the large model are updated based on the model loss until the large model converges, thus obtaining the pre-trained large model.
[0112] The data filling module 13 is used to obtain the online data template and fill the data extracted after data verification into the online data template.
[0113] Optionally, the data filling module 13 is further configured to: perform type identification on the data words in the data extracted after data verification, obtain the word type, and match the word type with the fill column in the online data template;
[0114] The data terms are filled into the corresponding fill fields based on the type matching results.
[0115] Please see Figure 3 The offline data digitization system 100, based on a large model, integrates an OCR engine and a large model engine. It can perform OCR recognition on uploaded data with one click, converting offline data into online text. The text data recognized by OCR and related extraction requirements are combined to form a data digitization prompt, which is sent to the large model service for automatic extraction. Finally, the extracted data is output in JSON format and automatically populated into the relevant online forms for saving.
[0116] The specific implementation steps of the offline data digitization system 100 based on a large model include:
[0117] 1. Integrates OCR engine and large model engine;
[0118] 2. Upload the offline documents and materials to be digitized to the system;
[0119] 3. Click the document recognition function to perform OCR recognition on offline documents and convert documents of different formats into plain text data;
[0120] 4. Combine the plain text data generated in the previous step with the content extraction requirements to form a prompt;
[0121] 5. Send the assembled prompt to the large model service for automatic content extraction and output of JSON format data;
[0122] 6. Read the JSON data generated in the previous step using code and automatically populate it into the online form;
[0123] 7. After the business personnel check and confirm the form data, they save it.
[0124] In this embodiment, by integrating an OCR engine to convert offline data into plain text, the workload of manual copying / pasting is reduced. The engine's large model engine uses the powerful reasoning ability of the large model to automatically extract plain text, replacing the manual extraction of content. This forms a closed-loop operation from offline data to online data storage, greatly improving the efficiency of digital work.
[0125] In this embodiment, text recognition is performed on the offline documents to be digitized, eliminating the need for manual copying and pasting of text, thus improving the efficiency of offline document digitization. By inputting the digitization prompts into a pre-trained large model for content extraction, the powerful reasoning ability of the large model is used to automatically extract the content of offline documents, further improving the efficiency of offline document digitization without the need for manual content extraction.
[0126] Example 3
[0127] Figure 4 This is a structural block diagram of a terminal device 2 provided in the third embodiment of this application. For example... Figure 4 As shown, the terminal device 2 in this embodiment includes a processor 20, a memory 21, and a computer program 22 stored in the memory 21 and executable on the processor 20, such as a program for a large-model-based offline data digitization method. When the processor 20 executes the computer program 22, it implements the steps in the various embodiments of the large-model-based offline data digitization method described above.
[0128] For example, the computer program 22 may be divided into one or more modules, which are stored in the memory 21 and executed by the processor 20 to complete this application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 22 in the terminal device 2. The terminal device may include, but is not limited to, the processor 20 and the memory 21.
[0129] The processor 20 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0130] The memory 21 can be an internal storage unit of the terminal device 2, such as a hard drive or memory of the terminal device 2. The memory 21 can also be an external storage device of the terminal device 2, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the terminal device 2. Furthermore, the memory 21 can include both internal and external storage units of the terminal device 2. The memory 21 is used to store the computer program and other programs and data required by the terminal device. The memory 21 can also be used to temporarily store data that has been output or will be output.
[0131] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0132] If an integrated module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. This computer-readable storage medium can be non-volatile or volatile. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the contents of a computer-readable storage medium may be appropriately added to or subtracted from the contents as required by the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, a computer-readable storage medium may not include electrical carrier signals and telecommunication signals.
[0133] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for digitizing offline data based on a large model, characterized in that, The method includes: Obtain offline materials to be digitized, and perform text recognition on the offline materials to be digitized to obtain offline documents; Obtain content extraction requirements and combine them with the offline documents to obtain digital prompts for the data; The digitized data prompts are input into a pre-trained large model for content extraction to obtain data extraction data, and the data extraction data is then validated. Obtain an online data template and fill the online data template with the data extracted after data verification; After performing text recognition on the offline materials to be digitized to obtain the offline documents, the process also includes: Entity recognition is performed on document paragraphs in the offline document to obtain entity recognition results, and the paragraph object of the document paragraph is determined based on the entity recognition. The document paragraphs are classified according to the paragraph objects to obtain a paragraph set, and semantic recognition is performed on the document paragraphs to obtain semantic recognition results; Based on the semantic recognition results, the paragraph correlation degree between different document paragraphs in the same paragraph set is determined, and the document paragraphs in the same paragraph set are sorted according to the paragraph correlation degree.
2. The offline data digitization method based on a large model as described in claim 1, characterized in that, The offline materials to be digitized are subjected to text recognition to obtain offline documents, including: The offline data to be digitized is subjected to grayscale processing to obtain a grayscale image of the data, and the grayscale image of the data is normalized to obtain a normalized image; The normalized image is convolved according to different convolution scales to obtain convolution features, and the convolution features are fused according to the convolution scale to obtain a feature pyramid. Text prediction is performed based on the feature pyramid to obtain the text prediction result, and the target text box is determined based on the text prediction result; The offline document is generated based on the target text box.
3. The offline data digitization method based on a large model as described in claim 2, characterized in that, Determining the target text box based on the text prediction results includes: Obtain the text existence probability in the text prediction result, and compare the text existence probability with a probability threshold; If the probability of the text being present is greater than the probability threshold, then the text box corresponding to the probability of the text being present is determined as a candidate text box, and the overlap between different candidate text boxes is calculated. The text box score of the candidate text box is determined based on the overlap and the probability of text presence, and the target text box is determined based on the text box score.
4. The offline data digitization method based on a large model as described in claim 1, characterized in that, Before inputting the digitized data into the pre-trained large model for content extraction, the process also includes: A digital prompt sample is obtained and input into the large model for content extraction to obtain sample extraction data. The digital prompt sample includes sample documents and sample prompt words. The model loss is determined based on the sample data, and the parameters of the large model are updated based on the model loss until the large model converges, thus obtaining the pre-trained large model.
5. The offline data digitization method based on a large model as described in claim 1, characterized in that, The extracted content requirements are combined with the offline documents to obtain digital information prompts, including: Based on the sorting result of the document paragraphs, the document paragraphs in the same paragraph set are combined, and a first identifier is inserted into different document paragraphs to obtain a paragraph string; Insert the corresponding paragraph object at the beginning of the paragraph string, and combine the different paragraph strings; Insert a second identifier into the different paragraph strings after combination to obtain a string combination, and insert the content extraction requirement at the beginning of the string combination; A third identifier is inserted between the beginning and end of the content extraction requirement and the string combination to obtain the digital prompt of the data.
6. The offline data digitization method based on a large model as described in claim 1, characterized in that, The data extracted after data verification is then populated into the online data template, including: The data words in the data extracted after data verification are identified by type to obtain the word type, and the word type is matched with the type of the fill column in the online data template; The data terms are filled into the corresponding fill fields based on the type matching results.
7. A large-scale model-based offline data digitization system, characterized in that, The system includes: The text recognition module is used to acquire offline materials to be digitized and to perform text recognition on the offline materials to be digitized to obtain offline documents; The prompt generation module is used to obtain content extraction requirements and combine the content extraction requirements with the offline documents to obtain digital prompts for the materials; The content extraction module is used to input the digitized prompts of the data into the pre-trained large model for content extraction, obtain the extracted data, and perform data verification on the extracted data. The data filling module is used to obtain online data templates and fill the extracted data after data verification into the online data templates; The text recognition module is also used to: perform entity recognition on document paragraphs in the offline document, obtain entity recognition results, and determine the paragraph object of the document paragraph based on the entity recognition; The document paragraphs are classified according to the paragraph objects to obtain a paragraph set, and semantic recognition is performed on the document paragraphs to obtain semantic recognition results; Based on the semantic recognition results, the paragraph correlation degree between different document paragraphs in the same paragraph set is determined, and the document paragraphs in the same paragraph set are sorted according to the paragraph correlation degree.
8. The offline data digitization system based on a large model as described in claim 7, characterized in that, The text recognition module is also used for: The offline data to be digitized is subjected to grayscale processing to obtain a grayscale image of the data, and the grayscale image of the data is normalized to obtain a normalized image; The normalized image is convolved according to different convolution scales to obtain convolution features, and the convolution features are fused according to the convolution scale to obtain a feature pyramid. Text prediction is performed based on the feature pyramid to obtain the text prediction result, and the target text box is determined based on the text prediction result; The offline document is generated based on the target text box.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Key information extraction method and system based on large language model
CN118210879A