A method and device for automatically extracting key information from chemical literature
By combining the Florence-2 model and the improved MolScribe model with a large language model for text and image recognition of chemical literature, this approach solves the problems of errors, omissions, and incompleteness in information extraction in existing technologies. It achieves efficient and accurate extraction of key information from chemical literature and supports high-quality training of deep learning models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies for extracting information from chemical literature suffer from errors, omissions, and incompleteness and standardization, which affect the quality of training data and application effectiveness of deep learning models.
The Florence-2 model was used for text recognition, and the improved MolScribe model was used for image recognition. A large language model was combined to filter core paragraphs and extract key information. The LoRA algorithm was used to fine-tune the model to ensure the accuracy and completeness of the information.
It achieves high-precision information extraction from complex document layouts, improves the efficiency and accuracy of key information extraction, and ensures high-quality training data for deep learning models.
Smart Images

Figure CN120781834B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chemical literature recognition, and in particular to a method and apparatus for automatically extracting key information from chemical literature. Background Technology
[0002] In chemical research and industrial production, the automated extraction of reaction information from patents and journal articles related to organic chemical synthesis has become a key technology for improving the efficiency of chemical reaction database construction. Its importance is increasingly evident, primarily due to the dependence of current deep learning tasks on high-quality chemical reaction databases. Deep learning models, such as those used for retrosynthetic prediction, product prediction, and conditional prediction, require large amounts of accurate and structured data for training and optimization. However, existing chemical reaction data often face challenges and problems, such as missing reaction roles, incomplete reaction steps, errors in molecular structure identification, and inaccurate text recognition. These issues not only affect the accuracy and reliability of the database but also limit the application and development of deep learning models in cheminformatics. To improve data quality, it is necessary to ensure the accuracy and completeness of information from the source. This includes the accurate extraction of key information such as reactants, products, reagents, solvents, catalysts, experimental conditions, and yields. Automated extraction technology can significantly improve the efficiency of this process, reduce manual intervention, and thus lower the error rate. Furthermore, automated extraction can process large amounts of data, constructing more comprehensive and richer chemical reaction databases, providing higher-quality training data for deep learning models.
[0003] In the field of automated extraction of reaction information from patents or journal articles related to organic chemical synthesis, existing technologies have the following significant drawbacks.
[0004] 1. Information Extraction Errors: Existing technologies often encounter errors when extracting information. These errors may stem from variations in document layout, leading to incorrect paragraph structures; errors present in the original text, such as typos or non-standard chemical nomenclature; and misidentification of chemical structure images in the original text. These errors directly affect the accuracy of the extracted data, thereby reducing the reliability of subsequent applications, such as retrosynthetic prediction and product prediction tasks.
[0005] 2. Information omissions: Existing technologies also have omission problems when extracting information. The lack of matching of key paragraphs may lead to the loss of important information; pronouns in paragraphs may prevent the association of some entity molecules; general method descriptions may lead to the loss of information, such as key details such as reaction conditions or yields; oversimplification of reaction descriptions in the original documents may result in the failure to extract effective information, thus making the extracted data incomplete and unable to meet the needs of deep learning model training.
[0006] 3. Incomplete and unstandardized extracted information: Existing technologies often extract information that is incomplete and unstandardized. For example, the extracted fields are limited, making it difficult to distinguish major components such as reagents, solvents, and catalysts; the reaction description is overly simplified, failing to reveal specific operational steps. These issues limit the usability of the extracted data, especially in scenarios requiring detailed reaction information to support complex chemical prediction and query tasks.
[0007] These shortcomings severely affect the accuracy, completeness, and standardization of the information extraction process. Summary of the Invention
[0008] To address the above problems, this invention provides a method for automatically extracting key information from chemical literature, comprising the following steps:
[0009] Chemical literature is obtained and input into the first Florence-2 model for text recognition to obtain a set of chemical texts.
[0010] Chemical literature is input into the improved MolScribe model for image recognition to obtain a set of chemical images.
[0011] The chemical text set is input into the first language model to filter core paragraphs, thus obtaining the core paragraph text set.
[0012] The chemical image set and the core paragraph text set are input into the second language model to extract key information and obtain key chemical information.
[0013] Optionally, the training process of the first Florence-2 model specifically includes:
[0014] Obtain a set of sample document images, and label each region in each sample document image in the set; label the title, image, paragraph, table, header and footer, and caption as a0, a1, a2, a3, a4, and a5 respectively to obtain the first training image set; where a0, a1, a2, a3, a4, and a5 are all preset constants;
[0015] The initial Florence-2 model is iteratively trained using the first training image set until the loss value of the initial Florence-2 model converges and is less than the first preset value, thus obtaining the first Florence-2 model.
[0016] Optionally, chemical literature can be input into the first Florence-2 model for text recognition to obtain a set of chemical texts, specifically including:
[0017] S11: Obtain the image of the i-th page of the chemical literature, perform image recognition on the document image using the first Florence-2 model, and obtain all regions in the document image and the corresponding labels for each region;
[0018] S12: Optical character recognition is performed on the regions labeled a0 and a2 using the first Florence-2 model to obtain the title text and paragraph text respectively, and the title text and paragraph text are used as the chemical text of the i-th page;
[0019] S13: Repeat steps S11-S12 until all document images of chemical literature have been traversed to obtain a set of chemical texts.
[0020] Optionally, the improved MolScribe model construction process includes:
[0021] Obtain a set of sample structure images, and label the abbreviation groups and Markush structures in each sample structure image in the set to obtain a second training image set;
[0022] The initial Florence-2 model is iteratively trained using the second training image set until the loss value of the initial Florence-2 model converges and is less than the second preset value, thus obtaining the second Florence-2 model.
[0023] Obtain the initial MolScribe model, and construct the improved MolScribe model from the initial MolScribe model and the second Florence-2 model.
[0024] Optionally, chemical literature can be input into the improved MolScribe model for image recognition to obtain a set of chemical images, specifically including:
[0025] S21: Input chemical literature into the initial MolScribe model to perform chemical structure transformation and obtain all structure images;
[0026] S22: Input the j-th structural image into the second Florence-2 model for image text recognition to obtain the j-th chemical image;
[0027] S23: Repeat step S22 until all structural images have been traversed to obtain a set of chemical images.
[0028] Optionally, the training process of the first major language model specifically includes:
[0029] Obtain the sample chemical text set, extract the sample title text set from the sample chemical text set, construct the sample directory text set based on the sample title text set, and divide the sample directory text set into the first query text set and the first answer text set;
[0030] Extract the sample paragraph text set from the sample chemical text set, and divide the sample paragraph text set into a second query text set and a second answer text set;
[0031] Based on the first and second answer text sets, the sample core paragraph text set is obtained from the sample chemical text set. Based on the first query text set, the second query text set, and the sample core paragraph text set, the initial large language model is fine-tuned using the LoRA algorithm to obtain the first large language model.
[0032] Optionally, the training process for the second major language model specifically includes:
[0033] Obtain the core paragraph text set of the sample, and annotate the core paragraph text set of the sample with key chemical information, including chemical structure, product, reactant, solvent, catalyst, conditions, yield and standardized steps;
[0034] Based on the core paragraph text set of samples annotated with key chemical information, the initial large language model is fine-tuned using the LoRA algorithm to obtain the second large language model.
[0035] This invention also provides an automatic extraction device for key information from chemical literature, used to implement the aforementioned automatic extraction method for key information from chemical literature, the device comprising:
[0036] The chemical text set acquisition module is used to acquire chemical literature. The chemical literature is input into the first Florence-2 model for text recognition to obtain a chemical text set.
[0037] The chemical image collection acquisition module is used to input chemical literature into the improved MolScribe model for image recognition and obtain a chemical image collection.
[0038] The core paragraph text set acquisition module is used to input the chemical text set into the first language model to filter core paragraphs and obtain the core paragraph text set.
[0039] The chemical key information acquisition module is used to input the chemical image set and the core paragraph text set into the second language model to extract key information and obtain chemical key information.
[0040] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the aforementioned method for automatically extracting key information from chemical literature.
[0041] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the aforementioned method for automatically extracting key information from chemical literature.
[0042] The present invention has the following beneficial effects:
[0043] 1. The first Florence-2 model can perform text recognition on chemical documents based on document layout, accurately parsing chemical documents with different formats and layouts and extracting chemical texts containing important information. The improved MolScribe model can accurately identify chemical structures in images and extract chemical images containing chemical structures. The first major language model can remove invalid content in chemical texts and retain only the core paragraph text. Finally, the second major language model extracts chemical structures from chemical images and key chemical information from core paragraph texts, achieving high-precision information extraction from chemical documents with complex document layouts.
[0044] 2. Based on the table of contents text and paragraph text constructed from the title text, the initial large language model is fine-tuned using the LoRA algorithm to obtain the first large language model. This first large language model focuses on extracting the core paragraphs from the title text and paragraph text, significantly improving the efficiency and accuracy of core information extraction.
[0045] 3. Based on the sample chemical image set annotated with chemical structure and the sample core paragraph text set annotated with key chemical information, the initial large language model is fine-tuned using the LoRA algorithm to obtain a second large language model. This second large language model can quickly identify and extract key chemical information and chemical structures from the literature, and can also identify errors in compound names, significantly improving the speed and accuracy of extracting key chemical information and chemical structures. Attached Figure Description
[0046] Figure 1 This is a flowchart of a method according to an embodiment of the present invention;
[0047] Figure 2 A diagram illustrating region recognition in a document image;
[0048] Figure 3 This is a schematic diagram for identifying abbreviation groups;
[0049] Figure 4 A schematic diagram for identifying Markush structures;
[0050] Figure 5 A schematic diagram illustrating the key chemical information extracted;
[0051] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0052] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0053] Reference Figure 1 This invention provides a method for automatically extracting key information from chemical literature, comprising the following steps:
[0054] Chemical literature is obtained and input into the first Florence-2 model for text recognition to obtain a set of chemical texts.
[0055] In some embodiments, text recognition is a crucial stage in current chemical literature reaction information extraction techniques. Chemical literature is typically stored in PDF format, which exhibits significant diversity in layout, including single-column, multi-column, or mixed-column formats. This diversity poses challenges to text recognition and paragraph order identification; traditional text recognition techniques are often inefficient and inaccurate when handling these complex layouts. To address these issues, this invention uses the Florence-2 visual model as a foundation and performs targeted fine-tuning training on it. During fine-tuning, particular attention is paid to its potential in document layout analysis, enabling the Florence-2 model to better understand and parse the complex layout structure of PDF documents.
[0056] The training process of the first Florence-2 model specifically includes:
[0057] Obtain a set of sample document images, and label each region in each sample document image in the set; label the title, image, paragraph, table, header and footer, and caption as a0, a1, a2, a3, a4, and a5 respectively to obtain the first training image set; where a0, a1, a2, a3, a4, and a5 are all preset constants;
[0058] The initial Florence-2 model is iteratively trained using the first training image set until the loss value of the initial Florence-2 model converges and is less than the first preset value, thus obtaining the first Florence-2 model.
[0059] In some embodiments, a0, a1, a2, a3, a4, and a5 can be set to 0, 1, 2, 3, 4, and 5, respectively. The fine-tuning training process includes analyzing and annotating the layout features of a large number of chemical documents. Based on this, the Florence-2 model learns how to identify different paragraph structures and text types. Through this training, the Florence-2 model can not only accurately identify text content but also correctly determine the order and type of paragraphs based on the document's layout features. This capability is crucial for the subsequent reaction information extraction stage, as it ensures the accurate extraction and classification of key textual information.
[0060] In some embodiments, chemical literature is input into the first Florence-2 model for text recognition to obtain a set of chemical texts, specifically including:
[0061] S11: Obtain the image of the i-th page of the chemical literature, perform image recognition on the document image using the first Florence-2 model, and obtain all regions in the document image and the corresponding labels for each region;
[0062] In some embodiments, the first Florence-2 model is used to perform image recognition on the images of the current document page (the code required for the corresponding model is ""). <od>“” indicates that an object recognition task is being performed. The model returns results indicating what the labels are for different regions. For example, region recognition in document images is like… Figure 2 As shown, Figure 2 In the left-hand single-column layout, the title area 1 returns "bboxes": [[x1, y1, x2, y2]], "labels": ["0"], where bboxes represents the pixel area, x1 and y1 represent the top-left pixel position of the pixel box, and x2 and y2 represent the bottom-right pixel position of the pixel box. Labels indicates the label type: 0 for title, 1 for image, 2 for paragraph, 3 for table, 4 for header and footer, and 5 for caption.
[0063] S12: Optical character recognition is performed on the regions labeled a0 and a2 using the first Florence-2 model to obtain the title text and paragraph text respectively, and the title text and paragraph text are used as the chemical text of the i-th page;
[0064] In some embodiments, the text paragraphs (label types 0 and 2) obtained from the layout recognition results in the previous step are extracted, and optical character recognition (OCR) is performed using the Florence-2 model (the code required for the corresponding model is ""). <ocr>“” indicates that an OCR recognition task is being performed. The model directly returns the recognized text and combines it with the tag content analyzed by the layout to finally generate chemical text in Markdown format (the title is marked with a "#" prefix to indicate that the content is a title line, otherwise it is a paragraph).
[0065] S13: Repeat steps S11-S12 until all document images of chemical literature have been traversed to obtain a set of chemical texts.
[0066] Chemical literature is input into the improved MolScribe model for image recognition to obtain a set of chemical images.
[0067] In some embodiments, image recognition is a crucial step in the second part of document recognition, especially for example diagrams containing chemical molecular structures. These diagrams typically contain key information, such as the molecular structures and designations of products and reactants, reaction conditions, etc. However, traditional image recognition technologies often face inaccurate recognition when processing these complex chemical diagrams, resulting in the inability to extract complete reaction information from the text. To address these issues, this invention improves the MolScribe model.
[0068] The improvement process for constructing the MolScribe model specifically includes:
[0069] Obtain a set of sample structure images, and label the abbreviation groups and Markush structures in each sample structure image in the set to obtain a second training image set;
[0070] The initial Florence-2 model is iteratively trained using the second training image set until the loss value of the initial Florence-2 model converges and is less than the second preset value, thus obtaining the second Florence-2 model.
[0071] Obtain the initial MolScribe model, and construct the improved MolScribe model from the initial MolScribe model and the second Florence-2 model.
[0072] In some embodiments, chemical literature is input into the improved MolScribe model for image recognition to obtain a set of chemical images, specifically including:
[0073] S21: Input chemical literature into the initial MolScribe model to perform chemical structure transformation and obtain all structure images;
[0074] S22: Input the j-th structural image into the second Florence-2 model for image text recognition to obtain the j-th chemical image;
[0075] S23: Repeat step S22 until all structural images have been traversed to obtain a set of chemical images.
[0076] In some embodiments, the initial MolScribe model cannot identify some abbreviations as functional groups. A second Florence-2 model is added to perform secondary identification of the abbreviations, replacing the originally unrecognizable parts, thus completing the optimization of abbreviation functional group identification. A schematic diagram of abbreviation functional group identification is shown below. Figure 3 As shown, the initial MolScribe model failed to recognize abbreviation groups 1 and 2, resulting in an incorrect SMILES expression: "*-C1=CC=C(-*)C=C1", where "*" represents any atom or group. The second Florence-2 model identified abbreviation group 1 as a sulfur pentafluoride functional group and group 2 as a pinacol boronic acid ester group, so the final SMILES expression that could be recognized was "CC1(C)OB(OC1(C)C)C1=CC=C(C=C1)S(F)(F)(F)(F)F".
[0077] Markush structures are frequently used in images to represent matching results. These structures are marked with standard R-group identifiers (such as R1, R2, ..., Rn) or non-standard custom group identifiers. These identifiers increase the difficulty of structure recognition. The powerful OCR capabilities of the Florence-2 model can accurately identify the text. Subsequent text analysis can determine whether the identifier is an R-group-like identifier, allowing for the use of an enhanced version of CXSMILES (Chemaxon Extended SMILES) for representation. A schematic diagram of Markush structure recognition is shown below. Figure 4 As shown, Figure 4 (a) shows the Markush structure in the original image; Figure 4 (b) shows the recognition results of the initial MolScribe model, which reveals multiple errors. Figure 4 (c) shows the recognition results of the improved MolScribe model, which can be seen to be completely consistent with the Markush structure in the original image.
[0078] The chemical text set is input into the first language model to filter core paragraphs, thus obtaining the core paragraph text set.
[0079] In some embodiments, core paragraph identification is a key step in improving efficiency and accuracy. Chemical literature is often lengthy and contains a significant amount of content unrelated to specific experimental procedures. To optimize information extraction efficiency, it is necessary to identify which paragraphs are core paragraphs for faster extraction of the required information. A first large language model is obtained by training the open-source large language model Llama 3.1-8b, and this model is used to pre-screen the text structure and paragraphs of the literature. In this way, the first large language model can intelligently determine which parts or paragraphs of the article are likely to contain chemical reaction information, thereby significantly improving the efficiency and accuracy of information extraction.
[0080] In some embodiments, the training process of the first major language model specifically includes:
[0081] Obtain the sample chemical text set, extract the sample title text set from the sample chemical text set, construct the sample directory text set based on the sample title text set, and divide the sample directory text set into the first query text set and the first answer text set;
[0082] In some embodiments, the sample directory text set consists of multiple text pairs. Each text pair is divided into a query (Q) text and an answer (A) text, mainly providing instance directory information and specific matching result numbers, for example:
[0083] Data 1:
[0084] Q:1. General Considerations
[0085] 2. Experimental Procedures and Tabulated Characterization Data
[0086] 3. X-Ray Crystallographic Information
[0087] 4. NMR Spectra
[0088] A:2
[0089] Note: The second section, "2. Experimental Procedures and Tabulated Characterization Data," contains a detailed description of the experiments, so the output is number 2.
[0090] Data 2:
[0091] Q: Contents
[0092] 1. General Chemistry Information.............................S2
[0093] 2.Synthesis........................................S2
[0094] 3. 1H and 13C spectra................................S3
[0095] 4. X-Ray analysis................................S62
[0096] 5. Computational studies................................S66
[0097] 5.1. General information................................S66
[0098] 5.2. Cartesian coordinates (Å) of optimized geometries ...S67
[0099] 5.3. Energy diagrams................................S101
[0100] 5.4. NMR correlations................................S102
[0101] A:2
[0102] Note: The "2. Synthesis" section contains key synthesis information, so output number 2; the title text corresponding to output number 2 will be used as the core paragraph text.
[0103] The first set of query texts and the first set of response texts mainly come from two parts. The first part is collected from real journal articles (Supporting Information), where the table of contents and corresponding paragraph numbers containing specific experimental steps are manually identified (if the numbers do not exist in the original text, they are manually added). The second part is generated by OpenAI GPT4 using prompts to create a batch of similar but non-repeating new samples, mimicking the previous real examples.
[0104] Extract the sample paragraph text set from the sample chemical text set, and divide the sample paragraph text set into a second query text set and a second answer text set;
[0105] In some embodiments, the sample paragraph text set also consists of multiple text pairs. Each text pair is divided into a query (Q) text and an answer (A) text, mainly providing the answer result (Y / N) of whether the instance text is a single natural paragraph and whether it is a synthesized paragraph, for example:
[0106] Data 1:
[0107] Q: The present disclosure relates to novel compounds capable ofmodulating lysine specific demethylase-1 (LSD1) monoamine oxidase activity. Such oxidative activity may be inhibited by the compounds described herein. The present invention further describes the synthesis of the compounds and their uses as medicaments in diseases or disorders where LSD1 modulation maybe beneficial.
[0108] A: N.
[0109] Note: This paragraph mainly describes content unrelated to the synthesis steps, so it is not a synthesized paragraph, and the output should be N;
[0110] Data 2:
[0111] Q: From 3-[(4-allyl-2-chloro-phenyl)methoxy]pyridine (227 mg, 0.87mmol, 1 eq), 1-bromo-3-[3-chloro-4-(3-pyri-dyloxymethyl)phenyl]propan-2-ol was obtained as a beige solid (54 mg, 16 % yield).
[0112] A: Y.
[0113] Note: This section mentions the product, stoichiometric information, and yield, which can be considered a synthesis step, outputting Y; the paragraph text that answers Y is taken as the core paragraph text;
[0114] Based on the first and second answer text sets, the sample core paragraph text set is obtained from the sample chemical text set. Based on the first query text set, the second query text set, and the sample core paragraph text set, the initial large language model is fine-tuned using the LoRA algorithm to obtain the first large language model.
[0115] In some embodiments, LoRA (Low-Rank Adaptation) is an effective fine-tuning method that reduces the number of parameter updates by introducing a low-rank matrix, thereby lowering computational and storage costs. The model already has a pre-trained weight matrix. Where d is the dimension of the input features, and k is the dimension of the input features. LoRA restricts weight updates to a low-rank subspace, so the updated weight matrix is set as... It can be decomposed into the product of two low-rank matrices: ,in and Since r is a rank much smaller than d and k, this decomposition allows us to learn only small matrices A and B without directly updating W, significantly reducing the number of training parameters. The weights are updated during training as follows:
[0116]
[0117] in This is the scaling factor, used to control the update magnitude.
[0118] The chemical image set and the core paragraph text set are input into the second language model to extract key information and obtain key chemical information.
[0119] In some embodiments, the training process of the second language model specifically includes:
[0120] Obtain the core paragraph text set of the sample, and annotate the core paragraph text set of the sample with key chemical information, including chemical structure, product, reactant, solvent, catalyst, conditions, yield and standardized steps;
[0121] Based on the core paragraph text set of samples annotated with key chemical information, the initial large language model is fine-tuned using the LoRA algorithm to obtain the second large language model.
[0122] In some embodiments, the extraction of key reaction information is the most crucial step for experimental chemists in the final stage of reaction information extraction technology. The goal of this stage is to extract the most important information from the literature to facilitate future data retrieval and prediction. To this end, this invention designs the extraction of the following important fields.
[0123] Products: In chemical reactions, product identification is crucial. The second major language model can extract the names of the final products, including both main products and byproducts. It supports IUPAC nomenclature and the identification of key pronouns, ensuring the accuracy and consistency of information. This feature helps researchers quickly identify reaction results, facilitating subsequent analysis and application.
[0124] Reactants: Reactants are the foundation of chemical reactions. The second language model can accurately extract the names of key reactants involved in the reaction, supporting IUPAC nomenclature and pronoun recognition. This capability ensures that researchers have a comprehensive understanding of the starting materials of the reaction, which is helpful for the study and optimization of reaction mechanisms.
[0125] Solvents and Catalysts: In chemical reactions, the choice of solvents and catalysts has a significant impact on the success of the reaction. The second language model can identify and distinguish the names of these component compounds involved in the step description. This function helps researchers understand the details of the reaction conditions and optimize experimental design.
[0126] Conditions: Reaction conditions such as temperature, time, and special atmospheres (e.g., inert gases) are key factors affecting reaction efficiency and selectivity. The second language model can extract this conditional information, helping researchers accurately reproduce experimental conditions and improve the reproducibility and reliability of experiments.
[0127] Yield: Yield is an important indicator for evaluating reaction efficiency. The second language model can extract yield information of main and by-products, helping researchers assess the actual output of the reaction. This function is of great significance for optimizing reaction conditions and improving product yield.
[0128] Standardized Procedures: Extracting and organizing standardized experimental procedures is crucial for ensuring experimental reproducibility. The second language model can extract and standardize specific experimental steps, ensuring consistency in the experimental process. This feature helps researchers better record and share experimental methods, promoting scientific communication and collaboration.
[0129] Similarly, to achieve efficient extraction of key information, this invention fine-tuned the open-source large language model Llama3.1-8b to obtain a second large language model, and optimized the LoRA algorithm for the following tasks.
[0130] Compound name error correction: A large training set containing different types of spelling errors was constructed, specifically for training on OCR recognition errors. By fine-tuning the model, the system can automatically correct errors in compound names, ensuring the accuracy of extracted information. This function reduces the workload of manual proofreading and improves the efficiency of information processing.
[0131] Key field extraction: A large pre-extracted training set was constructed for the aforementioned key fields to train the model for accurate information extraction. In this way, the model can quickly identify and extract key information from the literature, significantly improving the speed and accuracy of information extraction.
[0132] Step standardization: A batch of standardized step texts was generated using large models such as ChatGPT, and a training set was constructed to train the model's step standardization capabilities. The training set also includes simplified step description texts referencing general methods to enhance the model's ability to standardize simplified texts. This feature ensures the clarity and consistency of experimental steps, facilitating experiment reproducibility and validation.
[0133] Extracted key chemical information such as Figure 5 As shown, the second language model extracted key chemical information from the input images and text.
[0134] This invention also provides an automatic extraction device for key information from chemical literature, used to implement the aforementioned automatic extraction method for key information from chemical literature, the device comprising:
[0135] The chemical text set acquisition module is used to acquire chemical literature. The chemical literature is input into the first Florence-2 model for text recognition to obtain a chemical text set.
[0136] The chemical image collection acquisition module is used to input chemical literature into the improved MolScribe model for image recognition and obtain a chemical image collection.
[0137] The core paragraph text set acquisition module is used to input the chemical text set into the first language model to filter core paragraphs and obtain the core paragraph text set.
[0138] The chemical key information acquisition module is used to input the chemical image set and the core paragraph text set into the second language model to extract key information and obtain chemical key information.
[0139] This application provides an electronic device, including a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the method for automatically extracting key information from chemical literature according to any of the above schemes.
[0140] Specifically, the processor may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor may also include onboard memory for caching purposes. The processor may be a single processing unit or multiple processing units for performing different actions of the method flow according to embodiments of this application.
[0141] Memory can be any medium capable of containing, storing, transmitting, propagating, or transmitting instructions. For example, memory can include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, instruments, or propagation media. Specific examples of memory include: magnetic storage devices such as magnetic tape or hard disk drives (HDDs); optical storage devices such as optical discs (CD-ROMs); and also random access memory (RAM) or flash memory; and / or wired / wireless communication links.
[0142] This application also provides a computer-readable medium storing a computer program that, when executed by a processor, implements the method for automatically extracting key information from chemical literature according to any of the above-described schemes. This computer-readable medium may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into that device / apparatus / system. The aforementioned computer-readable medium carries one or more programs, which, when executed, implement the method as described in the embodiments of this application.
[0143] According to embodiments of this application, a computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, optical fiber, radio frequency signals, etc., or any suitable combination thereof.
[0144] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments and / or claims of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application. Therefore, the scope of this application should not be limited to the above embodiments, but should be defined not only by the appended claims, but also by their equivalents. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.< / ocr> < / od>
Claims
1. A method for automatically extracting key information from chemical literature, characterized in that, Including the following steps: Chemical literature is obtained and input into the first Florence-2 model for text recognition to obtain a set of chemical texts. Chemical literature is input into the improved MolScribe model for image recognition to obtain a set of chemical images. The chemical text set is input into the first language model to filter core paragraphs, thus obtaining the core paragraph text set. The chemical image set and the core paragraph text set are input into the second language model to extract key information and obtain key chemical information. The improvement process for constructing the MolScribe model specifically includes: Obtain a set of sample structure images, and label the abbreviation groups and Markush structures in each sample structure image in the set to obtain a second training image set; The initial Florence-2 model is iteratively trained using the second training image set until the loss value of the initial Florence-2 model converges and is less than the second preset value, thus obtaining the second Florence-2 model. Obtain the initial MolScribe model, and construct the improved MolScribe model from the initial MolScribe model and the second Florence-2 model; Chemical literature is input into the improved MolScribe model for image recognition, resulting in a set of chemical images, specifically including: S21: Input chemical literature into the initial MolScribe model to perform chemical structure transformation and obtain all structure images; S22: Input the j-th structural image into the second Florence-2 model for image text recognition to obtain the j-th chemical image; S23: Repeat step S22 until all structural images have been traversed to obtain a set of chemical images.
2. The method for automatically extracting key information from chemical literature according to claim 1, characterized in that, The training process of the first Florence-2 model specifically includes: Obtain a set of sample document images, and label each region in each sample document image in the sample document image set; label the title, image, paragraph, table, header and footer, and caption as a0, a1, a2, a3, a4, and a5 respectively, to obtain the first training image set; where a0, a1, a2, a3, a4, and a5 are all preset constants; The initial Florence-2 model is iteratively trained using the first training image set until the loss value of the initial Florence-2 model converges and is less than the first preset value, thus obtaining the first Florence-2 model.
3. The method for automatically extracting key information from chemical literature according to claim 2, characterized in that, Chemical literature was input into the first Florence-2 model for text recognition, resulting in a set of chemical texts, specifically including: S11: Obtain the image of the i-th page of the chemical literature, perform image recognition on the document image using the first Florence-2 model, and obtain all regions in the document image and the corresponding labels for each region; S12: Optical character recognition is performed on the regions labeled a0 and a2 using the first Florence-2 model to obtain the title text and paragraph text respectively, and the title text and paragraph text are used as the chemical text of the i-th page; S13: Repeat steps S11-S12 until all document images of chemical literature have been traversed to obtain a set of chemical texts.
4. The method for automatically extracting key information from chemical literature according to claim 1, characterized in that, The training process of the first major language model specifically includes: Obtain the sample chemical text set, extract the sample title text set from the sample chemical text set, construct the sample directory text set based on the sample title text set, and divide the sample directory text set into the first query text set and the first answer text set; Extract the sample paragraph text set from the sample chemical text set, and divide the sample paragraph text set into a second query text set and a second answer text set; Based on the first and second answer text sets, the sample core paragraph text set is obtained from the sample chemical text set. Based on the first query text set, the second query text set, and the sample core paragraph text set, the initial large language model is fine-tuned using the LoRA algorithm to obtain the first large language model.
5. The method for automatically extracting key information from chemical literature according to claim 1, characterized in that, The training process for the second major language model specifically includes: Obtain the core paragraph text set of the sample, and annotate the core paragraph text set of the sample with key chemical information, including chemical structure, product, reactant, solvent, catalyst, conditions, yield and standardized steps; Based on the core paragraph text set of samples annotated with key chemical information, the initial large language model is fine-tuned using the LoRA algorithm to obtain the second large language model.
6. An automatic extraction device for key information from chemical literature, used to implement the automatic extraction method for key information from chemical literature as described in any one of claims 1 to 5, characterized in that, The device includes: The chemical text set acquisition module is used to acquire chemical literature. The chemical literature is input into the first Florence-2 model for text recognition to obtain a chemical text set. The chemical image collection acquisition module is used to input chemical literature into the improved MolScribe model for image recognition and obtain a chemical image collection. The core paragraph text set acquisition module is used to input the chemical text set into the first language model to filter core paragraphs and obtain the core paragraph text set. The chemical key information acquisition module is used to input the chemical image set and the core paragraph text set into the second language model to extract key information and obtain chemical key information.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the automatic extraction method for key information from chemical literature as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the automatic extraction method for key information from chemical literature as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Prediction method of chemical reaction product
CN114550841A
Chemical literature analysis and reaction information extraction method and device based on large language model
CN118888046A