File structured information extraction method and device, equipment, medium and product

By acquiring the file content type and performing text recognition and structured content entity recognition, entity relationship data is constructed, solving the problems of accuracy and completeness in extracting structured information from multiple types of files, and realizing efficient extraction of structured information from multimodal files.

CN120849649AActive Publication Date: 2025-10-28HANGZHOU HAOLINK INTELLIGENT TECHNOLOGY CO LTD +1
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202511358445.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2025-10-28
Estimated Expiration
2045-09-23

AI Technical Summary

Technical Problem

Existing technologies for extracting structured information from multiple types of documents lack accuracy and completeness, and fail to effectively consider the relationships between texts.

Method used

By obtaining the content type of the file to be processed, text recognition and structured content entity recognition are performed. Entity relationship data is constructed using the coordinates of the content entities, and structured information is extracted, including the processing of text content files and image content files.

Benefits of technology

It improves the accuracy and completeness of structured information extraction, expands the scope of application, and meets the needs of structured information extraction from multimodal documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849649A_ABST
    Figure CN120849649A_ABST
Patent Text Reader

Abstract

The invention discloses a file structured information extraction method and device, equipment, a medium and a product, and relates to the technical field of data processing, and the method comprises the following steps: determining a file content type of a to-be-processed file; under the condition of determining that the file content type is the image content file, performing text recognition on the to-be-processed file, and determining a to-be-processed text contained in the to-be-processed file and a text region coordinate corresponding to the to-be-processed text in the to-be-processed file; carrying out structured content entity recognition on the to-be-processed text, and determining structured content entities contained in the to-be-processed text and content entity coordinates respectively corresponding to the structured content entities in the text region coordinates; and constructing content entity relation data among the structured content entities according to the content entity coordinates, and performing structured information extraction on the to-be-processed text according to the content entity relation data to obtain target structured information contained in the to-be-processed file. According to the invention, the accuracy and integrity of structured information extraction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, device, medium, and product for extracting structured information from documents. Background Technology

[0002] With the development of knowledge base and retrieval enhancement generation technologies, efficient parsing and structured processing of various file types have become core challenges.

[0003] In existing technologies, the extraction of structured information for various types of files usually involves directly extracting structured information based on the text contained in the file, without considering the correlation between the texts. This results in insufficient accuracy and completeness of the extracted structured information. Summary of the Invention

[0004] This invention provides a method, apparatus, device, medium, and product for extracting structured information from documents, in order to solve the problems of insufficient accuracy and completeness in existing document structured information extraction methods.

[0005] According to one aspect of the present invention, a method for extracting structured information from a document is provided, the method comprising:

[0006] Obtain the file to be processed from which structured information needs to be extracted, and determine the file content type of the file to be processed; wherein, the file content type is a text content file or an image content file;

[0007] If the file content type is determined to be the image content file, text recognition is performed on the file to be processed, and the text to be processed contained in the file to be processed is determined according to the text recognition result, as well as the text region coordinates corresponding to the text to be processed in the file to be processed.

[0008] The text to be processed is subjected to structured content entity recognition to determine at least one structured content entity contained in the text to be processed, and the content entity coordinates corresponding to each structured content entity in the text region coordinates respectively;

[0009] Based on the coordinates of each content entity, content entity relationship data between each structured content entity is constructed, and the structured information of the text to be processed is extracted based on the content entity relationship data to obtain the target structured information contained in the file to be processed.

[0010] According to another aspect of the present invention, an apparatus for extracting structured information from documents is provided, the apparatus comprising:

[0011] The file content type determination module is used to obtain the file to be processed from which structured information needs to be extracted, and to determine the file content type of the file to be processed; wherein, the file content type is a text content file or an image content file;

[0012] The text recognition module is used to perform text recognition on the file to be processed when the file content type is determined to be the image content file, and to determine the text to be processed contained in the file to be processed based on the text recognition result, as well as the text region coordinates corresponding to the text to be processed in the file to be processed.

[0013] The structured content entity recognition module is used to perform structured content entity recognition on the text to be processed, determine at least one structured content entity contained in the text to be processed, and the content entity coordinates corresponding to each structured content entity in the text region coordinates.

[0014] The structured information extraction module is used to construct content entity relationship data between the structured content entities based on the coordinates of each content entity, and to extract structured information from the text to be processed based on the content entity relationship data to obtain the target structured information contained in the file to be processed.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] At least one processor; and

[0017] A memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the document structure information extraction method according to any one of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the method for extracting structured information from a file as described in any one of the present invention.

[0020] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method for extracting structured information from files as described in any one of the present invention.

[0021] This invention obtains a file from which structured information needs to be extracted and determines the file content type; wherein the file content type is a text content file or an image content file; when the file content type is determined to be an image content file, text recognition is performed on the file to be processed, and the text to be processed contained in the file is determined based on the text recognition results, as well as the text region coordinates corresponding to the text to be processed in the file; structured content entity recognition is performed on the text to be processed to determine at least one structured content entity contained in the text to be processed, as well as the content entity coordinates corresponding to each structured content entity in the text region coordinates; content entity relationship data between each structured content entity is constructed based on the content entity coordinates, and structured information is extracted from the text to be processed based on the content entity relationship data to obtain the target structured information contained in the file to be processed. The beneficial effects are:

[0022] By identifying the structured content entities and their coordinates contained in the text to be processed, content entity relationship data between the structured content entities is constructed based on the content entity coordinates. Furthermore, the structured information is extracted using this content entity relationship data. This process of extracting structured information takes into account the correlation between the structured content entities, thereby improving the accuracy and completeness of the structured information extraction.

