Document analysis method and device based on large model agent

Through the document analysis method based on large model agents, abnormal sentence breaking characters in the document are identified and processed, which solves the sentence breaking problem caused by irregular documents, improves the accuracy and effectiveness of language task processing, and reduces the cost of manual review.

CN119670728APending Publication Date: 2025-03-21IOL WUHAN INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411754173.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

In the prior art, the sentence breaking problems caused by irregular documents affect the accuracy and effect of subsequent language tasks.

Method used

The document analysis method based on the big model agent is adopted. By generating the first sentence element list, abnormal sentence breaking characters are identified and processed, the second sentence element list is generated, and they are sorted and sorted, and finally a document breaking list is generated.

Benefits of technology

It effectively solves the problem of sentence breaking caused by irregular documents, improves the accuracy and effectiveness of subsequent language tasks, and reduces the cost of pre-human review and post-human review.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119670728A_ABST
    Figure CN119670728A_ABST
Patent Text Reader

Abstract

The invention provides a document analysis method and device based on a large model agent, and the method comprises the steps: generating a first sentence element list of a target document based on the document type of the target document; generating a second sentence element list based on a large model agent and the abnormal sentence segmentation symbols in the first sentence element list; and sorting the second sentence element list, and based on the sorted second sentence element list, generating a document segmented sentence list as a document analysis result of the target document. According to the document analysis method and device based on the large model agent, the sentences which possibly have abnormal segmented sentences due to nonstandard documents can be quickly and effectively judged and processed, and subsequent text processing such as translation and model training is avoided; the method solves the problem of poor precision effect caused by sentence integrity under the conditions of sentence integrity, content segmentation and the like, and can efficiently save the cost of front manual review and rear manual review at low cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of text processing technology, and in particular to a document parsing method and device based on a large model intelligent agent. Background Art

[0002] Editable document parsing and splitting technology refers to the technology of analyzing electronic documents to identify their internal structure and decompose the document content into manageable and actionable parts. This technology is usually applied to editable documents such as Word documents, PDF files, HTML web pages, etc.

[0003] Generally speaking, document parsing technology includes the following steps: 1. Document format recognition: First, you need to determine the type of document (such as .docx, .pdf, .html, etc.). For specific types of documents, you need to use the corresponding parser or application programming interface (API) to read and parse the document content. 2. Structural analysis: Paragraph recognition: Identify paragraphs in the document and extract the text of each paragraph. Table analysis: Detect tables in the document and extract the row and column data of the table. List recognition: Identify ordered and unordered lists and extract list items. Title extraction: Identify the title hierarchy of the document and extract titles at all levels. Style analysis: Extract style information in the document, such as font size, color, bold, italic, etc. 3. Content extraction and organization: Extract the text content in the document and organize it into logical units according to the document structure. It may also be necessary to extract other elements, such as images, charts, footnotes, endnotes, etc. 4. Data structuring: Convert the extracted data into a structured format, such as JSON, XML, or CSV, for further processing and analysis.

[0004] Document parsing is the basis for further file processing. However, in actual work, there are often many non-standard documents, which cause various segmentation problems, such as segmentation problems caused by soft returns and hard returns, and segmentation problems caused by incorrect space symbols, which affect the accuracy and effect of subsequent task processing. Summary of the invention

[0005] The present invention provides a document parsing method and device based on a large model intelligent agent, which is used to solve the problem of sentence segmentation caused by non-standard documents in the prior art, thereby affecting the accuracy and effect of subsequent language task processing, and achieve improvement in the accuracy and effect of subsequent language task processing after document parsing.

[0006] The present invention provides a document parsing method based on a large model agent, comprising the following steps: Based on the document type of the target document, generating a first sentence element list of the target document; Generate a second sentence element list based on the large model agent and the abnormal sentence breakers in the first sentence element list; The second sentence element list is sorted and arranged, and a document segmentation list is generated based on the sorted second sentence element list as a document parsing result of the target document.

[0007] According to a document parsing method based on a large model agent provided by the present invention, based on the large model agent and the abnormal sentence breakers in the first sentence element list, a second sentence element list is generated, specifically comprising: Based on the abnormal sentence breakers, the sentence contents in the target document are spliced ​​to obtain a splicing result; Based on the large model agent and the splicing results, a second sentence element list is generated.

