A chemical reaction formula identification method, device, storage medium and equipment

By analyzing and identifying the original text data in the document, and combining the recognition model to determine the correspondence between the chemical molecular formula and the species name in the chemical reaction formula, the problem of low efficiency in chemical reaction formula recognition in the prior art is solved, and efficient and accurate chemical reaction formula recognition and SMILES structure information acquisition are achieved.

CN119207609BActive Publication Date: 2025-04-18ZHEJIANG LAB
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411728782.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-18
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

The prior art is inefficient and requires a lot of manual intervention when automatically identifying chemical reaction formulas from documents, making it difficult to efficiently process massive chemical data.

Method used

By obtaining the original text data, analyzing and determining the chemical reaction formula in the target text data, combining the species name in the associated text data, input it into the preset recognition model, determining the correspondence between the chemical molecular formula and the species name, and then obtaining SMILES structure information and completing the reaction formula.

Benefits of technology

It realizes intelligent and automatic identification of chemical reaction formulas from documents, accurately obtaining SMILES structural information, ensuring that the generated chemical reaction formula is complete and accurate, and improving the efficiency and accuracy of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119207609B_ABST
    Figure CN119207609B_ABST
Patent Text Reader

Abstract

This specification discloses a chemical reaction formula recognition method, device, storage medium and equipment. The server can automatically and intelligently recognize the chemical reaction formula from the document, and then accurately obtain the corresponding SMILES structure information according to the species name of the chemical molecular formula in the chemical reaction formula, and complete the missing SMILES structure information in the chemical reaction formula to ensure that the final generated chemical reaction formula is fully expressed in the form of SMILES. In addition, before the server finally outputs the chemical reaction formula fully presented in the form of SMILES, it verifies the validity of the chemical reaction formula. This greatly improves the accuracy and reliability of information recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of sensor array signal processing technology, and in particular to a chemical reaction formula recognition method, device, storage medium and equipment. Background Art

[0002] At present, in chemical research, by identifying chemical reaction formulas expressed in the original molecular formula format from various documents and converting them into chemical reaction formulas expressed in a standardized format (i.e., the Simplified Molecular Input Line Entry System (SMILES) format that uses ASCII strings to represent complex chemical structures), researchers can deeply understand the mechanism and process of chemical reactions and design new chemical reaction pathways and synthesis methods. This not only helps the construction and improvement of chemical databases, facilitates the retrieval and sharing of chemical information, but also plays an important role in many fields. For example, in drug research and development, the identification of chemical reaction formulas expressed in a standardized format can help researchers determine efficient synthesis pathways and improve the efficiency and yield of drug synthesis. In the research and development of new materials, the identification of chemical reaction formulas expressed in a standardized format helps to reveal the synthesis mechanism and performance regulation mechanism of materials, and promote the innovation and development of new materials. In the fields of chemical research and drug development, a large number of chemical reaction formulas are recorded in documents such as PDF. With the rapid development of chemical informatics, higher requirements are placed on the method of automatically identifying chemical reaction formulas from these PDF documents. This is not only to improve the efficiency of data processing, but also to better support the construction and improvement of chemical databases and promote the retrieval and sharing of chemical information.

[0003] Normally, when it is necessary to automatically identify chemical reaction formulas from various documents, it is necessary to rely on rules and template matching, which has obvious limitations when dealing with chemical reaction formulas in complex or non-standard formats. It is not only time-consuming and labor-intensive, but also requires a lot of manual intervention and correction. It is difficult to automatically identify chemical reaction formulas from massive amounts of chemical data efficiently, which limits the automated processing and analysis of chemical information and affects the efficiency and accuracy of research.

[0004] Therefore, how to improve the efficiency of identifying chemical reaction formulas from documents is an urgent problem to be solved. Summary of the invention

[0005] This specification provides a chemical reaction formula identification method, device, storage medium and equipment to partially solve the above-mentioned problems existing in the prior art.

[0006] This manual adopts the following technical solutions:

[0007] This specification provides a chemical reaction formula identification method, including:

[0008] Get the original text data;

[0009] Parsing the original text data to determine target text data contained in the original text data, wherein the target text data contains a target chemical reaction formula expressed in an original molecular formula format;

[0010] Determining associated text data corresponding to the target text data from the original text data, wherein the associated text data includes species names of reactants and products in the target chemical reaction formula;

[0011] Inputting the target text data and the associated text data into a preset target recognition model so that the target recognition model recognizes the target text data and the associated text data to determine the corresponding relationship between each chemical molecular formula in the target chemical reaction formula and the species name;

[0012] For each chemical formula in the target chemical reaction formula, according to the corresponding relationship, determine the species name corresponding to the chemical formula as the associated species name of the chemical formula, and query and obtain the recognition result of the chemical formula according to the associated species name, wherein the recognition result is text data representing the chemical formula in a specified format;

[0013] According to each recognition result, text data representing the target chemical reaction formula in a specified format is obtained as a target recognition result, and the task is executed according to the target recognition result.

[0014] Optionally, parsing the original text data to determine the target text data contained in the original text data specifically includes:

[0015] According to preset chemical reaction formula parsing rules, the original text data is parsed to determine text data containing a target chemical reaction formula in the original text data as preprocessed text data, wherein different chemical reaction formula parsing rules are used to parse target chemical reaction formulas represented in different formats;

