Method and system for extracting content, catalog and index of standardized file in PDF (Portable Document Format) format

By using ASPOSE.PDF plug -in tools and Moonshot artificial intelligence models, extract the long text and picture content in the PDF file, and edit it, solve the problem of the existing technology that cannot effectively extract the non -text content and edit extraction content of PDF files, and realize it. Efficient PDF file analysis and editing.

CN119378500APending Publication Date: 2025-01-28SHANDONG TEJIAN LUAN ENG TECH SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411424563.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

It is difficult for the prior art to effectively extract non-text content such as pictures in PDF files, and it is impossible to edit the extracted PDF file content, which cannot meet the requirements of building a standardized management system and mechanism.

Method used

Use ASPOSE.PDF plug -in tools to identify and extract the catalog and content of long text. If the PDF file does not contain long text, all pictures are used, the Moonshot artificial intelligence model is used to convert the picture into long text, extract the directory and content, and via Moonshot via Moonshot Large artificial intelligence model extracts the indicators contained in the long text.

Benefits of technology

Realize the effective extraction of non -text content such as pictures such as PDF files, and allow editing the extracted PDF file content to meet the requirements of the standardization management system and mechanism construction, which significantly improves the directory, content, indicators, etc. of the PDF standard documentation, etc. Analysis storage efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378500A_ABST
    Figure CN119378500A_ABST
Patent Text Reader

Abstract

The invention provides a PDF format standardized file content, directory and index extraction method and system, relates to the technical field of information extraction, and aims to solve the problems that non-text content such as pictures in a PDF file cannot be effectively extracted, meanwhile, the extracted PDF file content cannot be edited, and the requirement of standardized management mechanism construction cannot be met. The method specifically comprises the steps of obtaining a to-be-extracted PDF format standardized file; identifying the to-be-extracted standard file in the PDF format, and judging whether the identified file is a long text or not so as to judge whether picture extraction is carried out on the standard file in the PDF format or not to obtain a directory and content of the file; editing the catalog and the content of the file to obtain an edited long text; extracting a file index according to the edited long text; according to the method, non-text information such as pictures in the PDF file can be effectively extracted, editing of the extracted PDF file content is achieved, and the requirement for mechanism construction of a standardized management system is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of information extraction, and in particular relates to a method and system for extracting content, directory and index of a standardized file in PDF format. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] With the vigorous promotion of the construction of standardization management systems and mechanisms, in the construction and service processes of various standardization projects, there is an urgent need for an intelligent and efficient big data standardization public service platform as support to ensure that market entities obtain more accurate standardization services.

[0004] In order to collect, analyze and store massive amounts of standardized texts on a standardized big data platform and provide more accurate standardized services to market entities, it is necessary to digitize and index the content of standardized texts to achieve in-depth application, assist standardized business decision-making, and improve the level of standardized services.

[0005] Standardization work is characterized by being multi-faceted and extensive. The data and information in the field of standardization is very large, including not only national, industry, local, group, and enterprise standard catalog data resources, but also specific standard text content data and standardization policy data, etc. In actual work, for example, in many aspects of business work such as standardization policy formulation, standard declaration and management, and standardization project declaration management, the decision-making process mainly relies on experts, but subjective deviations often occur due to the level of experts and the extent of their knowledge of standards. In order to improve the decision-making and service level of standardization work, it is urgent to analyze the current standard text resources in an indicatorized manner to support the realization of standardization auxiliary decision-making. In the process of analyzing the current standard text resources in an indicatorized manner, if it only relies on manual entry by personnel, the workload is very large.

[0006] At present, PDF format has become a widely accepted document exchange and archiving format in the world. Whether in academic research, commercial applications or daily life, PDF is favored for its high portability and format consistency. Therefore, the current standardization management construction mainly focuses on the analysis and extraction of the content, directory and indicators of PDF format standardized files.

[0007] The inventors have found that there are many software on the market for extracting PDF file content, but there are certain shortcomings: although it is possible to extract PDF file content, it is not possible to effectively extract non-text content such as pictures in PDF files. At the same time, the extracted PDF file content cannot be deleted, modified, added, confirmed, etc., and cannot meet the requirements for the construction of a standardized management system and mechanism. Summary of the invention

[0008] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a method and system for extracting content, directories, and indicators of standardized files in PDF format. By adopting the Aspose.PDF plug-in tool to identify and extract the directory and content of long text, if the PDF file to be extracted identified by the Aspose.PDF plug-in tool does not contain long text but is all pictures, the API provided by the Moonshot artificial intelligence big model is used to identify the directory and content of the pictures, and the Moonshot artificial intelligence big model is used again to extract the indicators contained in the long text, thereby solving the problem of not being able to effectively extract non-text content such as pictures in PDF files, and at the same time realizing the editing of the extracted PDF format file content, meeting the requirements of the construction of a standardized management system and mechanism.