[0008] According to a document parsing method based on a large model agent provided by the present invention, a second sentence element list is generated based on the large model agent and the splicing result, specifically including: Based on the large model polishing agent, the splicing result is split and reassembled to obtain a split and reassembled result; Based on the splitting and reorganization result, sentence elements in the first sentence list are replaced to obtain a second sentence element list.

[0009] According to a document parsing method based on a large model agent provided by the present invention, based on the abnormal sentence breakers, the sentence contents in the target document are spliced ​​to obtain a splicing result, which specifically includes: For any abnormal sentence break, all sentence contents at the level to which the abnormal sentence break belongs are spliced ​​to obtain a splicing result.

[0010] According to a document parsing method based on a large model agent provided by the present invention, the method further includes: In the case that the level to which the arbitrary abnormal sentence breaker belongs only includes the current sentence content, a plurality of sentence contents adjacent to the current sentence content are selected for splicing to obtain a splicing result.

[0011] According to a document parsing method based on a large model agent provided by the present invention, based on the document type of a target document, a first sentence element list of the target document is generated, specifically comprising: Based on the document type of the target document, determining a document parsing library corresponding to the document type; Based on the document parsing library, the target document is parsed to generate a first sentence element list of the target document.

[0012] The present invention also provides a document parsing device based on a large model agent, comprising the following modules: A first generating module, used for generating a first sentence element list of the target document based on the document type of the target document; A second generating module is used to generate a second sentence element list based on the large model agent and the abnormal sentence breakers in the first sentence element list; The third generating module is used to sort and rank the second sentence element list, and generate a document segmentation list based on the sorted and rank second sentence element list as the document parsing result of the target document.

[0013] According to a document parsing device based on a large model agent provided by the present invention, based on the large model agent and the abnormal sentence breakers in the first sentence element list, a second sentence element list is generated, specifically comprising: Based on the abnormal sentence breakers, the sentence contents in the target document are spliced ​​to obtain a splicing result; Based on the large model agent and the splicing results, a second sentence element list is generated.

[0014] According to a document parsing device based on a large model agent provided by the present invention, based on the large model agent and the splicing result, a second sentence element list is generated, specifically including: Based on the large model polishing agent, the splicing result is split and reassembled to obtain a split and reassembled result; Based on the splitting and reorganization result, sentence elements in the first sentence list are replaced to obtain a second sentence element list.

[0015] According to a document parsing device based on a large model agent provided by the present invention, based on the abnormal sentence breakers, the sentence contents in the target document are spliced ​​to obtain a splicing result, specifically including: For any abnormal sentence break, all sentence contents at the level to which the abnormal sentence break belongs are spliced ​​to obtain a splicing result.

[0016] According to a document parsing device based on a large model agent provided by the present invention, based on the abnormal sentence breakers, the sentence contents in the target document are spliced ​​to obtain a splicing result, and further includes: In the case that the level to which the arbitrary abnormal sentence breaker belongs only includes the current sentence content, a plurality of sentence contents adjacent to the current sentence content are selected for splicing to obtain a splicing result.

[0017] According to a document parsing device based on a large model agent provided by the present invention, based on the document type of a target document, a first sentence element list of the target document is generated, specifically comprising: Based on the document type of the target document, determining a document parsing library corresponding to the document type; Based on the document parsing library, the target document is parsed to generate a first sentence element list of the target document.

[0018] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements any of the document parsing methods based on a large model agent as described above.

[0019] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the document parsing methods based on a large model agent as described above.

[0020] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the document parsing methods based on a large model agent as described above.

[0021] The document parsing method and device based on a large model intelligent agent provided by the present invention generate a first sentence element list of the target document according to the document type of the target document, then judge the abnormal sentence breaks in the first sentence element list, generate a second sentence element list according to the large model intelligent agent and the abnormal sentence breaks in the first sentence element list, and then sort the second sentence element list. Based on the sorted and arranged second sentence element list, a document sentence break list is generated as the document parsing result of the target document. It can quickly and effectively judge and process sentences that may have abnormal sentence breaks due to non-standard documents, avoid the problem of poor accuracy caused by sentence integrity in subsequent text processing such as translation, model training, content cutting, etc., and can efficiently and low-cost save the cost of pre-manual proofreading and post-manual review. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 It is a flowchart of the document parsing method based on the large model intelligent agent provided by the present invention.

[0024] Figure 2 It is a flow chart of the agent-based document parsing method provided by the present invention.