[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 A flowchart illustrating a method for extracting structured information from a document, as provided in Embodiment 1 of the present invention;

[0026] Figure 2 This is a flowchart of a method for extracting structured information from a document, provided in Embodiment 2 of the present invention;

[0027] Figure 3 This is a schematic diagram of a device for extracting structured information from documents according to Embodiment 3 of the present invention;

[0028] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the method for extracting structured information from files according to embodiments of the present invention. Detailed Implementation

[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first," "second," "third," "fourth," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0031] Example 1

[0032] Figure 1 This is a flowchart illustrating a method for extracting structured information from a file according to Embodiment 1 of the present invention. This embodiment is applicable to situations where structured information is extracted from a file using content entity relationship data. This method can be executed by a file structured information extraction device, which can be implemented in hardware and / or software, such as using a computer. Figure 1 As shown, the method includes:

[0033] S101. Obtain the file to be processed from which structured information needs to be extracted, and determine the file content type of the file to be processed.

[0034] Structured information refers to information with a predefined format, clear data relationships, and that can be directly parsed by computer programs. Its core characteristic is that data elements are organized in a standardized way, facilitating automatic extraction and analysis by machines. For example, structured information can include headings, subheadings, body text, tables, list items, and so on in a document.

[0035] The file to be processed refers to the original input file from which structured information needs to be extracted. The file content type refers to the technical classification of the underlying data structure and information carrying format of the file to be processed.

[0036] In this embodiment, the file content type is either a text content file or an image content file. A text content file refers to a file type that uses character encoding as its core storage format and whose semantic information can be directly read using text parsing tools; essentially, it represents human-readable characters using binary code. For example, file content types can include Word files, TXT files, and so on.

[0037] Image content files refer to a file type that uses visual pixels or vector graphics as its core data carrier and requires computer vision technology to interpret its semantics. Essentially, they record color and coordinate information through binary encoding. For example, image content files can include scanned documents, screenshots, image-based PDFs, and so on.

[0038] In one implementation, when a user or business system uploads a file to be processed from which structured information needs to be extracted to a cloud storage service, the computer automatically triggers an event listening mechanism to determine that the cloud storage service currently stores the latest file to be processed. Then, based on the communication connection between the computer and the cloud storage service, the computer retrieves the file from which structured information needs to be extracted from the cloud storage service.

[0039] In another implementation, a file storage and file modification monitoring service is deployed in the computer to monitor a designated directory on the computer's storage device in real time. When a new file for which structured information needs to be extracted is stored in the designated directory, or when an existing file for which structured information needs to be extracted is modified, the computer automatically triggers a file retrieval operation to obtain the file for which structured information needs to be extracted.

[0040] After obtaining the file from which structured information needs to be extracted, in one implementation, the computer reads the binary header signature of the file and compares it with a header signature comparison database to determine the file content type. For example, the header signature of text content files usually begins with a printable character encoding; the header signature of image content files has a clear identifier, such as "FF D8 FF" for JPEG files and "89 50 4E 47" for PNG files.

[0041] After obtaining the file from which structured information needs to be extracted, in another implementation, the judgment is made based on the statistical characteristics and structural patterns of the file content:

[0042] A. Detect whether the character distribution of the file to be processed conforms to the rules of natural language, or whether there are continuous semantic paragraph delimiters. If so, determine that the file content type of the file to be processed is a text content file.

[0043] B. Verify whether the binary data of the file to be processed contains regular pixel matrix or compression algorithm characteristics. If so, determine that the file content type of the file to be processed is an image content file.

[0044] S102. If the file content type is determined to be an image content file, perform text recognition on the file to be processed, and determine the text to be processed contained in the file to be processed, as well as the coordinates of the text region corresponding to the text to be processed in the file to be processed, based on the text recognition results.

[0045] Text recognition refers to the process of converting visual text information in an image into editable and searchable text data using computer vision technology, and locating its spatial position. The text to be processed refers to the text content extracted from the file to be processed using text recognition technology that needs further processing. Text region coordinates refer to the precise location markers of the text to be processed within the file to be processed, detected by text recognition technology; they are typically represented by geometric coordinates to indicate the boundary range of a text block.

[0046] In one implementation, when the file content type is determined to be an image content file, the file to be processed is preprocessed, including but not limited to at least one of image denoising, image correction, and image resolution reconstruction. Image denoising includes, but is not limited to, using an adaptive binarization algorithm to remove image noise, such as speckles and shadows; image correction includes, but is not limited to, correcting tilted images using Hough transform, such as ensuring the image tilt angle is ≤15°; image resolution reconstruction includes, but is not limited to, performing super-resolution reconstruction on low-resolution images, such as images with a resolution ≤200 dpi, such as using an ESRGAN model to increase the resolution to 300 dpi or higher.

[0047] Furthermore, for the preprocessed file to be processed, a multimodal OCR (Optical Character Recognition) engine is used for text recognition. This engine integrates CTPN (Connectionist Text Proposal Network) text detection with CRNN (Convolutional Recurrent Neural Network) character recognition, outputting the text to be processed contained in the file, as well as the coordinates of the corresponding text regions within the file. The output format includes, but is not limited to, "text content + text region coordinates," such as "text content XXX, x:100-500, y:300-600."

[0048] S103. Perform structured content entity recognition on the text to be processed, determine at least one structured content entity contained in the text to be processed, and the content entity coordinates corresponding to each structured content entity in the text region coordinates.

[0049] Structured content entity recognition refers to the process of automatically identifying predefined structured content entities from unstructured text to be processed and determining their coordinate positions in the text.

[0050] Structured content entities refer to logical units in the text to be processed that have clear semantic boundaries and functional attributes, including but not limited to titles, subheadings, body paragraphs, tables, list items, etc. Content entity coordinates refer to the spatial location information of different structured content entities in the text to be processed, that is, the coordinates corresponding to the text area coordinates. These coordinates are digitally mapped to associate structured content entities with physical locations.

[0051] In one implementation, a named entity recognition model is used to perform structured content entity recognition on the text to be processed, thereby determining at least one structured content entity contained in the text to be processed, and the content entity coordinates corresponding to each structured content entity in the text region coordinates.

[0052] For example, it can identify entities such as "title entity ('3.1 Equipment Parameters', coordinates x:50-200, y:100-150)", "table entity (coordinates x:100-500, y:300-600)", and "body text entity ('Equipment Parameter Description', coordinates x:50-300, y:200-250)".

[0053] S104. Construct content entity relationship data between each structured content entity based on the coordinates of each content entity, and extract structured information from the text to be processed based on the content entity relationship data to obtain the target structured information contained in the file to be processed.

[0054] Content entity relationship data refers to structured data describing the logical connections and spatial locations between different structured content entities during document structuring. Its core function is to transform discrete structured content entities into a knowledge network with contextual relationships. For example, content entity relationship data can be represented in the form of triples: (structured content entity A, relation, structured content entity B), such as (heading entity "3.1 Equipment Parameters", containing, body text entity "Equipment Parameter Description"); or (heading 1, containing, subheading 1.1); or (table 2, subordinate, body paragraph 3), etc.

[0055] Structured information extraction refers to the technical process of identifying structured information from unstructured files, analyzing their logical relationships, and outputting machine-readable structured data.

[0056] In one implementation, the coordinate distance between each structured content entity is determined based on the coordinates of each content entity, and the structured content entities are associated based on the coordinate distance. Structured content entities with similar coordinate distances are identified from the structured content entities, and entity relationships are constructed among these similarly distanced entities to generate content entity relationship data. Further, a large language model is used to extract structured information from the text to be processed based on the content entity relationship data, outputting the target structured information contained in the file to be processed.

[0057] For example, the output example of the target structured information includes "|Parameter Name|Value|Remarks|\n|Voltage|220V|N / A|". It should be understood that this embodiment only uses the above example as an example to illustrate the form and content of the target structured information, and does not limit the form and content of the target structured information in any way.

[0058] Optionally, after generating the content entity relationship data, the method further includes: generating a knowledge graph based on the entity relationship data using an attribute graph model, wherein "structured content entities" serve as nodes in the knowledge graph, and the relationships between structured content entities serve as "edge relationships." Node attributes include at least one of entity type, content entity text, content entity coordinates, and confidence level; edge relationship attributes include edge relationship type, such as inclusion or subordination relationship, coordinate distance, etc.

[0059] This invention provides an embodiment of a process for obtaining a file from which structured information needs to be extracted and determining the file content type. If the file content type is determined to be an image file, text recognition is performed on the file, and the text to be processed is determined based on the text recognition results, along with the coordinates of the text region corresponding to the text to be processed within the file. Structured content entity recognition is then performed on the text to be processed to determine at least one structured content entity, and the coordinates of each structured content entity in the text region coordinates. Content entity relationship data between the structured content entities is constructed based on the coordinates of each content entity, and structured information is extracted from the text based on this content entity relationship data to obtain the target structured information contained in the file. The beneficial effects are:

[0060] Firstly, by determining the structured content entities and their coordinates contained in the text to be processed, content entity relationship data between structured content entities is constructed based on the content entity coordinates. Furthermore, structured information is extracted using this content entity relationship data. This process of extracting structured information takes into account the correlation between various structured content entities, thereby improving the accuracy and completeness of structured information extraction.

[0061] Secondly, it achieves the effect of extracting structured information from image content files, expands the scope of application of structured information extraction, and meets users' business needs for extracting structured information from multimodal files.

[0062] Optionally, before extracting structured information from the text to be processed based on the content entity relationship data to obtain the target structured information contained in the file to be processed, the process may also include:

[0063] When the file content type is text content file, obtain the pre-set structured content hierarchy tags in the file to be processed; construct the content entity relationship data between each structured content entity based on the structured content hierarchy tags.

[0064] Among them, structured content hierarchy tags refer to semantic tags used to identify different hierarchical logical structures in a file to be processed. Their core function is to construct a structured network of relationships between content entities based on the hierarchical relationships of the tags. For example, structured content hierarchy tags... <w:t>Used to mark the main text; for example, structured content hierarchy tags. <w:tbl>Used for marking tables, etc.

[0065] In one implementation, when the file content type is a text file, the file to be processed is parsed to obtain preset structured content hierarchy tags. Further, based on the preset structured content hierarchy tags, content entity relationship data between each structured content entity is constructed.

[0066] For example, suppose structured content hierarchy tags <w:t>Includes structured content hierarchy tags <w:tbl>Structured content hierarchy tags <w:t>Used to mark the body text 1, a structured content hierarchy tag. <w:tbl>If the label is used to mark Table 1, then it is determined that Body 1 contains Table 1.

[0067] By retrieving pre-defined structured content hierarchy tags from a text file and constructing content entity relationship data between structured content entities based on these tags, the beneficial effects are:

[0068] Firstly, by using preset structured content hierarchy tags, it can automatically identify structured content entities in the text to be processed, solving the problem of fuzzy structure in traditional text processing and achieving the effect of accurately identifying content structure.

[0069] Secondly, based on structured content hierarchical tags, it automatically generates parent-child, parallel, and other relationship data of structured content entities, forming knowledge graph-style entity relationship data, thus achieving the effect of automatically constructing entity relationship data.

[0070] Optionally, after obtaining the target structured information contained in the file to be processed, the following may also be included:

[0071] The target structured information and content entity relationship data are associated and stored in the target knowledge base.

[0072] Among them, associative storage refers to binding and storing target structured information with content entity relationship data through specific technical means, so as to form a traceable semantic network between the data. Target knowledge base refers to a dedicated database system that has been structured and designed for associative storage of specific structured information and content entity relationship data.

[0073] In one implementation, after obtaining the target structured information contained in the file to be processed, the target structured information and content entity relationship data are associated and stored in the target knowledge base using data association storage technology.

[0074] By associating and storing the target structured information with the content entity relationship data in the target knowledge base, the beneficial effect is that it supports the simultaneous retrieval of structured information and content entity relationship data during subsequent searches.

[0075] Example 2

[0076] Figure 2 This is a flowchart illustrating a method for extracting structured information from documents according to Embodiment 2 of the present invention. This embodiment further optimizes and expands upon the above embodiments and can be combined with the various optional implementation methods described above. For example... Figure 2 As shown, the method includes:

[0077] S201. Obtain the file to be processed from which structured information needs to be extracted, and determine the file content type of the file to be processed.

[0078] Optionally, after determining the file content type of the file to be processed, the following steps are also included:

[0079] If the file content type is determined to be a text file, the text to be processed is extracted to determine the text to be processed contained in the file, as well as the coordinates of the text region corresponding to the text to be processed in the file.

[0080] Text extraction refers to the process of identifying and extracting editable character sequences, i.e., the text to be processed, from a text content file, while recording the spatial location information of the text to be processed within the file.

[0081] In one implementation, if the file content type of the file to be processed is determined to be a text content file, a text extraction algorithm is used to directly extract the text from the file to be processed, determine the text to be processed contained in the file to be processed, and the coordinates of the text region corresponding to the text to be processed in the file to be processed.

[0082] By extracting text from a file whose content type is determined to be text, and identifying the text to be processed contained within the file, as well as the coordinates of the corresponding text regions within the file, the beneficial effect is that the physical location of the text to be processed within the file can be accurately located using the text region coordinates, thus achieving dual analysis of content and structure.

[0083] S202. If the file content type is determined to be an image content file, perform text recognition on the file to be processed, and determine the text to be processed contained in the file to be processed, as well as the coordinates of the text region corresponding to the text to be processed in the file to be processed, based on the text recognition results.

[0084] S203. Perform structured content entity recognition on the text to be processed, determine at least one structured content entity contained in the text to be processed, and the content entity coordinates corresponding to each structured content entity in the text region coordinates.

[0085] S204. Determine the coordinate distance between each structured content entity based on the coordinates of each content entity; determine the distance weight information between each structured content entity based on the coordinate distance; and determine the similar structured content entities from each structured content entity based on the distance weight information.

[0086] Among them, coordinate distance refers to the difference in spatial position of each structured content entity in the page coordinate system calculated by mathematical methods. Its core function is to quantify the physical layout correlation between each structured content entity.

[0087] Distance weighting information refers to a numerical indicator that quantifies the strength of the association or the degree of influence between structured content entities based on their coordinate distance. Its core logic is to assign higher weights to structured content entities that are closer in coordinate distance, and to decrease the weights as the distance increases. Similar structured content entities refer to those that are physically adjacent in the layout space of the text being processed.

[0088] In one implementation, coordinate distances are calculated based on the coordinates of each content entity, and the coordinate distances between each structured content entity are determined based on the calculation results. Further, the coordinate distances are matched against a preset mapping relationship between candidate coordinate distances and candidate distance weight information, and the distance weight information between each structured content entity is determined based on the matching results. The distance weight information can optionally be set in the range of 0 to 1.

[0089] Based on distance weight information and distance weight threshold, each structured content entity is filtered, and each structured content entity whose distance weight information is greater than the distance weight threshold is regarded as a similar structured content entity.

[0090] S205. Construct entity relationships for each similar structured content entity and generate content entity relationship data.

[0091] By determining the coordinate distances between structured content entities based on their coordinates, determining distance weights between them based on these distances, and identifying similar structured content entities based on these weights, entity relationships are constructed among these similar entities to generate content entity relationship data. The beneficial effects are:

[0092] Firstly, the coordinate distance between structured content entities is automatically calculated based on the coordinates of the content entities, replacing manual calculation and improving efficiency.

[0093] Secondly, based on the principle of distance decay, distance weight information is automatically generated to quantify the correlation strength between various structured content entities.

[0094] Thirdly, the scattered content entity coordinates are transformed into weighted entity relationship data, realizing the transformation from unstructured data to structured data.

[0095] S206. Obtain the preset structural information extraction instructions from the instruction database, and input the structural information extraction instructions, the text to be processed, and the content entity relationship data into the large language model.

[0096] The instruction database refers to a dedicated data warehouse that stores and manages pre-defined structured operation instructions, used to guide large language models in performing specific information extraction tasks. Its core function is to achieve efficient and accurate structured data extraction through standardized instruction templates.

[0097] Structured information extraction instructions refer to pre-set command templates in the database that guide the large language model to accurately extract structured data from unstructured text and output it in a standardized format. A large language model refers to an ultra-large-scale artificial intelligence model trained on massive amounts of text, possessing deep semantic understanding and generation capabilities; its parameter scale typically ranges from billions to trillions. In this embodiment, the core function of the large language model is to extract structured information through three steps: instruction parsing, text understanding, and structured output.

[0098] In one implementation, a preset structural information extraction instruction is called from a prompt-type instruction database, and the structural information extraction instruction, the text to be processed, and the content entity relationship data are used together as the input text of the large language model and input into the large language model.

[0099] For example, the form of structural information extraction instructions includes, but is not limited to: Core task: "Based on the entity relationships in the content entity relationship data, classify the text to be processed into titles, body text, tables, and lists, and extract the corresponding content"; Constraints: "Titles must contain ≥3 characters and ≤20 characters; tables must have their headers and data rows completely extracted, and missing cells should be marked 'N / A'."

[0100] It is understood that this embodiment is merely an example of the form of the structural information extraction instruction, and is not intended to specifically limit the form of the structural information extraction instruction.

[0101] S207. Extract instructions based on structural information using a large language model, and extract structured information from the text to be processed using content entity relationship data to obtain target structured information.

[0102] By retrieving preset structural information extraction instructions from the instruction database, and inputting these instructions, the text to be processed, and content entity relationship data into a large language model, the large language model extracts structured information from the text to be processed based on the structural information extraction instructions and the content entity relationship data, thus obtaining the target structured information. The beneficial effects are:

[0103] Firstly, by using pre-defined structural information extraction instructions, a standardized parsing framework is provided for large language models, avoiding the generalization problem of traditional regular expressions or rule engines and improving the accuracy of structured information extraction.

[0104] Secondly, the large language model uses content entity relationship data as semantic anchors, which can handle nested entities and fuzzy expressions, dynamically adapt to complex semantics, and further ensure the accuracy of structured information extraction.

[0105] Thirdly, the structural information extraction instruction forces the large language model to output by field, avoiding the random divergence problem of generative models and ensuring the stability of the target structured information output by the model.

[0106] Optionally, based on the structural information extraction instructions using a large language model, structured information can be extracted from the text to be processed using content entity relation data to obtain the target structured information, including:

[0107] S2071. Extract instructions based on structural information using a large language model, and extract the structured content text corresponding to each structured content entity from the text to be processed using content entity relationship data.

[0108] Structured content text refers to information units extracted from unstructured raw text using a large language model that conform to a predefined logical framework.

[0109] S2072. Perform semantic similarity calculations on each structured content text with content entity relationships to determine the semantic similarity between each structured content text with content entity relationships.

[0110] Semantic similarity calculation refers to the quantitative method of measuring the degree of semantic similarity between two pieces of structured text, with a particular focus on the semantic relevance of entity relationships. Its core objective is to go beyond superficial lexical differences and capture deep logical consistency.

[0111] Semantic similarity measures the degree of closeness between two structured texts at the level of meaning rather than literal form. It focuses on whether the core concepts, logical relationships, or emotional intentions expressed in the texts are consistent, rather than simple word overlap.

[0112] In one implementation, a large language model is used to calculate the semantic similarity of each structured content text with content entity relationships, thereby obtaining the semantic similarity between the structured content texts with content entity relationships.

[0113] S2073. Based on semantic similarity, determine semantically similar content texts from each structured content text with content entity relationships, and perform text association on each semantically similar content text to obtain target structured information.

[0114] Semantically similar text refers to structured text that expresses highly similar concepts, entity relationships, or core intentions. Text association refers to the process of constructing a structured information network through logical connections, feature integration, or relation mapping after identifying semantically similar text based on semantic similarity.

[0115] In one implementation, a large language model is used to sort and filter according to semantic similarity, and the structured content texts with the highest semantic similarity and content entity relationships are determined as semantically similar content texts. Text association is then performed on each semantically similar content text to obtain the target structured information.

[0116] By extracting instructions based on structural information using a large language model, and utilizing content entity relationship data, structured content text corresponding to each structured content entity is extracted from the text to be processed. Semantic similarity is calculated for each structured content text with content entity relationships to determine the semantic similarity between them. Based on semantic similarity, semantically similar content texts are identified from the structured content texts with content entity relationships, and text association is performed on these semantically similar content texts to obtain the target structured information. The beneficial effects are:

[0117] Firstly, since content entity relationship data is generated solely based on content entity coordinates, using only content entity relationship data for structured information extraction may lead to errors in structured information extraction. For example, assuming that the coordinate distance between Title 1 and the preceding text 1, as well as the following text 2, is relatively close, using only content entity relationship data for structured information extraction will result in the extraction of incorrect structured information for Title 1 and Text 1.

[0118] This embodiment combines semantic similarity for structured information extraction, which can effectively avoid the above-mentioned problems and improve the accuracy and reliability of structured information extraction.

[0119] Secondly, semantically similar structured content texts are linked together to eliminate information redundancy.

[0120] Optionally, after obtaining the target structured information, the following may also be included:

[0121] A1. Associate and store the information identifier and structure information extraction instructions of the target structured information, and generate the storage association relationship between the information identifier and the structure information extraction instructions.

[0122] Here, information identifier refers to a unique identification symbol or code assigned to the target structured information, used for accurately locating and distinguishing different types of structured information. Storage association refers to the established mapping relationship between information identifiers and structured information extraction instructions.

[0123] In one implementation, after obtaining the target structured information, the information identifier of the target structured information and the structure information extraction instruction are associated and stored in the instruction database, and the recorded fields include, but are not limited to, instruction text, call time, entity relationship data summary, output format type, etc.

[0124] B1. Determine whether there are any anomalies in the target structured information, and if it is determined that there are anomalies in the target structured information, obtain the structured information extraction instructions based on the information identifier and storage association relationship.

[0125] Among them, the presence of anomalies in the target structured information refers to the extraction of target structured information that violates predefined rule templates, business logic constraints, or data structure specifications. The determination of such anomalies must be based on preset anomaly detection rules.

[0126] In one implementation, the system determines whether the target structured information is abnormal based on a preset anomaly detection rule. If the target structured information is determined to be abnormal, the system matches the information identifier with the storage association relationship and obtains the structured information extraction instruction associated with the information identifier based on the matching result.

[0127] Optionally, determine whether there are anomalies in the target structured information, including:

[0128] B11. Determine the character similarity between the title structured text included in the target structured information and the title text included in the content entity relationship data.

[0129] Here, "structured title text" refers to the standardized title text obtained by extracting structured information from the text to be processed. Title text refers to the natural language title recorded in the content entity relation data of the text to be processed. Character similarity is a metric that quantifies the similarity of text strings by comparing the surface character composition and sequence similarity.

[0130] In one implementation, the character similarity between the title structured text included in the target structured information and the title text included in the content entity relationship data is determined by calculating the edit distance algorithm.

[0131] B12. Calculate the table text extraction rate based on the table structured text included in the target structured information and the table text included in the text to be processed.

[0132] Here, structured table text refers to the standardized table text obtained by extracting structured information from the text to be processed. Table text refers to the original table content in the text to be processed, without any processing. The table text extraction rate refers to the proportion of the number of structured table texts successfully identified and extracted from the text to be processed during the structured information extraction process, relative to the total number of table texts included in the text to be processed. It is a core indicator for measuring the accuracy and completeness of structured table information extraction.

[0133] B13. Calculate the list item text extraction rate based on the structured text of the list items included in the target structured information and the list item text included in the text to be processed.

[0134] Here, "structured list item text" refers to the standardized list item text obtained by extracting structured information from the text to be processed. List item text refers to the unprocessed original list item content within the text to be processed. The list item text extraction rate refers to the proportion of successfully identified and extracted structured list item text from the text to be processed during the structured information extraction process, relative to the total amount of list item text included in the text to be processed. It is a core indicator for measuring the accuracy and completeness of structured list item information extraction.

[0135] B14. Determine the text similarity between the target structured information and the text to be processed.

[0136] Text similarity refers to the quantitative method used to measure the degree of similarity between the target structured information and the text to be processed in terms of semantic content, structural features, or expressive intent. Its core is to assess the relevance or repetition between texts.

[0137] In one implementation, BLEU (Bilingual Evaluation Understudy) is used to calculate the BLEU value between the target structured information and the text to be processed as the text similarity.

[0138] B15. If the character similarity is less than the first threshold, the table text extraction rate is less than the second threshold, the list item text extraction rate is less than the third threshold, or the text similarity is less than the fourth threshold, it is determined that the target structured information is abnormal.

[0139] The first, second, third, and fourth thresholds are all set according to actual business needs. For example, the first threshold can be set to 0.9, the second threshold to 0.95, the third threshold to 0.95, and the fourth threshold to 0.85, etc.

[0140] By determining the character similarity between the title structured text included in the target structured information and the title text included in the content entity relationship data; calculating the table text extraction rate based on the table structured text included in the target structured information and the table text included in the text to be processed; calculating the list item text extraction rate based on the list item structured text included in the target structured information and the list item text included in the text to be processed; determining the text similarity between the target structured information and the text to be processed; and determining that the target structured information is abnormal if the character similarity is less than a first threshold, the table text extraction rate is less than a second threshold, the list item text extraction rate is less than a third threshold, or the text similarity is less than a fourth threshold, the beneficial effect is:

[0141] By determining the character similarity between the structured title text and the title text, the problem of title misalignment was solved. By calculating the table text extraction rate based on the structured table text and the table text, and by calculating the list item text extraction rate based on the structured list item text and the list item text, the completeness of the extracted table / list item structured information was quantified. By determining the text similarity between the target structured information and the text to be processed, the problem of semantic tampering can be captured in a timely manner. Then, anomaly detection of the target structured information is carried out from three dimensions: the title layer, the data layer, and the semantic layer, ensuring the comprehensiveness and reliability of the anomaly detection of the target structured information.

[0142] C1. Fine-tune the structural information extraction instruction to obtain the corresponding fine-tuning instruction, and update the fine-tuning instruction to the instruction database.

[0143] In one implementation, entity relationship anomalies in the content entity relationship data are determined, and instruction defects of the structural information extraction instruction are located based on the entity relationship anomalies. Then, the structural information extraction instruction is fine-tuned according to the defect type of the instruction defect to obtain the fine-tuning instruction corresponding to the structural information extraction instruction.

[0144] For example, rules can be added to the instructions for extracting structural information, such as "when the distance weight between the title entity and the body entity is 0.6, it is determined to be a second-level title"; another example is to strengthen the constraints on the instructions for extracting structural information, such as "table extraction should check the consistency between the number of table headers and the number of data rows, and mark 'row count mismatch' if they are inconsistent"

[0145] Furthermore, the fine-tuning instructions are updated in the instruction database to replace the original structural information extraction instructions.

[0146] By associating and storing the information identifiers of the target structured information with the structured information extraction instructions, and generating a storage association relationship between the information identifiers and the structured information extraction instructions; determining whether there are anomalies in the target structured information, and if so, obtaining the structured information extraction instructions based on the information identifiers and storage association relationships; fine-tuning the structured information extraction instructions to obtain the corresponding fine-tuning instructions, and updating the fine-tuning instructions to the instruction database, the beneficial effect is that binding the structured information extraction instructions with the information identifiers achieves a precise mapping of "indicator anomalies → relationship anomalies → instruction defects," solving the problem that traditional assessments cannot locate the root cause.

[0147] Example 3

[0148] Figure 3 This is a schematic diagram of a file structure information extraction device provided in Embodiment 3 of the present invention. It is applicable to situations where structured information is extracted from a file using content entity relationship data. Figure 3 As shown, the device includes:

[0149] The file content type determination module 31 is used to obtain the file to be processed from which structured information needs to be extracted, and to determine the file content type of the file to be processed; wherein the file content type is a text content file or an image content file;

[0150] The text recognition module 32 is used to perform text recognition on the file to be processed when the file content type is determined to be the image content file, and to determine the text to be processed contained in the file to be processed based on the text recognition result, as well as the text region coordinates corresponding to the text to be processed in the file to be processed.

[0151] The structured content entity recognition module 33 is used to perform structured content entity recognition on the text to be processed, determine at least one structured content entity contained in the text to be processed, and the content entity coordinates corresponding to each structured content entity in the text region coordinates.

[0152] The structured information extraction module 34 is used to construct content entity relationship data between the structured content entities based on the coordinates of each content entity, and to extract structured information from the text to be processed based on the content entity relationship data to obtain the target structured information contained in the file to be processed.

[0153] Optionally, the structured information extraction module 34 is specifically used for:

[0154] The coordinate distance between each structured content entity is determined based on the coordinates of each content entity.

[0155] Based on the coordinate distance, distance weight information between each structured content entity is determined, and similar structured content entities are determined from each structured content entity based on the distance weight information.

[0156] Entity relationships are constructed for each of the similar structured content entities to generate the content entity relationship data.

[0157] Optionally, the device further includes a structured content hierarchy tag parsing module, specifically used for:

[0158] When the file content type is a text content file, obtain the preset structured content hierarchy tags in the file to be processed;

[0159] Based on the structured content hierarchy tags, content entity relationship data between each structured content entity is constructed.

[0160] Optionally, the structured information extraction module 34 is further used for:

[0161] The system retrieves preset structural information extraction instructions from the instruction database and inputs the structural information extraction instructions, the text to be processed, and the content entity relationship data into the large language model.

[0162] The target structured information is obtained by extracting structured information from the text to be processed using the content entity relationship data based on the structural information extraction instructions of the large language model.

[0163] Optionally, the structured information extraction module 34 is further used for:

[0164] Based on the structural information, the large language model extracts instructions and uses the content entity relationship data to extract the structured content text corresponding to each structured content entity from the text to be processed.

[0165] Semantic similarity is calculated for each structured content text with content entity relationships to determine the semantic similarity between the structured content texts with content entity relationships.

[0166] Based on the semantic similarity, semantically similar content texts are determined from each of the structured content texts with content entity relationships, and text association is performed on each of the semantically similar content texts to obtain the target structured information.

[0167] Optionally, the device further includes a text extraction module, specifically used for:

[0168] If the file content type is determined to be a text content file, text extraction is performed on the file to be processed to determine the text to be processed contained in the file to be processed, and the coordinates of the text region corresponding to the text to be processed in the file to be processed.

[0169] Optionally, the device further includes an instruction fine-tuning module, specifically used for:

[0170] The information identifier of the target structured information and the structured information extraction instruction are associated and stored together, and a storage association relationship is generated between the information identifier and the structured information extraction instruction;

[0171] Determine whether the target structured information is abnormal, and if it is determined that the target structured information is abnormal, obtain the structured information extraction instruction based on the information identifier and the storage association relationship;

[0172] The structural information extraction instruction is fine-tuned to obtain the fine-tuning instruction corresponding to the structural information extraction instruction, and the fine-tuning instruction is updated to the instruction database.

[0173] Optionally, the instruction fine-tuning module is further used for:

[0174] Determine the character similarity between the title structured text included in the target structured information and the title text included in the content entity relationship data;

[0175] The table text extraction rate is calculated based on the table structured text included in the target structured information and the table text included in the text to be processed.

[0176] The list item text extraction rate is calculated based on the list item structured text included in the target structured information and the list item text included in the text to be processed.

[0177] Determine the text similarity between the target structured information and the text to be processed;

[0178] If the character similarity is less than a first threshold, the table text extraction rate is less than a second threshold, the list item text extraction rate is less than a third threshold, or the text similarity is less than a fourth threshold, then the target structured information is determined to be abnormal.

[0179] Optionally, the device further includes an associated storage module, specifically used for:

[0180] The target structured information is associated with the content entity relationship data and stored in the target knowledge base.

[0181] The document structure information extraction device provided in this embodiment of the invention can execute the document structure information extraction method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0182] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0183] Example 4