[0009] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:

[0010] The first aspect of the present invention provides a method for extracting content, directory, and index of a PDF format standardized file, comprising:

[0011] Get the standardized file in PDF format to be extracted;

[0012] Identify the standardized PDF file to be extracted, determine whether the identified file is a long text, determine whether to extract images from the standard PDF file, and obtain the directory and content of the file;

[0013] Editing the directory and content of the file to obtain an edited long text;

[0014] A file indicator is extracted according to the edited long text.

[0015] As an implementation method, the PDF format standardized file to be extracted is identified, and it is determined whether the identified file is a long text, so as to determine whether to extract images from the PDF format standard file, and obtain the directory and content of the file, specifically:

[0016] Read and identify the PDF file to be extracted;

[0017] Determine whether the identified file is a long text. If so, perform text extraction. If not, perform image extraction to extract the directory and content of the file.

[0018] As an implementation manner, the text extraction is specifically as follows:

[0019] Configure the PDF file directory to be extracted, configure the starting page number, ending page number, starting page index, and ending page index of the PDF file directory, and parse and extract the PDF file directory;

[0020] Configure the PDF file content to be extracted, configure the starting page number, ending page number, starting page index, and ending page index of the PDF file content, and parse and extract the PDF file content.

[0021] As an implementation method, the image extraction is specifically: using the Moonshot artificial intelligence large model to parse and recognize the image, and converting the image into a long text.

[0022] As an implementation method, file indicators are extracted based on the edited long text, specifically: the Moonshot artificial intelligence large model is used to extract the indicators contained in the edited long text.

[0023] As an implementation method, Aspose.PDF plug-in tool is used to parse and identify the PDF file to be extracted.

[0024] The second aspect of the present invention provides a system for extracting content, directory and index of a PDF format standardized file, including:

[0025] A file acquisition module, configured to acquire a standardized file in PDF format to be extracted;

[0026] The directory and content parsing and extraction module is configured to identify the standardized PDF format file to be extracted, determine whether the identified file is a long text, determine whether to perform image extraction on the standard PDF format file, and obtain the directory and content of the file;

[0027] A text editing module, configured to edit the directory and content of the file to obtain an edited long text;

[0028] The index extraction module is configured to extract file indexes according to the edited long text.

[0029] The third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps of the method for extracting content, directory, and index of a PDF format standardized file as described in the first aspect of the present invention.

[0030] The fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps of the method for extracting content, directory, and index of a standardized file in PDF format as described in the first aspect of the present invention are implemented.

[0031] A fifth aspect of the present invention provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the methods and functions involved in any of the above-mentioned embodiments.

[0032] One or more of the above technical solutions have the following beneficial effects:

[0033] In this embodiment, the Aspose.PDF plug-in tool is used to identify and extract the directory and content of the long text. If the PDF file to be extracted identified by the Aspose.PDF plug-in tool does not contain long text but is all pictures, the Moonshot artificial intelligence model is used to convert the pictures into long text, extract the directory and content, and again use the Moonshot artificial intelligence model to extract the indicators contained in the long text. It can not only directly extract the content of the long text, but also effectively extract non-text content such as pictures in the PDF file.

[0034] In this embodiment, the extracted PDF file content can be edited by operations such as deletion, modification, and addition, so that the extracted PDF file meets the requirements of the construction of a standardized management system and mechanism.

[0035] In this embodiment, the extraction method can significantly improve the parsing and storage efficiency of the directory, content, indicators, etc. of the PDF standard document, effectively saving labor costs. Taking a 10,000-word PDF standard document as an example, the extraction method can extract and store the directory, content, and indicators in 5 minutes without manual entry.

[0036] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0038] Figure 1 This is a flow chart of a method for extracting content, directory, and indicators of a PDF-format standardized file in the first embodiment. DETAILED DESCRIPTION

[0039] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0040] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.

[0041] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0042] The overall idea proposed by the present invention is: by using the Aspose.PDF plug-in tool to identify and extract the directory and content of the long text; if the PDF file to be extracted identified by the Aspose.PDF plug-in tool does not contain long text but is all pictures, the Moonshot artificial intelligence big model is used to convert the pictures into long texts to extract the directory and content; and the Moonshot artificial intelligence big model is used again to extract the indicators contained in the long text; it can not only directly extract the content of the long text, but also effectively extract the non-text content such as pictures in the PDF file; at the same time, the entry of the extracted PDF file content is confirmed, and if it does not meet the requirements, it is edited, which can significantly improve the parsing and storage efficiency of the directory, content, indicators, etc. of the PDF standard document, and meet the requirements of the construction of a standardized management system and mechanism.

