Table information extraction method, device, equipment and medium
By inputting text blocks in the table information extraction method into the pre-trained named entity recognition model, obtaining semantic tags and generating structured data, the problems of low accuracy and process efficiency of table information extraction in the prior art are solved, and high accuracy and high efficiency of table information extraction are achieved.
Patent Information
- Application Number
- CN202210441727.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-04-25
AI Technical Summary
The existing table information extraction methods have low parsing accuracy when dealing with irregularly-typed tables, and the methods based on NLP technology have problems such as excessive extraction process and low efficiency.
By obtaining the table to be processed, the recognition process is performed to obtain multiple text blocks, and then the text blocks are input to the pre-trained named entity recognition model, semantic labels are obtained and structured data is generated. This method combines image technology and NLP technology to improve the accuracy and timeliness of extraction.
It improves the accuracy and timeliness of table information extraction, simplifies the extraction process, and can effectively handle irregularly-typed tables.
Smart Images

Figure CN114818710B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to a table information extraction method, device, electronic device and computer-readable storage medium. Background Art
[0002] At present, in the relevant table information extraction scheme, the main application technologies are divided into image-based technology and natural language processing (NLP)-based technology.
[0003] In the table information extraction solution based on image technology, the table cells are determined by identifying visible and invisible table lines, and then the relationship between cells is analyzed through the correspondence between rows and columns. However, in some specific fields, the layout of the table is not regular enough, and the cells are closely attached to each other, resulting in low parsing accuracy. At this time, using NLP technology to parse the table from the perspective of text semantics can achieve better information extraction results.
[0004] However, due to the use of too many types of NLP models and the large workload, the related solutions for extracting table information based on NLP technology have problems such as long extraction process and low efficiency. Therefore, how to provide a table information extraction method with high accuracy and simple process has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The main purpose of the embodiments of the present application is to propose a table information extraction method, device, electronic device and computer-readable storage medium, which can improve the accuracy and timeliness of table information extraction.
[0006] To achieve the above object, a first aspect of an embodiment of the present application proposes a table information extraction method, the method comprising:
[0007] Obtain a table to be processed, wherein the table includes a table header title and a content record corresponding to the table header title;
[0008] Performing recognition processing on the table to obtain multiple text blocks;
[0009] Input each of the text blocks into a pre-trained named entity recognition model, so as to obtain a semantic label corresponding to a target text block belonging to the content record through the named entity recognition model, wherein the semantic label is used to characterize the table header title corresponding to the target text block;
[0010] According to the semantic tags corresponding to the target text blocks, determining the target semantic entities corresponding to the semantic tags in the table;
[0011] Structured data is generated according to the semantic tag and the target semantic entity corresponding to the semantic tag.
[0012] According to the table information extraction method provided by some embodiments of the present invention, determining the target semantic entity corresponding to the semantic label in the table according to the semantic label corresponding to each of the target text blocks includes:
[0013] Determining the occurrence frequency of the semantic tags according to the semantic tags corresponding to the target text blocks;
[0014] Sorting the semantic tags according to the occurrence frequency from high to low;
[0015] Each of the semantic tags is traversed in order according to the order, and the currently traversed semantic tag is used as the current tag, and the following processing is performed:
[0016] Based on the current tag, digitally replace each line of text in the content record to obtain multiple semantic digital sequences corresponding to each line of text;
[0017] Determine the maximum substring sum in each of the semantic digital sequences and the text corresponding to the maximum substring sum, and use the maximum substring and the text corresponding to the maximum substring sum as the initial semantic entity corresponding to the current label;
[0018] According to the initial semantic entities corresponding to the current tags, a target semantic entity corresponding to the semantic tag in the table is determined.
[0019] According to the table information extraction method provided by some embodiments of the present invention, determining the target semantic entity corresponding to the semantic label in the table according to the initial semantic entity corresponding to each current label includes:
[0020] Acquire location information of the initial semantic entity;
[0021] Determining, according to the position information, initial semantic entities belonging to the same column in the table;
[0022] Judging the initial semantic entities belonging to the same column to determine the initial semantic entities belonging to the same content record;
[0023] The initial semantic entities belonging to the same content record are merged to determine a target semantic entity corresponding to the semantic tag in the table.
[0024] According to the table information extraction method provided by some embodiments of the present invention, the judging of the initial semantic entities belonging to the same column to determine the initial semantic entities belonging to the same content record includes:
[0025] Get the preset dictionary data set;
[0026] Based on the dictionary data set, the initial semantic entities belonging to the same column are input into a preset AC automaton for matching, so as to obtain the initial semantic entities belonging to the same content record through the AC automaton (Aho-Corasick automaton).
[0027] According to the table information extraction method provided by some embodiments of the present invention, the judging of the initial semantic entities belonging to the same column to determine the initial semantic entities belonging to the same content record includes:
[0028] Get the preset regular expression;
[0029] The initial semantic entities belonging to the same column are matched using the regular expression to obtain initial semantic entities belonging to the same content record.
[0030] According to the table information extraction method provided by some embodiments of the present invention, the judging of the initial semantic entities belonging to the same column to determine the initial semantic entities belonging to the same content record includes:
[0031] Obtaining a character feature matrix of the initial semantic entity belonging to the same column;
[0032] Performing maximum pooling on the character feature matrix to obtain a character feature vector of the initial semantic entity;
[0033] The character feature vector is input into the Xgboost model to obtain initial semantic entities belonging to the same content record through the Xgboost model.
[0034] According to the table information extraction method provided by some embodiments of the present invention, the named entity recognition model is a two-dimensional named entity recognition model based on the LayoutLM model;
[0035] Before inputting each of the text blocks into a pre-trained named entity recognition model to obtain a semantic label corresponding to a target text block belonging to the content record through the named entity recognition model, the method further includes:
[0036] Get the preset table training data set;
[0037] The two-dimensional named entity recognition model is augmented and pre-trained using the tabular training data set, wherein the augmented pre-training adopts a self-supervised pre-training method based on a masked visual language model.
[0038] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a table information extraction device, the device comprising:
[0039] A table acquisition module, used to acquire a table to be processed, wherein the table includes a table header title and a content record corresponding to the table header title;
[0040] A table recognition module is used to recognize and process the table to obtain multiple text blocks;
[0041] A semantic label extraction module, used for inputting each of the text blocks into a pre-trained named entity recognition model, so as to obtain a semantic label corresponding to a target text block belonging to the content record through the named entity recognition model, wherein the semantic label is used to characterize the table header title corresponding to the target text block;
[0042] A semantic entity extraction module, used for determining, according to the semantic tags corresponding to the target text blocks, the target semantic entities corresponding to the semantic tags in the table;
[0043] The table information extraction module generates structured data according to the semantic tag and the target semantic entity corresponding to the semantic tag.
[0044] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program implements the method described in the first aspect when executed by the processor.
[0045] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium used for computer-readable storage, and the storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to implement the method described in the first aspect above.
[0046] The present application proposes a table information extraction method, device, electronic device and computer-readable storage medium. The table information extraction method obtains a table to be processed and identifies the table to obtain multiple text blocks, and inputs each text block into a pre-trained named entity recognition model to obtain a semantic label corresponding to a target text block belonging to a content record through the named entity recognition model. The semantic label is used to characterize a table header title corresponding to the target text block. According to the semantic labels corresponding to each target text block, a target semantic entity corresponding to the semantic label in the table is determined, so that structured data of the table is generated according to the semantic label and the target semantic entity corresponding to the semantic label. The embodiment of the present application can divide the content records in the cell according to the semantic information of the table text, so as to extract the structured data of the table. On the basis of improving the extraction accuracy, the present application adopts a lightweight model to simplify the extraction process, thereby improving the timeliness of table information extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a flowchart of a table information extraction method provided in an embodiment of the present application;
[0048] Figure 2 It is a flowchart of a table information extraction method provided in an embodiment of the present application;
[0049] Figure 3 It is a flowchart of a table information extraction method provided in an embodiment of the present application;
[0050] Figure 4 It is a schematic diagram of a LayoutLm model structure provided in an embodiment of the present application;
[0051] Figure 5 It is a schematic diagram of an insurance benefit table provided in an embodiment of the present application;
[0052] Figure 6 yes Figure 5 A schematic diagram of some semantic entities in the insurance benefit table is shown;
[0053] Figure 7 yes Figure 5 A schematic diagram of some semantic entities in the insurance benefit table is shown;
[0054] Figure 8 It is a structural schematic diagram of a table information extraction device provided in an embodiment of the present application;
[0055] Fig. 9 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0057] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0058] First, some nouns involved in this application are analyzed:
[0059] LayoutLM model. Currently, a large number of research results show that large-scale pre-trained language models can effectively capture the semantic information contained in the text in the pre-training stage through self-supervised tasks, and can effectively improve the model effect after fine-tuning in downstream tasks. However, the existing pre-trained language models mainly focus on the single modality of text, while ignoring the visual structure information of the document itself that is naturally aligned with the text. The general document pre-training model LayoutLM models the document structure information (Document Layout Information) and visual information (Visual Information), allowing the model to perform multi-modal alignment in the pre-training stage. The structure and visual information introduced in the pre-training can be effectively transferred to downstream tasks, and has achieved significant accuracy improvements in downstream tasks such as form understanding (Form Understanding), receipt understanding (Receipt Understanding), and document image classification (Document Image Classification). See Figure 4 , Figure 4 A schematic diagram of the LayoutLM model structure provided in an embodiment of the present application is shown. Figure 4 As shown in the figure, the LayoutLM model structure adds two new Embedding layers, 2-DPosition Embedding and ImageEmbedding, to the existing pre-trained model:
[0060] 2-D Position Embedding, based on the text block obtained by OCR technology, we can obtain the specific position of the text in the document. After converting the corresponding coordinates into virtual coordinates, we calculate the representation of the coordinates in the four Embedding sub-layers of x, y, w, and h. The final 2-D Position Embedding is the sum of the Embeddings of the four sub-layers.
[0061] Image Embedding,In the Image Embedding part, we treat the corresponding text block of each text as a proposal in Faster R-CNN to extract the corresponding local features.,In particular, since the [CLS] symbol is used to represent the semantics of the entire input text, we also use the entire document image as the image embedding of this position to maintain modality alignment.
[0062] Masked Visual-Language Model (MVLM), a self-supervised pre-training task of the LayoutLM model. A large number of experiments have proven that the Masked Language Model (MLM) can effectively perform self-supervised learning in the pre-training stage. Modifications have been made on this basis: after masking the current word, the corresponding 2-D Position Embedding hint is retained, allowing the model to predict the corresponding word. In this method, the model predicts the masked word based on the existing context and the corresponding visual hint, allowing the model to better learn the modal alignment relationship between text position and text semantics.
[0063] At present, in the relevant table information extraction scheme, the main application technologies are divided into image-based technology and natural language processing (NLP)-based technology.
[0064] In the table information extraction solution based on image technology, the table cells are determined by identifying visible and invisible table lines, and then the relationship between cells is analyzed through the correspondence between rows and columns. However, in some specific fields, the layout of the table is not regular enough, and the cells are closely attached to each other, resulting in low parsing accuracy. At this time, using NLP technology to parse the table from the perspective of text semantics can achieve better information extraction results.
[0065] However, due to the use of too many types of NLP models and the large workload, the related solutions for extracting table information based on NLP technology have problems such as long extraction process and low efficiency. Therefore, how to provide a table information extraction method with high accuracy and simple process has become a technical problem that needs to be solved urgently.
[0066] Based on this, the embodiments of the present application provide a table information extraction method, device, electronic device and storage medium, which can improve the accuracy and timeliness of table information extraction.
[0067] A table information extraction method, device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the table information extraction method in the embodiments of the present application is described.
[0068] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0069] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0070] The table information extraction method provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the table information extraction method, etc., but is not limited to the above forms.
[0071] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0072] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a table information extraction method provided in an embodiment of the present application. Figure 1 As shown, the table information extraction method includes but is not limited to steps S110 to S150:
[0073] Step S110, obtaining a table to be processed, wherein the table includes a table header title and a content record corresponding to the table header title.
[0074] For example, see Figure 5 , Figure 5 A schematic diagram of an insurance benefit table provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the insurance interest table is a table to be processed, and the table includes a table header title: {Insurance type name, basic insurance amount, insurance period, payment method, insurance premium payment date / payment expiration date, insurance premium}, wherein the content records corresponding to the table header title include:
[0075] The table header of "Insurance Type Name" has the following content records: {Healthy Care Major Illness Insurance, Healthy and Elegant Medical Insurance, Hospitalization Care Medical Insurance, Accidental Injury Insurance};
[0076] The table header of "Basic Insurance Amount" has corresponding content records: {100000.00 yuan, 200000.00 yuan, 10000.00 yuan, 200000.00 yuan};
[0077] The title of the "Insurance Period" table corresponds to the following content records: {Lifetime, Until December 1, 2020, Until December 1, 2020, Until December 1, 2020};
[0078] The title of the "Payment Method" table has the following content records: {Annual payment / 20 years, One-time payment, One-time payment, One-time payment};
[0079] The table header title of "Insurance Premium Payment Date / Payment Expiration Date" corresponds to the content title: {December 1st of each year / December 1st of 2038};
[0080] The corresponding content records of the "Insurance Premium" header title are: {3210.00 yuan, 380.00 yuan, 300.00 yuan, 500.00 yuan per year}.
[0081] It is understandable that the table may be in a picture format or a portable document format (PDF).
[0082] Step S120, performing recognition processing on the table to obtain multiple text blocks.
[0083] It is understandable that the table is recognized and processed by optical character recognition (OCR) technology to obtain multiple text blocks in the table, wherein the text block includes coordinate information of the text block in the table and information such as character text.
[0084] Step S130, input each of the text blocks into a pre-trained named entity recognition model to obtain a semantic label corresponding to the target text block belonging to the content record through the named entity recognition model, wherein the semantic label is used to characterize the header title corresponding to the target text block.
[0085] It can be understood that, through the pre-trained named entity recognition model, multi-label classification is performed on the characters in the text block to obtain the semantic label corresponding to the target text block belonging to the content record.
[0086] For example, by pre-defining a set of semantic tags for a table, refer to Figure 5 For the insurance benefit table in the figure, the semantic label is used to characterize the table header corresponding to the target text block, so the semantic label set can be defined as follows: {insurance type name, basic insurance amount, insurance period, payment method, insurance premium payment date / payment expiration date, insurance premium, other}, using the pre-trained named entity recognition model for sequence labeling tasks, fine-tuning the labeled table data, performing multi-label classification on the words in the text block, and obtaining the semantic label corresponding to the target text block, the target text block corresponds to the content record of the table. See Figure 6 , Figure 6 yes Figure 5 The diagram of some semantic entities in the insurance benefit table is shown as follows: Figure 6 As shown, the corresponding content record in the "Insurance Type Name" table header title is: {Healthy Carefree Major Illness Insurance, Healthy and Elegant Medical Insurance, Worry-free Hospitalization Medical Insurance, Accidental Injury Insurance}, and by labeling the target text block corresponding to this part of the content record, the semantic label corresponding to the target text block is obtained: "Insurance Type Name"; the corresponding content record in the "Insurance Premium" table header title is: {3210.00 yuan, 380.00 yuan, 300.00 yuan, 500.00 yuan per year}, and by labeling the target text block corresponding to this part of the content record, the semantic label corresponding to the target text block is obtained: "Insurance Premium".
[0087] In a specific embodiment, when different semantic labels appear in the target text block, label smoothing is performed, that is, the semantic label with the highest frequency of appearance in the target text block is selected through label voting, and the semantic label with the highest frequency of appearance is used as the semantic label of all words in the target text block, that is, the semantic label corresponding to the target text block.
[0088] For example, the "Payment Deadline" table header title corresponds to the content record: "June 6, 2036". When "2036" and "June 6, 2036" in the target text block belonging to the content record "June 6, 2036" are both marked as the "Payment Deadline" semantic label, and "06" is marked as other semantic labels, the semantic label of the target text block can still be accurately obtained through label smoothing: "Payment Deadline".
[0089] In some embodiments, the named entity recognition model is a two-dimensional named entity recognition model based on the LayoutLM model;
[0090] Before inputting each of the text blocks into a pre-trained named entity recognition model to obtain a semantic label corresponding to a target text block belonging to the content record through the named entity recognition model, the method further includes:
[0091] Get the preset table training data set;
[0092] The two-dimensional named entity recognition model is augmented and pre-trained using the tabular training data set, wherein the augmented pre-training adopts a self-supervised pre-training method based on a masked visual language model.
[0093] It should be noted that the embodiments of the present application use Figure 4 The non-CNN part of the LayoutLm model, that is, the five-layer Embedding input layer and the LayouLm Embedding layer in the LayoutLm model. The Text Embedding layer represents the character-level text in the OCR recognition result. In Position Embedding, x0 and y0 represent the standardized coordinates of the upper left corner of the character in the OCR recognition result, and x1 and y1 represent the standardized coordinates of the center point of the text block where the character is located in the OCR recognition result. Coordinate standardization refers to mapping the x-coordinate and y-coordinate, that is, the width and height of the image, to numbers within a certain range, such as 0 to 1000.
[0094] It can be understood that by obtaining a preset table training data set and the OCR recognition result of the table training data set, the two-dimensional named entity recognition model based on the LayoutLM model is augmented and pre-trained, wherein the training method adopts the MVLM method.
[0095] Exemplarily, when the table information extraction method provided in the embodiments of the present application is applied to table information extraction in the insurance field, the named entity recognition model can be augmented and pre-trained by adopting the OCR recognition results of tables in the insurance field on a large scale to obtain a pre-trained named entity recognition model, so as to obtain the semantic label corresponding to the target text block in the table through the pre-trained named entity recognition model.
[0096] It should be understood that according to the application field of the table information extraction method provided in the embodiment of the present application, it is only necessary to select the corresponding table training data set to pre-train the named entity recognition model to facilitate the migration of the application field.
[0097] Step S140 , determining the target semantic entity corresponding to the semantic tag in the table according to the semantic tag corresponding to each of the target text blocks.
[0098] It is understandable that the target semantic entity in the table can be determined according to the semantic tags corresponding to each target text block. Figure 6 For example, under the table header of "Insurance Premium", the semantic tag corresponding to the target text block belonging to the content record is "Insurance Premium". This semantic tag uses the same name as the table header and is used to characterize the table header corresponding to the target text block. Therefore, according to the semantic tags corresponding to each target text block, such as the semantic tag corresponding to the target text block "3210.00 yuan per year" is "Insurance Premium", the target semantic entity corresponding to the semantic tag in the table can be determined. For example, the target semantic entities corresponding to the semantic tag "Insurance Premium" in the table are: {3210.00 yuan per year, 380.00 yuan, 300.00 yuan, 500.00 yuan}. On the other hand, that is to say, the target semantic entity is the complete content record in the table.
[0099] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of a table information extraction method provided in an embodiment of the present application. Figure 2 As shown, in some embodiments, step S140 includes but is not limited to steps S210 to S260:
[0100] Step S210, determining the occurrence frequency of the semantic tags according to the semantic tags corresponding to the target text blocks;
[0101] Step S220, sorting the semantic tags according to the occurrence frequency from high to low;
[0102] Step S230, traverse each of the semantic tags in order according to the order, take the currently traversed semantic tag as the current tag, and perform the following processing:
[0103] Step S240, based on the current tag, performing digital replacement on each line of text in the content record to obtain multiple semantic digital sequences corresponding to each line of text;
[0104] Step S250, determining the maximum substring sum in each of the semantic digital sequences and the text corresponding to the maximum substring sum, and using the maximum substring sum and the text corresponding to the maximum substring sum as the initial semantic entity corresponding to the current tag;
[0105] Step S260 , determining a target semantic entity corresponding to the semantic tag in the table according to the initial semantic entities corresponding to the current tags.
[0106] It can be understood that the semantic label corresponding to the target text block belonging to the content record is obtained through the named entity recognition model. Each line of text in the table content record may have a target text block belonging to the same content record but is marked with a different semantic label. The table information extraction method provided in the embodiment of the present application can determine the target semantic entity corresponding to the semantic label in the table based on the maximum substring and algorithm according to the semantic labels corresponding to each target text block, and correctly extract the content record in each line of text in the table. Exemplarily, a line of text in the table content record includes three target text blocks, and the text corresponding to the three target texts is: {as of, 2020, March 2} and the text belongs to a content record under the "insurance period" header title. The semantic labels corresponding to the three target text blocks obtained by the named entity recognition model are: {insurance period, payment period, insurance period}, based on the maximum substring and algorithm, according to the semantic labels corresponding to the three target text blocks, determine the target semantic entity corresponding to the "insurance period" semantic label in the table: "as of March 2, 2020", that is, the content record corresponding to the "insurance period" header title in the table: "as of March 2, 2020".
[0107] Specifically, first determine the frequency of occurrence of the semantic tags according to the semantic tags corresponding to each target text block, and then sort the semantic tags according to the frequency of occurrence from high to low. For example, the frequency of occurrence of the semantic tags from high to low is: {insurance type name, basic insurance amount, insurance period, payment method, other}, then traverse each semantic tag in turn according to the sorting, take the currently traversed semantic tag as the current tag, and perform the following processing:
[0108] Step S240: Based on the current tag, digitally replace each line of text in the content record to obtain multiple semantic digital sequences corresponding to each line of text.
[0109] Exemplarily, the current label is "Insurance Type Name", and a line of text in the table content record: "Health Care Major Illness Insurance 100,000.00 yuan lifetime annual payment / 20 years December 1st of each year / December 1st of 2038 3,210.00 yuan per year" is replaced with a number. Among them, the semantic label corresponding to the target text block of the above line of text is: {Health: "Insurance Type Name", Worry-free: "Payment Method", Major Illness Insurance: "Insurance Type Name", ...}, and the digital replacement is performed in the following way: replace the text in the target text block corresponding to the semantic label "Insurance Type Name" with the number "1", replace the text in the target text block corresponding to other semantic labels with the number "-1", and replace the text in the target text block corresponding to the "other" label with the number "0", so as to obtain the semantic digital sequence corresponding to the line of text: {1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, ..., -1}.
[0110] Step S250, determining the maximum substring sum in each of the semantic digital sequences and the text corresponding to the maximum substring sum, and using the maximum substring sum and the text corresponding to the maximum substring sum as the initial semantic entity corresponding to the current tag.
[0111] Exemplarily, taking the example in the above step S240 as an example, determine the maximum substring sum in the semantic digital sequence: {1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, ..., -1}: {1, 1, -1, -1, 1, 1, 1, 1, 1, 1}, and the text corresponding to the maximum substring and: "Healthy and Worry-free Major Illness Insurance", and take the maximum substring and the corresponding text: "Healthy and Worry-free Major Illness Insurance" as the initial semantic entity corresponding to the current label "Insurance Type Name".
[0112] It is understandable that in order to improve the accuracy and efficiency of information extraction, the replacement object of digital replacement in the current traversal operation does not include the initial semantic entity determined in the previous traversal operation. That is, when digitally replacing each line of text in the content record based on the current label, digital replacement is not performed on the text that has been determined as the initial semantic entity.
[0113] It should be understood that the digital replacement of the semantic digital sequence is not limited to the method and specific values in the above examples. As long as the semantic digital sequence can be obtained by digital replacement and the initial semantic entity corresponding to the current label is determined based on the maximum substring and algorithm, the embodiments of the present application do not impose any restrictions on this.
[0114] It should be noted that the algorithm for obtaining the maximum substring sum from a digital sequence is known to those skilled in the art and will not be described in detail here.
[0115] Step S260 , determining a target semantic entity corresponding to the semantic tag in the table according to the initial semantic entities corresponding to the current tags.
[0116] It can be understood that after the above traversal operation, the initial semantic entities corresponding to each current tag in the content records of each row of the table can be obtained, and then the target semantic entity corresponding to the semantic tag in the table can be determined, that is, the complete content record corresponding to the table header title in the table.
[0117] See also Figure 3 , Figure 3 FIG. 1 is a flow chart of a table information extraction method provided in an embodiment of the present application. Figure 3 As shown, in some embodiments, step S260 includes but is not limited to steps S310 to S340:
[0118] Step S310: Acquire the location information of the initial semantic entity.
[0119] Step S330: determining the initial semantic entities belonging to the same column in the table according to the position information.
[0120] It can be understood that the location information of the initial semantic entity is obtained, for example, by obtaining the target text block corresponding to the initial semantic entity, wherein the target text block includes the coordinate information of the target text block in the table and information such as character text, and the location information of the initial semantic entity is obtained according to the coordinate information included in the target text block. Then, according to the location information of the initial semantic entity, the initial semantic entities belonging to the same column in the table are determined, and then the initial semantic entities belonging to the same column are judged to determine the initial semantic entities belonging to the same content record.
[0121] Step S330 : judging the initial semantic entities belonging to the same column to determine the initial semantic entities belonging to the same content record.
[0122] Step S340: merging the initial semantic entities belonging to the same content record, and determining a target semantic entity corresponding to the semantic tag in the table.
[0123] It should be understood that if there are texts belonging to the same content record in the table that cross rows, it is necessary to judge whether the texts in the same column of the table belong to the same content record. Figure 6As shown, under the header title "Insurance Type Name" in the table, there are content records such as "Inpatient Carefree Medical Insurance", etc. However, it appears across multiple lines and is divided into two initial semantic entities: "Inpatient Carefree Medical" and "Insurance". Therefore, it is necessary to judge "Inpatient Carefree Medical" and "Insurance" to determine whether the target semantic entity belongs to the same content record, and merge them to obtain the target semantic entity corresponding to the semantic label of "Insurance Type Name": "Inpatient Carefree Medical Insurance".
[0124] Exemplarily, for judging initial semantic entities belonging to the same column, refer to Figure 6 , for the initial semantic entities in the same column corresponding to the header title "Insurance Type Name", starting from the first row, two initial semantic entities can be judged in sequence. For example, first judge the initial semantic entities "Health Carefree Major" and "Disease Insurance" to determine whether they belong to the same content record:
[0125] If the initial semantic entities "Health Carefree Major" and "Disease Insurance" belong to the same content record, then judge the text "Health Carefree Major Disease Insurance" and the initial semantic entity "Kangjian Huagui Medical";
[0126] If the initial semantic entities "Health Carefree Major" and "Disease Insurance" do not belong to the same content record, then judge the initial semantic entity "Disease Insurance" and the initial semantic entity "Kangjian Huagui Medical";
[0127] And so on, the initial semantic entities that can be determined to belong to the same content record are: {"Health Carefree Major" and "Disease Insurance", "Kangjian Huagui Medical" and "Insurance", "Inpatient Carefree Medical" and "Insurance"}. After that, merge the initial semantic entities that belong to the same content record to determine the target semantic entity corresponding to the semantic label in the table, refer to Figure 7 , Figure 7 is Figure 5 a partial semantic entity schematic diagram in the insurance benefit table shown, as Figure 7 shown, the target semantic entity corresponding to the semantic label of "Insurance Type Name", that is, for the header title "Insurance Type Name", the initial semantic entities that belong to the same content record are: {Health Carefree Major Disease Insurance, Kangjian Huagui Medical Insurance, Inpatient Carefree Medical Insurance, Accident Insurance}.
[0128] It should be noted that the judgment of the initial semantic entities belonging to the same column is not limited to the methods and orders provided in the above examples. As long as it can be determined whether the initial semantic entities of the same column content record belong to the same content record, this embodiment does not make any restrictions on this.
[0129] In some embodiments, the judgment of the initial semantic entities belonging to the same column to determine the initial semantic entities belonging to the same content record includes:
[0130] Get the preset dictionary data set;
[0131] Based on the dictionary data set, the initial semantic entities belonging to the same column are input into a preset AC automaton for matching, so as to obtain the initial semantic entities belonging to the same content record through the AC automaton.
[0132] It is understandable that the dictionary data set may be a noun dictionary or a word-frequency dictionary. In particular, for the table information extraction method provided in this embodiment, the corresponding dictionary data set is obtained according to the application field of the table information extraction method. Exemplarily, the table information extraction method is applied to the insurance field, and the corresponding insurance noun dictionary and insurance noun-frequency dictionary are obtained.
[0133] In a specific embodiment, the table information extraction method is applied to the insurance field, and the initial semantic entities that belong to the same column and are adjacent to each other are judged. The corresponding insurance term dictionary and insurance term-frequency dictionary are used to match them through a preset AC automaton. The AC automaton is used to determine whether the initial semantic entities belong to the same content record, that is, the initial semantic entities belonging to the same content record are obtained through the AC automaton.
[0134] In some embodiments, judging the initial semantic entities belonging to the same column to determine the initial semantic entities belonging to the same content record includes:
[0135] Get the preset regular expression;
[0136] The initial semantic entities belonging to the same column are matched using the regular expression to obtain initial semantic entities belonging to the same content record.
[0137] Exemplarily, for text whose initial semantic entity is of date type, a preset date regular expression is obtained, such as: YYYY-MM-DD-day, to match the initial semantic entities belonging to the same column. For example, using the date regular expression: YYYY-MM-DD-day, the initial semantic entities {2020, December 1} belonging to the same column are matched, and it can be determined that the initial semantic entity {2020, December 1} belongs to the same content record.
[0138] In some embodiments, judging the initial semantic entities belonging to the same column to determine the initial semantic entities belonging to the same content record includes:
[0139] Obtaining a character feature matrix of the initial semantic entity belonging to the same column;
[0140] Performing maximum pooling on the character feature matrix to obtain a character feature vector of the initial semantic entity;
[0141] The character feature vector is input into the Xgboost model to obtain initial semantic entities belonging to the same content record through the Xgboost model.
[0142] For example, using Figure 4 The pre-trained Layout model in the LayoutLm model uses the five-layer Embedding input layer and the LayouLm Embedding layer in the LayoutLm model as the feature extractor of the semantic paragraph, and outputs a 512-dimensional character feature vector. Take out the one-dimensional character feature matrix of the initial semantic entities belonging to the same column, for example, the one-dimensional character feature matrix of two initial semantic entities belonging to the same column and adjacent to each other: and Max-pooling is performed separately to obtain the character feature vectors corresponding to the two initial semantic entities: and The character feature vector is input into the Xgboost model to determine whether the two initial semantic entities belong to the same content record through the Xgboost model, that is, the initial semantic entities belonging to the same content record are obtained through the Xgboost model.
[0143] It is understandable that other machine learning models may also be selected in the above embodiments, and the embodiments of the present application are not limited thereto.
[0144] In a specific embodiment, the method judges the initial semantic entities belonging to the same column through AC automaton matching, regular expression matching and Xgboost model learning to determine the initial semantic entities belonging to the same content record. Among them, the three methods of AC automaton matching, regular expression matching and Xgboost model learning are complementary. Any method determines that the initial semantic entities belong to the same content record, and the initial semantic entities belonging to the same content record can be obtained.
[0145] Step S150: generating structured data according to the semantic tag and the target semantic entity corresponding to the semantic tag.
[0146] It can be understood that the semantic tag is used to represent the table header title corresponding to the target text block, and the target semantic entity corresponding to the semantic tag is the content record corresponding to the table header title in the table. Therefore, structured data is generated according to the semantic tag and the target semantic entity corresponding to the semantic tag, that is, according to the table header title and the content record corresponding to the table header title.
[0147] The following describes the table information extraction method provided by the embodiment of the present application through a specific embodiment applied to the insurance field:
[0148] See also Figures 4 to 7 The table information extraction method obtains an insurance policy table training data set, adopts an MVLM method, and uses the table training data set to perform augmented pre-training on a two-dimensional named entity recognition model based on a LayoutLM model.
[0149] The insurance benefit table to be processed is obtained, and OCR recognition processing is performed on the insurance benefit table to obtain multiple text blocks. A semantic label set {insurance type name, basic insurance amount, insurance period, payment method, insurance premium payment date / payment expiration date, insurance premium, others} is defined, and the multiple text blocks are input into a pre-trained named entity recognition model to perform sequence labeling tasks through the named entity recognition model, fine-tuning the labeled table data, performing multi-label classification on the characters in the text block, and obtaining the semantic label corresponding to the target text block belonging to the content record, and the semantic label is used to characterize the table header title corresponding to the target text block.
[0150] According to the semantic labels corresponding to the target text blocks, the target semantic entities corresponding to the semantic labels in the insurance interest table are determined. If the text of the same content record in the insurance interest table is divided into multiple target text blocks or the text of the same content record crosses lines, each line of text in the content record is judged and merged based on the maximum substring sum algorithm, or each column of text in the content record is judged and merged through methods such as AC automaton matching, regular expression matching, and Xgboost model learning, so as to determine the target semantic entity corresponding to the semantic label in the insurance interest table, that is, to determine the complete content record corresponding to the table header title in the insurance interest table.
[0151] Finally, structured data is generated based on the semantic tags and the target semantic entities corresponding to the semantic tags, that is, based on the table headers and the content records corresponding to the table headers:
[0152]
[0153] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present application, it should not be understood as requiring the operations to be performed in the specific order or serial order shown, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0154] The present application proposes a table information extraction method, device, electronic device and computer-readable storage medium. The table information extraction method obtains a table to be processed and identifies the table to obtain multiple text blocks, and inputs each text block into a pre-trained named entity recognition model to obtain a semantic label corresponding to a target text block belonging to a content record through the named entity recognition model. The semantic label is used to characterize a table header title corresponding to the target text block. According to the semantic labels corresponding to each target text block, a target semantic entity corresponding to the semantic label in the table is determined, so that structured data of the table is generated according to the semantic label and the target semantic entity corresponding to the semantic label. The embodiment of the present application can divide the content records in the cell according to the semantic information of the table text, so as to extract the structured data of the table. On the basis of improving the extraction accuracy, the present application adopts a lightweight model to simplify the extraction process, thereby improving the timeliness of table information extraction.
[0155] See also Figure 8 The embodiment of the present application further provides a table information extraction device 100, the table information extraction device 100 comprising:
[0156] The table acquisition module 110 is used to acquire a table to be processed, wherein the table includes a table header and a content record corresponding to the table header;
[0157] A table recognition module 120 is used to recognize the table and obtain multiple text blocks;
[0158] A semantic label extraction module 130, used for inputting each of the text blocks into a pre-trained named entity recognition model, so as to obtain a semantic label corresponding to a target text block belonging to the content record through the named entity recognition model, wherein the semantic label is used to characterize the table header title corresponding to the target text block;
[0159] A semantic entity extraction module 140, configured to determine, according to the semantic tags corresponding to the target text blocks, the target semantic entities corresponding to the semantic tags in the table;
[0160] The table information extraction module 150 generates structured data according to the semantic tag and the target semantic entity corresponding to the semantic tag.
[0161] The present application proposes a table information extraction device, which obtains a table to be processed through a table acquisition module, and a table recognition module recognizes and processes the table to obtain multiple text blocks. The semantic label extraction module inputs each text block into a pre-trained named entity recognition model to obtain a semantic label corresponding to a target text block belonging to a content record through the named entity recognition model, and the semantic label is used to characterize a table header title corresponding to the target text block. The semantic entity extraction module determines the target semantic entity corresponding to the semantic label in the table according to the semantic label corresponding to each target text block. The table information extraction module generates structured data of the table according to the semantic label and the target semantic entity corresponding to the semantic label. The embodiment of the present application can divide the content records in the cell according to the semantic information of the table text, so as to extract the structured data of the table. On the basis of improving the extraction accuracy, the present application adopts a lightweight model to simplify the extraction process, thereby improving the timeliness of table information extraction.
[0162] It should be noted that the information interaction, execution process and other contents between the modules of the above-mentioned device are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0163] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device provided in an embodiment of the present application is shown, and the electronic device includes:
[0164] The processor 210 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant computer programs to implement the technical solutions provided in the embodiments of the present application;
[0165] The memory 220 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 220 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 220, and the processor 210 calls and executes the table information extraction method of the embodiment of this application;
[0166] Input / output interface 230, used to implement information input and output;
[0167] The communication interface 240 is used to realize the communication interaction between the device and other devices, and the communication can be realized by wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.); and the bus 250 transmits information between each component of the device (such as the processor 210, the memory 220, the input / output interface 230 and the communication interface 240);
[0168] The processor 210 , the memory 220 , the input / output interface 230 , and the communication interface 240 are connected to each other in communication within the device via the bus 250 .
[0169] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to implement the above-mentioned table information extraction method.
[0170] The memory, as a computer-readable storage medium, can be used to store software programs and computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0171] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0172] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0173] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0174] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0175] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application 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 can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0176] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0177] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0178] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0179] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0180] If the assembled units are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., and other media that can store programs.
[0181] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A table information extraction method, characterized in that: include: Obtain a table to be processed, wherein the table includes a table header title and a content record corresponding to the table header title; Performing recognition processing on the table to obtain multiple text blocks; Input each of the text blocks into a pre-trained named entity recognition model, so as to obtain a semantic label corresponding to a target text block belonging to the content record through the named entity recognition model, wherein the semantic label is used to characterize the table header title corresponding to the target text block; Determining the occurrence frequency of the semantic tags according to the semantic tags corresponding to the target text blocks; Sorting the semantic tags according to the occurrence frequency from high to low; Traverse each of the semantic tags in order according to the sorting, take the currently traversed semantic tag as the current tag, and perform the following processing: based on the current tag, perform digital replacement on each line of text in the content record to obtain multiple semantic digital sequences corresponding to each line of text, determine the maximum substring sum in each of the semantic digital sequences and the text corresponding to the maximum substring and the text, and take the maximum substring and the text corresponding to the text as the initial semantic entity corresponding to the current tag, and determine the target semantic entity corresponding to the semantic tag in the table according to the initial semantic entities corresponding to each of the current tags; Structured data is generated according to the semantic tag and the target semantic entity corresponding to the semantic tag.
2. The table information extraction method according to claim 1, characterized in that: The step of determining the target semantic entity corresponding to the semantic label in the table according to the initial semantic entities corresponding to the current labels comprises: Acquire location information of the initial semantic entity; Determining, according to the position information, initial semantic entities belonging to the same column in the table; Judging the initial semantic entities belonging to the same column to determine the initial semantic entities belonging to the same content record; The initial semantic entities belonging to the same content record are merged to determine a target semantic entity corresponding to the semantic tag in the table.
3. The table information extraction method according to claim 2, characterized in that: The judging the initial semantic entities belonging to the same column to determine the initial semantic entities belonging to the same content record includes: Get the preset dictionary data set; Based on the dictionary data set, the initial semantic entities belonging to the same column are input into a preset AC automaton for matching, so as to obtain the initial semantic entities belonging to the same content record through the AC automaton.
4. The table information extraction method according to claim 2, characterized in that: The judging the initial semantic entities belonging to the same column to determine the initial semantic entities belonging to the same content record includes: Get the preset regular expression; The initial semantic entities belonging to the same column are matched using the regular expression to obtain initial semantic entities belonging to the same content record.
5. The table information extraction method according to claim 2, characterized in that: The judging the initial semantic entities belonging to the same column to determine the initial semantic entities belonging to the same content record includes: Obtaining a character feature matrix of the initial semantic entity belonging to the same column; Performing maximum pooling on the character feature matrix to obtain a character feature vector of the initial semantic entity; The character feature vector is input into the Xgboost model to obtain initial semantic entities belonging to the same content record through the Xgboost model.
6. The table information extraction method according to claim 1, characterized in that: The named entity recognition model is a two-dimensional named entity recognition model based on the LayoutLM model; Before inputting each of the text blocks into a pre-trained named entity recognition model to obtain a semantic label corresponding to a target text block belonging to the content record through the named entity recognition model, the method further includes: Get the preset table training data set; The two-dimensional named entity recognition model is augmented and pre-trained using the tabular training data set, wherein the augmented pre-training adopts a self-supervised pre-training method based on a masked visual language model.
7. A table information extraction device, characterized in that: The device comprises: A table acquisition module, used to acquire a table to be processed, wherein the table includes a table header title and a content record corresponding to the table header title; A table recognition module is used to recognize and process the table to obtain multiple text blocks; A semantic label extraction module, used for inputting each of the text blocks into a pre-trained named entity recognition model, so as to obtain a semantic label corresponding to a target text block belonging to the content record through the named entity recognition model, wherein the semantic label is used to characterize the table header title corresponding to the target text block; A semantic entity extraction module is used to determine the frequency of occurrence of the semantic tags according to the semantic tags corresponding to each of the target text blocks, sort the semantic tags from high to low according to the frequency of occurrence, traverse the semantic tags in sequence according to the sorting, take the currently traversed semantic tag as the current tag, and perform the following processing: based on the current tag, perform digital replacement on each line of text in the content record to obtain multiple semantic digital sequences corresponding to each line of text, determine the maximum substring sum in each of the semantic digital sequences and the text corresponding to the maximum substring and, take the maximum substring and the text corresponding to the maximum substring as the initial semantic entity corresponding to the current tag, and determine the target semantic entity corresponding to the semantic tag in the table according to the initial semantic entities corresponding to each of the current tags; The table information extraction module generates structured data according to the semantic tag and the target semantic entity corresponding to the semantic tag.
8. An electronic device, characterized in that: include: Memory, used to store programs; A processor, configured to execute the program stored in the memory. When the processor executes the program stored in the memory, the processor is configured to execute: the table information extraction method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to execute: the table information extraction method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Table picture content extraction method, device and equipment based on artificial intelligence
CN113887422A
Information acquisition method and device, medium and computing equipment
CN114357335A