[0184] Figure 4 A schematic diagram of an electronic device 40 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0185] like Figure 4 As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded from storage unit 48 into the RAM 43. The RAM 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0186] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0187] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as methods for extracting structured information from documents.

[0188] In some embodiments, the method for extracting structured information from documents may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the method for extracting structured information from documents described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to perform the method for extracting structured information from documents by any other suitable means (e.g., by means of firmware).

[0189] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0190] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0191] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0192] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0193] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0194] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system to address the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.

[0195] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0196] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.< / w:tbl> < / w:t> < / w:tbl> < / w:t> < / w:tbl> < / w:t>

Claims

1. A method for extracting structured information from a document, characterized in that, The method includes: Obtain the file to be processed from which structured information needs to be extracted, and determine the file content type of the file to be processed; wherein, the file content type is a text content file or an image content file; If the file content type is determined to be the image content file, text recognition is performed on the file to be processed, and the text to be processed contained in the file to be processed is determined according to the text recognition result, as well as the text region coordinates corresponding to the text to be processed in the file to be processed. The text to be processed is subjected to structured content entity recognition to determine at least one structured content entity contained in the text to be processed, and the content entity coordinates corresponding to each structured content entity in the text region coordinates respectively; Based on the coordinates of each content entity, content entity relationship data between each structured content entity is constructed, and the structured information of the text to be processed is extracted based on the content entity relationship data to obtain the target structured information contained in the file to be processed.

