File structured material data extraction method and device, electronic equipment and medium
By segmenting the writing logic and generating subtasks of materials science documents, using the agent to extract sample information in the materials science documents, the problem of manual extraction of high-precision structured data in the prior art is solved, and more efficient and accurate data extraction is achieved.
Patent Information
- Application Number
- CN202510236401.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-17
AI Technical Summary
In the prior art, it takes 1-2 hours for a PhD in Materials to manually extract high-precision structured data from a material science document, and it is difficult to work continuously for a long time, resulting in a high error rate for extraction accuracy and accuracy.
Through multiple prompt words and focus points, the writing logic of the material science document to be extracted is divided, multiple sub-tasks are generated, and the agent extracts the sample information, and the structured material data is output according to the user-defined fixed format.
It reduces the difficulty and time of data extraction, improves the accuracy and structure of the extracted information, and reduces the error rate of field experts.
Smart Images

Figure CN120162375A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data extraction, and particularly to a method, device, electronic device and medium for extracting data of document structured materials. Background Art
[0002] The extraction results of relevant technical materials science document data need to be annotated by experts with professional domain knowledge. After testing, it takes 1-2 hours for a materials science doctor to manually extract high-precision structured data from a materials science document, and it is difficult to work continuously for a long time. At the extraction accuracy expected by researchers, domain experts also have a relatively high error rate. Summary of the Invention
[0003] The present application provides a method, device, electronic device and medium for extracting data of document structured materials.
[0004] The present application provides a method for extracting data of document structured materials, including:
[0005] Obtaining a task for extracting structured material data of samples in the material science document to be extracted and prompt information; the prompt information includes a plurality of prompt words, key points of concern represented by the plurality of prompt words, and an output form; each piece of data of the structured material data includes all preparation characterization conditions and characterization results of a sample;
[0006] Dividing the writing logic of the material science document to be extracted according to the plurality of prompt words and the key points of concern, and generating a plurality of subtasks;
[0007] Extracting information of the samples in the material science document to be extracted according to the writing logic divided by the subtasks, to obtain the extracted information of the samples;
[0008] Performing data conversion on the extracted information of the samples according to a user-defined fixed format in the output form, and outputting structured material data corresponding to the extracted information of the samples.
[0009] Furthermore, the key points of concern are used to represent the result part and / or the method part of concern, and to indicate the extraction method of the intelligent agent for the samples;
[0010] The dividing the writing logic of the material science document to be extracted according to the plurality of prompt words and the key points of concern, and generating a plurality of subtasks includes:
[0011] Dividing the writing logic of the material science document to be extracted according to a plurality of prompt words and the result part and / or the method part of concern, to obtain a first subtask and a second subtask;
[0012] Extract the information of the sample in the material science document to be extracted according to the writing logic segmented by the sub-tasks, and obtain the extraction information of the sample, including:
[0013] Execute the first sub-task, including: according to the concerned method part, extract all the preparation and characterization conditions of the sample through the agent according to the indicated extraction method;
[0014] Execute the second sub-task, including: according to the concerned result part, extract all the characterization results of the sample through the agent according to the indicated extraction method;
[0015] Correspond the preparation and characterization conditions with the characterization results, and merge the samples with the same preparation and characterization conditions to obtain the extraction information of the same sample as the extraction information of the sample.
[0016] Further, the corresponding of the preparation and characterization conditions with the characterization results, and the merging of the samples with the same preparation and characterization conditions to obtain the extraction information of the same sample as the extraction information of the sample includes:
[0017] Configure a sample identifier for each result of corresponding the preparation and characterization conditions of the same sample with the characterization results;
[0018] For each sample identifier, merge the preparation and characterization conditions corresponding to the same sample identifier to obtain the extraction information of the same sample as the extraction information of the sample.
[0019] Further, the obtaining of the task and prompt information for extracting the structured material data of the sample in the material science document to be extracted includes:
[0020] Determine the material type corresponding to the concerned key points part and the prompt word template corresponding to the material type according to the concerned key points part represented by the multiple prompt words; the prompt word template includes a first prompt word for screening out the material science documents that do not conform to the concerned key points part, a second prompt word for text processing, a third prompt word for search and matching, and a fourth prompt word for formatting;
[0021] The segmentation of the writing logic of the material science document to be extracted according to the multiple prompt words and the concerned key points part, and the generation of multiple sub-tasks includes:
[0022] Segment the writing logic of the material science document to be extracted based on the concerned key points part and the prompt word template, and generate multiple sub-tasks.
[0023] Further, based on the focus points part and the prompt template, divide the writing logic of the material science document to be extracted, and generate multiple subtasks, including:
[0024] According to the first prompt, screen the text and charts in the obtained material science document, and screen out the material science documents that do not conform to the focus points part to obtain the material science documents that conform to the focus points part as the material science document to be extracted;
[0025] According to the second prompt, classify the body paragraphs of the material science document to be extracted and pre-classify the chart content;
[0026] Use the third prompt to search and match the samples, including: respectively search all the preparation and characterization conditions and all the characterization results of the samples; identify and match all the characterization results with the preparation and characterization conditions;
[0027] Extract the information of the samples in the material science document to be extracted according to the writing logic divided by the subtasks to obtain the extraction information of the samples, including:
[0028] Merge the samples with the same preparation and characterization conditions to obtain the extraction information of the same sample as the extraction information of the samples.
[0029] Further, before merging the samples with the same preparation and characterization conditions to obtain the extraction information of the same sample as the extraction information of the samples, the method further includes: performing error and hallucination checks on each step of searching and matching the samples by an intelligent agent for verification to obtain the matching results of all the verified characterization results and the preparation and characterization conditions.
[0030] Further, before converting the extraction information of the samples into structured material data corresponding to the extraction information of the samples according to the user-defined fixed format in the output form, the method further includes: converting the extraction information of the samples into a sample file in the fixed format according to the user-defined fixed format; comparing the converted sample text in the fixed format with the material science document to be extracted by an intelligent agent for judgment, and making a choice on the text that has not been converted into the fixed format, and outputting the sample file in the fixed format after the choice as the extraction information of the samples.
[0031] The present application provides a device for extracting structured material data of a document, which is used to implement the method for extracting structured material data of a document as described above. The device for extracting structured material data of a document includes:
[0032] An information acquisition module, configured to acquire a task for extracting structured material data of samples in a material science document to be extracted and prompt information; the prompt information includes a plurality of prompt words, the concerned key point parts represented by the plurality of prompt words, and an output form; each piece of the structured material data includes all preparation and characterization conditions and characterization results of a sample.
[0033] A subtask generation module, configured to split the writing logic of the material science document to be extracted according to the plurality of prompt words and the concerned key point parts, and generate a plurality of subtasks.
[0034] An information extraction module, configured to extract information of the samples in the material science document to be extracted according to the writing logic split by the subtasks, so as to obtain the extracted information of the samples.
[0035] An output module, configured to output the structured material data corresponding to the extracted information of the samples in a fixed format customized by the user in the output form.
[0036] This application provides an electronic device, including one or more processors, configured to implement the method described in any one of the above.
[0037] This application provides a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, the method described in any one of the above is implemented.
[0038] This application provides a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, the method described in any one of the above is implemented.
[0039] In some embodiments, for the method for extracting structured material data of a document in this application, by a plurality of prompt words, the concerned key point parts represented by the plurality of prompt words for splitting the material science document to be extracted, and the output form, the writing logic of the material science document to be extracted is split, which can clarify the logic chain of the material science document. At the same time, a plurality of subtasks are generated to reduce the task difficulty. According to the writing logic split by the subtasks, information of the samples in the material science document to be extracted is extracted, which can reduce the difficulty of extracting information, thereby improving the accuracy of data extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 The figure shows a schematic flowchart of the method for extracting structured material data of a document according to an embodiment of this application;
[0041] Figure 2 As shown in Figure 1 a specific flowchart of the method for extracting structured material data of the document shown;
[0042] Figure 3 As shown inFigure 1 Another specific flowchart of the method for extracting structured material data from a document shown;
[0043] Figure 4 The figure shows a schematic structural diagram of a device for extracting structured material data according to an embodiment of the present application;
[0044] Figure 5 The figure shows a schematic structural diagram of an electronic device according to an embodiment of the present application. Specific embodiments
[0045] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0046] It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily executed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may also be combined into a single step for description in other embodiments.
[0047] To solve the technical problem that in related technologies, it takes 1-2 hours for a materials science doctor to manually extract high-precision structured data from a materials science document, and it is difficult to work continuously for a long time. Under the extraction accuracy expected by scientific researchers, domain experts also have a relatively high error rate. An embodiment of the present application provides a method for extracting structured material data from a document. By using multiple prompt words and the key points of attention and output forms represented by multiple prompt words for splitting the materials science document to be extracted, the writing logic of the materials science document to be extracted can be segmented, which can clarify the logical chain of the materials science document. At the same time, multiple subtasks are generated to reduce the task difficulty. According to the writing logic segmented by the subtasks, the information of the samples in the materials science document to be extracted can be extracted, which can reduce the difficulty of extracting information, thereby improving the accuracy of data extraction.
[0048] Figure 1 The figure shows a schematic flowchart of the method for extracting structured material data from a document according to an embodiment of the present application.
[0049] As Figure 1 shown, the method for extracting structured material data from a document may include, but is not limited to, the following steps 110 to step 140:
[0050] Step 110: Obtain the task of extracting the structured material data of the samples in the material science document to be extracted and the prompt information; the prompt information includes multiple prompt words, the concerned key point parts represented by the multiple prompt words, and the output form; each piece of the structured material data contains all the preparation and characterization conditions and characterization results of a sample. Among them, the above-mentioned material science document to be extracted refers to a document that meets the extraction conditions. For example, the material science document to be extracted is selected from multiple material science documents.
[0051] Since the content of the material science document to be extracted is relatively large, and the text and / or charts are complex, therefore, the task of extracting the structured material data of the samples in the material science document to be extracted is more complex compared to the subsequent subtasks.
[0052] Starting from the result requirements, the structured data that the user hopes to obtain can be classified by sample, and each piece of data contains all the preparation conditions and characterization results of a sample. Therefore, this article guides the agent to extract all the samples in the material science document to be extracted and the relevant preparation and characterization data of these samples. Here, since the definition of the sample is relatively complex, all the preparation parameters being the same are defined as the same sample, rather than a separate entity. Whether the sample can be accurately defined is the key to the accuracy of the extraction result.
[0053] In this regard, multiple prompt words in this article are used to split the material science document to be extracted, making the subdivided material science document to be extracted easier to extract data. At the same time, multiple prompt words are used to illustrate the key points that the user is concerned about, the purpose and / or output form of the prompt words. Among them, the prompt words are used to prompt the specific execution steps. The purpose of the prompt word refers to the specific execution steps for processing the input material science document to be extracted. The output form is used to represent that the content extracted from the input material science document according to the specific execution steps prompted by the prompt word is output in a fixed format defined by the user.
[0054] Step 120: Split the writing logic of the material science document to be extracted according to the multiple prompt words and the concerned key point parts, and generate multiple subtasks.
[0055] In the extraction step, due to the scarcity of labeled data, this article directly adopts the zero-shot end-to-end prompt word method. Step 120 of this article can split the complex task into multiple subtasks and make each task as simple and clear as possible in order to enable the agent to stably output results with higher accuracy. For multiple subtasks, a dedicated agent is set. Further, in some other examples, on this basis, two additional agents are added, which are respectively used for result verification and processing of abnormal material science documents to be extracted.
[0056] In the related art, a large amount of labeled data is required, resulting in high consumption of computing power and time resources, and poor scalability. Each fine-tuning can only be used to extract documents in a specific sub-field. Compared with the related art, in the embodiments of the present application, for the above zero-shot end-to-end prompting method, a "temperature" parameter lower than 0.3 is used, and it is emphasized that all values must be directly extracted from the provided text and the original expression should be retained, without inferring, calculating, or estimating values based on external knowledge. In this way, by directly using the end-to-end prompting method, practitioners in the field of materials without a computer background can easily write prompts according to the prompt template using natural language, and no labeled data is required.
[0057] In addition, in the related art, for long texts, even if the key entities of all paragraphs are extracted using the technology of the fine-tuning model, it is still difficult to accurately combine them with the material samples of multiple groups, and the extraction granularity and F1 score are poor. Compared with the related art, in the embodiments of the present application, the writing logic of the material science document to be extracted is segmented into medium-length texts, and the language model is guided to perform sample recognition according to specific steps similar to those of an expert reading a document, which can effectively extract the sample information scattered throughout the text.
[0058] The above writing logic of the material science document to be extracted may include, but is not limited to, the method part and the result part. For detailed descriptions, please refer to the following text.
[0059] Step 130: According to the writing logic segmented by the subtasks, extract the information of the samples in the material science document to be extracted to obtain the extraction information of the samples.
[0060] It should be noted that the above material science document to be extracted is used to represent a document containing material science. The material science document to be extracted may include, but is not limited to, academic papers, book documents, and / or patent documents.
[0061] Step 140: According to the user-defined fixed format in the output form, perform data conversion on the extraction information of the samples, and output the structured material data corresponding to the extraction information of the samples.
[0062] It should be noted that the sample can be used to represent a specific material sample. The above sample is represented by the name or identifier of the sample. The above sample may include, but is not limited to, any product in metallic materials, any product in ceramic materials, any product in polymer materials (macromolecular materials), any product in composite materials, any product in semiconductor materials, any product in magnetic materials, any product in biological materials, any product in transparent materials, and any product in intelligent materials, either singly or in combination. The user-defined fixed format is used to represent the structuring of data. This fixed format can be a structured data format, such as the json format.
[0063] Continue to refer toFigure 1 As shown, the above-mentioned key points of concern are used to represent the results of concern and / or the methods of concern, and to indicate the extraction method of the sample by the agent. Correspondingly, the above step 120 may, but is not limited to, include the first step. The above step 130 may, but is not limited to, include the second step to the fifth step:
[0064] The first step is to split the writing logic of the material science document to be extracted according to multiple prompt words and the results of concern and / or the methods of concern, to obtain the first subtask and the second subtask.
[0065] The second step is to execute the first subtask, including: according to the method of concern, and in accordance with the indicated extraction method, extracting all the preparation and characterization conditions of the sample by the agent.
[0066] The third step is to execute the second subtask, including: according to the results of concern, and in accordance with the indicated extraction method, extracting all the characterization results of the sample by the agent.
[0067] The fourth step is to correspond the preparation and characterization conditions with the characterization results. Among them, the above fourth step includes: according to the context of the text describing the characterization results, finding all the descriptions of the sample entity of the characterization results, and then supplementing the preparation and characterization conditions of the found sample entity according to the extraction of the overall preparation and characterization conditions.
[0068] The fifth step is to merge the samples with the same preparation and characterization conditions to obtain the extraction information of the same sample as the extraction information of the sample.
[0069] The previously obtained result is in the form of {"a certain sample": "a certain type of characterization"}, and the merging is to obtain a result in the form of {"a certain sample": "all types of characterizations of the sample"}.
[0070] The merging rule is user-defined, because a material science document to be extracted can be characterized in multiple ways, and the user may only be concerned about one or two of the characterizations, or all the characterization results.
[0071] For example, a document will simultaneously perform three characterizations on a sample. According to the previous steps, all three characterizations of all the samples are extracted in a scattered manner, such as sample A + characterization 1, sample A + characterization 2, sample B + characterization 2, sample B + characterization 3. If the user only cares about characterization 1, then characterization 1 can be merged to obtain sample A + characterization 1 + characterization 2, while sample B is discarded because it does not have characterization 1.
[0072] In the embodiments of the present application, a strategy of first global search and then classification is adopted, that is, first search for all text descriptions related to sample preparation and characterization in the text, and then classify these descriptions into different samples. This strategy has relatively low requirements for the memory of the model and mainly relies on the "classification" ability that the agent is good at. Since there is a causal relationship between preparation and characterization, it can be split into two tasks. In the first task, the method part is input first to guide the agent to extract all the conditions for preparation and characterization. In the second task, the result part is input to guide the agent to extract all the characterization results. Then guide the agent to correspond the conditions with the results and classify the same samples into one category. Finally, guide the agent to output a formatted json result. For a detailed description, see below.
[0073] In some embodiments, step 110 above may further include receiving a task and a prompt message for extracting structured material data of samples in the material science file to be extracted input by the user, as the obtained task and the prompt message above. In this way, input writing can be performed according to user requirements.
[0074] Combined with Figure 1 As shown, in another embodiment of step 110 in the above file structured material data extraction method, it may but is not limited to include the following step (1). Correspondingly, step 120 above may but is not limited to include the following step (2):
[0075] (1) Determine the material type corresponding to the key point of concern and the prompt word template corresponding to the material type according to the key points of concern indicated by multiple prompt words; the prompt word template includes a first prompt word for screening out material science files that do not conform to the key point of concern, a second prompt word for text processing, a third prompt word for search and matching, and a fourth prompt word for formatting.
[0076] It should be noted that the above prompt word template can be a pre-customized template for convenient subsequent direct call. By receiving the key point of concern input by the user and then following the above step (1), the prompt word template can be quickly retrieved for use. Of course, the pre-established prompt word templates can correspond to different material types, so that when the specific material type is determined later, the prompt word template corresponding to the specific material type can be determined from the corresponding relationship between the pre-established prompt word templates and different material types. Of course, the same prompt template can also be used for all material types. When using it, call the prompt word template and fill in the corresponding information.
[0077] The above material types may but are not limited to include metallic materials, ceramic materials, polymer materials (macromolecular materials), composite materials, semiconductor materials, magnetic materials, biological materials, transparent materials, and intelligent materials.
[0078] (2) Based on the key points of concern and the prompt template, split the writing logic of the material science document to be extracted, generate multiple subtasks, and extract the information of the samples in the material science document to be extracted. In this way, the user can input the key points of concern,
[0079] In the embodiment of the present application, (2) in the above step 120 may further include, but is not limited to, the following first to third steps. Correspondingly, the above step 130 may further include the following fourth step:
[0080] First step: According to the first prompt word, screen the text and charts in the obtained material science document, screen out the material science documents that do not meet the key points of concern, and obtain the material science documents that meet the key points of concern as the material science documents to be extracted;
[0081] Second step: According to the second prompt word, classify the body paragraphs of the material science document to be extracted and pre-classify the chart content;
[0082] Third step: Use the third prompt word to search for and match the samples, including: respectively searching for all the preparation and characterization conditions of the samples and all the characterization results; identifying and matching all the characterization results with the preparation and characterization conditions.
[0083] Fourth step: Combine the samples with the same preparation and characterization conditions to obtain the extraction information of the same sample as the extraction information of the sample.
[0084] In the first embodiment, before combining the samples with the same preparation and characterization conditions to obtain the extraction information of the same sample as the extraction information of the sample, the method further includes: performing error and hallucination checks on each step of searching for and matching the samples through an intelligent agent for verification, and obtaining the matching results of all the verified characterization results and preparation and characterization conditions.
[0085] In the second embodiment, before converting the extraction information of the sample into structured material data corresponding to the extraction information of the sample according to the user-defined fixed format in the output form, the method further includes: converting the extraction information of the sample into a sample file in a fixed format according to the user-defined fixed format; comparing the converted sample text in the fixed format with the material science document to be extracted through an intelligent agent for judgment, making a choice on the text that has not been converted into the fixed format, and outputting the sample file in the fixed format after the choice as the extraction information of the sample.
[0086] Combined with Table 1 above, for example, 1) Use a text processing intelligent agent to process the literature text to achieve literature abbreviation extraction, paragraph classification, and chart pre-classification;
[0087] 2) Use the search and match agent to extract all samples and their corresponding preparation and characterization data;
[0088] 3) Use the verification agent to perform hallucination checks on the Q&A results in 2);
[0089] 4) Use the formatting agent to output the samples extracted in 2) in JSON format;
[0090] 5) Use the judgment agent to select and discard the sample data extracted in 2) that cannot be filled into 4).
[0091] Of course, the above first embodiment and the second embodiment can be executed independently or in combination. In this way, by using multiple agents with strong versatility and adopting the end-to-end prompt word method in different agents, structured complete material data can be directly extracted from the material science documents to be extracted through a series of steps.
[0092] Figure 2 As shown Figure 1 A specific flowchart of the method for extracting structured material data from the file shown.
[0093] Such as Figure 2 The preferred extraction route shown. 1. Obtain the text of the material science document in txt (Text File) format. The text should include several major parts: title, introduction, method, results and discussion. The text refers to html (Hyper Text Markup Language). The html web page text is directly crawled, and the text is in txt format. It should also include the figure captions and table xml format corresponding to each part, and be stored in different variables.
[0094] 2. Screening: Use the screening agent to screen out the material science documents that do not meet the requirements to obtain the material science documents to be extracted. Among them, the requirements can include but are not limited to the key points of concern.
[0095] 3. Text processing: Use the text processing agent to process the text of the material science document, including classifying the text paragraphs, and pre-classifying the pictures and tables;
[0096] 4. Search and match: Use the search and match agent to extract samples, including searching and extracting all preparation and characterization parameters, identifying the characterization results, matching them with their preparation and characterization conditions, and merging the samples with the same preparation and characterization conditions (also known as merging samples);
[0097] 5. Verification: Use the verification agent to perform error and hallucination checks on each step of the search and match agent; only verify the steps and results of the search and extraction.
[0098] 6. Formatting: Use a formatting agent to convert the obtained sample text into JSON format for formatted output;
[0099] 7. Judgment: Use a judgment agent to determine whether to fill in data, and select or discard the sample text that cannot be converted into JSON format.
[0100] 8. Obtain the material sample data in JSON format as the file structured material data.
[0101] The following is a specific application example of the above file structured material data extraction method of this application:
[0102] Taking the alloy materials science document as an example, the goal is to extract the formatted data of the components, processes, microstructures, and mechanical properties of additively manufactured steel alloy materials.
[0103] First, before using the extraction process, the following preparatory work from Step ① to Step ③ needs to be done:
[0104] ① Obtain the text of the materials science document. There are many methods to obtain the text of the materials science document, which is not the protected point of this application embodiment. In this embodiment, the method of crawling the html format materials science document from the materials science document web page and then processing it into txt format is adopted to obtain the txt format text, figure captions, and xml (eXtensible Markup Language) format tables of the target materials science document, and the introduction, methods, results and discussions, and tables are saved in different txts respectively for subsequent use. ② Select a language model. In this embodiment, qwen-plus is used; ③ The user needs to define the final data format according to their own needs.
[0105] In this embodiment, the data related to the tensile properties of alloy samples is to be extracted. The predefined final data format is as follows, mainly including the materials science document information, components, printing process, heat treatment process, tensile conditions, microstructure characterization results, and tensile test results of each sample as follows:
[0106] {"Sample ID": "xxx", "Literature Information": {"Title": "xxx", "DOI": "xxx", "Journal": "xxx"}, "Sample Name": "xxx", "Composition Content": [{"Element": "xxx", "Content": "xxx"},...], "Printing Parameter": {"Equipment": "xxx", "Laser Power": "xxx", "Scan Speed": "xxx", "Layer Thickness": "xxx", "Hatch Spacing": "xxx", "Rotation Angle": "xxx", "Scan Strategy": "xxx"}, "Thermal Process": [{"Temperature": "xxx", "Time": "xxx", "Cooling Method": "xxx", "Pressure": "xxx", "Atmosphere": "xxx"},...], "Tensile Condition": {"Tensile Standard": "xxx", "Tensile Temperature": "xxx", "Tensile Speed": "xxx", "Sample Shape": "xxx"}, "Tensile Property": {"Stress-Strain Curve": {"Figure Number": "Fig.xxx", "image path (img_url)": "(relative path)", "caption": "(caption text)"}, "yield strength": "xxx", "ultimate strength": "xxx", "elongation": "xxx", "fracture toughness": "xxx"}, "microstructure": {"microscope image": [{"img number (img_number)": "Fig.xxx", "image path (img_url)": "(relative path)", "caption": "(caption text)"}...], "electron backscatter diffraction image (EBSD_image)": [{"img number (img_number)": "Fig.xxx", "image path (img_url)": "(relative path)", "caption": "(caption text)"}...], "phase fraction": [{"phase name (phase_name)": "xxx", "phase content": "xxx"}...]}.
[0107] Secondly, the process of extracting structured material data from the document is as follows:
[0108] It should be noted that: 4 or 1 agent is used in the extraction process, and there are a total of 14 pieces of prompt words. The purpose, key points of the input content, and output form are summarized in Table 1 below:
[0109] Table 1 Agent, Prompt Words, Purpose, Input Text, and Output Content
[0110]
[0111] Combined with Table 1 above, the above first prompt word may include, but is not limited to, Prompt Word 1. The above second prompt word may include, but is not limited to, Prompt Word 2, Prompt Word 3, Prompt Word 4, and Prompt Word 5. The above third prompt word may include, but is not limited to, Prompt Word 6, Prompt Word 7, Prompt Word 8, Prompt Word 9, and Prompt Word 10. The above fourth prompt word may include, but is not limited to, Prompt Word 11, Prompt Word 12, Prompt Word 13, and Prompt Word 14.
[0112] In the above Table 1, in Prompt Word 1, four screening conditions are set in this embodiment, including screening whether the materials science document is an "article", screening whether the alloy type is steel, screening whether a tensile test has been carried out, and screening whether the alloy is a pure alloy rather than a composite material;
[0113] Among prompts 6, 8, and 9, the main purpose of extracting the component name and sample name is to shorten the token length of subsequent Q&A.
[0114] In prompt 7, when extracting the heat treatment process, the integrity and implementation sequence of the heat treatment process must be emphasized; the heat treatment process only has preparation conditions; prompt 12 is the preparation condition and characterization condition. (There are no prompts 3, 4, and 5), and the error rate is 60% - 5%.
[0115] Samples are defined in prompts 8 and 9, that is, samples with the same components, additive manufacturing process, heat treatment process, and tensile conditions are regarded as the same sample. In prompts 8 and 9, the subject in the context where the performance is described in the text is used as the sample name; in prompts 8 and 9, the extracted tensile test results and microstructural results are unformatted strings close to the original text. In these two steps, the agent (which can also be called a language model) is guided to search in three steps: ① Search for descriptions of the target performance; ② For each subject of the found description, match it with the process described in the agent's output for prompt 7 to form a sample; ③ Judge whether the sample is the same as an existing sample, and if they are all different, create a new sample entry.
[0116] In prompt 10, a one-way merging strategy is adopted, that is, the microstructural properties are attached to the sample corresponding to the tensile properties, and the samples with only microstructures and no tensile properties are discarded. Because our purpose is to obtain material data with tensile results, we think it is meaningless to have only microstructures without tensile tests. Then, in prompt 10, each merged sample is assigned a unique number as the anchor point for subsequent Q&A. The naming method of the number is doi_i, where doi is the part after the slash of the doi of the materials science document, and i is an incrementing number.
[0117] Prompts 11 - 14 are all to let the agent help us organize the data to directly obtain the json format of a certain information of all samples in an article.
[0118] Before extraction, the parameters of the language model itself should be adjusted, such as lowering parameters like "temperature" and "presence_penalty" of the language model. During extraction, it should be emphasized that all numerical values must be directly extracted from the provided text and the original expression should be retained, and no inferences, calculations, or estimated values based on external knowledge are allowed. If not mentioned in the text, fill in "None".
[0119] After the extraction is completed according to the steps corresponding to the above 14 prompts, write a script to reorganize the results of prompts 11 - 14 above into a JSON file named according to the sample label, that is, one JSON contains all the data of the composition, preparation and testing process, microstructure, and tensile properties of one sample.
[0120] Format Table 1 for more accurate models.
[0121] In addition to the extraction process, two more agents are set up to improve the accuracy and generality of the results:
[0122] The result checking agent mainly compares whether the output result exists in the original text, mainly aiming to prevent hallucinations or errors.
[0123] For example, in a materials science document, an uncommon operation such as "corrosion of alloy surface" is used and cannot be filled into the JSON with a strict format preset by the user. The judgment agent infers whether there will be a significant impact if this operation is discarded. If this operation is crucial for the final performance, this sample will be directly abandoned to avoid misleading information.
[0124] At the specific implementation level, the extraction steps are as follows:
[0125] Using the multi-agent strategy, since the structured data extraction task is divided among six agents, the complexity of the tasks that a single agent needs to complete can be reduced, and the risk of output hallucinations is dispersed; at the same time, more instructions can be input in small steps to precisely control the output result, which helps to make the output accuracy of the extraction result higher and more stable, achieving the effect of strengthening instruction following.
[0126] In the screening agent, documents that do not meet the requirements are screened out before extraction. Due to the use of this screening strategy, the remaining documents can basically be fitted into the template preset by the extractor. On the one hand, it avoids wasting computing power on unnecessary documents, and on the other hand, it reduces the possibility of errors in the extraction results.
[0127] In the text processing agent, Prompt 2 is for extracting abbreviations. Due to the use of this strategy, the text perplexity in subsequent steps can be reduced because the full text of the document will not be input in subsequent steps.
[0128] In the text processing agent, Prompt 3 is for pre-classifying pictures. Due to the use of this strategy, the correct rate of the subsequent search and matching agent for characterizing picture matching can be significantly improved.
[0129] In the text processing agent, Prompt 4 is for pre-classifying paragraphs. Due to the use of this strategy, when inputting the original text of the document in subsequent tasks, only "method" or "result" needs to be input, greatly reducing the length of the prompt context.
[0130] In the text processing agent, the prompt 5 is for process judgment. Due to the use of this strategy, the error rate of subsequent preparation condition extraction can be significantly reduced.
[0131] In the search and matching agent, an extraction strategy is adopted that first searches for performance, then retraces the sample preparation conditions, and finally merges the samples. Due to the use of this strategy, there are three benefits: ① It makes the task simpler and clearer, splitting the complex task of "extracting all preparation conditions and characterization performances of all samples" into retrieval and classification tasks, which are areas that language models are good at; ② The number of performance types to be extracted can be arbitrarily expanded. For each additional performance, just add a prompt for one more step of search; ③ The output result of each step is traceable, making it easy to find problems and helping to optimize the prompts.
[0132] In the search and matching agent, the prompts 6 and 7 are for extracting all components and preparation conditions. Although components are also a type of preparation condition, due to the different extraction difficulties of the two, components can be directly extracted as json in one step. If the preparation conditions are directly extracted as json, information is likely to be lost, resulting in incorrect retracing of the preparation conditions when searching for performance later. Due to using different strategies to extract components and preparation conditions respectively, all text information in the method part is retained with less text, which helps to successfully correspond the samples in subsequent steps.
[0133] In the search and matching agent, an explanation is made for the customized requirements of the user's sub-discipline (even experts in large fields may not understand the details of sub-fields). For example, in prompt 7, it is emphasized to distinguish heat treatment processes from casting processes and to retain the integrity and step sequence of heat treatment processes, which helps to improve the accuracy of extraction by the language model.
[0134] In the search and matching agent, since the concept of a sample is clearly defined in prompts 8 and 9, the language model can correctly output the single-layer corresponding results of "sample - performance" according to different samples, rather than outputting multi-layer confused results such as "component - process1 - process2 - performance".
[0135] In the search and matching agent, in prompts 8 and 9, since specific guiding steps are given when searching for performance and samples, the output results are more stable and the result accuracy is higher.
[0136] In the search and matching agent, since the sample name field is used in prompts 8 and 9, it can be used as an alignment anchor for the sample to conveniently enable the annotator to identify which sample this is, rather than having to check each component and preparation condition to identify which sample this is.
[0137] In the verification agent, since the original text and the result are compared and checked, errors caused by hallucinations can be greatly avoided.
[0138] In the format agent, among prompts 11 - 14, since different information of the sample is split into multiple questions and answers, the output length is shortened, the output accuracy is improved, and the risk of exceeding the token length is reduced.
[0139] In the judgment agent, since the data that cannot be filled into the preset json format is judged, the diversity of the literature can be effectively dealt with, and the extraction error caused by incomplete data extraction (such as missing key steps) can be avoided.
[0140] In the specific implementation case of the prompt, since the "temperature" index of the language model is lowered and it is emphasized that all numerical values must be directly extracted from the provided text and the original expression should be retained, and no inference, calculation or estimated value based on external knowledge is allowed, the "hallucination" phenomenon in the output of the language model is effectively reduced. Without emphasizing this point, many data that should be left blank (not provided in the literature) in the output will be filled with "hallucination" data generated by the language model. When this happens, it often gets stuck at the verification agent, wasting a large number of tokens.
[0141] In Table 1 above, the steps corresponding to the prompts, that is, the purpose of Table 1, can be executed in parallel or sequentially, and no limitation is made here.
[0142] In Table 1 above, screening, text processing, search matching, formatting, etc. can be implemented by one agent or four agents. In the following text of this article, verification can be implemented by one agent, and judgment can be implemented by one agent. Further, the output result of the screening agent is a boolean value, and the output result formats of the text processing, search matching, verification, and judgment agents are text, and the output result format of the format agent is json. 1) Use the screening agent to retain the literature that meets the requirements;
[0143] In Table 1 above, the search matching agent guides the language model to first search for the description of the target performance, then match the preparation conditions corresponding to the target performance, obtain the result pairs of "condition - single performance", and finally merge the samples for all result pairs. Specifically, methods including intersection, union, left join, and right join can be used to merge the samples as needed, and each sample is assigned a number.
[0144] Continue to refer to Figure 2 As shown, the above - mentioned 4th step may include but is not limited to the following Step 1 and Step 2:
[0145] Step 1, configure a sample identifier for each result corresponding to the preparation characterization condition and the characterization result of the same sample.
[0146] Step 2: For each sample identifier, merge the preparation characterization conditions corresponding to the same sample identifier to obtain the extraction information of the same sample, which serves as the extraction information of the sample.
[0147] Figure 3 is shown as Figure 1 Another specific flowchart of the file structured material data extraction method shown.
[0148] such as Figure 3 shown, the difference between the embodiment of the optional extraction route and the embodiment of the above - preferred extraction route mainly lies in the extraction strategy: this optional extraction route uses the method of first identifying the sample and then identifying the preparation characterization results.
[0149] Continue to combine Figure 2 and as Figure 3 shown. Specifically, modify the original prompt 8, original prompt 9, and original prompt 10: still extract all the samples that have been tested for tensile in prompt 8. However, the difference is that in this step, assign a sample identifier of "sample number" to the result corresponding to each preparation characterization condition and the characterization result of the same sample in each sample, and fix the final sample. In the next step, search for and extract the microscopic characterization results of each sample according to the samples fixed in the previous step. This makes machine learning simpler. For the test results of the first sample, assign a sample identifier of "sample number" to the result corresponding to each sample.
[0150] The effect of this optional extraction route is not necessarily worse than that of the optimal one in all cases. However, in the literature of the materials field, since there are many preparation parameters and defining a sample requires multiple parameters, the "search for performance after fixing the sample" strategy has higher requirements for the memory of the model. Therefore, the accuracy is usually worse than that of the "merge samples after searching for performance" strategy. In addition, since this strategy defines samples only relying on a certain kind of characterization, it is easy to miss samples that have not undergone this characterization but have undergone other characterizations.
[0151] Combined with the above Figures 1 to 3 and as shown in Table 1, the prompt template is as follows, where the content inside <{}> needs to be replaced with the corresponding content, and the underlined italic part needs to be customized by the user according to their own needs.
[0152] [1]. Prompt 1 for screening:
[0153] "Original text": <{Literature text (using all the text of the title, abstract, and body)}>
[0154] According to the following judgment conditions, output "correct" or "wrong":
[0155] 1. Determine whether the "original text" is a "research paper" rather than other forms of text such as "review", "comment", etc. If the "original text" is not a "research paper", output "Error".
[0156] 2. Write other screening conditions according to user requirements
[0157] If all the above conditions are met, output "Correct".
[0158] Directly output "Correct" or "Error", without any other text or symbols.
[0159] [2], Text processing:
[0160] 1], Abbreviation extraction of prompt word 2:
[0161] "Original text": <{Literature text (using the main text)}>
[0162] Output the "abbreviations" defined in the text. Do not include element symbols (e.g., Fe, Co, C).
[0163] Directly output json, without adding any extra text or symbols: [{{"abbreviation": "xxx", "full name": "xxx"}},...].
[0164] 2], Text content classification of prompt word 3
[0165] "Original text": <{Literature text (using the main text)}>
[0166] Classify the article parts into "Introduction", "Method", and "Result". Classify all parts related to experiments (such as "Experimental method", "Materials") under "Method". Classify all result and discussion parts under "Result". Exclude other parts, such as conclusions, author contributions, acknowledgments, funding, etc. Directly output in json format, without adding any extra text or symbols: {{"Introduction": ["part_i"...], "Method": ["part_i"...], "Result": ["part_i"...]}}
[0167] Note: Only output the pure text in json format, without any extra text or symbols!
[0168] 3], Pre-classification of pictures and tables for prompt word 4:
[0169] Given {pictures and tables (using figure captions and xml-formatted table text)}>
[0170] Task
[0171] 1. Find the figures included in "Classification 1":
[0172] Explanation of the chart judgment method for Classification 1
[0173] 2. Find the figures included in "Classification 2":
[0174] …
[0175] The output is directly in JSON format without adding any extra text or symbols: {{"Classification 1":[{"Figure Number":"xxx","Figure Caption":"xxx"},...],"Classification 2":[{"Figure Number":"xxx","Figure Caption":"xxx"},...]...}}
[0176] Where: The content of "Figure Number" is a number, and the content of "Figure Caption" is the complete title of the chart.
[0177] 4]. Hint word 5 process judgment:
[0178] Given: <{Method Text}>
[0179] Confirm whether the following manufacturing processes are used in the "Method". Output a JSON:
[0180] {"Process":"Correct / Incorrect","Process 2":"Correct / Incorrect",…"Other Process":"Correct / Incorrect"}. If "Other Process" is "Correct", then finally output what the other manufacturing processes used are:
[0181] {"Other Process":"xxx"}.
[0182] No extra characters are allowed.
[0183] [3]. Search and match:
[0184] 1]. Hint word 6 Search for alloy components
[0185] "Original Text":<{Method Text}>
[0186] "Table":<{Table}>
[0187] Task:
[0188] Extract all "components", including "Component Name", "Alloy Type", and "Component Content". The following is the explanation of each field:
[0189] - "Component Content" is the percentage of all elements in the alloy. The main element can be replaced by "bal." or "balanced (balanced)" instead of the specific percentage, and the unit needs to use "%". If the original text is a range, please keep the range, for example: "Ti: 3.0 - 3.5%".
[0190] - The "Component Name" can be found in the context. If an ingredient does not have a "Component Name", it is named "Component_1", "Component_2", "Component_3", etc.
[0191] In many cases, the "ingredients" are listed in a table. If the ingredients are characterized by methods such as EDS, use the ingredients mentioned in the method section rather than the characterization results.
[0192] Please output the ingredients of all experimental samples. Each output should be in JSON format:
[0193] {{"Component Name":"xxx", "Component Content":"xxx"}}
[0194] Note: All values must be directly extracted from the provided text and cannot be inferred or estimated from external knowledge. If an ingredient is not mentioned in the text, fill in "None".
[0195] 2]. Preparation conditions for Prompt 7:
[0196] "Original Text": <{Method Section}>
[0197] "Image": <{Pre-classified Image}>
[0198] "Table": <{Table Text}>
[0199] "Classified Method": <{Method Category}>
[0200] The task is to extract and structure the following information from the method section:
[0201] 1. **Manufacturing Process Extraction**:
[0202] - For each step in the `Method Category`, create a corresponding `Manufacturing Type_N` field.
[0203] - Extract the detailed parameters of each step as `Manufacturing Process_N`.
[0204] - If the parameters are referenced in a table, describe them in natural language (e.g., "As shown in Table 1, the parameters are: temperature X °C, pressure Y MPa...").
[0205] 2. **Heat Treatment Process Extraction**:
[0206] - Identify the literal descriptions of all heat treatment processes (e.g., annealing, aging, solution treatment, tempering, normalizing, sintering, precipitation hardening, surface hardening, stress relief, annealed state, direct aging, etc.).
[0207] 3. **Other Processes**:
[0208] - Any manufacturing steps that do not belong to the above categories should be included in `Other Processes`.
[0209] Output JSON format:
[0210]
[0211] Processing rules:
[0212] - Strictly in the order of manufacturing steps.
[0213] - Convert tabular data into text descriptions.
[0214] - Retain the original units of time, temperature, and other parameters.
[0215] - Ensure that all extracted information is accurate and directly supports the original "Method" text.
[0216] - The extracted text should be concise and accurate, avoiding excessive copying of the original text.
[0217] 3], Prompt 8 extraction tests and test conditions:
[0218] "Original": <{Method text}>
[0219] "Image": <{Classified image}>
[0220] "Table": <{Table text}>
[0221] Task: Identify all tests included in the provided list: [(Which test results does the input user care about) "Test 1", "Test 2",... ]
[0222] Extract the test conditions and output in a JSON format:
[0223] [{{"Test Name": "xxx (string, one of the tests in the list)", "Test Conditions": "xxx (string, all conditions for this test)"}}... ]
[0224] Processing rules:
[0225] - Do not extract tests that are not in the provided list.
[0226] - Convert tabular data into text descriptions.
[0227] - Ensure that all extracted information is accurate and directly supports the original "Method" text.
[0228] 9], Prompt 9 Search for samples representing the results, use a for loop to iterate through each test in Prompt 8, and replace the "Test Name" in this section of the prompt with the corresponding characterization
[0229] "Original Text": <{Result Text}>
[0230] "Picture": <{Classified Picture}>
[0231] "Table": <{Table Text}>
[0232] "Abbreviation": <{Abbreviation Text}>
[0233] "Component": <{Component Text}>
[0234] "Manufacturing Process": <{Manufacturing Process Text}>
[0235] "Test Conditions": <{Test Condition Text}>
[0236] Instructions:
[0237] 1. Search for and extract {Test Name} from "Results", "Figure Captions", and "Tables". Look for text and numerical descriptions as well as figure numbers.
[0238] 2. Match the extracted {Test Name} results with "Test Conditions", "Components", and "Manufacturing Condition Text" to identify a "Sample". List all "Samples" separately.
[0239] Note:
[0240] - If the "Manufacturing Condition Text" describes different heat treatment processes, they are different samples. (For example, "Aged 17-4PH SS" and "Hot Isostatically Pressed and Aged 17-4PH SS" should be considered separate samples).
[0241] - Analyze the heat treatment process of each matched sample and list it step by step. For example, a heat treatment of "Hot Isostatic Pressing + Aging" should be listed as "Step_1": "Hot Isostatic Pressing at (temperature) for (time)", "Step_2": "Aging Treatment at (temperature) for (time)".
[0242] Output directly in JSON format, without adding any extra text or symbols:
[0243]
[0244] Where:
[0245] - "Sample Name": It can be extracted from the text, especially the subject of the tensile properties being extracted. It is how the author names their sample and is usually related to the composition and process. For example, "Three groups of original DP980 (DP980-Orig) specimens were heated at 250, 400, and 550 degrees Celsius for 60 minutes and then air-cooled. In this text, they are called DP980-250, DP980-400, and DP980-550 respectively." In this case, there are 4 samples named DP980-Orig, DP980-250, DP980-400, and DP980-550 respectively.
[0246] - When filling in "Picture", only fill in the main figure number, such as "fig.1". Do not fill in sub-numbers, such as "fig.1a".
[0247] - If there is no relevant value, fill in "None".
[0248] Precautions:
[0249] - Keep the response concise and accurate. Avoid copying the original text extensively. Only focus on the relevant information of the specifically mentioned sample and exclude any irrelevant details, including information from other samples. If a sentence discusses multiple samples, only extract the information of the target sample and ignore the details related to other samples.
[0250] - **Figure Number Consistency**: Check the figure number and figure content according to the "Figure Caption" to ensure that each figure number matches its description.
[0251] - **Sample Identification Consistency**: (Ensure that each sample (listed separately) (based on unique processing conditions) (even if the same material) (different conditions -> different samples) (after generating information) (check whether the conditions are correct) (no incorrect merging))
[0252] - **Some heat treatment steps may be omitted**: For example, if the sample is called "460 aging", but the method section clearly states that all samples are first annealed, then the correct heat treatment process should be annealing first and then 460 aging.
[0253] - All extracted values **come directly from the original text or table**: Do not infer or calculate estimated values from external knowledge. Do not look for values in the figures.
[0254] 5], Prompt 10 combines samples, where the "File Name" is the doi number
[0255] All samples obtained from the user-defined Prompt 9
[0256] Instructions:
[0257] Merge the identical samples and list all samples.
[0258] - How to define "identical samples": Samples are considered identical if their "component names" and "manufacturing processes" are the same.
[0259] - Merging rule: User-defined merging rule
[0260] The output is directly in JSON format without adding any extra words or symbols:
[0261]
[0262]
[0263] Where:
[0264] -"Sample number": The format is "{file name}_i", for example, "{file name}_1", "{file name}_2", "{file name}_3"...
[0265] 4] Verification:
[0266] Task: Check whether the {answer} extracted from the {literature text} based on the {prompt} contains hallucinations or errors. If no errors are found, output "Correct". If errors are found, list the specific errors.
[0267] Checking steps:
[0268] 1. Content verification: Confirm that all content in the {extraction result} is clearly mentioned in the {literature text}. If any fact or data in the {extraction result} is not mentioned in the {literature text}, it is regarded as a hallucination.
[0269] 2. Prompt alignment: Ensure that the {extraction result} directly responds to the {prompt}. If the result introduces irrelevant information, it is regarded as an error.
[0270] 3. Sentence structure: Check for grammar errors or logical connection problems in the {extraction result}. Ensure that the sentences are coherent and the structure is correct.
[0271] Output:
[0272] If there are no errors: {"Status": "Correct"}
[0273] If errors are found: {"Error": [{"Type": "Content hallucination", "Details": "..."}, {"Type": "Grammar and connection error", "Details": "..."}]}
[0274] 5] Formatting:
[0275] Prompt 11 - Prompt 14: Split the formatting into multiple small steps according to the user's needs. For example, in the embodiment, it is split into four steps: components, preparation conditions, heat treatment process, and characterization results.
[0276] The sample information is summarized in "Answer 10": <{Answer 10}>.
[0277] Please help me organize the sample data in "Answer 10" and return a JSON containing all the samples.
[0278] [{{"Sample Number":"xxx", user - predefined JSON format.}]
[0279] Among them: "Sample Number" and "Sample Name" can be extracted from "Answer 10".
[0280] Explanation of each field in the user - predefined format.
[0281] If the original text is a range, keep the range. If there is no exact value, directly fill in "None".
[0282] Output: If all sample descriptions can be filled into the predefined JSON, directly output the following JSON data without any additional text, symbols, or explanations. If some sample descriptions cannot be filled into the predefined JSON, do not return the JSON result, but return an explanation of the reason.
[0283] 5], Judgment:
[0284] Task: According to the output of the previous module, the literature text, and the sample description, decide whether to discard the sample.
[0285] Input:
[0286] - `Output of the previous module` is the result obtained from the previous module (either in JSON format or the reason for not being able to format the extraction result as JSON): <{Output of the previous module}>
[0287] - `Sample description`: <{Answer 10}>
[0288] Rules:
[0289]
[0290]
[0291] Output:
[0292] - If the `Output of the previous module` is JSON: {"Status": "Correct"}
[0293] - If the sample (also known as the material science document to be extracted) should be retained and corrected: {"Status": "Corrected", "Corrected Sample": "xxx (description of the corrected sample)"}
[0294] - If the sample should be discarded: {"Status": "Error"}
[0295] In the embodiments of this application, 1. Facilitate the construction of the national new material big data infrastructure and reduce costs and increase efficiency for scientific research:
[0296] The automated literature data extraction technology can significantly reduce the time spent by researchers on data collection and preprocessing, enabling them to focus more on data analysis and scientific research itself. This will accelerate the output of scientific research results and promote the development of science and technology.
[0297] 2. Give full play to the expertise of domain experts and promote cross-domain cooperation: This technology provides an easy-to-use tool for material researchers without a computer background, promoting communication and cooperation between different disciplines. The zero-shot learning ability enables non-professionals to quickly get started. In fact, the extraction of material science literature data requires domain experts in material science to propose and refine requirements, and rich domain knowledge and experience in reading and writing literature within the domain to achieve better results.
[0298] 3. Improve data quality: It can directly extract data with a relatively high degree of structuring, providing great convenience for data warehousing and data analysis.
[0299] Based on the same inventive concept as the above method, the embodiments of this application also provide a device for extracting structured material data from documents, as Figure 4 shown. This device may include the following various modules.
[0300] An information acquisition module 31, configured to acquire the task of extracting structured material data of samples in the material science document to be extracted and the prompt information; the prompt information includes multiple prompt words, the key points of concern represented by the multiple prompt words, and the output form; each piece of structured material data includes all the preparation and characterization conditions and characterization results of a sample;
[0301] A subtask generation module 32, configured to divide the writing logic of the material science document to be extracted according to the multiple prompt words and the key points of concern, and generate multiple subtasks;
[0302] An information extraction module 33, configured to extract the information of the samples in the material science document to be extracted according to the writing logic divided by the subtasks, and obtain the extracted information of the samples;
[0303] An output module 34, configured to output the structured material data corresponding to the extracted information of the samples in a fixed format customized by the user in the output form.
[0304] In one embodiment, the above device further includes: a verification module, configured to perform error and hallucination checks on each step of searching and matching samples by an agent for verification before combining samples with the same preparation characterization conditions to obtain extraction information of the same sample, which is used as the extraction information of the sample, so as to obtain the matching result between all the verified characterization results and the preparation characterization conditions.
[0305] In one embodiment, the above device further includes: a judgment module, configured to convert the extraction information of the sample into a sample file in a fixed format according to the user-defined fixed format in the output form before converting the extraction information of the sample into structured material data corresponding to the extraction information of the sample and outputting it; compare the converted sample text in the fixed format with the material science file to be extracted by an agent for judgment, select or discard the text that has not been converted into the fixed format, and output the sample file in the fixed format after selection or discard, which is used as the extraction information of the sample.
[0306] The implementation processes of the functions and roles of each module in the above device are specifically described in the implementation processes of the corresponding steps in the above method, which can achieve the same technical effects and will not be elaborated here.
[0307] An embodiment of the present application provides an electronic device, including the above-mentioned file structured material data extraction device.
[0308] The above electronic device may be a PC (Personal Computer) terminal device. Among them, the PC terminal device may include, but is not limited to, a desktop computer, a tablet computer or a notebook computer.
[0309] An interface for inputting information is set on the web page or APP (application) page of the PC terminal device. In this way, the displayed interface for inputting information is used to fill in information to obtain user requirement information, so as to achieve the user's purpose.
[0310] Figure 5 The structural schematic diagram of the electronic device 50 provided by the embodiment of the present application is shown.
[0311] As Figure 5 shown, the electronic device 50 includes one or more processors 51, configured to implement the above-mentioned file structured material data extraction method.
[0312] In some embodiments, the electronic device 50 may include a storage medium 59. For example, a computer-readable storage medium may store a program that can be called by the processor 51, and may include a non-volatile storage medium. In some embodiments, the electronic device 50 may include a memory 58 and an interface 57. In some embodiments, the electronic device 50 may further include other hardware according to actual applications.
[0313] The computer-readable storage medium of the embodiments of the present application stores a program, which when executed by the processor 51, is used to implement the file structured material data extraction method described above.
[0314] The present application provides a computer program product, including a computer program / instructions, which when executed by the processor, implement the method described in any one of the above.
[0315] The embodiments of the present application also provide a computer program, stored in a computer-readable storage medium, for example, Figure 5 the storage medium 59, and when the processor executes the computer program, it causes the processor 51 to execute the method described above.
[0316] The present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing program codes. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and may implement information storage by any method or technology. The information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device.
[0317] The above are only the preferred embodiments of this specification and are not intended to limit this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this specification shall be included within the scope of protection of this specification.
[0318] It should also be noted that the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent in such process, method, commodity or device. Without further limitation, the element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, commodity or device including the said element.
Claims
1. A method for extracting structured material data from a document, characterized in that: include: Get the task and prompt information for extracting structured material data of samples in the material science file to be extracted; The prompt information includes a plurality of prompt words, the focus points indicated by the plurality of prompt words, and the output form; Each piece of the structured material data includes all preparation characterization conditions and characterization results of a sample; According to the plurality of prompt words and the focus points, the writing logic of the material science document to be extracted is divided, and a plurality of subtasks are generated; According to the writing logic divided by the subtasks, extract the information of the sample in the material science file to be extracted to obtain the extraction information of the sample; According to the user-defined fixed format in the output form, data conversion is performed on the extraction information of the sample, and structured material data corresponding to the extraction information of the sample is output.
2. The method for extracting structured material data from a document according to claim 1, characterized in that: The focus point part is used to indicate the focus result part and / or the focus method part, and to instruct the intelligent agent on the method of extracting the sample; According to the plurality of prompt words and the focus points, the writing logic of the material science document to be extracted is divided, and a plurality of subtasks are generated, including: According to the plurality of prompt words and the focus result part and / or the focus method part, the writing logic of the material science document to be extracted is divided to obtain a first subtask and a second subtask; The step of extracting information of the sample from the material science file to be extracted according to the writing logic divided by the subtasks to obtain the extraction information of the sample includes: Executing the first subtask includes: extracting all preparation characterization conditions of the sample by the agent according to the method of interest part and the indicated extraction method; Executing the second subtask includes: extracting all characterization results of the sample by the agent according to the result of interest part and the indicated extraction method; The preparation characterization conditions are matched with the characterization results, and samples with the same preparation characterization conditions are combined to obtain extraction information of the same sample as the extraction information of the sample.
3. The method for extracting data from structured documents as claimed in claim 2, characterized in that: The step of matching the preparation characterization conditions with the characterization results and combining samples with the same preparation characterization conditions to obtain extraction information of the same sample as the extraction information of the sample includes: Assign a sample identifier to each result corresponding to each of the preparation characterization conditions and the characterization result of the same sample; For each sample identifier, the preparation characterization conditions corresponding to the same sample identifier are combined to obtain the extraction information of the same sample as the extraction information of the sample.
4. The method for extracting data from structured documents as claimed in claim 1, characterized in that: The task of extracting structured material data of a sample in a material science file to be extracted and the prompt information include: According to the focus points represented by the multiple prompt words, determine the material type corresponding to the focus points and the prompt word template corresponding to the material type; the prompt word template includes a first prompt word for screening out material science documents that do not meet the focus points, a second prompt word for text processing, a third prompt word for searching for matches, and a fourth prompt word for formatting; According to the plurality of prompt words and the focus points, the writing logic of the material science document to be extracted is divided, and a plurality of subtasks are generated, including: Based on the focus points and the prompt word template, the writing logic of the material science document to be extracted is segmented, and a plurality of subtasks are generated.
5. The method for extracting structured material data from a document as claimed in claim 4, characterized in that: Based on the focus points and the prompt word template, the writing logic of the material science document to be extracted is segmented, and multiple subtasks are generated, including: According to the first prompt word, the text and charts in the acquired material science documents are screened, and the material science documents that do not meet the key points of attention are screened out, and the material science documents that meet the key points of attention are obtained as the material science documents to be extracted; According to the second prompt word, classify the text paragraphs of the material science document to be extracted and pre-classify the contents of the charts and graphs; Using the third prompt word, searching and matching the sample, including: searching all preparation characterization conditions and all characterization results of the sample respectively; identifying and matching all characterization results with the preparation characterization conditions; The step of extracting information of the sample from the material science file to be extracted according to the writing logic divided by the subtasks to obtain the extraction information of the sample includes: The samples prepared under the same characterization conditions are combined to obtain the extraction information of the same sample as the extraction information of the sample.
6. The method for extracting structured material data from a document according to claim 5, characterized in that: Before merging samples with the same preparation characterization conditions to obtain extraction information of the same sample as the extraction information of the sample, the method further includes: performing error and hallucination checks on each step of searching and matching the sample by an intelligent agent for verification to obtain matching results of all verified characterization results with the preparation characterization conditions.
7. The method for extracting data from structured documents as claimed in claim 5, characterized in that: Before performing data conversion on the sample extraction information according to the user-defined fixed format in the output form and outputting the structured material data corresponding to the sample extraction information, the method further includes: converting the sample extraction information into a sample file in the fixed format according to the user-defined fixed format; comparing the converted fixed-format sample text with the material science file to be extracted by an intelligent agent for judgment, selecting and discarding the text that has not been converted into the fixed format, and outputting the sample file in the fixed format after the selection as the sample extraction information.
8. A device for extracting data from structured documents, characterized in that: Used to implement the file structured material data extraction method according to any one of claims 1 to 7, the file structured material data extraction device comprises: An information acquisition module is used to acquire tasks and prompt information for extracting structured material data of samples in the material science document to be extracted; the prompt information includes multiple prompt words, key points represented by the multiple prompt words, and output forms; each piece of structured material data includes all preparation characterization conditions and characterization results of a sample; A subtask generating module, used to segment the writing logic of the material science document to be extracted according to the multiple prompt words and the focus points, and generate multiple subtasks; An information extraction module, used to extract the information of the sample in the material science file to be extracted according to the writing logic divided by the subtasks, and obtain the extraction information of the sample; The output module is used to output the structured material data corresponding to the extraction information of the sample according to the fixed format defined by the user in the output form.
9. An electronic device, characterized in that: The method comprises one or more processors for implementing the file structured material data extraction method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by a processor, the method for extracting file structured material data as described in any one of claims 1-7 is implemented.