[0016] The preprocessed text data and a preset first task description statement are input into a preset basic recognition model, so that the basic recognition model recognizes the preprocessed text data according to the first task description statement to determine the target text data contained in the original text data.

[0017] Optionally, the target text data and the associated text data are input into a preset target recognition model so that the target recognition model recognizes the target text data and the associated text data to determine the corresponding relationship between each chemical formula in the target chemical reaction formula and the species name, specifically including:

[0018] Parsing the target text data to determine each target sub-text data contained in the target text data, wherein the target sub-text data includes a chemical molecular formula of a reactant or a product in the target chemical reaction formula expressed in an original molecular formula format;

[0019] The target sub-text data and the associated text data are input into a preset target recognition model so that the target recognition model recognizes the target text data and the associated text data to determine the corresponding relationship between each chemical molecular formula in the target chemical reaction formula and the species name.

[0020] Optionally, before inputting each target sub-text data and the associated text data into a preset target recognition model, the method further includes:

[0021] For each target sub-text data, determine each element symbol contained in the chemical molecular formula represented by the target sub-text data as each element symbol to be verified corresponding to the target sub-text data;

[0022] Compare each element symbol to be verified with each preset standard element symbol one by one to obtain a comparison result of each element symbol to be verified, and determine the verification result of the target subtext data according to each comparison result, wherein the comparison result is used to indicate whether there is a standard element symbol consistent with the element symbol to be verified, and the verification result is used to indicate whether there is an abnormality in the target subtext data;

[0023] Inputting each target subtext data and the associated text data into a preset target recognition model specifically includes:

[0024] If it is determined according to the verification result that none of the target sub-text data is abnormal, the target sub-text data and the associated text data are input into a preset target recognition model.

[0025] Optionally, according to the associated species name, querying to obtain the identification result of the chemical molecular formula specifically includes:

[0026] According to the associated species name, determining whether there is an identification result of the chemical molecular formula in a preset designated knowledge base, wherein the designated knowledge base contains a designated format representation of each chemical molecular formula having a predetermined confidence level higher than a preset threshold;

[0027] If yes, the identification result of the chemical formula is obtained by querying from the preset specified knowledge base;

[0028] If not, a query request is sent to a preset designated database, so that the designated database responds to the query request, queries the chemical formula, obtains a query result of the chemical formula, and determines an identification result of the chemical formula according to the query result.

[0029] Optionally, determining the recognition result of the chemical formula according to the query result specifically includes:

[0030] In the case where at least some of the chemical formulas included in the target chemical reaction formula have empty search results, other chemical formulas among the chemical formulas included in the target chemical reaction formula except for the chemical formulas for which the search results are empty are used as basic chemical formulas;

[0031] The query result of the basic chemical formula is input into a preset completion model, so that the completion model can predict the recognition result of the chemical formula whose query result is empty among the chemical formulas included in the target chemical reaction formula according to the query result of the basic chemical formula.

[0032] Optionally, according to each recognition result, text data representing the target chemical reaction formula in a specified format is obtained as a target recognition result, specifically including:

[0033] According to each recognition result, text data representing the target chemical reaction formula in a specified format is obtained as a candidate recognition result;

[0034] Parsing the candidate recognition results to obtain chemical composition parameters of reactants contained in the target chemical reaction formula determined based on the candidate recognition results as first verification parameters, and obtaining chemical composition parameters of products contained in the target chemical reaction formula determined based on the candidate recognition results as second verification parameters;

[0035] Obtaining, according to the first verification parameter, the second verification parameter and each preset verification strategy, a verification result corresponding to the candidate recognition result, wherein the verification result is used to characterize whether the candidate recognition result satisfies a quantitative description condition of a relationship between quantities in a chemical reaction;

[0036] When it is determined according to the verification result that the candidate recognition result satisfies the quantitative description condition of the relationship between quantities in a chemical reaction, the candidate recognition result is used as the target recognition result.

[0037] This specification provides a chemical reaction formula recognition device, comprising:

[0038] An acquisition module is used to obtain original text data;

[0039] A parsing module, used for parsing the original text data to determine target text data contained in the original text data, wherein the target text data contains a target chemical reaction formula expressed in an original molecular formula format;

[0040] A determination module, used to determine associated text data corresponding to the target text data from the original text data, wherein the associated text data includes species names of reactants and products in the target chemical reaction formula;

[0041] A first recognition module, used for inputting the target text data and the associated text data into a preset target recognition model, so that the target recognition model recognizes the target text data and the associated text data to determine the corresponding relationship between each chemical molecular formula in the target chemical reaction formula and the species name;

[0042] A second recognition module is used to determine, for each chemical formula in the target chemical reaction formula, the species name corresponding to the chemical formula according to the corresponding relationship, as the associated species name of the chemical formula, and query to obtain a recognition result of the chemical formula according to the associated species name, wherein the recognition result is text data representing the chemical formula in a specified format;

[0043] The execution module is used to obtain text data representing the target chemical reaction formula in a specified format according to each recognition result as a target recognition result, and perform task execution according to the target recognition result.

[0044] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned chemical reaction formula recognition method is implemented.

[0045] This specification 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 implements the above-mentioned chemical reaction formula recognition method when executing the program.

