Data cleaning method and device, storage medium and electronic equipment
By establishing a reaction mapping model and using deep learning technology, the atomic mapping data of chemical reactions are cleaned, which solves the problem of low accuracy in existing technologies, improves the accuracy of atomic mapping information, and ensures the reliability of subsequent processing.
Patent Information
- Application Number
- CN202110672477.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-17
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2041-06-17
AI Technical Summary
The accuracy of chemical reaction atom mapping information based on preset annotation rules in existing technologies is low, which adversely affects subsequent processing.
By establishing a reaction mapping model, deep learning technology is used to clean the atomic mapping data, compare the changes in chemical bonds to determine the correctness of the atomic mapping relationship, and replace erroneous atomic mapping data.
This improves the accuracy of atom mapping information for chemical reactions, ensuring the reliability and accuracy of subsequent processing.
Smart Images

Figure CN115497571B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a data cleaning method and device, a storage medium and an electronic device. BACKGROUND
[0002] With the development of computer technology, chemical information technology has been widely used in the field of chemistry. In chemical information technology, atomic mapping information of chemical reactions is one of the basic information for modeling and predicting the properties of compounds. Atomic mapping refers to establishing a one-to-one mapping relationship between each atom of the reactants of a chemical reaction and each atom of its products.
[0003] In chemical information technology, chemical structures are usually described based on Simplified Molecular Input Line Entry Specification (SMILES). Atomic mapping information of chemical reactions is usually obtained by annotating the SMILES expression of the chemical reaction.
[0004] Currently, the SMILES expression of a chemical reaction is usually annotated based on a preset annotation rule to obtain atomic mapping information of the chemical reaction. The preset annotation rule is usually based on the accumulation of human social experience. As the number of chemical reactions accumulated by human society increases, the atomic mapping obtained based on the preset annotation rule cannot accurately identify the corresponding relationship between each atom of the reactants and products of all chemical reactions, resulting in low accuracy of the atomic mapping information of the chemical reaction obtained by the existing method, which in turn has a great adverse effect on subsequent processing work. SUMMARY
[0005] Therefore, the embodiments of the present application provide a data cleaning method to solve the problem of low accuracy of atomic mapping information of chemical reactions and adverse effects on subsequent processing work.
[0006] The embodiments of the present application also provide a data cleaning device to ensure the implementation and application of the above method in practice.
[0007] To achieve the above object, the embodiments of the present application provide the following technical solutions:
[0008] A data cleaning method comprises:
[0009] When an instruction of data cleaning on atomic mapping information corresponding to a chemical reaction is received, first atomic mapping data contained in the atomic mapping information is acquired, the first atomic mapping data being a string obtained by performing atomic mapping annotation processing on a reaction string based on a preset annotation rule, the reaction string being a SMILES string corresponding to the chemical reaction;
[0010] The reaction string is input into a pre-established reaction mapping model, and second atomic mapping data corresponding to the chemical reaction is obtained after processing by the reaction mapping model;
[0011] A first quantity and a second quantity are determined, the first quantity being a chemical bond change quantity corresponding to the first atomic mapping data, and the second quantity being a chemical bond change quantity corresponding to the second atomic mapping data;
[0012] Based on the first quantity and the second quantity, it is determined whether the atomic mapping relationship corresponding to the first atomic mapping data is correct;
[0013] If the atomic mapping relationship corresponding to the first atomic mapping data is incorrect, the first atomic mapping data contained in the atomic mapping information is replaced by the second atomic mapping data to clean the data of the atomic mapping information.
[0014] The above method, optionally, the establishment process of the reaction mapping model comprises:
[0015] A training sample set is determined, the training sample set including reaction strings corresponding to a plurality of sample chemical reactions and atomic mapping data corresponding to each of the sample chemical reactions;
[0016] Based on the training sample set, a pre-constructed language processing model is trained, and the trained language processing model is used as the reaction mapping model.
[0017] The above method, optionally, the determination of the first quantity comprises:
[0018] The connection information corresponding to each reactant atom corresponding to the first atomic mapping data is determined, and the connection information corresponding to each reactant atom includes the information of each reactant atom connected to the reactant atom;
[0019] The connection information corresponding to each product atom corresponding to the first atomic mapping data is determined, and the connection information corresponding to each product atom includes the information of each product atom connected to the product atom;
[0020] In each of the product atoms, the product atom corresponding to each of the reactant atoms is determined;
[0021] comparing the connection information corresponding to each of the reactant atoms with the connection information corresponding to the product atoms corresponding thereto, to determine the amount of chemical bond formation and the amount of chemical bond breakage corresponding to each of the product atoms;
[0022] summing the amount of chemical bond formation and the amount of chemical bond breakage corresponding to each of the product atoms, and determining the calculation result as the first quantity.
[0023] The method described above, optionally, the determining of the connection information corresponding to each of the reactant atoms corresponding to the first atomic mapping data comprises:
[0024] calling a preset chemoinformatics tool to parse the first atomic mapping data, to obtain parsing data corresponding to the first atomic mapping data;
[0025] extracting the identification information corresponding to each of the reactant atoms from the parsing data, the identification information corresponding to each of the reactant atoms comprising the identification of the reactant atom and the identification of each of the reactant atoms connected to the reactant atom;
[0026] determining the extracted identification information corresponding to each of the reactant atoms as the connection information corresponding to each of the reactant atoms.
[0027] The method described above, optionally, the judging of whether the atomic mapping relationship corresponding to the first atomic mapping data is correct comprises:
[0028] judging whether the second quantity is less than the first quantity;
[0029] if the second quantity is less than the first quantity, determining that the atomic mapping relationship corresponding to the first atomic mapping data is incorrect.
[0030] The method described above, optionally, further comprises:
[0031] if the second quantity is greater than or equal to the first quantity, determining that the atomic mapping relationship corresponding to the first atomic mapping data is correct.
[0032] The method described above, optionally, further comprises:
[0033] if the atomic mapping relationship corresponding to the first atomic mapping data is correct, retaining the first atomic mapping data in the atomic mapping information.
[0034] A data cleaning device, comprising:
[0035] The first obtaining unit is configured to, when an instruction of data cleaning of atomic mapping information corresponding to a chemical reaction is received, obtain first atomic mapping data contained in the atomic mapping information, the first atomic mapping data being a string obtained by performing atomic mapping annotation processing on a reaction string based on a preset annotation rule, and the reaction string being a SMILES string corresponding to the chemical reaction.
[0036] The second obtaining unit is configured to input the reaction string into a pre-established reaction mapping model, and obtain second atomic mapping data corresponding to the chemical reaction after processing by the reaction mapping model.
[0037] The first determining unit is configured to determine a first quantity and a second quantity, the first quantity being a chemical bond change quantity corresponding to the first atomic mapping data, and the second quantity being a chemical bond change quantity corresponding to the second atomic mapping data.
[0038] The judging unit is configured to judge whether an atomic mapping relationship corresponding to the first atomic mapping data is correct based on the first quantity and the second quantity.
[0039] The cleaning unit is configured to, if the atomic mapping relationship corresponding to the first atomic mapping data is incorrect, replace the first atomic mapping data contained in the atomic mapping information with the second atomic mapping data, so as to perform data cleaning on the atomic mapping information.
[0040] The device described above can further include the following optional components.
[0041] The second determining unit is configured to determine a training sample set, the training sample set including reaction strings corresponding to a plurality of sample chemical reactions and atomic mapping data corresponding to each of the sample chemical reactions.
[0042] The training unit is configured to train a pre-constructed language processing model based on the training sample set, and use the trained language processing model as the reaction mapping model.
[0043] The first determining unit of the device described above can include the following components.
[0044] The first determining sub-unit is configured to determine connection information corresponding to each reactant atom corresponding to the first atomic mapping data, and the connection information corresponding to each reactant atom includes information of each reactant atom connected to the reactant atom.
[0045] The second determining sub-unit is configured to determine connection information corresponding to each product atom corresponding to the first atomic mapping data, and the connection information corresponding to each product atom includes information of each product atom connected to the product atom.
[0046] a third determining sub-unit, configured to determine, in each of the product atoms, a product atom corresponding to each of the reactant atoms;
[0047] a fourth determining sub-unit, configured to compare the connection information corresponding to each of the reactant atoms with the connection information corresponding to the product atom corresponding to each of the reactant atoms, to determine a chemical bond generation amount and a chemical bond breaking amount corresponding to each of the product atoms;
[0048] a fifth determining sub-unit, configured to perform summation operation on the chemical bond generation amount and the chemical bond breaking amount corresponding to each of the product atoms, and determine the calculation result as the first quantity.
[0049] Optionally, the first determining sub-unit comprises:
[0050] a parsing sub-unit, configured to call a preset chemoinformatics tool to parse the first atom mapping data, to obtain parsing data corresponding to the first atom mapping data;
[0051] an extracting sub-unit, configured to extract, from the parsing data, identification information corresponding to each of the reactant atoms, wherein the identification information corresponding to each of the reactant atoms comprises an identification of the reactant atom and an identification of each of the reactant atoms connected to the reactant atom;
[0052] a sixth determining sub-unit, configured to determine the extracted identification information corresponding to each of the reactant atoms as the connection information corresponding to each of the reactant atoms.
[0053] Optionally, the judging unit comprises:
[0054] a judging sub-unit, configured to judge whether the second quantity is less than the first quantity;
[0055] a seventh determining sub-unit, configured to, if the second quantity is less than the first quantity, determine that the atom mapping relationship corresponding to the first atom mapping data is incorrect.
[0056] Optionally, the judging unit further comprises:
[0057] an eighth determining sub-unit, configured to, if the second quantity is greater than or equal to the first quantity, determine that the atom mapping relationship corresponding to the first atom mapping data is correct.
[0058] Optionally, the device further comprises:
[0059] a data retaining unit, configured to, if the atom mapping relationship corresponding to the first atom mapping data is correct, retain the first atom mapping data in the atom mapping information.
[0060] A storage medium including stored instructions, wherein the instructions, when executed, control a device in which the storage medium resides to perform the data cleaning method as described above.
[0061] An electronic device including a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the data cleaning method as described above.
[0062] The data cleaning method provided by the embodiment of the present application comprises the following steps: when an instruction of data cleaning of atomic mapping information of a chemical reaction is received, first atomic mapping data contained in the atomic mapping information is acquired, the first atomic mapping data being a string obtained by performing atomic mapping annotation processing on a reaction string based on a preset annotation rule. It is determined that the reaction string corresponding to the chemical reaction belongs to a pre-established reaction mapping model, and second atomic mapping data corresponding to the chemical reaction is obtained. A first quantity representing a chemical bond change amount corresponding to the first atomic mapping data and a second quantity representing a chemical bond change amount corresponding to the second atomic mapping data are determined, and whether the atomic mapping relationship corresponding to the first atomic mapping data is correct is judged based on the first quantity and the second quantity. If not, the first atomic mapping data contained in the atomic mapping information corresponding to the chemical reaction is replaced by the second atomic mapping data. By comparing the chemical bond change amount corresponding to the first atomic mapping data and the chemical bond change amount corresponding to the second atomic mapping data, whether the atomic mapping relationship corresponding to the first atomic mapping data is correct is judged, and if not, the atomic mapping information is corrected based on the second atomic mapping data, and the accuracy of the atomic mapping information corresponding to the chemical reaction is improved. BRIEF DESCRIPTION OF DRAWINGS
[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of the provided drawings.
[0064] Figure 1 The method flowchart of the data cleaning method provided by the embodiment of the present application;
[0065] Figure 2 Another method flowchart of the data cleaning method provided by the embodiment of the present application;
[0066] Figure 3 The atomic mapping identification diagram of the chemical reaction provided by the embodiment of the present application;
[0067] Figure 4 Another atomic mapping identification chart of a chemical reaction provided for an embodiment of the present application;
[0068] Figure 5 A structural change schematic diagram of a chemical reaction provided for an embodiment of the present application;
[0069] Figure 6 Another structural change schematic diagram of a chemical reaction provided for an embodiment of the present application;
[0070] Figure 7 Another atomic mapping identification chart of a chemical reaction provided for an embodiment of the present application;
[0071] Figure 8 Another atomic mapping identification chart of a chemical reaction provided for an embodiment of the present application;
[0072] Figure 9 Another structural change schematic diagram of a chemical reaction provided for an embodiment of the present application;
[0073] Figure 10 A structural schematic diagram of a data cleaning device provided for an embodiment of the present application;
[0074] Figure 11 A structural schematic diagram of an electronic device provided for an embodiment of the present application. DETAILED DESCRIPTION
[0075] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.
[0076] In the present application, the term “comprising”, “containing” or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the sentence “comprising a” does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0077] As can be known from the background art, atomic mapping of chemical reactions can be automatically realized by computer technology. At present, there are many software systems that can automatically realize atomic mapping, such as SYMYX software, ChemAxon, and ACD / Labs, etc. Current mapping algorithms are usually mapping algorithms based on artificially preset rules or mapping algorithms based on empirical principles. For example, the mapping algorithm based on the empirical principle proposed by Jochum et al. is based on the principle that "most chemical reactions proceed in the direction of minimum chemical distance: minimum number of valence electron rearrangements", that is, the minimum chemical distance principle, which is one of the commonly used principles in the application of computer technology in the field of chemistry. The mapping algorithm based on artificial rules cannot always accurately identify the corresponding atoms between reactants and products, because the artificially designed rules inevitably miss some special reactions, resulting in insufficient generalization ability of the algorithm. In addition, the mapping algorithm based on empirical principles is similar to the above and is also insufficient to cope with all chemical reactions, because not all chemical reactions follow the empirical principle, or in some cases, geometric explosion of chemical combinations may occur, so that the algorithm will no longer be applicable. Based on artificial rules or empirical principles, it is usually difficult to handle special reactions outside the scope of the rules, and the generalization ability is low, resulting in low accuracy of atomic mapping data, and the rules cannot be used to identify or correct errors.
[0078] Therefore, the embodiment of the present application provides a data cleaning method, which obtains new atomic mapping data through a reaction mapping model, judges whether the mapping relationship reflected by the original atomic mapping data is correct based on the new atomic mapping data, and corrects it if it is not correct, so as to improve the accuracy of atomic mapping information.
[0079] The embodiment of the present application provides a data cleaning method, which can be applied to a chemical reaction data management system, and the execution subject of the method can be a processor running on a computer. The flowchart of the data cleaning method is shown in Figure 1
[0080] S101: When receiving an instruction of data cleaning of atomic mapping information corresponding to a chemical reaction, first atomic mapping data contained in the atomic mapping information is obtained, the first atomic mapping data is a string obtained by performing atomic mapping annotation processing on a reaction string based on a preset annotation rule, and the reaction string is a simplified molecular linear input specification string corresponding to the chemical reaction.
[0081] In the method provided by this invention, the reaction data of each chemical reaction is stored in a reaction database, which includes atomic mapping information with atomic mapping relationships annotated based on manually defined rules. When it is necessary to verify and clean the reaction data, the operator can send instructions through the system front-end. When the processor receives an instruction to clean the atomic mapping information of the chemical reaction, it can retrieve the atomic mapping information corresponding to the current chemical reaction from the reaction database. This information includes a string with atomic mapping relationships annotated based on preset rules. This string is a simplified molecular linear input specification (SMILES) string for chemical reactions that has undergone atomic mapping and conforms to the basic syntax rules of chemical reaction SMILES.
[0082] S102: Input the reaction string into a pre-established reaction mapping model, and after processing by the reaction mapping model, obtain the second atom mapping data corresponding to the chemical reaction;
[0083] In the method provided by this invention, the reaction string corresponding to the current chemical reaction can be obtained from a reaction database. This string, specifically the unmapped SMILES string, represents the chemical structures of each reactant and product in the reaction. The reaction string is then loaded into the input layer of a pre-established reaction mapping model to trigger the model to process the string and output a string with atom-mapped annotations. The string output by the reaction mapping model is used as the second atom-mapped data corresponding to the chemical reaction.
[0084] The reaction mapping model mentioned in the method provided in this invention embodiment can employ a variant of deep learning in the field of artificial intelligence to establish a trained data-driven model. This model can analyze and learn transformation patterns in chemical change processes from large amounts of data, and annotate the chemical reaction strings input to the model with atomic mappings. The specific model type can be selected according to actual needs, or an existing model can be chosen without affecting the functionality of the method provided in this invention embodiment.
[0085] S103: Determine the first quantity and the second quantity, wherein the first quantity is the amount of chemical bond change corresponding to the first atom mapping data, and the second quantity is the amount of chemical bond change corresponding to the second atom mapping data;
[0086] In the method provided by the embodiment of the present application, the first atomic mapping data can be parsed to obtain the chemical bond change quantity corresponding to the first atomic mapping data, that is, the change quantity of the chemical bond in the chemical reaction process reflected by the first atomic mapping data, and the second atomic mapping data can also be parsed to obtain the chemical bond change quantity corresponding to the second atomic mapping data, that is, the change quantity of the chemical bond in the chemical reaction process reflected by the second atomic mapping data. The change quantity of the chemical bond includes the number of broken chemical bonds and the number of newly generated chemical bonds.
[0087] In S104, whether the atomic mapping relationship corresponding to the first atomic mapping data is correct is judged based on the first quantity and the second quantity.
[0088] In the method provided by the embodiment of the present application, the chemical change process reflected by the atomic mapping data obtained through the reaction mapping model processing can be compared with the chemical change process reflected by the original atomic mapping data, so as to verify the original atomic mapping data.
[0089] In S105, if the atomic mapping relationship corresponding to the first atomic mapping data is incorrect, the first atomic mapping data contained in the atomic mapping information is replaced by the second atomic mapping data, so as to clean the atomic mapping information.
[0090] In the method provided by the embodiment of the present application, if the atomic mapping relationship corresponding to the original first atomic mapping data is incorrect, the second atomic mapping data obtained through the reaction mapping model processing is used to replace the first atomic mapping data, so as to clean the atomic mapping information of the chemical reaction. Specifically, the atomic mapping information corresponding to the chemical reaction in the reaction database is modified, the originally stored first atomic mapping data is modified into the second atomic mapping data, and the data contained in the atomic mapping information corresponding to the chemical reaction after the modification is the second atomic mapping data, instead of the first atomic mapping data.
[0091] Based on the data cleaning method provided in the embodiment of the present application, when the instruction is received, the current atomic mapping data of the chemical reaction is obtained, and the reaction string of the chemical reaction is input into the reaction mapping model to obtain the atomic mapping data processed by the reaction mapping model. Then, the change amount of the chemical bond in the chemical process reflected by the current atomic mapping data of the chemical reaction is determined, and the change amount of the chemical bond in the chemical process reflected by the atomic mapping data processed by the reaction mapping model is determined. Based on the change amounts of the chemical bonds reflected by the two atomic mapping data, it is judged whether the atomic mapping relationship corresponding to the current atomic mapping data of the chemical reaction is correct or not. If not, the atomic mapping data processed is used to replace the current atomic mapping data to clean the atomic mapping information corresponding to the chemical reaction. By using the method provided in the embodiment of the present application, the atomic mapping data corresponding to the chemical reaction can be obtained by the reaction mapping model, and whether the atomic mapping data currently obtained based on the rule for the chemical reaction is correct or not is verified. If not, the atomic mapping data can be further corrected, so that the accuracy of the atomic mapping information of the chemical reaction can be improved, and the adverse effect on the subsequent processing work can be avoided. On the other hand, the data cleaning work of a large amount of data in the reaction database can be met.
[0092] In order to better illustrate the method provided in the embodiment of the present application, another data cleaning method is provided in the embodiment of the present application, which is based on the method shown in Figure 1 In the method provided in the embodiment of the present application, the establishment process of the reaction mapping model mentioned in step S102 includes:
[0093] A training sample set is determined, and the training sample set includes reaction strings corresponding to a plurality of sample chemical reactions and atomic mapping data corresponding to each of the sample chemical reactions.
[0094] In the method provided in the embodiment of the present application, a large amount of sample chemical reaction strings and corresponding atomic mapping data can be obtained from the existing chemical reaction database, and these sample data with high atomic mapping accuracy are used as the training sample set.
[0095] Based on the training sample set, the pre-constructed language processing model is trained, and the trained language processing model is used as the reaction mapping model.
[0096] In the method provided in the embodiment of the present application, the language processing model is used as the architecture of the reaction mapping model, and the atomic mapping task of the chemical reaction can be considered as the application of the language translation technology in the field of chemical information technology. The language processing model capable of realizing language translation can be trained as the reaction mapping model. There are various language processing models capable of realizing language translation in the prior art, which are not specifically described here.
[0097] In the method provided by the embodiment of the present application, the chemical reaction SMILES string without atomic mapping in the training sample set is used as the sample input of the model, the chemical reaction SMILES string with atomic mapping is used as the sample output of the model, the pre-constructed language processing model is trained according to a preset training method, and when the trained language processing model meets a preset condition, the training of the model is completed, and the trained language processing model is used as the reaction mapping model.
[0098] Based on the method provided by the embodiment of the present application, the language processing model can be trained based on a large amount of reaction strings of chemical reactions and corresponding atomic mapping data, and the trained model is used as the reaction mapping model. The trained model has strong generalization ability, and can map atoms in reactants and products from similar chemical reaction mechanisms for un-recognized chemical reactions.
[0099] Further, in combination with the flowchart shown in Figure 2 The embodiment of the present application provides another data cleaning method, which is based on the method shown in Figure 1 In the method provided by the embodiment of the present application, the process of determining the first number in step S103 includes:
[0100] S201: determining the connection information corresponding to each reactant atom corresponding to the first atomic mapping data; the connection information corresponding to each reactant atom includes the information of each reactant atom connected to the reactant atom;
[0101] In the method provided by the embodiment of the present application, the first atomic mapping data is analyzed to obtain the connection information corresponding to each reactant atom in the chemical reaction process reflected by the first atomic mapping data, for example, the identification of each reactant atom connected to the reactant atom, the chemical bond type between the reactant atom and each reactant atom connected to it, and the like. The first atomic mapping data is data representing the mapping relationship between each product atom and each reactant atom, and each atom is labeled with a label corresponding to the atomic mapping relationship in the data, which can be used as the identification of the atom.
[0102] S202: determining the connection information corresponding to each product atom corresponding to the first atomic mapping data; the connection information corresponding to each product atom includes the information of each product atom connected to the product atom;
[0103] In the method provided by the embodiment of the present application, the first atomic mapping data is parsed to obtain connection information corresponding to each product atom in a chemical reaction process reflected by the first atomic mapping data, for example, the identification of each product atom connected to the product atom, the chemical bond type between the product atom and each product atom connected to the product atom, and the like.
[0104] In the method provided by the embodiment of the present application, the identification of each product atom and the identification of each reactant atom reflect a one-to-one mapping relationship between each product atom and each reactant atom. The identification corresponding to each reactant atom is compared with the identification corresponding to each product atom, and the product atom having the same identification as the reactant atom is determined as the product atom corresponding to the reactant atom.
[0105] In the method provided by the embodiment of the present application, the identification of each product atom and the identification of each reactant atom reflect a one-to-one mapping relationship between each product atom and each reactant atom. The identification corresponding to each reactant atom is compared with the identification corresponding to each product atom, and the product atom having the same identification as the reactant atom is determined as the product atom corresponding to the reactant atom.
[0106] In the method provided by the embodiment of the present application, the connection information corresponding to each reactant atom is compared with the connection information corresponding to the product atom corresponding to the reactant atom to determine the chemical bond generation amount and the chemical bond breaking amount corresponding to each product atom.
[0107] In the method provided by the embodiment of the present application, the connection information corresponding to each reactant atom is compared with the connection information corresponding to the product atom corresponding to the reactant atom to determine the chemical bond generation amount and the chemical bond breaking amount corresponding to each product atom.
[0108] In the method provided by the embodiment of the present application, the connection information corresponding to each reactant atom is compared with the connection information corresponding to the product atom corresponding to the reactant atom to determine the chemical bond generation amount and the chemical bond breaking amount corresponding to each product atom.
[0109] In the method provided by the embodiment of the present application, the connection information corresponding to each reactant atom is compared with the connection information corresponding to the product atom corresponding to the reactant atom to determine the chemical bond generation amount and the chemical bond breaking amount corresponding to each product atom.
[0110] Based on the method provided in the embodiment of the present application, the connection information corresponding to each reactant atom and each product atom can be obtained by analyzing the first atomic mapping data, and the number of changes of chemical bonds can be quickly determined through comparison of the connection information, the processing speed is faster, and the processing efficiency can be further improved.
[0111] In Figure 1 In the method shown, the process of determining the second number in step S103 can be processed based on the second atomic mapping data by analogy with the process of determining the first number, and the principle can be referred to the description of the provided embodiments, which will not be repeated here. Figure 2
[0112] In order to better illustrate the method provided in the embodiment of the present application, the present application provides another data cleaning method, which is based on the method shown in Figure 2 In the method provided in the embodiment of the present application, the process of determining the connection information corresponding to each reactant atom corresponding to the first atomic mapping data in step S201 comprises:
[0113] The first atomic mapping data is parsed by calling a preset cheminformatics tool to obtain parsed data corresponding to the first atomic mapping data;
[0114] In the method provided in the embodiment of the present application, the first atomic mapping data can be parsed by calling a cheminformatics tool, for example, RDKit, which is an open source toolkit for cheminformatics and is a commonly used tool in the field of chemical information technology, and can realize information extraction of SMILES string. Specifically, the first atomic mapping data can be loaded into RDKit, which is read as a processing object, and after tool processing, the parsed data corresponding to the first atomic mapping data can be obtained, such as the identification of each reactant atom and the atomic information connected thereto, the identification of each product atom and the atomic information connected thereto, and the like.
[0115] The identification information corresponding to each of the reactant atoms is extracted from the parsed data, and the identification information corresponding to each of the reactant atoms includes the identification of the reactant atom and the identification of each reactant atom connected to the reactant atom;
[0116] In the method provided in the embodiment of the present application, the identification information related to each reactant atom can be extracted from the parsed data obtained by the tool, and the chemical bond information related to each reactant atom can also be extracted.
[0117] The extracted identification information corresponding to each of the reactant atoms is determined as the connection information corresponding to each of the reactant atoms.
[0118] In the method provided by the embodiment of the present application, the identification information corresponding to each reactant atom after extraction can be used as the connection information corresponding to the reactant atom, and the chemical bond information corresponding to each reactant atom can also be used as the connection information.
[0119] Based on the method provided by the embodiment of the present application, the existing chemoinformatics tools can be called to analyze the atom mapping data, and the parsed data can be directly obtained, from which the connection information of the atoms can be extracted, so that the processing process is relatively convenient and fast, and the processing efficiency can be further improved.
[0120] Further, Figure 2 In the method, the determination of the connection information corresponding to each product atom corresponding to the first atom mapping data in step S202 can also be processed based on the method principle provided in the above embodiment for step S201, the chemoinformatics tools are called to analyze the data, and information extraction is performed. Please refer to the description in the above embodiment, which will not be repeated here. It should be noted that in the specific implementation process, the chemoinformatics tools are usually called to analyze the atom mapping data, and the parsed data obtained contains information of the product atoms and information of the reactant atoms. The relevant information can be extracted respectively, and it is not necessary to analyze twice respectively.
[0121] Further, in the method provided by the embodiment of the present application, Figure 1 In the method, in the determination of the second number in step 103, the method principle provided in the above embodiment can be usually used, the chemoinformatics tools are called to analyze the second atom mapping data, so as to extract the information of each reactant atom and the information of each product atom corresponding to the second atom mapping data. Please refer to the description in the above embodiment, which will not be repeated here.
[0122] In order to better illustrate the method provided by the embodiment of the present application, Figure 1 Based on the method, the embodiment of the present application provides another data cleaning method, and the process of judging whether the atom mapping relationship corresponding to the first atom mapping data is correct in step S104 includes:
[0123] Judging whether the second number is less than the first number;
[0124] In the method provided by the embodiment of the present application, the first quantity represents the change of the chemical bond in the chemical reaction reflected by the first atomic mapping data, and the second quantity represents the change of the chemical bond in the chemical reaction reflected by the second atomic mapping data. According to the principle of chemical reaction, the chemical reaction usually follows the principle of minimum change. If different levels of change of the chemical bond are identified for the same chemical reaction, the process with smaller change is more accurate in matching the actual chemical reaction. In the method provided by the embodiment of the present application, the second quantity is compared with the first quantity in value to determine whether the second quantity is smaller than the first quantity.
[0125] If the second quantity is smaller than the first quantity, it is determined that the atomic mapping relationship corresponding to the first atomic mapping data is incorrect.
[0126] In the method provided by the embodiment of the present application, if the second quantity is smaller than the first quantity, it is determined that the atomic mapping relationship corresponding to the first atomic mapping data is incorrect, and the atomic mapping information needs to be corrected.
[0127] Based on the method provided by the embodiment of the present application, if the second quantity is smaller than the first quantity, it indicates that the change of the chemical bond in the chemical reaction corresponding to the second atomic mapping data is smaller than the change of the chemical bond in the chemical reaction reflected by the first atomic mapping data, which means that the chemical reaction reflected by the second atomic mapping data is closer to the actual chemical reaction, that is, the atomic mapping relationship corresponding to the first atomic mapping data is incorrect. Therefore, the method provided by the embodiment of the present application can conveniently determine whether the original atomic mapping data is correct through comparison of the number of chemical bonds.
[0128] Further, in the method provided by the embodiment of the present application, if the second quantity is greater than or equal to the first quantity, it is determined that the atomic mapping relationship corresponding to the first atomic mapping data is correct.
[0129] In the method provided by the embodiment of the present application, if the second quantity is greater than or equal to the first quantity, it indicates that the change of the chemical bond in the chemical reaction reflected by the first atomic mapping data is not greater than the change of the chemical bond in the chemical reaction reflected by the second atomic mapping data, that is, the change of the chemical reaction reflected by the first atomic mapping data is closer to the actual chemical reaction.
[0130] Further, based on the method shown in Figure 1 In the method provided by the embodiment of the present application, if the atomic mapping relationship corresponding to the first atomic mapping data is correct, the first atomic mapping data is retained in the atomic mapping information. That is, in the case that the atomic mapping relationship corresponding to the atomic mapping data currently contained in the atomic mapping information is correct, the information in the database is not changed.
[0131] In order to better illustrate the method provided by the embodiment of the present application, the following will be described in combination withFigures 3-9 The process of determining whether the atomic mapping relationship corresponding to the first atomic mapping data is correct, based on the first and second quantities, is illustrated using atomic mapping data from actual chemical reactions.
[0132] It should be noted that, Figures 3-9 The chemical reaction structures and symbols presented in each atomic mapping diagram and structural change diagram are independent; there is no direct correspondence between the numerical symbols in each diagram. Each numerical symbol in each atomic mapping diagram and structural change diagram represents the atomic mapping label corresponding to the atom at the corresponding position on the chemical structure shown in the diagram. Figure 3 , Figure 4 , Figures 7-9 In the diagrams, the chemical structures of the reactants are shown on either side of the plus sign, and the chemical structure of the products is shown to the right of the arrow.
[0133] exist Figure 1 Based on the method shown, combined with Figures 3-6 This invention provides a data cleaning method. Figure 3The first atomic mapping data corresponds to the atomic mapping identification map of the chemical reaction. In the embodiment of the present application, the first atomic mapping data, that is, the SMILES string obtained by performing atomic mapping based on the artificial labeling rule is: [CH3:1][O:2][C:3](=[O:4])\[CH:5]=[CH:6]\[c:7]1[cH:8][cH:9][c:10]([cH:11][cH:12]1)[N:13](=[O:14])=[O:15].[CH3:16][c:17]1[cH:18][cH:19][c:20]([cH:21][cH:22]1)[S:23](=[O:24])(=[O:25])[CH2:26][C:27](=[O:28])[NH:29][CH2:30][c:31]1[cH:32][cH:33][cH:34][cH:35][cH:36]1>>[CH3:16][c:17]1[cH:18][cH:19][c:20]([cH:21][cH:22]1)[S:23](=[O:25])(=[O:24])[C@H:26]1[C@@H:6]([CH2:5][C:3](=[O:2])[N:29]([CH2:30][c:31]2[cH:32][cH:33][cH:34][cH:35][cH:36]2)[C:27]1=[O:28])[c:7]1[cH:8][cH:9][c:10]([cH:11][cH:12]1)[N:13](=[O:14])=[O:15].
[0134] The second atomic mapping data obtained through the reaction mapping model, that is, the SMILES string obtained through the reaction mapping model, is [C:20](=[O:21])( / [CH:22]=[CH:23] / [c:24]1[cH:25][cH:26][c:27]([N+:28](=[O:29])[O-:30])[cH:31][cH:32]1)[O:36][CH3:35].[CH3:1][c:2]1[cH:3][cH:4][c:5]([S:6](=[O:7])(=[O:8])[CH2:9][C:10](=[O:11])[NH:12][CH2:13][c:14]2[cH:15][cH:16][cH:17][cH:18][cH:19]2)[cH:33][cH:34]1>>[CH3:1][c:2]1[cH:3][cH:4][c:5]([S:6](=[O:7])(=[O:8])[C@@H:9]2[C:10](=[O:11])[N:12]([CH2:13][c:14]3[cH:15][cH:16][cH:17][cH:18][cH:19]3)[C:20](=[O:21])[CH2:22][C@H:23]2[c:24]2[cH:25][cH:26][c:27]([N+:28](=[O:29])[O-:30])[cH:31][cH:32]2)[cH:33][cH:34]1. Figure 4 The atomic mapping identification diagram of the chemical reaction corresponding to the second atomic mapping data.
[0135] Through the chemical information tool, the information of the first atomic mapping data and the second atomic mapping data is extracted respectively, and after comparing the extracted information through the preset algorithm, it is determined that the chemical bond breaking amount corresponding to the first atomic mapping data is 4, the breaking and building atom serial number pairs are “3=4”, “1-2”, “5=6” and “2-3” respectively, the chemical bond generation amount is 4, the bonding atom serial number pairs are “6-26”, “5-6”, “3-29” and “2=3” respectively, and the chemical bond change amount, that is, the first quantity, is 8.
[0136] The chemical bond breaking amount corresponding to the second atomic mapping data is 2, the breaking and building atom serial number pairs are “20-36” and “22=23” respectively, and the chemical bond generation amount is 3, the bonding atom serial number pairs are “22-23”, “12-20” and “9-23” respectively, and the total chemical bond change quantity is 5, that is, the second quantity is 5.
[0137] Compared with the second quantity 5, the first quantity 8 is smaller, so the first atomic mapping data corresponds to incorrect atomic mapping relationship. Then, the second atomic mapping data is used to update the atomic mapping data corresponding to the chemical reaction.
[0138] From the mechanism of the chemical reaction, the chemical reaction is a nucleophilic addition reaction, so the carbonyl carbon should be used for the product site, and the chemical structure change schematic diagram is as shown in Figure 5 The second atomic mapping data reflects the atomic mapping of the chemical reaction, and the chemical structure change of the product site corresponding to the first atomic mapping data is as shown in Figure 4 The second atomic mapping data reflects the atomic mapping of the chemical reaction, and the chemical structure change of the product site corresponding to the first atomic mapping data is as shown in Figure 6 The chemical structure change of the product site corresponding to the first atomic mapping data is as shown in
[0139] On the basis of the method shown in Figure 1 In combination with Figures 7-9 The first atomic mapping data is: [CH3:1][CH2:2][O:3][C:4](=[O:5])[NH:6][C:7]([NH:8][CH2:9][c:10]1[cH:11][cH:12][cH:13][cH:14][cH:15]1)= [S:21].[NH2:16][C:17]([CH3:18])([CH3:19])[CH3:20]>>[CH3:1][CH2:2][O:3][C:4](=[O:5]) / [N:6]= [C:7] ( / [NH:8][CH2:9][c:10]1[cH:11][cH:12][cH:13][cH:14][cH:15]1)[NH:16][C:17]([CH3:18])([CH3:19])[CH3:20]. Figure 7 The atomic mapping of the chemical reaction corresponding to the first atomic mapping data is shown.
[0140] The second atomic mapping data obtained by processing the reaction mapping model is: [CH3:1][CH2:2][O:3][C:4](=[O:5])[NH:6][C:7]([NH:8][CH2:9][c:10]1[cH:11][cH:12][cH:13][cH:14][cH:15]1)=[S:21].[NH2:16][C:17]([CH3:18])([CH3:19])[CH3:20]>>[CH3:1][CH2:2][O:3][C:4](=[O:5]) / [N:6]=[C:7]( / [NH:8][CH2:9][c:10]1[cH:11][cH:12][cH:13][cH:14][cH:15]1)[NH:16][C:17]([CH3:18])([CH3:19])[CH3:20]. Figure 8 The atomic mapping identification of the chemical reaction corresponding to the second atomic mapping data is shown.
[0141] The first atomic mapping data and the second atomic mapping data are subjected to information extraction by a chemical informatics tool, and the extracted information is compared by a preset algorithm, and the chemical bond breaking amount corresponding to the first atomic mapping data is 3, and the bond breaking atom serial number pair is: “4-6”, “18-21” and “7=8”. The chemical bond formation amount is 3, and the bond formation atom serial number pair is: “7=21”, “4-21” and “6-18”, and the total chemical bond change number is 6, that is, the first number is 6. The chemical bond breaking amount corresponding to the second atomic mapping data is 2, and the bond breaking atom serial number pair is: “7=21” and “6-7”, and the chemical bond formation amount is 2, and the bond formation atom serial number pair is: “7-16” and “6=7”, and the total chemical bond change number is 4, that is, the second number is 4. After comparison, the second number 4 is less than the first number 6, and therefore the original mapping is determined as an error mapping.
[0142] According to the reaction mechanism of the chemical reaction, the change diagram of the chemical structure in the reaction process should be as shown in Figure 9 On the reactant side of the chemical reaction, the atom with the site serial number 16 and the atom 21 form a Schiff base, and then the double bond is transferred between the atom 6 and the atom 7.
[0143] According to the data cleaning method shown in Figure 1 The embodiment of the present application also provides a data cleaning device for the specific implementation of the method shown in Figure 1 The structural schematic diagram of the device is shown in Figure 10 The device comprises:
[0144] The first obtaining unit 301 is configured to, when an instruction of data cleaning of atomic mapping information corresponding to a chemical reaction is received, obtain first atomic mapping data contained in the current atomic mapping information, the first atomic mapping data being a string obtained by performing atomic mapping annotation processing on a reaction string based on a preset annotation rule, and the reaction string being a SMILES string corresponding to the chemical reaction.
[0145] The second obtaining unit 302 is configured to input the reaction string into a pre-established reaction mapping model, and obtain second atomic mapping data corresponding to the chemical reaction after processing by the reaction mapping model.
[0146] The first determining unit 303 is configured to determine a first quantity and a second quantity, the first quantity being a chemical bond change quantity corresponding to the first atomic mapping data, and the second quantity being a chemical bond change quantity corresponding to the second atomic mapping data.
[0147] The judging unit 304 is configured to judge whether an atomic mapping relationship corresponding to the first atomic mapping data is correct based on the first quantity and the second quantity.
[0148] The cleaning unit 305 is configured to, if the atomic mapping relationship corresponding to the first atomic mapping data is incorrect, replace the first atomic mapping data contained in the atomic mapping information with the second atomic mapping data, so as to perform data cleaning on the atomic mapping information.
[0149] The data cleaning device provided in the embodiment of the present application can obtain current atomic mapping data of a chemical reaction when an instruction is received, and input a reaction string of the chemical reaction into a reaction mapping model to obtain atomic mapping data processed by the reaction mapping model. Then, the change quantity of a chemical bond in a chemical process reflected by the current atomic mapping data of the chemical reaction is determined, and the change quantity of a chemical bond in a chemical process reflected by the atomic mapping data processed by the reaction mapping model is determined. Based on the change quantities of the chemical bonds reflected by the two atomic mapping data, it is judged whether the atomic mapping relationship corresponding to the current atomic mapping data of the chemical reaction is correct. If not, the atomic mapping data processed is used to replace the current atomic mapping data, so as to perform data cleaning on atomic mapping information corresponding to the chemical reaction. By using the device provided in the embodiment of the present application, atomic mapping data corresponding to a chemical reaction can be obtained by using a reaction mapping model, and whether atomic mapping data of a chemical reaction obtained by rule annotation is correct can be verified. If not, the atomic mapping data can be further corrected, so as to improve the accuracy of atomic mapping information of the chemical reaction and avoid adverse effects on subsequent processing work. On the other hand, the data cleaning work of a large amount of data in a reaction database can be satisfied.
[0150] On the basis of the above device, the device provided by the embodiment of the application further comprises:
[0151] The second determining unit is configured to determine a training sample set, wherein the training sample set comprises reaction strings corresponding to a plurality of sample chemical reactions and atomic mapping data corresponding to each sample chemical reaction.
[0152] The training unit is configured to train a pre-constructed language processing model based on the training sample set, and use the trained language processing model as the reaction mapping model.
[0153] On the basis of the above device, the device provided by the embodiment of the application further comprises that the first determining unit 303 comprises:
[0154] The first determining sub-unit is configured to determine connection information corresponding to each reactant atom corresponding to the first atomic mapping data; the connection information corresponding to each reactant atom comprises information of each reactant atom connected to the reactant atom.
[0155] The second determining sub-unit is configured to determine connection information corresponding to each product atom corresponding to the first atomic mapping data; the connection information corresponding to each product atom comprises information of each product atom connected to the product atom.
[0156] The third determining sub-unit is configured to determine, in each product atom, a product atom corresponding to each reactant atom.
[0157] The fourth determining sub-unit is configured to compare the connection information corresponding to each reactant atom with the connection information corresponding to the product atom corresponding to the reactant atom, to determine a chemical bond generation amount and a chemical bond breaking amount corresponding to each product atom.
[0158] The fifth determining sub-unit is configured to perform summation operation on the chemical bond generation amount and the chemical bond breaking amount corresponding to each product atom, and determine the calculation result as the first quantity.
[0159] On the basis of the above device, the device provided by the embodiment of the application further comprises that the first determining sub-unit comprises:
[0160] The parsing sub-unit is configured to call a preset chemoinformatics tool to parse the first atomic mapping data, to obtain parsing data corresponding to the first atomic mapping data.
[0161] The extraction sub-unit is configured to extract, from the parsing data, identification information corresponding to each reactant atom, wherein the identification information corresponding to each reactant atom comprises an identifier of the reactant atom and identifiers of each reactant atom connected to the reactant atom.
[0162] The sixth determining sub-unit is configured to determine the identification information corresponding to each of the reactant atoms as the connection information corresponding to each of the reactant atoms.
[0163] On the basis of the above device, the device provided by the embodiment of the present application comprises the judging unit 304, which comprises:
[0164] The judging sub-unit is configured to judge whether the second quantity is less than the first quantity.
[0165] The seventh determining sub-unit is configured to determine that the atomic mapping relationship corresponding to the first atomic mapping data is incorrect if the second quantity is less than the first quantity.
[0166] On the basis of the above device, the device provided by the embodiment of the present application comprises the judging unit 304, which further comprises:
[0167] The eighth determining sub-unit is configured to determine that the atomic mapping relationship corresponding to the first atomic mapping data is correct if the second quantity is greater than or equal to the first quantity.
[0168] On the basis of the above device, the device provided by the embodiment of the present application further comprises:
[0169] The data retaining unit is configured to retain the first atomic mapping data in the atomic mapping information if the atomic mapping relationship corresponding to the first atomic mapping data is correct.
[0170] The embodiment of the present application further provides a storage medium, which comprises stored instructions, wherein the instructions are used to control a device where the storage medium is located to perform the data cleaning method.
[0171] The embodiment of the present application further provides an electronic device, a structure diagram of which is shown in FIG. 4. Figure 11 The electronic device comprises a memory 401 and one or more than one instruction 402, wherein the one or more than one instruction 402 is stored in the memory 401 and is configured to be executed by one or more than one processor 403 to perform the following operations:
[0172] When an instruction of performing data cleaning on atomic mapping information corresponding to a chemical reaction is received, first atomic mapping data contained in the atomic mapping information is acquired, the first atomic mapping data is a string obtained by performing atomic mapping annotation processing on a reaction string based on a preset annotation rule, and the reaction string is a simplified molecular linear input specification string corresponding to the chemical reaction.
[0173] The reaction string is input into a pre-established reaction mapping model, and second atomic mapping data corresponding to the chemical reaction is obtained after processing by the reaction mapping model.
[0174] A first quantity and a second quantity are determined, the first quantity being a chemical bond change quantity corresponding to the first atomic mapping data, and the second quantity being a chemical bond change quantity corresponding to the second atomic mapping data;
[0175] Based on the first quantity and the second quantity, it is determined whether the atomic mapping relationship corresponding to the first atomic mapping data is correct.
[0176] If the atomic mapping relationship corresponding to the first atomic mapping data is incorrect, the first atomic mapping data contained in the atomic mapping information is replaced by the second atomic mapping data, so as to perform data cleaning on the atomic mapping information.
[0177] Each of the embodiments in the specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, it is described more simply, and the related parts can be referred to the part of the method embodiment. The above-described system and system embodiment are only illustrative, and the units described as separate components can be or can not be physically separated, and the components displayed as units can be or can not be physical units, that is, they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment scheme. Those skilled in the art can understand and implement without creative labor.
[0178] The skilled person can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical scheme. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0179] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and that the appended claims are intended to cover all such modifications that do not depart from the true spirit and scope of the application. Therefore, the application is not limited to the embodiments shown but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data cleaning method, characterized in that, The method comprises the following steps: When receiving an instruction for data cleaning of atomic mapping information corresponding to a chemical reaction, first atomic mapping data contained in the atomic mapping information is obtained, the first atomic mapping data being a string obtained by performing atomic mapping annotation processing on a reaction string based on a preset annotation rule, the reaction string being a SMILES string corresponding to the chemical reaction; The reaction string is input into a pre-established reaction mapping model, and second atomic mapping data corresponding to the chemical reaction is obtained after processing by the reaction mapping model; A first quantity and a second quantity are determined, the first quantity being a chemical bond change quantity corresponding to the first atomic mapping data, and the second quantity being a chemical bond change quantity corresponding to the second atomic mapping data; Based on the first quantity and the second quantity, it is determined whether the atomic mapping relationship corresponding to the first atomic mapping data is correct; If the atomic mapping relationship corresponding to the first atomic mapping data is incorrect, the first atomic mapping data contained in the atomic mapping information is replaced by the second atomic mapping data, so as to clean the data of the atomic mapping information; The determination of whether the atomic mapping relationship corresponding to the first atomic mapping data is correct comprises: It is determined whether the second quantity is less than the first quantity; If the second quantity is less than the first quantity, it is determined that the atomic mapping relationship corresponding to the first atomic mapping data is incorrect; If the second quantity is greater than or equal to the first quantity, it is determined that the atomic mapping relationship corresponding to the first atomic mapping data is correct.
2. The method of claim 1, wherein, The establishment process of the reaction mapping model comprises: A training sample set is determined, the training sample set comprising reaction strings corresponding to a plurality of sample chemical reactions and atomic mapping data corresponding to each of the sample chemical reactions; Based on the training sample set, a pre-constructed language processing model is trained, and the trained language processing model is used as the reaction mapping model.
3. The method of claim 1, wherein, The determination of the first quantity comprises: The connection information corresponding to each reactant atom corresponding to the first atomic mapping data is determined; the connection information corresponding to each reactant atom comprises information of each reactant atom connected to the reactant atom; The connection information corresponding to each product atom corresponding to the first atomic mapping data is determined; the connection information corresponding to each product atom comprises information of each product atom connected to the product atom; In each of the product atoms, the product atom corresponding to each reactant atom is determined; The connection information corresponding to each reactant atom is compared with the connection information corresponding to the product atom corresponding to the reactant atom, so as to determine the chemical bond formation quantity and the chemical bond breaking quantity corresponding to each product atom; The chemical bond formation quantity and the chemical bond breaking quantity corresponding to each product atom are summed, and the calculation result is determined as the first quantity.
4. The method of claim 3, wherein, The determination of the connection information corresponding to each reactant atom corresponding to the first atomic mapping data comprises: The preset cheminformatics tool is called to analyze the first atom mapping data, and analysis data corresponding to the first atom mapping data is obtained; Identification information corresponding to each of the reactant atoms is extracted from the analysis data, and the identification information corresponding to each of the reactant atoms includes the identification of the reactant atom and the identification of each of the reactant atoms connected to the reactant atom; The extracted identification information corresponding to each of the reactant atoms is determined as connection information corresponding to each of the reactant atoms.
5. The method of claim 1, wherein, Also includes: If the atom mapping relationship corresponding to the first atom mapping data is correct, the first atom mapping data is retained in the atom mapping information.
6. A data cleaning apparatus characterized by comprising: Includes: The first acquisition unit is configured to, when receiving an instruction of data cleaning on atom mapping information corresponding to a chemical reaction, acquire first atom mapping data contained in the current atom mapping information, the first atom mapping data being a string obtained by performing atom mapping annotation processing on a reaction string based on a preset annotation rule, and the reaction string being a simplified molecular linear input specification string corresponding to the chemical reaction; The second acquisition unit is configured to input the reaction string into a pre-established reaction mapping model, and obtain second atom mapping data corresponding to the chemical reaction after processing by the reaction mapping model; The first determination unit is configured to determine a first number and a second number, the first number being a chemical bond change quantity corresponding to the first atom mapping data, and the second number being a chemical bond change quantity corresponding to the second atom mapping data; The judgment unit is configured to judge whether the atom mapping relationship corresponding to the first atom mapping data is correct based on the first number and the second number; The cleaning unit is configured to, if the atom mapping relationship corresponding to the first atom mapping data is incorrect, replace the first atom mapping data contained in the atom mapping information with the second atom mapping data to clean the data of the atom mapping information; The judgment of whether the atom mapping relationship corresponding to the first atom mapping data is correct includes: Judging whether the second number is less than the first number; If the second number is less than the first number, it is determined that the atom mapping relationship corresponding to the first atom mapping data is incorrect; If the second number is greater than or equal to the first number, it is determined that the atom mapping relationship corresponding to the first atom mapping data is correct.
7. A storage medium, characterized by The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located performs the data cleaning method of any one of claims 1-5.
8. An electronic device, comprising: The memory and one or more instructions are included, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the data cleaning method of any one of claims 1-5.
Citation Information
Patent Citations
Improved chemical formula cutting method
CN110379468A
Chemical information extraction method and device, equipment and storage medium
CN112818645A