A method and system for document content extraction based on large language model
Through the literature content extraction method based on the large language model, the problem of inefficiency of scientific researchers in literature reading and content acquisition is solved, and efficient document content extraction and personalized data storage are achieved, which is suitable for the professional needs of the scientific research field.
Patent Information
- Application Number
- CN202411655249.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-11-19
AI Technical Summary
Scientific researchers are inefficient in reading and obtaining key content in scientific research literature. The existing technology is not widely used in the field of scientific research, especially in the field of specialization, which lacks mature models.
The literature content extraction method based on the large language model is adopted, and the literature content is formatted, and the appropriate extraction methods (table extraction, basic extraction, and custom attribute extraction), the extraction algorithm of the large language model is called for content extraction, and data display and custom saving functions are provided.
It improves the literature reading efficiency of scientific researchers, reduces the investment in invalid time, provides personalized document data preservation and management, and is more flexible and accurate in the field of scientific research.
Smart Images

Figure CN119166742B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology applications, and in particular to a document content extraction method and system based on a large language model. Background Art
[0002] In the current context where large model technology is more popular, facing the scientific research field, scientific researchers need to read a lot of literature in their daily scientific research work in order to focus on some useful data and content. Usually, reading literature occupies most of the time at work, and there are very few contents related to related research fields. The situation that scientific researchers’ scientific research output efficiency is low due to reading literature is common. In this context, some workers who pursue improving scientific research efficiency have put forward relevant demands, hoping to use large model technology to give play to its semantic understanding advantages and practice in scientific research literature reading and key data content extraction. At present, the products for literature extraction on the market are not widely used, especially in the application level of specialized models for a certain scientific research field, which is not deep and mature enough. The present invention selects the field of geology as the entry point, hoping to solve the problem of inefficient literature reading and content acquisition by scientific researchers in its field. Summary of the invention
[0003] The purpose of the present invention is to provide a method and system for extracting document content based on a large language model for personalized collection of key document content for document reading in scientific research work scenarios, so as to help scientific researchers improve efficiency, reduce ineffective time investment, and personalized save and organize document data.
[0004] To achieve the above object, the present invention provides a document content extraction method based on a large language model, comprising the following steps:
[0005] Step 1: Format the document content to form a structured data view;
[0006] Step 2: Based on the structured data view obtained in step 1, select a method for extracting the target document; the extraction method includes table extraction, basic extraction and custom attribute extraction;
[0007] Step 3: According to the extraction method selected in step 2, the extraction algorithm in the large language model is called to extract the document content;
[0008] Step 4: Display the data extracted in step 3;
[0009] Step 5: Save all the data displayed in step 4 as records, or save them as archived data according to user customization.
[0010] Furthermore, the step one is specifically as follows: uploading a document file in PDF format; identifying metadata content of the document, where the metadata mainly includes author, year, abstract, paragraph content, table elements and image elements; saving the identified metadata to the object file storage via an mmd file or json data to form a structured data view.
[0011] Furthermore, in the step 2, the table extraction is: directly extracting the table data in the document and outputting it in latex language;
[0012] The basic extraction is: executing fixed input parameters to extract basic metadata information in the document, including author, year, abstract, argument, conclusion, and discussion direction;
[0013] The custom attribute extraction is as follows: input attribute definition and attribute relationship; wherein the attribute definition includes attribute name, attribute description, attribute type, and attribute prompt word; the attribute relationship is used to determine the parent-child relationship between attributes. If the parent attribute is not specified, the same-level attribute strategy is used for extraction.
[0014] Furthermore, in step 3, if the extraction method is table extraction, the document structured content data is directly extracted;
[0015] If the extraction method is basic extraction, the large model is called, and the basic attribute data is summarized and returned through the output of the large model;
[0016] If the extraction method is custom attribute extraction, the extraction results of relevant attributes are returned based on the user-defined attributes through the semantic understanding of the large model; the extraction results are traced to find the specific location of the relevant content in the document, and returned in the form of a coordinate set.
[0017] Furthermore, in the step three, the extraction process adopts a concurrent extraction method, and its concurrent splitting strategy is to first split the concurrent number according to the document and then according to the attribute level.
[0018] Furthermore, the step 4 is specifically as follows: if the extraction type is table extraction data, the latex language is used for description, and the corresponding table view is rendered through the front end;
[0019] If the extraction type is basic extraction or custom attribute extraction data, it is displayed in a two-dimensional table, where the columns of the table are used to represent the attribute names and the rows are grouped according to the extracted values of the main attributes to display the contents of different attribute value combinations.
[0020] Furthermore, in the step five, the extracted data is saved as archived data according to user customization, including: the user creates a personal database table for associating and saving the extracted data; if the extracted data is two-dimensional table data, the cell method is selected to identify and convert it into a document data format and save it in the database.
[0021] To achieve the above object, the present invention also provides a document content extraction system based on a large language model, comprising:
[0022] The document import module is used to import the formatted documents into the extraction tool;
[0023] The attribute management module is used to define the attribute set information for extraction, where both basic extraction and custom attribute extraction depend on the attribute set information defined by the attribute management module;
[0024] The data extraction module is used to call the extraction algorithm in the large language model to extract the document content and realize the interaction between the system and the large language model algorithm service;
[0025] The record keeping module is used to parse and save the extraction process data and result data, and realize the parsing and conversion of different data;
[0026] The personal database management module is used to customize the two-dimensional table data stored in the personal database and realize data transfer.
[0027] To achieve the above-mentioned purpose, the present invention also provides an electronic device, including a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-mentioned document content extraction method based on a large language model.
[0028] To achieve the above objectives, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned method for extracting document content based on a large language model.
[0029] Compared with the prior art, the invention has the following beneficial effects: the invention can define a variety of different types of extracted data and provide custom attribute extraction, which is more flexible than the fixed extraction content preset by the existing document extraction tools. At the same time, the storage of the extracted data also adopts a free selection method, which makes the processing of valid data more accurate and flexible. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions or specific implementations of the present invention, the following briefly introduces the drawings required for use in the technical description and specific implementations of the present invention. Obviously, the drawings described below are some implementations of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0031] Figure 1 It is a schematic diagram of the system module of the present invention;
[0032] Figure 2 The system overall execution flow chart of the present invention;
[0033] Figure 3 This is a system deployment architecture diagram of the present invention;
[0034] Figure 4 The figure is a schematic diagram of an electronic device of the present invention. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of systems and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0036] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0037] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0038] The present invention is described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the features of the following embodiments and implementations can be combined with each other.
[0039] Figure 1 It is a schematic diagram of the system modules, which mainly covers the different functions set by the system to realize the extraction function; Figure 2 It is a schematic diagram of the main steps of the application method; Figure 3 It is the overall deployment architecture of the system, which shows the system deployment dependency components at different levels from the top to the bottom.
[0040] See also Figure 1 The present invention provides a document content extraction system based on a large language model, comprising:
[0041] In the system module, the document import module is used to select appropriate document content for the extraction tool. The document import module relies on specific documents in the document library. The selection restriction is that the document must go through the correct formatting process. Documents that have not completed the formatting process are not allowed to be imported into the extraction tool as input. The query interface provided by the module should cover the restriction.
[0042] In the system module, the attribute management module is used to define the extracted attribute set information. Both basic data extraction and custom attribute extraction rely on the attribute set information defined by the attribute management module. The attribute management module needs to implement the query and write functions of attribute data, and define the basic information and relationship information of attribute entities.
[0043] In the system module, the data extraction module is used to realize the interaction between the system and the large language model algorithm service, and can assemble the input parameter data of the algorithm service and parse the extracted result data. In the process of realizing the above functions, the data extraction module needs to rely on and read the data information of the attribute management module. In the process of interacting with the algorithm service API, it is compatible with some abnormal return situations. The data extraction module and the algorithm service adopt the HTTP interface interaction method. The module realizes the function of concurrently calling the algorithm service, and its concurrency strategy depends on the definition of the attribute relationship in the attribute management module.
[0044] In the system module, the record saving module implements the parsing and saving functions of the extraction process data and result data. This includes the attribute data of the attribute management module, the extraction record data, the extraction result data, etc. It also implements the parsing and conversion functions of different data, such as: converting the data returned by the algorithm extraction into a format type data suitable for storage in a document-based database. The record saving module provides data query and write operations.
[0045] In the system module, the personal database management module is used to realize the extracted data management function of the personal dimension. The module defines a Table table for associating the extracted result data. The module provides the Table management function and a customized result saving interface for customizing the selection of two-dimensional table data to be stored in the personal database after the extraction results are displayed. The module implements the data transfer function, including deduplication query, duplicate data replacement, table information management, data storage and other related functions.
[0046] See also Figure 2 The present invention provides a method for extracting document content based on a large language model, comprising the following steps:
[0047] Step S1, formatting the document content to generate an mmd file or a json file of the corresponding file, which mainly includes the file metadata information; and saving it to the object file storage to form a structured data view.
[0048] In the implementation of this step, the document file format is required to be of PDF type. The formatting operation process is mainly to complete the process of identifying the document metadata content. The metadata mainly includes the author, year, abstract, paragraph content, table elements, picture elements, and other key content; the identified metadata is saved in OSS (object file storage) through mmd file or json data; that is, different types of data in the document content are classified and organized and summarized, such as figures, tables, paragraphs and keywords, article structure data, etc.; a structured data view is formed; if an unexpected abnormality occurs during the formatting process, the document will no longer support continued extraction.
[0049] Step S2, based on the structured data view, select a suitable extraction method to extract the target document in a certain way; different extraction methods have different corresponding operation processes and result data. The extraction methods include table extraction, basic extraction, and custom attribute extraction.
[0050] Among them, when the table extraction type is selected, the system does not need to enter other parameter information. By default, the table data (including the table name) in the document is directly extracted. The output method of the table data is expressed in latex language and rendered and displayed through the front-end component to display all the table contents. The pre-processing of the table data has been completed in the formatting in step S1. In addition, for the basic extraction type, for the document content, common basic metadata information of the document including author, year, summary, argument, etc. is extracted. That is, the system executes fixed input parameters by default, and the user does not need to enter other parameters. The default parameters include the basic metadata information in the document. Both basic extraction and custom extraction are attribute-based extraction. The difference is that basic extraction is fixed parameters. Finally, for custom attribute extraction, users need to customize the attribute set they want to extract, such as latitude and longitude, coordinates, samples, etc. The attribute set needs to specify an attribute as the primary attribute to form a parent-child relationship, so that in the data splitting after extraction, the primary attribute can be used as the primary key basis for splitting, and the data situation can be displayed in two dimensions; the information that needs to be entered includes attribute definition (attribute name, attribute description, attribute type, attribute prompt), attribute relationship; the attribute relationship determines the parent-child relationship between attributes, and the system requires that at most one parent attribute can be specified. If no parent attribute is specified, the same-level attribute strategy is used by default for extraction. Here is a clear explanation of the attribute-related definitions:
[0051] Attribute name: the name of the attribute to be extracted. Attribute definitions with the same name are not allowed in this extraction.
[0052] Attribute description: describes the definition and function of the attribute. The large model mainly understands the definition of the attribute through the attribute description;
[0053] Attribute type: optional numeric type or text type. The big model will understand the type and return the corresponding content.
[0054] Attribute prompt: attribute prompt word, used for the definition of the prompt word for large model input. If it is not written, the system will preset the content of its attribute description;
[0055] Attribute relationship: The parent-child relationship is used to give a data row splitting rule, and the value of the parent attribute is used to distinguish whether the corresponding child attribute belongs to the row corresponding to the parent attribute value, which is similar to the primary key of the database. The extraction and return of the same-level attributes will display all the data in one row, and each attribute will have multiple values.
[0056] Step S3, extraction and tracing process. According to the selected extraction method, the system field selects the appropriate extraction algorithm, such as table extraction directly extracts the structured content data of the document; basic extraction calls the big model, summarizes the basic attribute data through the output of the big model, and returns it; custom attribute extraction returns the extraction results of related attributes based on the user-defined attributes through the semantic understanding of the big model. Tracing is to find the location of the relevant content in the document for the data extracted in the custom attribute extraction, and return it in the form of coordinate data for highlight positioning display on the front-end page; in addition, the extraction process adopts a concurrent extraction method, and its concurrent splitting strategy is to split the concurrent number according to the document first, and then according to the attribute level.
[0057] The extraction process requires the capabilities of a large language model. The extraction effect depends on the training effect of the model. The system and the extraction algorithm interact in the form of API access, and the traceability results have no effect on the extraction process.
[0058] It should be noted that this application does not provide a detailed introduction to the algorithm implementation of the large language model, but only focuses on the logical implementation of the data flow method and storage method that interacts with the algorithm. In the extraction module involved in step S3, the system parameter input is the document, the document formatting result, and the attribute set. Among them, the attribute set is not a mandatory item, and the attribute set does not need to be passed in for table and metadata extraction. The following are some restrictions on step S3:
[0059] Select at least one formatted document as input;
[0060] In the attribute extraction method, at least one attribute must exist to continue the process;
[0061] The system limits the number of documents extracted simultaneously to 10;
[0062] The system limits the number of attribute sets to 10 or less.
[0063] Regarding the data entity definition in step S3, the system of the present application implements the definition of the data entity in the form of a two-dimensional table, as listed below:
[0064] Document basic information entity: used to save basic information of the document, such as document name, OSS address, metadata information, formatted result file address, hash value, etc.
[0065] Document extraction record entity: used to save the execution record of the extraction task, such as extraction status, attribute set relationship, document set, type, etc.
[0066] Extraction attribute information entity: used to save basic information of attributes, such as attribute name, description, type, associated extraction records, etc.
[0067] Table result entity: used to save the extraction result data of table type;
[0068] Data table entity: used to define the table information associated with the extraction result data that the user finally saves;
[0069] Template entity: used to define standard information for saving a series of attribute sets in a user-defined attribute extraction type.
[0070] The extraction calling rule is to call according to the attribute relationship, that is, for each document, the extraction algorithm is called according to the parent-child relationship of the attributes (or each attribute of the same level). For example, attribute A and attribute a are a pair of parent-child attributes, and attribute A and attribute b are another pair of parent-child attributes. The attributes will be combined into Aa and Ab twice for extraction. If there are multiple documents, they will be split according to the documents. If it is a same-level attribute relationship, such as attribute A and attribute B, the extraction will be performed according to the attributes multiple times. Similarly, multiple documents will be split according to the document combination. It should be noted that for the basic extraction type, the system will set a fixed attribute set as the extraction input by default, without the need for additional definition, and table extraction does not need to define attributes, and the formatted table is directly obtained as the output.
[0071] The extraction is executed in multiple concurrent executions. The rule is to establish concurrency according to the attribute combination. For example, according to the attribute combination rule above, a pair of parent and child is a concurrency, and each attribute of the same level is a concurrency. In addition, the concurrency of the same number of documents will be split according to the number of documents. For example, if there are M documents and the number of attributes of the parent-child relationship combination is N, the number of concurrencies is:
[0072] M * (N-1);
[0073] In the traceability process, for each extracted result data, the system will find the specific location of the relevant content in the document. The data representation of the location is a coordinate set, as shown in the following example:
[0074] {page:1,x:0.3,y:0.5,width:0.432,height:0.2}
[0075] Among them, page is the page number, x is the horizontal coordinate, y is the vertical coordinate, width is the width, and height is the height.
[0076] Expressed as a set of selected coordinates, the data of an extraction result can correspond to multiple sets of coordinate sets. After the system traces all the extraction results, it will perform reverse tracing, which is to aggregate the same coordinate set to the attribute level, that is, to express that the extracted data corresponding to multiple attributes corresponds to a location information in the document, and the attribute name is displayed in a list in the document location.
[0077] In terms of system design, the traceability executor is embedded in the extraction executor, that is, each time the extraction executor is triggered, the traceability executor will be executed accordingly. In addition, for each extraction task, the system will save the corresponding attribute set information and extraction result data, and store them in the database as an extraction record.
[0078] Step S4, data display process. Different data results are displayed according to different extraction methods; the table extraction display method is latex format rendering; the basic extraction and custom extraction systems use the attribute name as a column and the strategy of splitting rows according to the main attribute content to display the two-dimensional table data.
[0079] In table extraction data, the table data is displayed by expressing the data in latex language, and then rendering the corresponding table view through the front end. It is grouped by document, and the displayed content includes the table name and table content.
[0080] For the two extraction methods of basic extraction and custom attribute extraction, the data is displayed in a two-dimensional table, where the columns represent the attribute names, and the rows are grouped according to the specific extraction values of the main attributes, showing the content of different attribute value combinations. There are two specific split row rules: In case one, if the parent-child attribute relationship or the basic extraction method is not specified, each document extraction result is displayed in one row, and the value data corresponding to each attribute is concentrated in one cell, representing multiple values; for example, the result data of attribute A extraction includes (var1, var2, var3), then these three values will be concentrated in one cell. In case two, if the parent-child attribute relationship is specified, the grouping and splitting of rows will be carried out according to the value of the parent attribute. For example, if the extraction results of parent attribute A and child attribute b are (A: var1, b: var2, var3) and (A: var4, b: var5), two rows will be split, representing the result correspondence relationship between each parent attribute value and the child attribute. In each value, in addition to the data value itself, it also includes a series of data sets such as the traceability coordinate set and original content corresponding to the value.
[0081] Step S5, the process of customizing the result data saving. The system will save the extracted data in full as records, and support users to customize and save it as the final archived data. Users need to first create a personal database table to associate and save the extracted data this time; if it is two-dimensional table data, the system can identify and convert it into a document-type data format and save it in the database by selecting a cell in the two-dimensional table data.
[0082] Specifically, there are two saving paths: one is to save the full data records; the other is to customize the saving of local data that users think is valuable in the full data. In addition, a database table will be specially established to save the data of table extraction type. For the preservation of two-dimensional table data, it uniformly adopts document database (MongoDB) as the storage medium, and it is necessary to establish the corresponding collection in the document database in advance for data preservation. The definition of the collection includes two categories: general content and attribute content. The general content includes document information collection, user information, and record information. The attribute content is variable and varies according to the different attribute sets extracted each time. The data of the attribute content is saved in json format, using key-value pairs.
[0083] For custom local data preservation, users will be required to create another logical storage table to bind the relational content of the local data. In the two-dimensional data view, users select appropriate cell content, and the system will automatically identify the corresponding row and column information, that is, document information and attribute information, and treat the value set in the cell as a record. Users can select multiple cells for batch local data preservation. The storage medium also uses a document database, and the collection definition is the same as above.
[0084] about Figure 3In the system deployment architecture described in, this application divides the system level into 6 levels, namely: terminal layer, gateway layer, display layer, service layer, computing layer, data layer, of which the 2nd layer (gateway layer) to the 6th layer (data layer) are defined at the system implementation level. The top layer is the terminal layer, which represents the storage accessed by the user, which can be a PC or a mobile terminal. The second layer is the gateway layer, which is used as the entrance for receiving the unified traffic of the system, and is equipped with a load balancing strategy to evenly distribute the traffic to prevent the response time of individual servers from being longer due to excessive traffic. At the same time, it is equipped with a secure SSL certificate strategy. The third layer is the display layer, which is used to render the user's system interface, and the front-end service system is deployed. The fourth layer is the service layer, which is divided into back-end services and algorithm services. The back-end service is used to process the system business process, and the algorithm service is used to provide the algorithm logic interface and specifically execute the calculation logic of the response. The fifth layer is the computing layer, which is mainly used for lower-level algorithm services, such as knowledge base services, which are used to store knowledge graphs, and large model reasoning services, which are used to encapsulate and deploy large language models. The last layer is the data layer, which is mainly used to store various types of data and provide them for business use, such as relational database Mysql, cache database Redis (used to store cache data and provide distributed cache services), vector database (used to store vector data for reasoning calculations), document database Mongodb (used to store document data), object storage service OSS (used to store various files). The system adopts a hybrid deployment method of public cloud and private cloud to deploy cloud servers and related middleware resources. Depending on the network region to which the user belongs, the request traffic is distributed to different cloud environments. A full set of system resources and services are deployed in each cloud environment, and a load balancing strategy is adopted to ensure the stability of the system.
[0085] Corresponding to the embodiment of the document content extraction method based on a large language model described above, the embodiment of the present application further provides an electronic device, including: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the document content extraction method based on a large language model described above. Figure 4 As shown, it is a hardware structure diagram of any device with data processing capability in the method for extracting document content based on a large language model provided in the embodiment of the present application, except Figure 4 In addition to the processor, memory, DMA controller, disk, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiment is located may also include other hardware, which will not be described in detail, generally based on the actual functions of the device with data processing capabilities.
[0086] Corresponding to the aforementioned embodiment of the document content extraction method based on a large language model, an embodiment of the present invention further provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the document content extraction method based on a large language model in the above embodiment is implemented.
[0087] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capability and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.
[0088] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
[0089] The above embodiments are only used to illustrate the design ideas and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design ideas disclosed by the present invention are within the protection scope of the present invention.
Claims
1. A document content extraction method based on a large language model, characterized in that: The following steps are involved: Step 1: Format the document content to form a structured data view; Step 2: Based on the structured data view obtained in step 1, select the extraction method of the target document; the extraction methods include table extraction, basic extraction and custom attribute extraction; the table extraction is: directly extract the table data in the document and output it in latex language; the basic extraction is: execute fixed input parameters to extract basic metadata information in the document, including author, year, abstract, argument, conclusion, and discussion direction; the custom attribute extraction is: input attribute definition and attribute relationship; wherein the attribute definition includes attribute name, attribute description, attribute type, and attribute prompt word; the attribute relationship is used to determine the parent-child relationship between attributes. If the parent attribute is not specified, the same-level attribute strategy is used for extraction; Step 3: According to the extraction method selected in step 2, the extraction algorithm in the large language model is called to extract the document content; Step 4: Display the data extracted in step 3; Step 5: Save all the data displayed in step 4 as records, or save them as archived data according to user customization.
2. The document content extraction method based on a large language model according to claim 1, characterized in that: The step one is specifically as follows: uploading a document file in PDF format; identifying metadata content of the document, where the metadata mainly includes author, year, abstract, paragraph content, table elements, and image elements; and saving the identified metadata to an object file storage via an MMD file or JSON data to form a structured data view.
3. The document content extraction method based on a large language model according to claim 1, characterized in that: In the step 3, if the extraction method is table extraction, the document structured content data is directly extracted; If the extraction method is basic extraction, the large model is called, and the basic attribute data is summarized and returned through the output of the large model; If the extraction method is custom attribute extraction, the extraction results of relevant attributes are returned based on the user-defined attributes through the semantic understanding of the large model; the extraction results are traced to find the specific location of the relevant content in the document, and returned in the form of a coordinate set.
4. The method for extracting document content based on a large language model according to claim 1, characterized in that: In the step three, the extraction process adopts a concurrent extraction method, and its concurrent splitting strategy is to split the concurrent number first according to the document and then according to the attribute level.
5. The method for extracting document content based on a large language model according to claim 1, characterized in that: The step 4 is specifically as follows: if the extraction type is table extraction data, the latex language is used to describe it, and the front end is rendered into a corresponding table view; If the extraction type is basic extraction or custom attribute extraction data, it is displayed in a two-dimensional table, where the columns of the table are used to represent the attribute names and the rows are grouped according to the extracted values of the main attributes to display the contents of different attribute value combinations.
6. The method for extracting document content based on a large language model according to claim 5, characterized in that: In the step 5, the extracted data is saved as archived data according to user customization, including: the user creates a personal database table for associating and saving the extracted data; if the extracted data is two-dimensional table data, the cell method is selected to identify and convert it into a document data format and save it in the database.
7. A document content extraction system based on a large language model for implementing the method as claimed in claim 1, characterized in that: include: The document import module is used to import the formatted documents into the extraction tool; The attribute management module is used to define the attribute set information for extraction, where both basic extraction and custom attribute extraction depend on the attribute set information defined by the attribute management module; The data extraction module is used to call the extraction algorithm in the large language model to extract the document content and realize the interaction between the system and the large language model algorithm service; The record keeping module is used to parse and save the extraction process data and result data, and realize the parsing and conversion of different data; The personal database management module is used to customize the two-dimensional table data stored in the personal database and realize data transfer.
8. An electronic device, comprising a memory and a processor, characterized in that: The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the document content extraction method based on a large language model as described in any one of claims 1-6 above.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for extracting document content based on a large language model as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Key information extraction method and system based on large language model
CN118210879A