[0046] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0047] In the chemical reaction formula recognition method provided in the present specification, firstly, original text data is obtained, and the original text data is parsed to determine the target text data contained in the original text data, the target text data contains the target chemical reaction formula expressed in the original molecular formula format, and the associated text data corresponding to the target text data is determined from the original text data, the associated text data contains the species names of the reactants and products in the target chemical reaction formula, and the target text data and the associated text data are input into a preset target recognition model so that the target recognition model recognizes the target text data and the associated text data to determine the correspondence between each chemical molecular formula and the species name in the target chemical reaction formula, for each chemical molecular formula in the target chemical reaction formula, according to the correspondence, the species name corresponding to the chemical molecular formula is determined as the associated species name of the chemical molecular formula, and according to the associated species name, the recognition result of the chemical molecular formula is queried to obtain, and the recognition result is the text data expressing the chemical molecular formula in the specified format, and according to each recognition result, the text data expressing the target chemical reaction formula in the specified format is obtained as the target recognition result, and the task is executed according to the target recognition result.

[0048] From the above method, it can be seen that the chemical reaction formula can be automatically and intelligently identified from the document. Then, according to the species name of the chemical molecular formula in the chemical reaction formula, the corresponding SMILES structure information can be accurately obtained, and the missing SMILES structure information in the chemical reaction formula can be completed, so as to ensure that the chemical reaction formula finally generated is fully expressed in the form of SMILES. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0050] Figure 1 A schematic diagram of a chemical reaction formula identification method provided in this specification;

[0051] Figure 2 Schematic diagrams of chemical formulas in different formats provided for this specification;

[0052] Figure 3 A schematic diagram of the chemical reaction formula recognition process provided in this specification;

[0053] Figure 4 A schematic diagram of a chemical reaction formula recognition device provided in this specification;

[0054] Figure 5 A method corresponding to the Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0056] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0057] Figure 1 A schematic diagram of a chemical reaction formula identification method provided in this specification includes the following steps:

[0058] S101: Acquire original text data.

[0059] In this specification, the business platform can collect document files containing chemical reaction equations from various preset data sources, and then convert the acquired document files into plain text format to obtain original text data, and then identify the original text data to identify the chemical reaction equations contained in the original text data, and convert the identified chemical reaction equations into text data represented in a specified format and save them, so as to execute tasks based on the identified text data representing the chemical reaction equations contained in the original text data in the specified format.

[0060] Among them, the above-mentioned data sources can be configured by users according to actual needs, such as academic databases used in different fields such as astrochemistry, interstellar chemistry and combustion chemistry (such as: paper preprint websites, ArXiv, etc.), academic forums, academic websites, etc.

[0061] The above-mentioned document files may be in different formats, for example, Portable Document Format (PDF), Document Format (DOC), etc.

[0062] In the above content, the method for converting a document file into a plain text format may be to determine the format adopted by the acquired document file, and determine a format conversion tool that matches the format adopted by the document file from the preset format conversion tools as the target format conversion tool, and then the document file can be converted into a plain text format through the target format conversion tool.

[0063] For example: for document files in PDF format, use the parsing tool PyMuPDF to convert document files in PDF format into plain text format.

[0064] The above-mentioned specified format may be a standardized format such as a Simplified Molecular Input Line Entry System (SMILES) format that uses ASCII strings to represent complex chemical structures, an International Chemical Identifier (InChl), or the like.

[0065] It should be noted that the above-mentioned specified format is set to improve the efficiency and accuracy of data processing and to promote the standardization, sharing and intelligent application of chemical information. By converting the chemical reaction formula represented by the original chemical formula into a form represented by the specified format, complex molecular structures can be represented in a concise string form, and the representation of the chemical reaction formula can be ensured to be standardized, so that the chemical reaction formula can be directly read and processed by a computer program without the need for complex parsing algorithms, so as to facilitate the automated processing of chemical information (for example: molecular fingerprint generation, similarity search, reaction path prediction, etc.), and facilitate data exchange and sharing between different systems and platforms.

[0066] In this specification, the execution entity used to implement the chemical reaction formula identification method may refer to a designated device such as a server set up on a business platform, or may refer to a terminal device such as a desktop computer or a laptop computer. For the sake of ease of description, the chemical reaction formula identification method provided in this specification is described below using the server as an example of the execution entity.

[0067] S102: Parsing the original text data to determine target text data contained in the original text data, wherein the target text data contains a target chemical reaction formula expressed in an original molecular formula format.

[0068] In this specification, after acquiring the original text data, the server can parse the original text data according to preset chemical reaction formula parsing rules to determine the text data containing the target chemical reaction formula in the original text data as preprocessed text data.

[0069] Among them, different chemical reaction formula parsing rules are used to parse target chemical reaction formulas expressed in different formats.

[0070] The chemical reaction formula parsing rule mentioned above may be a regular expression pre-set according to the composition features of the chemical reaction formula in the original text data. The regular expression here is used to search, replace, verify and extract text with a specific pattern in a character string.

[0071] For example, the composition features of the above chemical reaction formula in the original text data may be the equal sign "=", arrow "→", space separation between reactants and products, possible chemical symbols (such as C, H, O, brackets, plus sign, minus sign, etc.) and numbers that are fixed in the chemical reaction formula.

[0072] Furthermore, the server can input the preprocessed text data and the preset first task description statement into a preset basic recognition model, so that the basic recognition model recognizes the preprocessed text data according to the first task description statement to determine the target text data contained in the original text data, where the target text data contains the target chemical reaction formula expressed in the original molecular formula format.