2. The method according to claim 1, characterized in that, The step of constructing content entity relationship data between the structured content entities based on the coordinates of each content entity includes: The coordinate distance between each structured content entity is determined based on the coordinates of each content entity. Based on the coordinate distance, distance weight information between each structured content entity is determined, and similar structured content entities are determined from each structured content entity based on the distance weight information. Entity relationships are constructed for each of the similar structured content entities to generate the content entity relationship data.

3. The method according to claim 1, characterized in that, Before extracting structured information from the text to be processed based on the content entity relationship data to obtain the target structured information contained in the file to be processed, the method further includes: When the file content type is a text content file, obtain the preset structured content hierarchy tags in the file to be processed; Based on the structured content hierarchy tags, content entity relationship data between each structured content entity is constructed.

4. The method according to claim 1, characterized in that, The step of extracting structured information from the text to be processed based on the content entity relationship data to obtain the target structured information contained in the file to be processed includes: The system retrieves preset structural information extraction instructions from the instruction database and inputs the structural information extraction instructions, the text to be processed, and the content entity relationship data into the large language model. The target structured information is obtained by extracting structured information from the text to be processed using the content entity relationship data based on the structural information extraction instructions of the large language model.

5. The method according to claim 4, characterized in that, The step involves extracting structured information from the text to be processed using the content entity relationship data based on the structural information extraction instructions through the large language model, thereby obtaining the target structured information, including: Based on the structural information, the large language model extracts instructions and uses the content entity relationship data to extract the structured content text corresponding to each structured content entity from the text to be processed. Semantic similarity is calculated for each structured content text with content entity relationships to determine the semantic similarity between the structured content texts with content entity relationships. Based on the semantic similarity, semantically similar content texts are determined from each of the structured content texts with content entity relationships, and text association is performed on each of the semantically similar content texts to obtain the target structured information.

