Document structure segmentation methods, apparatus, equipment and media
Patent Information
- Application Number
- CN202410392060.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-02
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2044-04-02
AI Technical Summary
现有技术中,通常是在文档中通过正则匹配的方法检测行首行尾的字符模式,来判断文档中的段落和分级,这种方式只能在固定格式的文档中切分段落,检测段落关系,如果目标文本的段落标志符发生变化,检测也将失效,而普通的深度学习方法则是存在一定的误检测性,后处理往往需要大量时间却收效甚微;基于语义的方法,需要进行词性标注,句法分析等相对复杂的自然语言处理任务,因此需要更多的计算资源和处理时间
[0016] 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 document structure segmentation method according to any embodiment of the present invention.
Smart Images

Figure CN118298449B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of document processing, and more particularly to a method, apparatus, device, and medium for document structure segmentation. Background Technology
[0002] Document segmentation is the process of dividing a complete document into segments based on its semantic and structural information. These segments allow for the extraction of key information, significantly improving the efficiency and effectiveness of document analysis. Therefore, rapid document segmentation is crucial for efficient document processing. Current technologies typically use regular expression matching to detect character patterns at the beginning and end of lines to determine paragraphs and hierarchical levels. This approach only works for documents with fixed formats; if paragraph markers change, the detection fails. Traditional deep learning methods suffer from false positives, and post-processing often requires significant time with minimal results. Semantic-based methods require complex natural language processing tasks such as part-of-speech tagging and syntactic analysis, demanding substantial computational resources and processing time. A high-performance, efficient, and universally applicable document segmentation method is lacking. Summary of the Invention
[0003] This invention provides a document structure segmentation method, apparatus, device, and medium to parse text and text-like files of any text format, thereby improving the efficiency and performance of document parsing.
[0004] According to one aspect of the present invention, a document structure segmentation method is provided, comprising:
[0005] Obtain the document to be segmented, and sequentially perform text clustering on the document pages to be segmented using a preset clustering algorithm to obtain at least one text cluster and the corresponding cluster bounding box.
[0006] Text recognition is performed based on the text clusters and the bounding boxes of the clusters to obtain text classification information, and a directed text classification graph is built based on the text classification information; wherein, the text classification information includes text title, text body and text subsections;
[0007] The text reference relationships of the document to be segmented are determined based on the text classification directed graph.
[0008] According to another aspect of the present invention, a document structure segmentation apparatus is provided, comprising:
[0009] The document segmentation module is used to obtain the document to be segmented, and to perform text clustering on the document pages to be segmented in turn using a preset clustering algorithm to obtain at least one text cluster and the corresponding cluster bounding box.
[0010] The text recognition module is used to perform text recognition based on the text clusters and the bounding boxes of the clusters to obtain text classification information, and to establish a text classification directed graph based on the text classification information; wherein, the text classification information includes text title, text body and text subsections;
[0011] The text parsing module is used to determine the text reference relationships of the document to be segmented based on the text classification directed graph.
[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0013] At least one processor; and
[0014] A memory communicatively connected to the at least one processor; wherein,
[0015] 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 segmentation method according to any embodiment of the present invention.
[0016] 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 document structure segmentation method according to any embodiment of the present invention.
[0017] The technical solution of this invention obtains a document to be segmented, and sequentially performs text clustering on the pages of the document to be segmented using a preset clustering algorithm to obtain at least one text cluster and its corresponding bounding box. Text clustering effectively classifies each page of the document, identifies clusters of various text types within the document, improves text recognition efficiency, and requires no document data structure, enabling the recognition of files of any document type and improving the universality of recognition. Based on the text clusters and their bounding boxes, text recognition is performed to obtain text classification information, and a directed text classification graph is established based on this information. The text classification and the establishment of the directed text classification graph allow for the creation of a document graph, which can identify related text within the document, improving the performance of text analysis. Finally, the text reference relationships of the document to be segmented are determined based on the directed text classification graph. It solves the problem of existing technologies being unable to efficiently handle files of various document types. It can parse text and text-like files of any text format, extract the relationships between text fragments, build structured document trees and document graphs, and achieve document structure segmentation, thereby improving the efficiency and accuracy of document parsing.
[0018] 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
[0019] 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.
[0020] Figure 1 This is a flowchart of a document structure segmentation method provided in Embodiment 1 of the present invention;
[0021] Figure 2 This is a flowchart of another document structure segmentation method provided in Embodiment 2 of the present invention;
[0022] Figure 3 This is a flowchart of another document structure segmentation method provided in Embodiment 3 of the present invention;
[0023] Figure 4 This is a schematic diagram of a document structure segmentation device provided in Embodiment 4 of the present invention;
[0024] Figure 5 This is a schematic diagram of the structure of an electronic device that implements the document structure segmentation method of this invention. Detailed Implementation
[0025] 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.
[0026] Example 1
[0027] Figure 1 This is a flowchart of a document structure segmentation method provided in Embodiment 1 of the present invention. This embodiment is applicable to parsing documents and distinguishing between chapters, titles, and body text. This method can be executed by a document structure segmentation device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0028] S110. Obtain the document to be segmented, and perform text clustering on the document pages to be segmented in turn using a preset clustering algorithm to obtain at least one text cluster and the corresponding cluster bounding box.
[0029] The document to be segmented can be a text file in a document format that has at least one text page. It should be noted that the document to be segmented can have multiple formats. For example, the document to be segmented can be in TXT, DOC, DOCX, PPT, XLS, CHM, and PDF formats. Each page of the document to be segmented can be a text page containing text.
[0030] The preset clustering algorithm can be a pre-defined algorithm for clustering text on a text page. It should be noted that the clustering algorithm can be used to cluster text. For example, the clustering algorithm may include K-Means clustering, hierarchical clustering, Brownian clustering, TF-IDF clustering, topic modeling, and potential Dirichlet assignment. Optionally, the clustering algorithm can group similar text objects on the text page into different clusters. In the process of text object clustering, it is usually done in an unsupervised manner. Each cluster object can belong entirely to one cluster or to one or more clusters. In the clustering process of this application, the font size, style, and semantics of the text objects can be referenced to place them into one or more corresponding clusters.
[0031] Among them, a text cluster can be a cluster composed of similar texts; the texts within a text cluster are similar to each other, but differ from the texts in other text clusters.
[0032] The cluster bounding box can be a bounding box surrounding a text cluster in the vector space, containing one or more text clusters. The cluster bounding box can enclose the vectors within the scattered text clusters, reducing computational errors and improving computational efficiency. Optionally, in the vector space of the text clusters, feature vectors corresponding to the cluster bounding boxes are determined for the vectors corresponding to the text objects in one or more text clusters, and then the cluster bounding boxes are constructed based on these feature vectors.
[0033] Specifically, the document uploaded upon receiving the request is taken as the document to be segmented. The text of each page of the document to be segmented is sequentially clustered using a preset clustering algorithm to obtain at least one text cluster. A bounding box is calculated for each text cluster to obtain the cluster bounding box corresponding to each text cluster.
[0034] Optionally, in another optional embodiment of the present invention, the step of sequentially performing text clustering on the pages of the document to be segmented using a preset clustering algorithm to obtain at least one text cluster and a corresponding cluster bounding box includes:
[0035] The text to be identified in the document page to be segmented is obtained sequentially, and the font size and position of each text to be identified are identified; the text to be identified is clustered according to the font size and position of the text to be identified by a preset clustering algorithm to obtain at least one text cluster; the bounding box recognition model is used to sequentially recognize the bounding boxes of the text clusters to obtain the bounding box of each text cluster.
[0036] The text to be recognized can be all the text in the document page to be segmented; the text to be recognized includes at least one of the following: body text, title text, header and footer text. The font size refers to the size of the text in the document. The text size and font size are uniquely related and change proportionally with the size of the displayed page. The font size is a pre-set size format in the document, and one or more font sizes can exist in the document to be segmented. The font style can be the style of the text displayed on the document page, and the font style can be a pre-set font style in the document. Optionally, when performing text recognition on the document to be segmented, the font size and font of each character are compared with preset fonts and font styles to identify the character's font and font size. If the font and font size cannot be identified, the unrecognizable characters are analyzed by stroke. Based on the size and form of the strokes, a stroke similarity match is performed with the preset fonts and font sizes. The preset font and font size corresponding to the highest stroke similarity are selected as the font and font size for the unrecognizable characters. The text position can be the location of the text to be recognized within the document page to be segmented.
[0037] The bounding box recognition model can be a pre-trained automatic recognition model for recognizing bounding boxes of text clusters; the bounding box recognition model can be at least one of convolutional neural networks, recurrent neural networks, attention mechanism networks, large language models, and graph neural networks.
[0038] Optionally, before performing bounding box recognition on text clusters using the bounding box recognition model, a preliminary recognition model network structure corresponding to the bounding box recognition model is established, and cluster training data and bounding box recognition data corresponding to the cluster training data are obtained. A recognition model training set and a recognition model test set are constructed based on the cluster training data and the bounding box recognition data. The preliminary recognition model is trained using the recognition model training set to obtain a trained recognition model. The trained recognition model is tested based on the recognition model test set to obtain the model test results. The trained recognition model is backpropagated based on the model test results and the loss function to obtain the bounding box recognition model.
[0039] Optionally, the font size, font type, and position of the text to be identified in the document page to be segmented are obtained. The font size, font type, and position of the text to be identified are used as the basis for clustering. The text to be identified is clustered using a preset clustering algorithm to obtain at least one text cluster of the document to be segmented.
[0040] Specifically, in the document to be segmented, for the text to be identified on each page of the document to be segmented, starting from the first text to be identified, each text is identified sequentially to determine the font size, font, and position of each text to be identified in the document. Then, a preset clustering algorithm is used to cluster all the text to be identified according to the font size, font, and position of each text to be identified, to obtain at least one text cluster. Then, a pre-trained bounding box recognition model is used to sequentially recognize the bounding box of each text cluster to obtain the bounding box of each text cluster.
[0041] S120. Based on the text clusters and the bounding boxes of the clusters, perform text recognition to obtain text classification information, and establish a text classification directed graph based on the text classification information.
[0042] The text classification information can be the classification information corresponding to the text in the document to be segmented; for example, the text classification information can include text as a first-level heading, a second-level heading, body text, a text subsection, a first-level heading of a text subsection, a second-level heading of a text subsection, etc.
[0043] Optionally, the text classification information includes text titles, text body, and text subsections. The text title can be a summary description of the text content. In this embodiment, the text title can be used to classify the text. The text title can include text title content and text title level. The text title content can be the semantics composed of the words contained in the text title, and the text title level can be the level of the text title, which can be used to represent the text content that the text title can summarize. For example, the highest text title level is a first-level title, which can represent the main content or theme of the document to be segmented, and a second-level title can represent the secondary content or sub-theme under the first-level title. It should be noted that text subsections also include text titles. For example, the first-level title of a text subsection represents the main content or theme of the text subsection, and the second-level title of a text subsection can represent the secondary content or sub-theme under the first-level title of the text subsection.
[0044] Among them, the text classification directed graph can be a directed graph that describes the relationship between each text in the document to be segmented; the text classification directed graph can clearly describe the relationship between each text through directed edges. In the text classification directed graph, the text in the document to be segmented is the node of the text classification directed graph, and the edges in the directed graph connect each text. Starting from the text corresponding to any directed graph node, other related texts can be obtained.
[0045] Specifically, after obtaining the text clusters corresponding to the document to be segmented and the bounding boxes of each text cluster, text recognition is performed on the text in the document to be segmented based on the text clusters and the bounding boxes of each text cluster to obtain text classification information. Then, a directed text classification graph is established based on the relationship between the texts in the text classification information. The text classification graph describes the relationship between each text in the document to be segmented.
[0046] S130. Determine the text reference relationships of the document to be segmented based on the text classification directed graph.
[0047] The text reference relationship can refer to whether there is a reference relationship between the texts in the document to be segmented. A reference relationship can be whether one text references the content of another text. Text reference relationships can include direct references, indirect references, and self-references. For example, in the document to be segmented, text A and text B are texts under the same heading. Text B directly references the text content of text A, further explaining the semantics of text A based on its content.
[0048] Specifically, the text classification directed graph is used to determine the reference relationships between texts based on the connections between them. After determining the text reference relationships, these relationships are used as attribute information for the edges between nodes in the text classification directed graph, and the text reference relationships are then updated in the graph.
[0049] The technical solution of this invention obtains a document to be segmented, and sequentially performs text clustering on the pages of the document to be segmented using a preset clustering algorithm to obtain at least one text cluster and its corresponding bounding box. Text clustering effectively classifies each page of the document, identifies clusters of various text types within the document, improves text recognition efficiency, and requires no document data structure, enabling the recognition of files of any document type and improving the universality of recognition. Based on the text clusters and their bounding boxes, text recognition is performed to obtain text classification information, and a directed text classification graph is established based on this information. The text classification and the establishment of the directed text classification graph allow for the creation of a document graph, which can identify related text within the document, improving the performance of text analysis. Finally, the text reference relationships of the document to be segmented are determined based on the directed text classification graph. It solves the problem of existing technologies being unable to efficiently handle files of various document types. It can parse text and text-like files of any text format, extract the relationships between text fragments, build structured document trees and document graphs, and achieve document structure segmentation, thereby improving the efficiency and accuracy of document parsing.
[0050] Example 2
[0051] Figure 2 This is a flowchart of another document structure segmentation method provided in Embodiment 2 of the present invention. The relationship between this embodiment and the above embodiments is that this is a specific method for text recognition and classification of the document to be identified. Figure 2 As shown, this document structure segmentation method includes:
[0052] S210. Obtain the document to be segmented, and perform text clustering on the document pages to be segmented in turn using a preset clustering algorithm to obtain at least one text cluster and the corresponding cluster bounding box.
[0053] S220. Calculate the bounding box position vector and bounding box semantic vector of the cluster bounding box using a preset vector calculation model.
[0054] The preset vector computation model can be a pre-set computation model used to identify the feature information of the cluster bounding boxes. It should be noted that the vector computation model can be a computation model capable of calculating semantic embeddings and positional embeddings in the document to be segmented, and the vector computation model can be a neural network model and / or a large language model. For example, the vector computation model can be the LayoutXLM model (a multimodal pre-trained model).
[0055] The bounding box position vector can be used to represent the position information of the cluster bounding box in the vector space. It should be noted that in the vector space, the cluster bounding box of the text cluster is represented as a regular or irregular polyhedron, and the position of the cluster bounding box in the vector space can be located through the bounding box position vector.
[0056] The bounding box semantic vector can be the semantic vector of the text within the text cluster within the bounding box of the cluster. The bounding box semantic vector can be used to represent the semantics of the text clusters.
[0057] Specifically, the position of the cluster bounding box in the vector space is calculated using a pre-set vector calculation model to obtain the bounding box position vector of the cluster bounding box, and the semantic vector of the text in the text cluster within the cluster bounding box is calculated to obtain the bounding box semantic vector.
[0058] S230. Identify and record the font size frequency corresponding to the font size of the text to be identified in the bounding box of the cluster, determine the target font size frequency, and construct a font size embedding vector based on the font size of the text corresponding to the target font size frequency.
[0059] The font size frequency can be the frequency of the font size of the text within the cluster bounding box. Optionally, before segmenting the document, all text in the document can be parsed to determine the font size, font type, and position of each character, and the frequency of the font size, font type, and position can be listed.
[0060] Optionally, font size recognition is performed on the text to be recognized within the cluster bounding box. Records are made for each type of text font size recognition, and the font size frequency of each type of text appearing within the cluster bounding box is determined. The highest font size frequency is taken as the target font size frequency.
[0061] Specifically, for the text to be identified in each cluster bounding box, the font size is identified, and the font size frequency of each font size is recorded. After the text to be identified in the cluster bounding box is identified, the highest font size frequency is taken as the target font size frequency of the cluster bounding box according to the recorded font size frequency. A font size embedding vector is constructed based on the font size corresponding to the target font size frequency.
[0062] S240. Vectorize the font of the text to be identified in the cluster bounding box using a preset font encoding method to obtain a font embedding vector.
[0063] The preset font encoding method can be a pre-set method for encoding and vectorizing text fonts. For example, the preset font encoding method can be a fixed-length one-hot encoding.
[0064] Among them, the font embedding vector can be used to describe the encoding vector of the text font.
[0065] Specifically, when vectorizing the font of the text to be recognized, the font of all the text to be recognized in the cluster bounding box is encoded and vectorized using a preset font encoding method to obtain the font embedding vector corresponding to the cluster bounding box.
[0066] S250. Using a preset text classifier, text is classified according to the font embedding vector, the font size embedding vector, the bounding box position vector, and the bounding box semantic vector to determine the text classification information, and a directed text classification graph is established based on the text classification information.
[0067] The preset text classifier can be a pre-set model used to classify the text to be identified within the bounding box of the cluster. It should be noted that the text classifier can be pre-trained based on text classification training data, and the text classifier can be at least one of convolutional neural networks, recurrent neural networks, attention mechanism networks, large language models, and graph neural networks.
[0068] Optionally, a text classification training set is pre-established based on text classification clusters. This training set consists of font embedding vectors, font size embedding vectors, bounding box position vectors, and bounding box semantic vectors for each text classification cluster. Classification label data corresponding to the text category to which the text classification cluster belongs is also provided. The initial classification model is trained using the training data and its corresponding classification labels to obtain a trained classification model. Performance testing is then performed on the trained classification model. If the model's performance does not meet practical usage conditions, training continues using the training data and its corresponding classification labels. Training stops when the model's performance meets practical usage conditions, and the trained classification model is then designated as the text classifier. Practical usage conditions typically involve setting a threshold for the model's classification accuracy. For example, the threshold for model classification accuracy under practical usage conditions could be 99%.
[0069] Specifically, for each text cluster of the document to be segmented, the font embedding vector, font size embedding vector, bounding box position vector, and bounding box semantic vector are corresponding to each text cluster. The font embedding vector, font size embedding vector, bounding box position vector, and bounding box semantic vector of all text clusters of the document to be segmented are input into a pre-set text classifier. The text classifier outputs the text classification information corresponding to the document to be segmented, and a text classification directed graph is established based on the text classification information.
[0070] S260. Determine the text reference relationships of the document to be segmented based on the text classification directed graph.
[0071] The technical solution of this invention obtains a document to be segmented, and sequentially performs text clustering on the pages of the document to be segmented using a preset clustering algorithm to obtain at least one text cluster and its corresponding bounding box. Text clustering effectively classifies each page of the document, identifies clusters of various text types within the document, improves text recognition efficiency, and requires no document data structure, enabling the recognition of files of any document type and improving the universality of recognition. Based on the text clusters and their bounding boxes, text recognition is performed to obtain text classification information, and a directed text classification graph is established based on this information. The text classification and the establishment of the directed text classification graph allow for the creation of a document graph, which can identify related text within the document, improving the performance of text analysis. Finally, the text reference relationships of the document to be segmented are determined based on the directed text classification graph. It solves the problem of existing technologies being unable to efficiently handle files of various document types. It can parse text and text-like files of any text format, extract the relationships between text fragments, build structured document trees and document graphs, and achieve document structure segmentation, thereby improving the efficiency and accuracy of document parsing.
[0072] Example 3
[0073] Figure 3 This is a flowchart of another document structure segmentation method provided in Embodiment 2 of the present invention. The relationship between this embodiment and the above embodiments is that this is a specific method for analyzing the text reference relationships between texts in the document to be segmented. Figure 3 As shown, this document structure segmentation method includes:
[0074] S310. Obtain the document to be segmented, and perform text clustering on the document pages to be segmented in turn using a preset clustering algorithm to obtain at least one text cluster and the corresponding cluster bounding box.
[0075] S320. Based on the text clusters and the bounding boxes of the clusters, perform text recognition to obtain text classification information.
[0076] S330. Divide the document to be segmented according to the text title to determine the target classification text; construct a text structure tree according to the target classification text based on the preset structure tree building rules; and establish the text classification directed graph according to the text structure tree.
[0077] The target classification text can be standardized text classification information. Optionally, after identifying the text title, text body, and text subsections in the target classification text, since the text titles, text bodies, and text subsections are single and randomly distributed, document segmentation of the document to be segmented can organize the text titles, text bodies, and text subsections, standardizing their display. For example, in the text classification information corresponding to a document to be segmented, the text classification information is arranged according to text title, text body, and text subsections. Within each text subsection, the same arrangement of text title, text body, and text subsections is used until all text titles are segmented, resulting in the target classification text corresponding to the text classification information.
[0078] Optionally, in another optional embodiment of the present invention, the step of dividing the document to be segmented according to the text title includes:
[0079] The text classification information is determined as the text to be classified. The text to be classified is then divided into document segments based on the text title content with the highest text title level in the text to be classified, resulting in document segmented text. The document segmented text includes text sub-sections and / or text body, and the text body title is the text title content with the highest text title level. When it is recognized that the document segmented text includes the text sub-section and that the text title exists in the text sub-section, the text sub-section is updated to the text to be classified, and the operation of dividing the text to be classified based on the text title content with the highest text title level in the text to be classified is repeated until the text title does not exist in the text sub-section.
[0080] The text to be classified can be any text used for document classification. It should be noted that the text to be classified is different at different stages of document segmentation. In the first document segmentation, the text to be classified can be all document classification information. After segmenting the document classification information, a text title, text body, and at least one text subsection are obtained. Then, it is checked whether a text title exists in each text subsection. If a text subsection has a text title, then the text subsection with a text title is updated to the text to be classified, and the text segmentation of the text to be classified continues, obtaining the text title, text body, and at least one next-level text subsection for each text subsection. If a next-level text subsection has a text title, then the next-level text subsection is updated to the text to be classified, and the document segmentation operation is repeated.
[0081] The document segmentation text can be obtained by segmenting the text to be classified; the segmented text can include the main text and the main title, where the main title is the text title content with the highest level in the text segmentation; during the text segmentation process, the document segmentation text obtained from the segmentation of the text to be classified can include text sub-sections and / or text main body.
[0082] Specifically, when classifying text information, the text information is identified as the text to be classified. The text to be classified is then divided into document segments based on the highest-level text title in the text to be classified. After identifying the document segments, the resulting document segments are further identified to determine if they contain text subsections. If at least one text subsection is found, it is then further identified sequentially. If a text title is found within a text subsection, the text subsection in the document segments is updated to the text to be classified, and the process of dividing the text to be classified based on the highest-level text title in the text to be classified is repeated until the text title is found within the text subsections of the document segments. At this point, the document segmentation is complete, and the target classified text is obtained.
[0083] The preset structure tree establishment rules can be pre-established rules for constructing a text structure tree. Optionally, in another optional embodiment of the present invention, the preset structure tree establishment rules include the following rules: determining the highest-level text title in the target classified text as the node entity of the root node of the structure tree, taking the text corresponding to the text title as the leaf node of the structure tree root node, and taking the text sub-section corresponding to the text title as the child node of the structure tree root node;
[0084] The highest-level text title in the text sub-section is taken as the node entity of the tree structure child node, the text corresponding to the text title is taken as the tree structure leaf node of the tree structure child node, and the text sub-section corresponding to the text title is taken as the tree structure child node of the tree structure child node.
[0085] In this invention, the node entity can be the entity data of a node in a structure tree. For example, the node entity of the root node of the structure tree is the content of the main title. Optionally, when constructing a text structure tree based on the target-classified text, the main title with the highest text title level in the target-classified text is used as the node entity of the root node of the text structure tree, and the text after segmenting the main title with the highest text title level is used as the leaf node of the root node. If there are text sub-sections in the target-classified text, the text sub-sections after segmenting the main title with the highest text title level are used as the child nodes of the root node. After determining the root node, leaf nodes, and child nodes of the structure tree, text detection is performed on the text sub-sections of the child nodes to determine the structure tree. If a document title exists in the text sub-section of the child node, and if so, retrieve the highest-level body title of the text sub-section, update it as the node entity of the current tree structure child node, and use the body text corresponding to the body title as the leaf node of the tree structure child node. Also, use the next-level text sub-section corresponding to the highest-level body title of the text sub-section as the tree structure child node of the tree structure child node. If no document title exists in the text sub-section, then the text sub-section is still used as the tree structure child node of the root node of the tree structure.
[0086] Optionally, in another optional embodiment of the present invention, the step of establishing the text classification directed graph based on the text structure tree includes:
[0087] By treating each node in the text structure tree as a graph node and establishing edge relationships between the graph nodes, a directed graph for text classification is obtained.
[0088] The text classification directed graph can be constructed using nodes from a text structure tree as graph nodes, with edge relationships established between these nodes based on the relationships within the structure tree. These edge relationships can be associations between the graph nodes, and may include at least one of title relationships, inclusion relationships, and progression relationships. For example, the nodes in the text structure tree include first-level headings, the corresponding body text, and first-level sub-section headings. The first-level sub-section headings also include the body text and second-level sub-section headings.
[0089] Specifically, each node in the text structure tree is treated as a graph node, and edge relationships are established between the graph nodes to obtain a directed graph for text classification.
[0090] S340. Determine the text reference relationships of the document to be segmented based on the text classification directed graph.
[0091] Optionally, in another optional embodiment of the present invention, determining the text reference relationship of the document to be segmented based on the text classification directed graph includes:
[0092] By identifying at least one reference relationship between each node using a preset semantic analysis method, the reference relationship is sequentially determined as the edge attribute of the edge relationship in the text classification directed graph, thus obtaining the text classification directed graph.
[0093] The preset semantic analysis method can be a pre-defined method for determining the reference relationships between graph nodes. Optionally, the preset semantic analysis method may include converting the text content in all graph nodes into text vectors, storing the text vectors in a vector database, then traversing all graph nodes, retrieving at least one related graph node from the vector database for each graph node, obtaining the related graph nodes for each graph node, and determining the reference relationship between each graph node and its corresponding related graph nodes. Specifically, determining the reference relationship between each graph node and its corresponding related graph nodes can be achieved by constructing a prompt text and performing semantic recognition on a pre-trained semantic recognition model, obtaining the output of the semantic recognition model, and assigning edge attributes to the edge relationships in the text classification directed graph. For example, the prompt text could be: "You are a knowledge question-and-answer assistant. Please answer the relevant questions according to the requirements. Given the text content corresponding to graph node A and the text content corresponding to graph node B, please determine whether there is a reference relationship from A to B between the text content corresponding to graph node A and the text content corresponding to graph node B. The reference relationship includes three types: 'direct reference,' 'indirect reference,' and 'self-reference.' What is your answer?"
[0094] Specifically, at least one reference relationship between each node is identified using a pre-defined semantic analysis method. These reference relationships are then sequentially determined as edge attributes of the edge relationships in the text classification directed graph, resulting in the text classification directed graph. For example, the graph nodes in the text classification directed graph include a first-level heading, the corresponding body text, first-level sub-chapter headings, the body text of the first-level sub-chapter headings, and second-level sub-chapter headings. The first-level heading of the text structure tree is the graph node corresponding to the root node. The body text and the graph nodes corresponding to the first-level sub-chapter headings are adjacent to the graph node corresponding to the first-level heading. The edge relationship between the graph node corresponding to the first-level heading and the corresponding body text is an inclusion relationship; the edge relationship between the graph node corresponding to the first-level heading and the first-level sub-chapter heading is a heading relationship; the edge relationship between the body text of the first-level heading and the first-level sub-chapter heading is a progression relationship; the relationship between the first-level sub-chapter heading and the body text of the first-level sub-chapter heading is an inclusion relationship; the edge relationship between the first-level sub-chapter heading and the second-level sub-chapter heading is a heading relationship; and the edge relationship between the body text of the first-level sub-chapter heading and the second-level sub-chapter heading is a progression relationship.
[0095] The technical solution of this invention obtains a document to be segmented, and sequentially performs text clustering on the pages of the document to be segmented using a preset clustering algorithm to obtain at least one text cluster and its corresponding bounding box. Text clustering effectively classifies each page of the document, identifies clusters of various text types within the document, improves text recognition efficiency, and requires no document data structure, enabling the recognition of files of any document type and improving the universality of recognition. Based on the text clusters and their bounding boxes, text recognition is performed to obtain text classification information, and a directed text classification graph is established based on this information. The text classification and the establishment of the directed text classification graph allow for the creation of a document graph, which can identify related text within the document, improving the performance of text analysis. Finally, the text reference relationships of the document to be segmented are determined based on the directed text classification graph. It solves the problem of existing technologies being unable to efficiently handle files of various document types. It can parse text and text-like files of any text format, extract the relationships between text fragments, build structured document trees and document graphs, and achieve document structure segmentation, thereby improving the efficiency and accuracy of document parsing.
[0096] Example 4
[0097] Figure 4 This is a schematic diagram of a document structure segmentation device provided in Embodiment 4 of the present invention. Figure 4 As shown, the device includes: a document segmentation module 410, a text recognition module 420, and a text parsing module 430, wherein,
[0098] The document segmentation module 410 is used to obtain the document to be segmented, and to perform text clustering on the document pages to be segmented in turn using a preset clustering algorithm to obtain at least one text cluster and the corresponding cluster bounding box.
[0099] The text recognition module 420 is used to perform text recognition based on the text clusters and the bounding boxes of the clusters to obtain text classification information, and to establish a text classification directed graph based on the text classification information; wherein, the text classification information includes text title, text body and text subsections;
[0100] The text parsing module 430 is used to determine the text reference relationships of the document to be segmented based on the text classification directed graph.
[0101] The technical solution of this invention obtains a document to be segmented, and sequentially performs text clustering on the pages of the document to be segmented using a preset clustering algorithm to obtain at least one text cluster and its corresponding bounding box. Text clustering effectively classifies each page of the document, identifies clusters of various text types within the document, improves text recognition efficiency, and requires no document data structure, enabling the recognition of files of any document type and improving the universality of recognition. Based on the text clusters and their bounding boxes, text recognition is performed to obtain text classification information, and a directed text classification graph is established based on this information. The text classification and the establishment of the directed text classification graph allow for the creation of a document graph, which can identify related text within the document, improving the performance of text analysis. Finally, the text reference relationships of the document to be segmented are determined based on the directed text classification graph. It solves the problem of existing technologies being unable to efficiently handle files of various document types. It can parse text and text-like files of any text format, extract the relationships between text fragments, build structured document trees and document graphs, and achieve document structure segmentation, thereby improving the efficiency and accuracy of document parsing.
[0102] Optionally, the document segmentation module is specifically used for:
[0103] The text to be identified in the document page to be segmented is obtained sequentially, and the font size, font and position of each text to be identified are identified.
[0104] The text to be identified is clustered according to the font size, font and position of the text using a preset clustering algorithm to obtain at least one text cluster.
[0105] The bounding box recognition model is used to sequentially recognize the bounding boxes of the text clusters to obtain the bounding box of each text cluster.
[0106] Optionally, the text recognition module is specifically used for:
[0107] The bounding box position vector and bounding box semantic vector of the cluster bounding box are calculated using a preset vector calculation model.
[0108] Identify and record the font size frequency of the text to be identified in the bounding box of the cluster, determine the target font size frequency, and construct a font size embedding vector based on the text font size corresponding to the target font size frequency;
[0109] The font of the text to be identified in the cluster bounding box is vectorized by a preset font encoding method to obtain the font embedding vector;
[0110] The text classification information is determined by classifying the text using a preset text classifier based on the font embedding vector, the font size embedding vector, the bounding box position vector, and the bounding box semantic vector.
[0111] Optionally, the text recognition module is further used for:
[0112] The document to be segmented is divided according to the text title to determine the target category text;
[0113] Based on the preset structure tree building rules, a text structure tree is constructed according to the target classified text;
[0114] Construct a directed graph for text classification based on the text structure tree.
[0115] Optionally, the text recognition module is further used for:
[0116] The highest-level text title in the target classified text is determined as the node entity of the root node of the structure tree. The text corresponding to the text title is taken as the leaf node of the structure tree of the root node of the structure tree. The text sub-section corresponding to the text title is taken as the child node of the structure tree of the root node of the structure tree.
[0117] The highest-level text title in the text sub-section is taken as the node entity of the tree structure child node, the text corresponding to the text title is taken as the tree structure leaf node of the tree structure child node, and the text sub-section corresponding to the text title is taken as the tree structure child node of the tree structure child node.
[0118] Optionally, the text recognition module is further used for:
[0119] The highest-level text title in the target classified text is determined as the root node of the structure tree, and the text corresponding to the text title is taken as the leaf node, and the text sub-section corresponding to the text title is taken as the child node.
[0120] The highest-level text title in the sub-section is taken as the root node of the sub-node, the text corresponding to the text title is taken as the leaf node, and the sub-section corresponding to the text title is taken as the sub-node.
[0121] Optionally, the text recognition module is further used for:
[0122] By treating each node in the text structure tree as a graph node and establishing edge relationships between the graph nodes, a directed graph for text classification is obtained.
[0123] Optionally, the text parsing module is specifically used for:
[0124] By identifying at least one reference relationship between each node using a preset semantic analysis method, the reference relationship is sequentially determined as the edge attribute of the edge relationship in the text classification directed graph, thus obtaining the text classification directed graph.
[0125] The document structure segmentation device provided in the embodiments of the present invention can execute the document structure segmentation method provided in any embodiment of the present invention, and has the corresponding mode module and beneficial effects of the execution method.
[0126] Example 5
[0127] Figure 5 A schematic diagram of an electronic device 10, which 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 patterns are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0128] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0129] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of monitors, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer grids such as the Internet and / or various telecommunications grids.
[0130] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 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 11 performs the various methods and processes described above, such as document structure segmentation methods.
[0131] In some embodiments, the document structure segmentation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the document structure segmentation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the document structure segmentation method by any other suitable means (e.g., by means of firmware).
[0132] Various embodiments 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), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments 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.
[0133] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the patterns / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0134] 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.
[0135] 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).
[0136] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or grid 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., a communication grid). Examples of communication grids include local area networks (LANs), wide area networks (WANs), blockchain grids, and the Internet.
[0137] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact through a communication mesh. 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 hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0138] 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.
[0139] Example 6
[0140] This embodiment provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the program implements the document structure segmentation method steps provided in any embodiment of the present invention, the method comprising:
[0141] Obtain the document to be segmented, and sequentially perform text clustering on the document pages to be segmented using a preset clustering algorithm to obtain at least one text cluster and the corresponding cluster bounding box.
[0142] Text recognition is performed based on the text clusters and the bounding boxes of the clusters to obtain text classification information, and a directed text classification graph is established based on the text classification information; wherein, the text classification information includes at least one of text title, text body and text subsection.
[0143] The text reference relationships of the document to be segmented are determined based on the text classification directed graph.
[0144] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0145] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0146] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0147] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of mesh, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0148] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a grid of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computing device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0149] 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.
[0150] 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.
Claims
1. A document structure segmentation method, characterized in that, include: Obtain the document to be segmented, and sequentially perform text clustering on the document pages to be segmented using a preset clustering algorithm to obtain at least one text cluster and the corresponding cluster bounding box. The text to be identified in the document page to be segmented is obtained sequentially, and the font size, font and position of each text to be identified are identified. The text to be identified is clustered according to the font size, font and position of the text using a preset clustering algorithm to obtain at least one text cluster. The bounding box recognition model is used to sequentially recognize the bounding boxes of the text clusters to obtain the bounding box of each text cluster. Text recognition is performed based on the text clusters and the bounding boxes of the clusters to obtain text classification information, and a directed text classification graph is built based on the text classification information; wherein, the text classification information includes text title, text body and text subsections; The text reference relationships of the document to be segmented are determined based on the text classification directed graph; wherein, the text reference relationship is the reference relationship between each text in the document to be segmented, indicating whether one text references the content of another text; the text reference relationship includes direct reference, indirect reference and self-reference; The process of establishing a directed graph for text classification based on the text classification information includes: The document to be segmented is divided according to the text title to determine the target category text; a text structure tree is constructed based on the target category text according to the preset structure tree building rules; and a directed graph of text classification is constructed based on the text structure tree. The step of constructing the directed graph for text classification based on the text structure tree includes: By treating each node in the text structure tree as a graph node and establishing edge relationships between the graph nodes, a directed graph for text classification is obtained. Determining the text reference relationships of the document to be segmented based on the text classification directed graph includes: By identifying at least one reference relationship between each node using a preset semantic analysis method, the reference relationship is sequentially determined as the edge attribute of the edge relationship in the text classification directed graph, thus obtaining the text classification directed graph.
2. The method according to claim 1, characterized in that, The text recognition based on the text clusters and the bounding boxes of the clusters to obtain text classification information includes: The bounding box position vector and bounding box semantic vector of the cluster bounding box are calculated using a preset vector calculation model. Identify and record the font size frequency of the text to be identified in the bounding box of the cluster, determine the target font size frequency, and construct a font size embedding vector based on the text font size corresponding to the target font size frequency; The font of the text to be identified in the cluster bounding box is vectorized by a preset font encoding method to obtain the font embedding vector; The text classification information is determined by classifying the text using a preset text classifier based on the font embedding vector, the font size embedding vector, the bounding box position vector, and the bounding box semantic vector.
3. The method according to claim 1, characterized in that, The text title includes text title content and text title hierarchy; the step of dividing the document to be segmented based on the text title includes: The text classification information is determined as the text to be classified. The text to be classified is divided into documents according to the text title content with the highest text title level in the text to be classified, resulting in document-divided text. The document-divided text includes text sub-chapters and / or text body, and the text body title is the text title content with the highest text title level. If it is detected that the document segmentation text includes the text sub-section and the text sub-section contains the text title, the text sub-section is updated to the text to be classified, and the operation of segmenting the text to be classified based on the text title content with the highest text title level in the text to be classified is repeated until the text sub-section does not contain the text title.
4. The method according to claim 1, characterized in that, The preset structure tree construction rules include the following rules: The highest-level text title in the target classified text is determined as the node entity of the root node of the structure tree. The text corresponding to the text title is taken as the leaf node of the structure tree of the root node of the structure tree. The text sub-section corresponding to the text title is taken as the child node of the structure tree of the root node of the structure tree. The highest-level text title in the text sub-section is taken as the node entity of the tree structure child node, the text corresponding to the text title is taken as the tree structure leaf node of the tree structure child node, and the text sub-section corresponding to the text title is taken as the tree structure child node of the tree structure child node.
5. A document structure segmentation device, characterized in that, include: The document segmentation module is used to obtain the document to be segmented, and to perform text clustering on the document pages to be segmented in turn using a preset clustering algorithm to obtain at least one text cluster and the corresponding cluster bounding box. The text to be identified in the document page to be segmented is obtained sequentially, and the font size, font and position of each text to be identified are identified. The text to be identified is clustered according to the font size, font and position of the text using a preset clustering algorithm to obtain at least one text cluster. The bounding box recognition model is used to sequentially recognize the bounding boxes of the text clusters to obtain the bounding box of each text cluster. The text recognition module is used to perform text recognition based on the text clusters and the bounding boxes of the clusters to obtain text classification information, and to establish a text classification directed graph based on the text classification information; wherein, the text classification information includes text title, text body and text subsections; The text parsing module is used to determine the text reference relationships of the document to be segmented based on the text classification directed graph; wherein, the text reference relationship is the reference relationship between various texts in the document to be segmented, indicating whether one text references the content of another text; the text reference relationship includes direct reference, indirect reference and self-reference; The process of establishing a directed graph for text classification based on the text classification information includes: The document to be segmented is divided according to the text title to determine the target category text; a text structure tree is constructed based on the target category text according to the preset structure tree building rules; and a directed graph of text classification is constructed based on the text structure tree. The step of constructing the directed graph for text classification based on the text structure tree includes: By treating each node in the text structure tree as a graph node and establishing edge relationships between the graph nodes, a directed graph for text classification is obtained. Determining the text reference relationships of the document to be segmented based on the text classification directed graph includes: By identifying at least one reference relationship between each node using a preset semantic analysis method, the reference relationship is sequentially determined as the edge attribute of the edge relationship in the text classification directed graph, thus obtaining the text classification directed graph.
6. 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 document structure segmentation method according to any one of claims 1-4.
Citation Information
Patent Citations
Document analysis method and system, computer equipment and computer readable storage medium
CN114238575A
Document structure identification method and device, electronic equipment and readable storage medium
CN115331247A
Segmentation method based on position information of characters in plane
CN116958995A