[0043] Embodiment 1

[0044] join Figure 1 As shown, this embodiment discloses a method for extracting content, directory, and index of a standardized file in PDF format, including:

[0045] S1. Obtain a standardized file in PDF format to be extracted;

[0046] S2, identifying the standardized PDF file to be extracted, determining whether the identified file is a long text, determining whether to perform image extraction on the standard PDF file, and obtaining the directory and content of the file;

[0047] S3, editing the directory and content of the file to obtain an edited long text;

[0048] S4. Extracting file indicators according to the edited long text.

[0049] like Figure 1 As shown, in step S1, a related PDF format standardized file is obtained and uploaded as a PDF format standardized file to be extracted.

[0050] Among them, the industry fields and levels involved are different, and file analysis is mainly carried out on standard documents such as national standards, industry standards, and local standards. The uploaded files are strictly uploaded in the form of case standard files.

[0051] like Figure 1As shown, in step S2, the PDF format standardized file to be extracted is identified, and it is determined whether the identified file is a long text, so as to determine whether to extract images from the PDF format standard file and obtain the directory and content of the file.

[0052] In actual work, the collected PDF standardized files include standard files of different types of PDF documents such as standard formats and image formats. In order to ensure the accuracy of extraction, different extraction methods are needed to parse and extract the uploaded PDF standardized files.

[0053] Step S201, reading and identifying the PDF file to be extracted;

[0054] In this embodiment, Aspose.PDF plug-in tool is used to read and identify the PDF file to be extracted.

[0055] Specifically, use Aspose.PDF plug-in to read PDF files and convert them into recognizable web page content. By specifying specific line numbers and keywords of specified page numbers, standard specific attributes can be extracted. For example, to extract "product manual on page 20, line 10", set the page number to 20, the line number to 10, and the keyword to "product manual". The extracted information can be extracted and stored in the database for display and query.

[0056] Aspose.PDF plug-in is a powerful PDF processing tool, which is more flexible and convenient to use in cross-platform applications. It can easily generate, modify, convert, present, protect and print documents in cross-platform applications. It can not only help users create, modify and convert PDF documents, but also provide rich editing and encryption functions. Therefore, in this embodiment, the Aspose.PDF plug-in tool is used to read and identify the uploaded PDF file, which can more accurately identify and extract long text from the PDF file.

[0057] S202, determining whether the identified file is a long text, if so, performing text extraction, if not, performing image extraction;

[0058] In this embodiment, if the Aspose.PDF plug-in extracts the long text from the PDF file to be extracted, and extracts the text, that is, extracts the target and content of the long text.

[0059] S2021. Text extraction, specifically:

[0060] (1) First parse and extract the PDF file directory in the long text

[0061] Configure the start page number, end page number, start page index, and end page index of the PDF file directory, parse and extract the PDF file directory in the long text, and store it in the database for display and query.

[0062] (2) Then parse and extract the PDF file content in the long text

[0063] The starting page number, ending page number, start page index, and ending page index of the PDF file content are configured, and the PDF file content in the long text is parsed and extracted. At the same time, it is stored in the database and can be displayed and queried.

[0064] S2022. Image Extraction

[0065] In this embodiment, if the Aspose.PDF plug-in fails to extract the long text from the PDF file, the parsed PDF file contains images but no text information, that is, the PDF file initially extracted does not contain long text but only images. In order to ensure the accuracy of image information extraction, the Aspose.PDF plug-in cannot be used for extraction. Instead, the API provided by the Moonshot artificial intelligence model is used to parse and extract images from the PDF file.

[0066] First, use the API provided by the Moonshot artificial intelligence model to parse and recognize images and convert them into long texts.

[0067] The Moonshot artificial intelligence model provides an API interface, which can be used to directly call PDF files that do not contain long texts by entering text instructions. For example, enter the text instruction: Please extract the directory. Then the API interface will identify the directory in the PDF file in image format according to the text instruction. When identifying the content, enter relevant text instructions such as "extract content" to identify the content of the file, and obtain the long text containing the directory and content.

[0068] Through the Moonshot artificial intelligence large model, both directory images and content images are converted into long texts, and the directory and content in the long texts are obtained to provide data support for extracting indicators.

[0069] like Figure 1 As shown, in step S3, the directory and content of the file are edited to obtain an edited long text.

[0070] In this embodiment, if the extracted directory and content information show problems or do not meet the standard requirements, the extracted information can be edited by deleting, modifying, adding, etc. to make the extracted information meet the standard requirements.

[0071] Specifically, if there are blank pages in the uploaded PDF file, resulting in no corresponding input page number to extract the directory, you can re-enter the corresponding directory page number to re-extract it; you can also configure the content page number and re-extract it according to the directory mark words in the content; you can also copy and add the unparsed directory to the extracted file, and the edited information will be stored in the database.