[0025] Figure 3 It is a structural diagram of a document parsing device based on a large model intelligent agent provided by the present invention.

[0026] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] Figure 1 is a flow chart of the document parsing method based on a large model agent provided by the present invention, such as Figure 1 As shown, the method comprises the following steps: Step 100: Generate a first sentence element list of the target document based on the document type of the target document.

[0029] Step 101: Generate a second sentence element list based on the large model agent and abnormal sentence breakers in the first sentence element list.

[0030] Step 102: sort the second sentence element list, and generate a document segmentation list based on the sorted second sentence element list as the document parsing result of the target document.

[0031] Specifically, the target document is a document file that needs to be parsed. The document type of the target document can be extracted by reading the document name and the suffix in the document name. For example, the document type of the target document may include .doc, .docx, .pdf, .html, etc.

[0032] According to different document types of the target document, a method corresponding to the target document type may be adopted to perform sentence segmentation, extract sentence elements, etc. on the target document, thereby obtaining a first sentence element list of the target document.

[0033] It should be noted that, in the embodiment of the present invention, each sentence element in the sentence element list (including the first sentence element list, the second sentence element list and the document segmentation list) may include the current sentence content, parsed segmentation symbols, style format and hierarchy information. Among them, the sentence content refers to the original text of each sentence; the segmentation symbol represents the segmentation point inferred based on punctuation or vocabulary dependency; the style format represents the output style adjusted according to the characteristics of the document type; the hierarchy represents the master-slave hierarchy formed according to the dependency relationship of the sentence elements.

[0034] According to a document parsing method based on a large model agent provided by the present invention, based on the document type of the target document, a first sentence element list of the target document is generated, which specifically includes: Based on the document type of the target document, determine the document parsing library corresponding to the document type; Based on the document parsing library, the target document is parsed to generate a list of the first sentence elements of the target document.

[0035] Specifically, in the process of generating the first sentence element list of the target document according to the document type of the target document, the document parsing library corresponding to the document type can be determined first according to the document type of the target document. For example, for .docx files, the python-docx library can be used to read; for .doc files, pythoncom combined with pywin32 can be used to read; for .pdf files, PyPDF2, pdfplumber or pdfminer libraries can be used to extract text; for .html files, the BeautifulSoup library can be used to parse HTML tags and extract text content.

[0036] After parsing the target document through the corresponding document parsing library, the first sentence element list of the target document can be generated.

[0037] After obtaining the first sentence element list, the second sentence element list may be generated based on the abnormal sentence breakers in the first sentence element list.

[0038] Abnormal sentence breakers refer to sentence breakers that cause inaccurate sentence parsing or incorrect identification of sentence elements, which are usually caused by special symbols in the text, format errors, or limitations of parsing tools. In an embodiment of the present invention, abnormal sentence breakers may include symbols such as spaces, tabs, soft returns, and hard returns.

[0039] Whether the punctuation mark in the first sentence element list is an abnormal punctuation mark can be determined by using a natural language processing (NLP) tool to analyze the grammatical structure of the sentence, check the use of punctuation marks, identify non-standard punctuation marks or misuse, identify unreasonable segmentation through contextual semantic coherence and rationality of sentence structure, and identify abbreviations, numbers, special symbols, and mispunctuation marks in multilingual texts.

[0040] After determining the abnormal punctuation marks in the first sentence element list, the abnormal punctuation marks in the first sentence element list can be eliminated, replaced, or repaired according to the large model intelligent agent to obtain the second sentence element list.

[0041] Large Model-based Agents are intelligent systems built using large-scale pre-trained language models to process complex natural language tasks.

[0042] After obtaining the second sentence element list, the second sentence element list may be sorted and then based on the sorted second sentence element list, a document segmentation list may be generated as a document parsing result of the target document.

[0043] In some implementations, the process of generating a document segmentation list based on the sorted and arranged second sentence element list can further parse the second sentence element list through a document parsing library corresponding to the target document to generate a document segmentation list, which is then used as the document parsing result of the target document.

[0044] The document parsing method based on a large model intelligent agent provided by the present invention generates a first sentence element list of the target document according to the document type of the target document, then determines abnormal sentence breaks in the first sentence element list, generates a second sentence element list according to the large model intelligent agent and the abnormal sentence breaks in the first sentence element list, and then sorts the second sentence element list. Based on the sorted and arranged second sentence element list, a document sentence break list is generated as the document parsing result of the target document. It can quickly and effectively judge and process sentences that may have abnormal sentence breaks due to non-standard documents, avoiding the problem of poor accuracy caused by sentence integrity in subsequent text processing such as translation, model training, content cutting, etc., and can efficiently and low-cost save the cost of pre-manual proofreading and post-manual review.