[0073] The first task description statement may be a text or instruction input into the model to guide the model to generate a specific output.

[0074] For example, the first task description statement can indicate that the model's task is to parse and format chemical reaction equations. Several typical chemical reaction equations will be provided as examples to help the model learn the correct format and syntax. The first task description statement used here can be "Please identify the chemical reaction equation in the following text and make sure that the equation follows the standard chemical notation, including the correct chemical molecular formula, arrows between reactants and products, and necessary stoichiometric numbers. For example, 2H2 + O2 → 2H2O."

[0075] It should be noted that the above-mentioned basic recognition model can only be deployed to the server after training, wherein the training method of the above-mentioned basic recognition model can be, obtaining sample text data, and inputting the obtained sample text data and a preset first task description sentence into the basic recognition model to be trained, so that the basic recognition model to be trained can recognize the sample text data according to the first task description sentence to determine the sample target text data contained in the sample text data, and then can determine the first loss value according to the deviation between the sample target text data obtained by the basic recognition model to be trained and the label target text data actually contained in the sample text data, and take minimizing the first loss value as the optimization goal to train the basic recognition model to obtain the trained basic recognition model.

[0076] Among them, the greater the deviation between the sample target text data obtained by the basic recognition model to be trained and the label target text data actually contained in the sample text data, the greater the determined first loss value.

[0077] For ease of understanding, the following describes in detail the difference between the target chemical reaction formula expressed in the original molecular formula format and the text data expressing the chemical reaction formula in the specified format. Figure 2 shown.

[0078] Figure 2 Schematic diagrams of chemical formulae in different formats provided for this specification.

[0079] Combination Figure 2 It can be seen that for the chemical formula corresponding to each reactant or product contained in the chemical reaction formula, the SMILES format can be used to represent the chemical formula corresponding to the reactant or product in the form of a linear string, which can facilitate data reading and writing of the chemical formula in the SMILES format in the subsequent data processing process.

[0080] S103: Determine associated text data corresponding to the target text data from the original text data, wherein the associated text data includes species names of reactants and products in the target chemical reaction formula.

[0081] Furthermore, the server can parse the original text data according to preset species name parsing rules to determine associated text data corresponding to the target text data from the original text data, wherein the above-mentioned associated text data can be a text paragraph in the original text data that contains the species names of reactants and products in the target chemical reaction formula.

[0082] The above-mentioned species name parsing rule may be a regular expression set in advance according to the composition features of the species name in the original text data.

[0083] For example, based on the combination of common chemical name prefixes (such as methyl, ethyl, propyl, isopropyl, etc.), suffixes (such as alkane, alkene, alkyne, alcohol, etc.) and possible element symbols (such as methanol, ethanol, acetic acid, benzene, etc.), a regular expression is constructed as the above-mentioned species name parsing rule, and then the original text data can be scanned according to the above-mentioned species name parsing rule to filter out paragraphs that meet the above-mentioned species name parsing rule.

[0084] S104: Inputting the target text data and the associated text data into a preset target recognition model, so that the target recognition model recognizes the target text data and the associated text data to determine the corresponding relationship between each chemical molecular formula in the target chemical reaction formula and the species name.

[0085] In this specification, after the server determines the associated text data corresponding to the target text data from the original text data, it can input the target text data and the associated text data into a preset target recognition model so that the target recognition model can recognize the target text data and the associated text data to determine the correspondence between each chemical molecular formula and the species name in the target chemical reaction formula.

[0086] Specifically, the server can input the target text data, associated text data and a preset second task description statement into a preset target recognition model, so that the target recognition model recognizes the target text data and the associated text data according to the second task description statement to determine the correspondence between each chemical molecular formula and the species name in the target chemical reaction formula.

[0087] The second task description statement is used to guide the target recognition model to efficiently and accurately identify and extract the associated pairs of chemical molecular formulas and corresponding species names.

[0088] For example: "Please read the following text carefully and accurately extract all the chemical formulas involved and their corresponding species names. Each pair must consist of a chemical formula and its closely related species name. Your output must strictly follow the following format: chemical formula: species name. Please ensure that all extracted information is accurate and in standard format."

[0089] In addition, in order to improve the efficiency of identifying target text data and associated text data through the target recognition model, the server can also parse the target text data to determine the target sub-text data contained in the target text data, and input each target sub-text data and associated text data into a preset target recognition model, so that the target recognition model can identify the target text data and the associated text data to determine the correspondence between each chemical molecular formula and the species name in the target chemical reaction formula. The above-mentioned target sub-text data may include the chemical molecular formula of the reactant or product in the target chemical reaction formula expressed in the original molecular formula format.

[0090] In addition, in order to improve the accuracy of identifying the target text data and associated text data through the target recognition model, the server can also verify each target sub-text data and associated text data before inputting them into the preset target recognition model.

[0091] Specifically, the server can determine, for each target sub-text data, the element symbols contained in the chemical molecular formula represented by the target sub-text data as the element symbols to be verified corresponding to the target sub-text data, and then compare each element symbol to be verified with the preset standard element symbols one by one to obtain the comparison result of each element symbol to be verified, and determine the verification result of the target sub-text data based on each comparison result. If it is determined according to the verification result that there is no abnormality in each target sub-text data, then each target sub-text data and the associated text data are input into the preset target recognition model.

[0092] The comparison result is used to indicate whether there is a standard element symbol that is consistent with the element symbol to be verified, and the verification result is used to indicate whether there is an anomaly in the target sub-text data.