6. The method according to claim 1, characterized in that, After determining the file content type of the file to be processed, the process further includes: If the file content type is determined to be a text content file, text extraction is performed on the file to be processed to determine the text to be processed contained in the file to be processed, and the coordinates of the text region corresponding to the text to be processed in the file to be processed.

7. The method according to claim 5, characterized in that, After obtaining the target structured information, the process further includes: The information identifier of the target structured information and the structured information extraction instruction are associated and stored together, and a storage association relationship is generated between the information identifier and the structured information extraction instruction; Determine whether the target structured information is abnormal, and if it is determined that the target structured information is abnormal, obtain the structured information extraction instruction based on the information identifier and the storage association relationship; The structural information extraction instruction is fine-tuned to obtain the fine-tuning instruction corresponding to the structural information extraction instruction, and the fine-tuning instruction is updated to the instruction database.

8. The method according to claim 7, characterized in that, Determining whether the target structured information is abnormal includes: Determine the character similarity between the title structured text included in the target structured information and the title text included in the content entity relationship data; The table text extraction rate is calculated based on the table structured text included in the target structured information and the table text included in the text to be processed. The list item text extraction rate is calculated based on the list item structured text included in the target structured information and the list item text included in the text to be processed. Determine the text similarity between the target structured information and the text to be processed; If the character similarity is less than a first threshold, the table text extraction rate is less than a second threshold, the list item text extraction rate is less than a third threshold, or the text similarity is less than a fourth threshold, then the target structured information is determined to be abnormal.