[0045] According to a document parsing method based on a large model agent provided by the present invention, a second sentence element list is generated based on abnormal sentence breakers in a first sentence element list, specifically comprising: Based on the abnormal sentence breakers, the sentence contents in the target document are spliced ​​to obtain the splicing result; Based on the large model agent and the concatenation results, a second sentence element list is generated.

[0046] Specifically, after determining the abnormal sentence break in the first sentence element list, the incorrectly broken sentence contents in the target document can be spliced ​​according to the abnormal sentence break in the first sentence element list to obtain a splicing result.

[0047] According to different segmentation problems (such as short sentences, abbreviations, punctuation marks, etc.), you can choose the appropriate splicing strategy to recombine the incorrectly segmented sentences.

[0048] After the concatenation result is obtained, the second sentence element list can be generated according to the concatenation result. It can be understood that the second sentence element list will contain the new content of each sentence, normal segmentation symbols, style format and level information.

[0049] According to a document parsing method based on a large model agent provided by the present invention, a second sentence element list is generated based on the large model agent and the splicing result, specifically including: Based on the large model polishing agent, the splicing results are split and reorganized to obtain the split and reorganized results; Based on the splitting and reorganization results, the sentence elements in the first sentence list are replaced to obtain the second sentence element list.

[0050] Specifically, in the process of generating the second sentence element list according to the splicing result, the splicing result can be first split and reorganized through the large model polishing agent to obtain the split and reorganization result.

[0051] The large-model polishing agent is a tool developed based on NLP and deep learning technologies. It can use large-scale pre-trained language models to automatically polish text. Its goal is to improve the readability, fluency, and logic of the text, and correct grammatical, spelling, and semantic errors.

[0052] Therefore, after the large model polishing agent polishes and corrects the text, the sentence elements in the first sentence list can be replaced according to the polishing and error correction results to obtain the second sentence element list.

[0053] The splicing results are split and reorganized through a large model polishing agent to obtain split and reorganization results. Based on the split and reorganization results, the sentence elements in the first sentence list are replaced to obtain the second sentence element list, thereby obtaining more fluent and accurate text content, which is conducive to improving the accuracy and effect of subsequent text processing.

[0054] According to a document parsing method based on a large model agent provided by the present invention, based on abnormal sentence breakers, the sentence contents in the target document are spliced ​​to obtain a splicing result, which specifically includes: For any abnormal sentence break, all sentence contents under the level to which the abnormal sentence break belongs are concatenated to obtain a concatenation result.

[0055] Specifically, in the process of splicing the sentence contents that are incorrectly disconnected in the target document according to the abnormal segmentation marks in the first sentence element list to obtain the splicing result, for any abnormal segmentation mark, all the sentence contents under the level to which the abnormal segmentation mark belongs can be determined, and then all the sentence contents under the level to which the abnormal segmentation mark belongs can be spliced, thereby removing the influence of the abnormal segmentation mark and obtaining a complete normal sentence.

[0056] By splicing all the sentence contents at the level to which any abnormal sentence breakers belong, a splicing result is obtained, which can better handle the parts of the text that do not conform to grammar or logic and improve the text quality.

[0057] According to a document parsing method based on a large model agent provided by the present invention, the method further includes: In the case that the level to which any abnormal sentence breaker belongs only includes the current sentence content, multiple sentence contents adjacent to the current sentence content are selected for splicing to obtain a splicing result.

[0058] Specifically, in the process of splicing the sentence contents that are incorrectly disconnected in the target document according to the abnormal sentence breakers in the first sentence element list to obtain the splicing result, it is also possible to select multiple sentence contents adjacent to the current sentence content for splicing to obtain the splicing result when only the current sentence content is included under the level to which any abnormal sentence breakers belong.

[0059] In the case that the level to which any abnormal segmentation mark belongs contains only the content of the current sentence, it means that the current sentence may be incorrectly divided into multiple parts due to the abnormal segmentation mark, resulting in a chaotic grammatical structure.