[0093] In the above content, the standard element symbols may refer to the element symbols used in the periodic table.

[0094] It should be noted that the method for the server to determine the symbols of each element contained in the chemical formula represented by the target sub-text data can be to perform multiple rounds of character splitting on the target sub-text data to determine the symbols of each element contained in the chemical formula represented by the target sub-text data, wherein, for each round of character splitting, each character contained in the target sub-text data or the combination of every two characters contained in the target sub-text data is split out from the target sub-text data as the symbols of each element contained in the chemical formula represented by the target sub-text data.

[0095] Furthermore, for each character contained in the target sub-text data, if the server determines that the comparison result corresponding to the character is that there is a standard element symbol consistent with the element symbol to be verified, or determines that the comparison result corresponding to the combination of the character and the next character or the previous character located at the character is that there is a standard element symbol consistent with the element symbol to be verified, then the server can determine that there is no abnormality in the character, and if the server determines that there is no abnormality in each character contained in the target sub-text data, then the server can determine that there is no abnormality in the target sub-text data.

[0096] It should be noted that the above-mentioned basic recognition model and target recognition model can be different large language models, and of course, they can also be the same large language model. When the above-mentioned basic recognition model and target recognition model are the same large language model, the large language model can target different input data. After extracting the feature representation of the input data, the large language model can determine the decision layer that matches the type of the input data from the preset different decision layers as the target decision layer, and process the input data through the target decision layer to obtain the output result.

[0097] For example: if the input data is preprocessed text data and a preset first task description sentence, the large language model can, after extracting the feature representations of the preprocessed text data and the preset first task description sentence, determine from the preset different decision layers a decision layer corresponding to the required input data being the preprocessed text data and the preset first task description sentence, as a target decision layer that matches the type of the input data, and identify the preprocessed text data according to the first task description sentence through the target decision layer to determine the target text data contained in the original text data.

[0098] S105: For each chemical formula in the target chemical reaction formula, determine the species name corresponding to the chemical formula according to the corresponding relationship, and use it as the associated species name of the chemical formula. According to the associated species name, query and obtain the recognition result of the chemical formula, and the recognition result is text data representing the chemical formula in a specified format.

[0099] Furthermore, the server can determine, for each chemical formula in the target chemical reaction formula, the species name corresponding to the chemical formula according to the corresponding relationship determined by the above method, as the associated species name of the chemical formula, and then query and obtain the recognition result of the chemical formula according to the associated species name of the chemical formula. The recognition result here is text data representing the chemical formula in a specified format, specifically as follows Figure 3 shown.

[0100] Figure 3 A schematic diagram of the chemical reaction formula recognition process provided in this manual.

[0101] Combination Figure 3 It can be seen that the server can call the interface provided by the preset designated database and send a query request to the preset designated database, so that the designated database responds to the query request, queries the chemical formula, returns the query result of the chemical formula, and determines the identification result of the chemical formula based on the query result returned by the designated database.

[0102] In actual application scenarios, in order to improve query efficiency, the server can also build a designated knowledge base based on the specified format representation of each chemical formula with a predetermined confidence level higher than a preset threshold, and then before sending a query request to the preset designated database, it can determine whether there is an identification result of the chemical formula in the preset designated knowledge base based on the chemical formula. If so, the identification result of the chemical formula can be queried from the preset designated knowledge base. If not, a query request is sent to the preset designated database so that the designated database responds to the received query request, queries the chemical formula, obtains the query result of the chemical formula, and determines the identification result of the chemical formula based on the query result.

[0103] The above-mentioned designated database can be set according to actual needs, for example: Public Chemical Database (PubChem) and the like.

[0104] It should be noted that in actual application scenarios, there may be some molecular formulas of reactants or products included in the chemical reaction formula that cannot be queried from the above-mentioned designated database. In this case, the server can, when determining that the query results for at least some of the chemical formulas included in the target chemical reaction formula are empty, use the other chemical formulas among the chemical formulas included in the target chemical reaction formula except for the chemical formulas whose query results are empty as basic chemical formulas, and then input the query results of the basic chemical formulas into a preset completion model, so as to predict the identification results of the chemical formulas whose query results are empty among the chemical formulas included in the target chemical reaction formula based on the query results of the basic chemical formulas through the completion model.

[0105] Among them, the above-mentioned completion model can be deployed to the server only after training. The method for training the completion model here can be, obtaining each sample chemical reaction formula, dividing each sample chemical reaction formula into a training set, a verification set, and a test set, and inputting at least part of the sample chemical formulas in the sample chemical reaction formulas contained in the training set into the completion model to be trained, so that the completion model to be trained can predict the remaining sample chemical formulas in the sample chemical reaction formula according to the input sample chemical formula, and then the second loss value can be determined according to the deviation between the sample chemical formula predicted by the completion model to be trained and the sample chemical formula actually contained in the sample chemical reaction formula, and the minimization of the second loss value is used as the optimization goal, and the completion model to be trained is trained to obtain the completion model to be verified.

[0106] Furthermore, the server can verify the completion model to be verified through the sample chemical reaction formulas included in the verification set. When it is determined that the deviation between the sample chemical formula predicted by the completion model to be verified for the sample chemical reaction formulas included in the verification set and the sample chemical formula actually included in the sample chemical reaction formulas in the verification set is less than a preset deviation threshold, the completion model is obtained; otherwise, the training set is re-acquired and the completion model to be trained is trained.