9. The method according to claim 1, characterized in that, After obtaining the target structured information contained in the file to be processed, the process further includes: The target structured information is associated with the content entity relationship data and stored in the target knowledge base.

10. A device for extracting structured information from documents, characterized in that, The device includes: The file content type determination module is used to obtain the file to be processed from which structured information needs to be extracted, and to determine the file content type of the file to be processed; wherein, the file content type is a text content file or an image content file; The text recognition module is used to perform text recognition on the file to be processed when the file content type is determined to be the image content file, and to determine the text to be processed contained in the file to be processed based on the text recognition result, as well as the text region coordinates corresponding to the text to be processed in the file to be processed. The structured content entity recognition module is used to perform structured content entity recognition on the text to be processed, determine at least one structured content entity contained in the text to be processed, and the content entity coordinates corresponding to each structured content entity in the text region coordinates. The structured information extraction module is used to construct content entity relationship data between the structured content entities based on the coordinates of each content entity, and to extract structured information from the text to be processed based on the content entity relationship data to obtain the target structured information contained in the file to be processed.

11. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method for extracting structured information from documents according to any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a processor to execute the method for extracting structured information from a file as described in any one of claims 1-9.

13. A computer program product comprising a computer program that, when executed by a processor, implements a method for extracting structured information from a file according to any one of claims 1-9.

Citation Information

Patent Citations

  • Method and device for extracting structured information of text, equipment and medium

    CN111753717A

  • Method and system for automatically extracting scientific and technical literature data based on text mining

    CN113779995A

  • Information extraction method and device and electronic equipment

    CN118279921A

  • Data processing method and device, electronic equipment, storage medium, system and computer program product

    CN118820388A

  • Bill information identification method, apparatus and device, and storage medium

    CN120014649A