[0060] The adjacent sentences of the current sentence usually have themes or contents that are interrelated with the current sentence. Therefore, when only the current sentence content is included at the level to which any abnormal sentence breakers belong, multiple sentence contents adjacent to the current sentence content can be selected for splicing, which can form a more complete expression and reduce information fragmentation.

[0061] In some implementations, when only the current sentence content is included at the level to which any abnormal sentence breaker belongs, six sentence contents adjacent to the current sentence content before and after are selected for splicing to obtain a splicing result.

[0062] By selecting multiple sentence contents adjacent to the current sentence content for splicing when only the current sentence content is included at the level to which any abnormal sentence breaker belongs, information can be reassembled and the sentence structure can be optimized to conform to grammatical rules.

[0063] The document parsing method based on a large model intelligent agent provided by the present invention is further explained below through embodiments in specific application scenarios.

[0064] This embodiment proposes a document parsing method based on an agent. Figure 2 A schematic diagram of the process flow of the agent-based document parsing method provided by the present invention, such as Figure 2 As shown, the process includes the following specific steps: 1. Preliminary document parsing into a list of sentence elements

[0065] Read the document name, extract the file type through the suffix, and call the corresponding document parsing library according to the different document types (.doc, .docx, .pdf, .html, etc.), such as python's docx, pypdf, BeautifulSoup, etc., to parse the document and generate a preliminary list of document parsing results. Each sentence element in the list includes the current sentence content, parsed segmentation symbols, style format and hierarchy information.

[0066] 2. Agent secondary processing sentence element list

[0067] The list of sentence elements generated in the first step is judged one by one. If the punctuation symbol of a sentence element is a space, tab, soft return or hard return, etc., all the sentence contents under the level to which the sentence element belongs are selected for splicing. If the level only has the current sentence, the six sentences before and after the sentence are selected for splicing. The splicing result is processed by the large model polishing agent, which splits and reorganizes these contents, outputs the re-split sentence content, and replaces the corresponding old sentence elements in the list as the new sentence elements after parsing.

[0068] 3. Generate a list of new sentence elements

[0069] Rearrange and sort the sentence element list generated in the second step, and use the document parsing library to generate the corresponding sentence content, style format, level and other information for the new sentence elements processed in the second step. Output the final document segmentation list result.

[0070] Beneficial effects of this embodiment: 1. Through this post-processing method, sentences that may have abnormal segmentation can be quickly and effectively judged and merged, avoiding problems caused by sentence integrity in subsequent text processing such as translation, model training, content cutting, etc.; 2. It can save the cost of pre-manual proofreading and post-manual review efficiently and at low cost.

[0071] The document parsing device based on a large model intelligent agent provided by the present invention is described below. The document parsing device based on a large model intelligent agent described below and the document parsing method based on a large model intelligent agent described above can be referenced to each other.

[0072] Figure 3 The schematic diagram of the structure of the document parsing device based on the large model agent provided by the present invention is as follows: Figure 3 As shown, the device includes the following modules: A first generating module 300, for generating a first sentence element list of a target document based on the document type of the target document; A second generating module 310 is used to generate a second sentence element list based on the large model agent and the abnormal sentence breakers in the first sentence element list; The third generating module 320 is used to sort the second sentence element list, and generate a document segmentation list based on the sorted second sentence element list as the document parsing result of the target document.

[0073] According to a document parsing device based on a large model agent provided by the present invention, based on the large model agent and abnormal sentence breakers in the first sentence element list, a second sentence element list is generated, specifically including: Based on the abnormal sentence breakers, the sentence contents in the target document are spliced ​​to obtain the splicing result; Based on the large model agent and the concatenation results, a second sentence element list is generated.

[0074] According to a document parsing device based on a large model agent provided by the present invention, a second sentence element list is generated based on the splicing result, specifically including: Based on the large model polishing agent, the splicing results are split and reorganized to obtain the split and reorganized results; Based on the splitting and reorganization results, the sentence elements in the first sentence list are replaced to obtain the second sentence element list.

[0075] According to a document parsing device based on a large model agent provided by the present invention, based on abnormal sentence breakers, the sentence contents in the target document are spliced ​​to obtain a splicing result, which specifically includes: For any abnormal sentence break, all sentence contents under the level to which the abnormal sentence break belongs are concatenated to obtain a concatenation result.