[0107] Furthermore, the server may test the completion model using sample chemical reaction formulas included in the test set to determine performance parameters of the completion model, generate a report text based on the determined performance parameters of the completion model, and display the report text to the user.

[0108] S106: According to each recognition result, text data representing the target chemical reaction formula in a specified format is obtained as a target recognition result, and the task is executed according to the target recognition result.

[0109] In the present specification, after obtaining the recognition results of each chemical molecular formula contained in the target chemical reaction formula, the server can obtain text data representing the target chemical reaction formula in a specified format based on each recognition result as a candidate recognition result, and then parse the candidate recognition result to obtain the chemical composition parameters of the reactants contained in the target chemical reaction formula determined based on the candidate recognition result as a first verification parameter, and obtain the chemical composition parameters of the product contained in the target chemical reaction formula determined based on the candidate recognition result as a second verification parameter.

[0110] Furthermore, the server may obtain a verification result corresponding to the candidate recognition result according to the first verification parameter, the second verification parameter and various preset verification strategies, where the verification result is used to characterize whether the candidate recognition result satisfies the quantitative description condition of the relationship between quantities in a chemical reaction.

[0111] Furthermore, when the server determines that the candidate recognition result satisfies the quantitative description condition of the relationship between quantities in a chemical reaction according to the verification result corresponding to the candidate recognition result, the candidate recognition result may be used as the target recognition result.

[0112] Among them, the above-mentioned chemical composition parameters can be of two types, the first is the number of each atom contained in the reactants and products, and the second is the total charge of the reactants and products. The following is a detailed description of the method for verifying the candidate identification results based on these two chemical composition parameters.

[0113] The first is that the server parses the candidate recognition results to obtain the number of each atom contained in the reactants in the target chemical reaction formula determined based on the candidate recognition results, and obtains the number of each atom contained in the product in the target chemical reaction formula determined based on the candidate recognition results. Then, according to the preset first verification strategy, for each atom contained in the reactants in the target chemical reaction formula determined based on the candidate recognition results, it can be judged whether the number of the atom contained in the reactants in the target chemical reaction formula determined based on the candidate recognition results and the number of the atom contained in the product in the target chemical reaction formula determined based on the candidate recognition results are consistent. If they are consistent, it is determined that the atom in the candidate recognition result is conserved. If they are inconsistent, it is determined that the atom in the candidate recognition result is not conserved. If the server determines that each atom is atomically conserved, the server can determine that the candidate recognition result meets the quantitative description conditions of the relationship between quantities in the chemical reaction.

[0114] The second is that the server parses the candidate recognition results to obtain the total charge of the reactants in the target chemical reaction formula determined based on the candidate recognition results, and obtains the total charge of the products in the target chemical reaction formula determined based on the candidate recognition results, and then can judge whether the total charge of the reactants in the target chemical reaction formula determined based on the candidate recognition results and the total charge of the products in the target chemical reaction formula determined based on the candidate recognition results are consistent according to the preset second verification strategy. If they are consistent, it can be determined that the candidate recognition result satisfies the quantitative description conditions of the relationship between quantities in the chemical reaction. Otherwise, it can be determined that the candidate recognition result does not meet the quantitative description conditions of the relationship between quantities in the chemical reaction.

[0115] Furthermore, after determining the target recognition result, the server can perform the task according to the target recognition result.

[0116] Among them, the above tasks can be determined according to business scenarios, for example: according to the target recognition result, other recognition results whose similarity with the target recognition result is higher than a preset similarity threshold are queried from a preset database, and the other recognition results are displayed to the user.

[0117] For another example, the target recognition result is input into a preset reaction path prediction model, so as to predict the reaction path information corresponding to the target recognition result through the reaction path prediction model, and then display the reaction path information to the user.

[0118] From the above method, it can be seen that the server can intelligently and automatically identify chemical reaction formulas from documents. Then, according to the species name of the chemical molecule formula in the chemical reaction formula, it can accurately obtain the corresponding SMILES structure information and complete the missing SMILES structure information in the chemical reaction formula, thereby ensuring that the final generated chemical reaction formula is fully expressed in SMILES form.

[0119] In addition, the server verifies the validity of the chemical reaction formula before finally outputting the chemical reaction formula in the form of SMILES. This verification process rigorously covers the verification of atomic conservation and charge conservation, thus further ensuring that the identified chemical information is not only complete but also accurate, greatly improving the accuracy and reliability of information identification.

[0120] The above are one or more chemical reaction formula recognition methods implemented in this specification. Based on the same idea, this specification also provides a corresponding chemical reaction formula recognition device, such as Figure 4 shown.

[0121] Figure 4 A schematic diagram of a chemical reaction formula recognition device provided in this specification includes:

[0122] The acquisition module 401 is used to acquire original text data;

[0123] A parsing module 402 is used to parse the original text data to determine target text data contained in the original text data, wherein the target text data contains a target chemical reaction formula expressed in an original molecular formula format;

[0124] A determination module 403 is used to determine associated text data corresponding to the target text data from the original text data, wherein the associated text data includes species names of reactants and products in the target chemical reaction formula;

[0125] A first recognition module 404 is used to input the target text data and the associated text data into a preset target recognition model so that the target recognition model recognizes the target text data and the associated text data to determine the corresponding relationship between each chemical molecular formula in the target chemical reaction formula and the species name;