[0072] like Figure 1 As shown, in step S4, the file index is extracted according to the edited information.

[0073] In this embodiment, the Moonshot artificial intelligence model is used to extract indicators contained in long texts.

[0074] Specifically, if the extracted indicator is "standard index file", enter the text command: standard index file, and then the API interface provided by the Moonshot artificial intelligence model will query and display the "standard index file" information from the extracted long text.

[0075] Among them, in this embodiment, other artificial intelligence large models + OCR can also be used to identify substitutions.

[0076] In this embodiment, after the directory, content and index of the uploaded PDF format standard file are extracted and meet the standardization requirements, confirmation is performed to complete the extraction.

[0077] In this embodiment, the directory, content and indicators of the extracted PDF file are stored in the database to facilitate subsequent queries. At the same time, when the extracted PDF file is deleted, modified, added, etc., it will be updated to the database, which can ensure the real-time and accuracy of the extracted data.

[0078] Embodiment 2

[0079] This embodiment provides a system for extracting content, directory, and index of a standardized PDF file, including:

[0080] A file acquisition module, configured to acquire a standardized file in PDF format to be extracted;

[0081] The directory and content parsing and extraction module is configured to identify the standardized PDF format file to be extracted, determine whether the identified file is a long text, determine whether to perform image extraction on the standard PDF format file, and obtain the directory and content of the file;

[0082] A text editing module, configured to edit the directory and content of the file to obtain an edited long text;

[0083] The index extraction module is configured to extract file indexes according to the edited long text.

[0084] Embodiment 3

[0085] This embodiment provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the steps in the method for extracting content, directory, and index of a PDF format standardized file as described in the first aspect of the present invention are implemented.

[0086] Embodiment 4

[0087] This embodiment provides a computer device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in the method for extracting content, directory, and index of a PDF format standardized file as described in the first aspect of the present invention are implemented.

[0088] Embodiment 5

[0089] The purpose of this embodiment is to provide a computer program product containing instructions, which, when running on a computer, enables the computer to execute the methods and functions involved in any of the above embodiments.

[0090] The steps involved in the apparatus of the above embodiment correspond to the method embodiment 1, and the specific implementation method can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.

[0091] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

[0092] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A method for extracting content, directory and index of a standardized PDF file, characterized in that: include: Get the standardized file in PDF format to be extracted; Identify the PDF format standardized file to be extracted, determine whether the identified file is a long text, determine whether to perform image extraction on the PDF format standard file, and obtain the directory and content of the file; Editing the directory and content of the file to obtain an edited long text; A file indicator is extracted according to the edited long text.

2. A method for extracting content, directory and index of a PDF format standardized file as claimed in claim 1, characterized in that: Identify the standardized PDF file to be extracted, determine whether the identified file is a long text, determine whether to extract images from the standard PDF file, and obtain the directory and content of the file, specifically: Read and identify the PDF file to be extracted; Determine whether the identified file is a long text. If so, perform text extraction. If not, perform image extraction. Extract the directory and contents of the file.

3. A method for extracting content, directory and index of a PDF format standardized file as claimed in claim 1, characterized in that: The text extraction is specifically as follows: Configure the PDF file directory to be extracted, configure the starting page number, ending page number, starting page index, and ending page index of the PDF file directory, and parse and extract the PDF file directory; Configure the PDF file content to be extracted, configure the starting page number, ending page number, starting page index, and ending page index of the PDF file content, and parse and extract the PDF file content.

4. A method for extracting content, directory and index of a PDF format standardized file as claimed in claim 1, characterized in that: The image extraction specifically includes: using the Moonshot plug-in to parse and identify the image, and converting the image into a long text.

5. A method for extracting content, directory and index of a PDF format standardized file as claimed in claim 1, characterized in that: According to the edited long text, file indicators are extracted, specifically: using the Moonshot plug-in to extract the indicators contained in the edited long text.

6. A method for extracting content, directory and index of a PDF format standardized file as claimed in claim 1, characterized in that: Use Aspose.PDF plug-in tool to parse and identify the PDF file to be extracted.

7. A system for extracting content, directory and index of standardized files in PDF format, characterized in that: A method for extracting content, directory and index of a PDF format standardized file according to any one of claims 1 to 6, comprising: A file acquisition module, configured to acquire a standardized file in PDF format to be extracted; The directory and content parsing and extraction module is configured to identify the standardized PDF format file to be extracted, determine whether the identified file is a long text, determine whether to perform image extraction on the standard PDF format file, and obtain the directory and content of the file; A text editing module, configured to edit the directory and content of the file to obtain an edited long text; The index extraction module is configured to extract file indexes according to the edited long text.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. A computer 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 program, the steps of the method described in any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are performed.