[0076] According to a document parsing device based on a large model agent provided by the present invention, based on abnormal sentence breakers, the sentence contents in the target document are spliced ​​to obtain a splicing result, and further includes: In the case that the level to which any abnormal sentence breaker belongs only includes the current sentence content, multiple sentence contents adjacent to the current sentence content are selected for splicing to obtain a splicing result.

[0077] According to a document parsing device based on a large model agent provided by the present invention, based on the document type of the target document, a first sentence element list of the target document is generated, specifically including: Based on the document type of the target document, determine the document parsing library corresponding to the document type; Based on the document parsing library, the target document is parsed to generate a list of the first sentence elements of the target document.

[0078] Figure 4 A schematic diagram of the structure of an electronic device provided by the present invention, such as Figure 4As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communications interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the document parsing method based on the large model agent provided by the above methods, and the method includes: Based on the document type of the target document, generate a list of first sentence elements of the target document; Generate a second sentence element list based on the large model agent and the abnormal segmentation mark in the first sentence element list; The second sentence element list is sorted and arranged, and based on the sorted second sentence element list, a document segmentation list is generated as a document parsing result of the target document.

[0079] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0080] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the document parsing method based on the large model agent provided by the above methods, the method includes: Based on the document type of the target document, generate a list of first sentence elements of the target document; Generate a second sentence element list based on the large model agent and the abnormal segmentation mark in the first sentence element list; The second sentence element list is sorted and arranged, and based on the sorted second sentence element list, a document segmentation list is generated as a document parsing result of the target document.

[0081] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the document parsing method based on a large model agent provided by the above methods, the method comprising: Based on the document type of the target document, generate a list of first sentence elements of the target document; Generate a second sentence element list based on the large model agent and the abnormal segmentation mark in the first sentence element list; The second sentence element list is sorted and arranged, and based on the sorted second sentence element list, a document segmentation list is generated as a document parsing result of the target document.

[0082] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0083] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A document parsing method based on a large model agent, characterized in that: include: Based on the document type of the target document, generating a first sentence element list of the target document; Generate a second sentence element list based on the large model agent and the abnormal sentence breakers in the first sentence element list; The second sentence element list is sorted and arranged, and a document segmentation list is generated based on the sorted second sentence element list as a document parsing result of the target document.

2. The document parsing method based on a large model agent according to claim 1 is characterized in that: Based on the large model agent and the abnormal stanza in the first sentence element list, a second sentence element list is generated, specifically including: Based on the abnormal sentence breakers, the sentence contents in the target document are spliced ​​to obtain a splicing result; Based on the large model agent and the splicing results, a second sentence element list is generated.

3. The document parsing method based on a large model agent according to claim 2 is characterized in that: Based on the large model agent and the splicing result, a second sentence element list is generated, specifically including: Based on the large model polishing agent, the splicing result is split and reassembled to obtain a split and reassembled result; Based on the splitting and reorganization result, sentence elements in the first sentence list are replaced to obtain a second sentence element list.

4. The document parsing method based on a large model agent according to claim 2 is characterized in that: Based on the abnormal sentence breakers, the sentence contents in the target document are spliced ​​to obtain a splicing result, which specifically includes: For any abnormal sentence break, all sentence contents at the level to which the abnormal sentence break belongs are spliced ​​to obtain a splicing result.

5. The document parsing method based on a large model agent according to claim 4 is characterized in that: The method further comprises: In the case that the level to which the arbitrary abnormal sentence breaker belongs only includes the current sentence content, a plurality of sentence contents adjacent to the current sentence content are selected for splicing to obtain a splicing result.

6. The document parsing method based on a large model agent according to claim 1 is characterized in that: Based on the document type of the target document, a first sentence element list of the target document is generated, specifically including: Based on the document type of the target document, determining a document parsing library corresponding to the document type; Based on the document parsing library, the target document is parsed to generate a first sentence element list of the target document.

7. A document parsing device based on a large model agent, characterized in that: include: A first generating module, used for generating a first sentence element list of the target document based on the document type of the target document; A second generating module is used to generate a second sentence element list based on the large model agent and the abnormal sentence breakers in the first sentence element list; The third generating module is used to sort and rank the second sentence element list, and generate a document segmentation list based on the sorted and rank second sentence element list as the document parsing result of the target document.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the document parsing method based on the large model agent as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the document parsing method based on a large model agent as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the document parsing method based on a large model agent as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Multi-modal document information extraction method, system and equipment and storage device

    CN121766326A