[0126] The second recognition module 405 is used to determine, for each chemical formula in the target chemical reaction formula, the species name corresponding to the chemical formula according to the corresponding relationship, as the associated species name of the chemical formula, and query and obtain the recognition result of the chemical formula according to the associated species name, wherein the recognition result is text data representing the chemical formula in a specified format;

[0127] The execution module 406 is used to obtain text data representing the target chemical reaction formula in a specified format according to each recognition result as a target recognition result, and perform task execution according to the target recognition result.

[0128] Optionally, the parsing module 402 is specifically used to parse the original text data according to preset chemical reaction formula parsing rules to determine the text data containing the target chemical reaction formula in the original text data as preprocessed text data, wherein different chemical reaction formula parsing rules are used to parse the target chemical reaction formula represented in different formats; the preprocessed text data and the preset first task description statement are input into a preset basic recognition model, so that the basic recognition model recognizes the preprocessed text data according to the first task description statement to determine the target text data contained in the original text data.

[0129] Optionally, the first recognition module 404 is specifically used to parse the target text data to determine each target sub-text data contained in the target text data, wherein the target sub-text data contains the chemical formula of the reactant or product in the target chemical reaction formula expressed in the original molecular formula format; input the each target sub-text data and the associated text data into a preset target recognition model so that the target recognition model recognizes the target text data and the associated text data to determine the correspondence between each chemical formula in the target chemical reaction formula and the species name.

[0130] Optionally, the first recognition module 404 is specifically used to, for each target sub-text data, determine the element symbols contained in the chemical molecular formula represented by the target sub-text data as the element symbols to be verified corresponding to the target sub-text data; compare each element symbol to be verified with the preset standard element symbols one by one to obtain the comparison result of each element symbol to be verified, and determine the verification result of the target sub-text data based on each comparison result, the comparison result is used to characterize whether there is a standard element symbol consistent with the element symbol to be verified, and the verification result is used to characterize whether there is an abnormality in the target sub-text data; if it is determined according to the verification result that there is no abnormality in the target sub-text data, then the target sub-text data and the associated text data are input into the preset target recognition model.

[0131] Optionally, the execution module 406 is specifically used to determine, based on the associated species name, whether there is an identification result of the chemical formula in a preset designated knowledge base, the designated knowledge base containing a specified format representation of each chemical formula with a predetermined confidence level higher than a preset threshold; if so, querying from the preset designated knowledge base to obtain the identification result of the chemical formula; if not, sending a query request to a preset designated database so that the designated database responds to the query request, queries the chemical formula, obtains the query result of the chemical formula, and determines the identification result of the chemical formula based on the query result.

[0132] Optionally, the first recognition module 404 is specifically used to, when the query results of at least some of the chemical formulas included in the target chemical reaction formula are empty, use the other chemical formulas among the chemical formulas included in the target chemical reaction formula except the chemical formulas for which the query results are empty as basic chemical formulas; input the query results of the basic chemical formulas into a preset completion model, so as to predict the recognition results of the chemical formulas for which the query results are empty among the chemical formulas included in the target chemical reaction formula through the completion model based on the query results of the basic chemical formulas.

[0133] Optionally, the first recognition module 404 is specifically used to obtain text data representing the target chemical reaction formula in a specified format according to each recognition result, as a candidate recognition result; parse the candidate recognition result to obtain chemical composition parameters of the reactants contained in the target chemical reaction formula determined based on the candidate recognition result, as a first verification parameter, and obtain chemical composition parameters of the product contained in the target chemical reaction formula determined based on the candidate recognition result, as a second verification parameter; obtain a verification result corresponding to the candidate recognition result according to the first verification parameter, the second verification parameter and each preset verification strategy, the verification result is used to characterize whether the candidate recognition result satisfies the quantitative description condition of the relationship between quantities in a chemical reaction; when it is determined according to the verification result that the candidate recognition result satisfies the quantitative description condition of the relationship between quantities in a chemical reaction, the candidate recognition result is used as the target recognition result.

[0134] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 A chemical reaction formula identification method is provided.

[0135] This manual also provides Figure 5 The one shown corresponds to Figure 1 A schematic diagram of the electronic device. Figure 5 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0136] For the improvement of a technology, it can be clearly distinguished whether it is a hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or a software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0137] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.

[0138] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0139] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0140] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0141] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0142] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0143] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0144] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0145] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0146] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0147] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0148] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0149] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0150] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0151] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A method for identifying a chemical reaction formula, characterized in that: include: Get the original text data; Parsing the original text data to determine target text data contained in the original text data, wherein the target text data contains a target chemical reaction formula expressed in an original molecular formula format; Determining associated text data corresponding to the target text data from the original text data, wherein the associated text data includes species names of reactants and products in the target chemical reaction formula; Inputting the target text data and the associated text data into a preset target recognition model so that the target recognition model recognizes the target text data and the associated text data to determine the corresponding relationship between each chemical molecular formula in the target chemical reaction formula and the species name; For each chemical formula in the target chemical reaction formula, according to the corresponding relationship, determine the species name corresponding to the chemical formula as the associated species name of the chemical formula, and query and obtain the recognition result of the chemical formula according to the associated species name, wherein the recognition result is text data representing the chemical formula in a specified format; wherein, if the query results of at least some of the chemical formulas included in the target chemical reaction formula are empty, then predict the recognition result of the chemical formula according to the query results of other chemical formulas included in the target chemical reaction formula except for the chemical formulas with empty query results through a preset completion model; According to each recognition result, text data representing the target chemical reaction formula in a specified format is obtained as a target recognition result, and the task is executed according to the target recognition result.

2. The method according to claim 1, characterized in that Parsing the original text data to determine the target text data contained in the original text data specifically includes: According to preset chemical reaction formula parsing rules, the original text data is parsed to determine text data containing a target chemical reaction formula in the original text data as preprocessed text data, wherein different chemical reaction formula parsing rules are used to parse target chemical reaction formulas represented in different formats; The preprocessed text data and a preset first task description statement are input into a preset basic recognition model, so that the basic recognition model recognizes the preprocessed text data according to the first task description statement to determine the target text data contained in the original text data.

3. The method according to claim 1, characterized in that Inputting the target text data and the associated text data into a preset target recognition model so that the target recognition model recognizes the target text data and the associated text data to determine the corresponding relationship between each chemical molecular formula in the target chemical reaction formula and the species name, specifically including: Parsing the target text data to determine each target sub-text data contained in the target text data, wherein the target sub-text data includes a chemical molecular formula of a reactant or a product in the target chemical reaction formula expressed in an original molecular formula format; The target sub-text data and the associated text data are input into a preset target recognition model so that the target recognition model recognizes the target text data and the associated text data to determine the corresponding relationship between each chemical molecular formula in the target chemical reaction formula and the species name.

4. The method according to claim 3, characterized in that Before inputting the target subtext data and the associated text data into a preset target recognition model, the method further includes: For each target sub-text data, determine each element symbol contained in the chemical molecular formula represented by the target sub-text data as each element symbol to be verified corresponding to the target sub-text data; Compare each element symbol to be verified with each preset standard element symbol one by one to obtain a comparison result of each element symbol to be verified, and determine the verification result of the target subtext data according to each comparison result, wherein the comparison result is used to indicate whether there is a standard element symbol consistent with the element symbol to be verified, and the verification result is used to indicate whether there is an abnormality in the target subtext data; Inputting each target subtext data and the associated text data into a preset target recognition model specifically includes: If it is determined according to the verification result that none of the target sub-text data is abnormal, the target sub-text data and the associated text data are input into a preset target recognition model.

5. The method according to claim 1, characterized in that According to the associated species name, the identification result of the chemical molecular formula is obtained by querying, specifically including: According to the associated species name, determining whether there is an identification result of the chemical molecular formula in a preset designated knowledge base, wherein the designated knowledge base contains a designated format representation of each chemical molecular formula having a predetermined confidence level higher than a preset threshold; If yes, the identification result of the chemical formula is obtained by querying from the preset specified knowledge base; If not, a query request is sent to a preset designated database, so that the designated database responds to the query request, queries the chemical formula, obtains a query result of the chemical formula, and determines an identification result of the chemical formula according to the query result.

6. The method according to claim 1, characterized in that According to each recognition result, text data representing the target chemical reaction formula in a specified format is obtained as a target recognition result, specifically including: According to each recognition result, text data representing the target chemical reaction formula in a specified format is obtained as a candidate recognition result; Parsing the candidate recognition results to obtain chemical composition parameters of reactants contained in the target chemical reaction formula determined based on the candidate recognition results as first verification parameters, and obtaining chemical composition parameters of products contained in the target chemical reaction formula determined based on the candidate recognition results as second verification parameters; Obtaining, according to the first verification parameter, the second verification parameter and each preset verification strategy, a verification result corresponding to the candidate recognition result, wherein the verification result is used to characterize whether the candidate recognition result satisfies a quantitative description condition of a relationship between quantities in a chemical reaction; When it is determined according to the verification result that the candidate recognition result satisfies the quantitative description condition of the relationship between quantities in a chemical reaction, the candidate recognition result is used as the target recognition result.

7. A chemical reaction formula recognition device, characterized in that: include: An acquisition module is used to acquire original text data; A parsing module, used for parsing the original text data to determine target text data contained in the original text data, wherein the target text data contains a target chemical reaction formula expressed in an original molecular formula format; A determination module, used to determine associated text data corresponding to the target text data from the original text data, wherein the associated text data includes species names of reactants and products in the target chemical reaction formula; A first recognition module, used for inputting the target text data and the associated text data into a preset target recognition model, so that the target recognition model recognizes the target text data and the associated text data to determine the corresponding relationship between each chemical molecular formula in the target chemical reaction formula and the species name; A second recognition module is used to determine, for each chemical formula in the target chemical reaction formula, the species name corresponding to the chemical formula according to the corresponding relationship as the associated species name of the chemical formula, and to query and obtain a recognition result of the chemical formula according to the associated species name, wherein the recognition result is text data representing the chemical formula in a specified format; wherein, if the query results of at least some of the chemical formulas included in the target chemical reaction formula are empty, then a preset completion model is used to predict the recognition result of the chemical formula according to the query results of other chemical formulas included in the target chemical reaction formula except for the chemical formulas with empty query results; The execution module is used to obtain text data representing the target chemical reaction formula in a specified format according to each recognition result as a target recognition result, and perform task execution according to the target recognition result.

8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. 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, the method described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Chemical reaction information extraction method and system, storage medium and equipment

    CN115481627A