Model training data generation method and device, equipment and storage medium
By acquiring a set of neutral molecular building blocks and chemical reaction rules, and simulating chemical reactions to generate a training dataset, the problem of low efficiency in manually determining reaction raw materials in synthetic route design is solved, achieving efficient determination of reaction raw materials and flexibility and accuracy of training datasets.
Patent Information
- Application Number
- CN202210405969.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-18
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2042-04-18
AI Technical Summary
In existing technologies, the design of synthetic routes relies on manual determination of reaction raw materials, which is inefficient and has high labor costs.
By acquiring a set of neutral molecular building blocks and chemical reaction rules, a training dataset is generated by simulating chemical reactions. The target products are then deduced to determine the reaction raw materials, reducing manual analysis and processing.
It improves the efficiency of determining reaction raw materials, reduces manpower consumption, supplements the deficiencies of existing datasets, and enhances the flexibility and accuracy of training datasets.
Smart Images

Figure CN115148296B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device and storage medium for generating model training data. Background Technology
[0002] Synthetic route design is the process by which chemists determine how to synthesize a target molecule. In this process, chemists continuously break down the target molecule into intermediates or smaller molecular fragments until commercially available raw materials or molecules known from the literature are found.
[0003] However, relying on manual deduction of raw materials from target molecules is inefficient and labor-intensive. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for generating model training data, which improves the efficiency of determining reaction raw materials and reduces the manpower required in the process. The technical solution is as follows.
[0005] According to one aspect of the embodiments of this application, a method for generating model training data is provided, the method comprising the following steps:
[0006] Obtain a set of neutral molecular building blocks and at least one chemical reaction rule; wherein the set of neutral molecular building blocks includes multiple neutral molecular building blocks, and the chemical reaction rule is used to indicate the type of reactant and the reaction mode;
[0007] In response to the fact that the target neutral molecular building block in the set of neutral molecular building blocks matches the type of reactant indicated by the chemical reaction rule, the target neutral molecular building block is determined to be the reactant corresponding to the chemical reaction rule;
[0008] Based on the reaction mode indicated by the chemical reaction rules, a simulated chemical reaction is performed on the target neutral molecular building block to determine the product generation result corresponding to the target neutral molecular building block;
[0009] Based on the product generation results corresponding to each of the neutral molecular building blocks, a training dataset for the target model is generated, wherein the training dataset includes multiple training data; wherein, each training data includes at least one neutral molecular building block and the product generated by the at least one neutral molecular building block.
[0010] According to one aspect of the embodiments of this application, a model training data generation apparatus is provided, the apparatus comprising the following modules:
[0011] A molecule acquisition module is used to acquire a set of neutral molecule building blocks and at least one chemical reaction rule; wherein the set of neutral molecule building blocks includes multiple neutral molecule building blocks, and the chemical reaction rule is used to indicate the type of reactants and the reaction mode;
[0012] A reactant determination module is used to determine that the target neutral molecular block is a reactant corresponding to the chemical reaction rule in response to a match between the target neutral molecular block in the set of neutral molecular blocks and the type of reactant indicated by the chemical reaction rule.
[0013] The reactant reaction module is used to simulate a chemical reaction on the target neutral molecular building block based on the reaction mode indicated by the chemical reaction rules, and to determine the product generation result corresponding to the target neutral molecular building block;
[0014] The data generation module is used to generate a training dataset for the target model based on the product generation results corresponding to each of the neutral molecular building blocks. The training dataset includes multiple training data sets. Each training data set includes at least one neutral molecular building block and the product generated by the at least one neutral molecular building block.
[0015] According to one aspect of the embodiments of this application, the present application provides a computer device, the computer device including a processor and a memory, the memory storing at least one program, the at least one program being loaded and executed by the processor to implement the above-described method for generating model training data.
[0016] According to one aspect of the embodiments of this application, the embodiments of this application provide a computer-readable storage medium storing at least one program, which is loaded and executed by a processor to implement the above-described method for generating model training data.
[0017] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the above-described method for generating model training data.
[0018] The technical solution provided in this application can bring the following beneficial effects:
[0019] By reverse-engineering the reaction raw materials from the target product using the target model, manual analysis of the target product is eliminated, improving the efficiency of determining the reaction raw materials and reducing manpower consumption in the process. Moreover, by determining the training dataset of the target model using a set of neutral molecular building blocks and chemical reaction rules, the serious deficiencies in existing public datasets regarding cyclization reactions, protection reactions, functional group addition reactions, and transformation reactions are addressed. Furthermore, by adjusting the set of neutral molecular building blocks and / or chemical reaction rules, different training datasets suitable for different target models can be generated, improving the flexibility of training dataset generation. The basis for generating training datasets can be flexibly adjusted according to actual conditions, so that model training is not limited to a limited and single training dataset. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of a model training data generation system provided in one embodiment of this application;
[0021] Figure 2 An exemplary schematic diagram of a system for generating model training data is shown.
[0022] Figure 3 This is a flowchart of a method for generating model training data according to an embodiment of this application;
[0023] Figure 4 An exemplary schematic diagram of a neutral molecular building block matching case is shown;
[0024] Figure 5 This is a block diagram of a model training data generation apparatus provided in one embodiment of this application;
[0025] Figure 6 This is a block diagram of a model training data generation apparatus provided in another embodiment of this application;
[0026] Figure 7 This is a structural block diagram of a computer device provided in one embodiment of this application. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0028] The method for generating model training data in this application involves the following techniques:
[0029] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0030] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0031] Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instruction-based learning.
[0032] With the research and advancement of artificial intelligence (AI) technology, AI is being studied and applied in various fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, and smart customer service. It is believed that with the development of technology, AI will be applied in more fields and play an increasingly important role.
[0033] The solutions provided in this application involve technologies such as machine learning in artificial intelligence. The technical solutions of this application will be described and explained below with reference to several embodiments.
[0034] Please refer to Figure 1 This illustration shows a schematic diagram of a model training data generation system provided in one embodiment of this application. The model training data generation system may include: a terminal 10 and a server 20.
[0035] Terminal 10 can be an electronic device such as a mobile phone, tablet computer, game console, e-book reader, multimedia playback device, wearable device, PC (Personal Computer) and intelligent voice interaction device, and this application embodiment does not limit it.
[0036] Server 20 is used to provide background services for terminal 10. Server 20 can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center. In an exemplary embodiment, server 20 provides background services for multiple terminals 10.
[0037] The aforementioned terminal 10 communicates with the server 20 via a network.
[0038] Optionally, terminal 10 provides configuration parameters to server 20, and server 20 generates training data for the model based on these configuration parameters. Optionally, in this embodiment, the configuration parameters include an initial set of molecular building blocks and at least one chemical reaction rule. For example, as... Figure 2 As shown, terminal 10 provides server 20 with an initial set of molecular building blocks, which includes multiple molecular building blocks. After obtaining the initial set of molecular building blocks, server 20 converts non-neutral building blocks in the initial set into neutral building blocks through desalting. It then removes duplicate neutral molecular building blocks and incorrect neutral molecular building blocks through deduplication and correctness checks, resulting in a set of neutral molecular building blocks, which includes multiple neutral molecular building blocks. Next, server 20 obtains at least one chemical reaction rule from terminal 10 and performs reactant matching and simulated chemical reactions using the at least one chemical reaction rule and the neutral molecular building block set, obtaining multiple chemical reaction data. This chemical reaction data includes a first neutral molecular building block matched based on the chemical reaction rule, and at least one product generation result corresponding to the first neutral molecular building block. Subsequently, using chemical reaction rules as the classification standard, server 20 performs data processing and clustering on the chemical reaction dataset corresponding to each chemical reaction rule to generate the training dataset of the target model. Among them, data processing refers to removing data with the same first neutral molecule building block and different product generation results.
[0039] It should be noted that the above configuration parameters can be manually configured by the user or automatically obtained by the terminal from the network environment; this application embodiment does not limit this. That is to say, in this application embodiment, the above initial molecular building block set can be manually configured by the user or automatically obtained from the network environment; moreover, similarly, the above chemical reaction rules can be manually configured by the user or automatically obtained from the network environment; this application embodiment does not limit this.
[0040] One more point to note is that the above... Figure 2 The descriptions provided are merely exemplary and explanatory. In exemplary embodiments, the functions of terminal 10 and server 20 can be flexibly configured and adjusted, and this application embodiment does not limit this. For example, if the load of terminal 10 allows, server 20 is not required, and only terminal 10 performs the above steps to obtain the training dataset of the target model; or, server 20 performs the above steps alone to obtain the training dataset of the target model, and this application embodiment does not limit this.
[0041] Please refer to Figure 3 The diagram illustrates a flowchart of a method for generating model training data according to an embodiment of this application. This method can be applied to the aforementioned model training data generation system, and the execution entity for each step in this method can be as described above. Figure 1 The terminal 10 and / or server 20 in the embodiment (hereinafter collectively referred to as "computer device"). The method may include at least one of the following steps (301-304):
[0042] Step 301: Obtain a set of neutral molecular building blocks and at least one chemical reaction rule.
[0043] In this embodiment of the application, the computer device generates a training dataset for the target model based on a set of neutral molecular building blocks and chemical reaction rules.
[0044] The set of neutral molecular building blocks includes multiple neutral molecular building blocks. Optionally, when a computer device acquires the set of neutral molecular building blocks, it can directly acquire the set of neutral molecular building blocks, or it can acquire the set of neutral molecular building blocks by processing the initial set of molecular building blocks. This application embodiment does not limit this.
[0045] In one possible implementation, the computer device can directly acquire the set of neutral molecular building blocks without additional data processing. Optionally, the set of neutral molecular building blocks can be a data set acquired in real time or a data set pre-stored on a local device; this embodiment does not limit this. Optionally, when acquiring the set of neutral molecular building blocks, the computer device can directly acquire it from the network environment using web crawler technology, or it can acquire it from a fixed storage location according to an address configured by the user; this embodiment does not limit this.
[0046] In another possible implementation, the computer device first acquires an initial set of molecular building blocks, and then converts the non-neutral molecular building blocks in the initial set into neutral molecular building blocks to obtain a set of neutral molecular building blocks. Optionally, the initial set of molecular building blocks can be a set of data acquired in real time, or it can be a set of data pre-stored on a local device; this application embodiment does not limit this.
[0047] Chemical reaction rules are used to indicate the types of reactants and the reaction mode. Optionally, the chemical reaction rules can be data acquired in real time or data pre-stored locally; this application embodiment does not limit this.
[0048] Optionally, in the embodiments of this application, the above-mentioned chemical reaction rules include, but are not limited to, at least one of the following: cyclization reaction rules, protection reaction rules, functional group addition reaction rules, and transformation reaction rules. In one possible implementation, in order to improve the specificity of the training dataset, the above-mentioned chemical reaction rules include one type of chemical reaction rule; in another possible implementation, in order to improve the breadth of the training dataset, the above-mentioned chemical reaction rules include multiple different types of chemical reaction rules.
[0049] Step 302: In response to the match between the target neutral molecular building block in the set of neutral molecular building blocks and the type of reactant indicated by the chemical reaction rule, the target neutral molecular building block is determined to be the reactant corresponding to the chemical reaction rule.
[0050] In this embodiment of the application, after the computer device obtains the set of neutral molecular building blocks and the chemical reaction rule, it matches the neutral molecular building blocks in the set of neutral molecular building blocks based on the type of reactant indicated by the chemical reaction rule. If the target neutral molecular building block in the set of neutral molecular building blocks matches the type of reactant indicated by the chemical reaction rule, the target neutral molecular building block is determined to be the reactant corresponding to the chemical reaction rule.
[0051] Optionally, during the matching process, the computer device invokes a reactant matching program to match the molecular building blocks in the aforementioned set of neutral molecular building blocks with the chemical reaction rules, determining the configuration relationship between each chemical reaction rule and the neutral molecular building blocks in the set of neutral molecular building blocks. This reactant matching program can be a pre-prepared program or a program configured in real-time based on the set of neutral molecular building blocks and the chemical reaction rules; this embodiment of the application does not limit this approach.
[0052] Optionally, during the matching process, the above-mentioned chemical reaction rules can be fixed or flexible; similarly, the above-mentioned set of neutral molecular building blocks can be fixed or flexible.
[0053] In one possible implementation, to make the training dataset more targeted, the aforementioned chemical reaction rules are fixed, while the set of neutral molecule building blocks is flexible. Optionally, during the matching process, matching is performed based on the chemical reaction rules. If some neutral molecule building blocks in the set cannot match any of the aforementioned chemical reaction rules, the neutral molecule building blocks are adjusted, and the unmatched neutral molecule building blocks are removed from the set. For example, as shown... Figure 4 As shown, if approximately 48,000 neutral molecule building blocks cannot be matched with a chemical reaction rule, these 48,000 neutral molecule building blocks are removed. It should be noted that this adjustment to the set of neutral molecule building blocks is only for this specific matching process; the adjusted set of neutral molecule building blocks is only used in this matching and is not recorded or used for other purposes.
[0054] In another possible implementation, to make the training dataset more comprehensive, the chemical reaction rules are flexible, while the set of neutral molecule building blocks remains fixed. Optionally, during the matching process, the set of neutral molecule building blocks is used as the standard for matching. If some neutral molecule building blocks in the set cannot be matched with any of the above chemical reaction rules, a new chemical reaction rule is obtained and matched with the unmatched neutral molecule building blocks. Of course, in the exemplary embodiment, if a chemical reaction rule cannot be matched with any neutral molecule building block in the set, the chemical reaction rule is removed in this matching. It should be noted that, unlike the adjustment types for the neutral molecule building block set described above, the adjustment for the chemical reaction rules here only applies to this matching.
[0055] It should be noted that, in the embodiments of this application, the type of reactant indicated by the chemical reaction rule can be one or more, and this embodiment of the application does not limit this. For example, during the matching process, a chemical reaction rule can match one or more neutral molecular building blocks. In the case where a chemical reaction rule matches multiple neutral molecular building blocks, these multiple neutral molecular building blocks can be neutral molecular building blocks of different types or neutral molecular building blocks of the same type; this embodiment of the application does not limit this. It should be noted that, after matching, for the type of reactant indicated by the chemical reaction rule, there must be at least one matching neutral molecular building block.
[0056] Step 303: Based on the reaction mode indicated by the chemical reaction rules, simulate the chemical reaction of the target neutral molecular building block to determine the product generation result corresponding to the target neutral molecular building block.
[0057] In this embodiment, after the computer device matches the reactants corresponding to the chemical reaction rule, it performs a simulated chemical reaction on the target neutral molecular building block based on the reaction mode indicated by the chemical reaction rule, and determines the product generation result corresponding to the target neutral molecular building block. The product generation result includes one or more products, which is not limited in this embodiment. In one possible implementation, the product generation result is used to indicate the type of product generated by the neutral molecular building block, so a product generation result includes one product generated by the neutral molecular building block. In another possible implementation, the product generation result is used to indicate the product generated by the neutral molecular building block in one simulated chemical reaction, so a product generation result includes the product generated by the neutral molecular building block in this simulated chemical reaction; in this case, the number of products can be one or more.
[0058] Optionally, during the simulated chemical reaction, the computer device invokes a chemical reaction simulation program to simulate the chemical reaction of the target neutral molecular building blocks based on the reaction mode indicated by the chemical reaction rules, thereby determining the product generation result corresponding to the target neutral molecular building blocks. This chemical reaction simulation program can be a pre-prepared program or a program configured in real-time based on actual reference factors; this embodiment does not limit the specific program. Optionally, the aforementioned actual reference factors include, but are not limited to, at least one of the following: a set of neutral molecular building blocks, chemical reaction rules, and the matching result between the set of neutral molecular building blocks and the chemical reaction rules.
[0059] Optionally, the above chemical reaction rules also include product formation rules. The target product formation rule indicates the product that can be formed after the target reactants undergo the target chemical reaction. For example, this product formation rule is used to assist in determining the product formation result during a simulated chemical reaction.
[0060] Step 304: Generate the training dataset for the target model based on the product generation results corresponding to each neutral molecular building block.
[0061] In this embodiment, after acquiring the product generation results corresponding to the neutral molecular building blocks, the computer device generates a training dataset for the target model based on the product generation results corresponding to each neutral molecular building block. The target model is used to inversely deduce the reaction raw materials based on the target products, which are the aforementioned neutral molecular building blocks. The training dataset includes multiple training data sets, each including at least one neutral molecular building block and the product generated by at least one neutral molecular building block.
[0062] In one possible implementation, the products included in the training dataset are the same as the product generation results described above. Optionally, after obtaining the product generation results corresponding to each neutral molecular building block, the computer device directly determines the product generation results as products and generates a training dataset based on the relationship between the product generation results and the neutral molecular building blocks.
[0063] Optionally, taking a target chemical reaction rule as an example, the computer device acquires a chemical reaction dataset corresponding to the target chemical reaction rule. The chemical reaction dataset includes at least one chemical reaction data. A chemical reaction data includes: a first neutral molecule building block obtained based on the target chemical reaction rule, and at least one product generation result corresponding to the first neutral molecule building block.
[0064] In one possible implementation, after acquiring the chemical reaction dataset corresponding to the target reaction rule, the computer device removes data from the chemical reaction dataset that have the same first neutral molecular building blocks (i.e., the same reactants) but different product generation results (i.e., different products) during the data processing process, and then generates a training dataset corresponding to the target chemical reaction rule based on the processed chemical reaction dataset.
[0065] In another possible implementation, after the computer device acquires the chemical reaction dataset corresponding to the target reaction rule, during the data processing, it performs clustering processing on the chemical reaction dataset based on the similarity of the product generation results of each chemical reaction data in the chemical reaction dataset to obtain at least one chemical reaction data class. Then, based on at least one chemical reaction data located at the cluster center of the chemical reaction data class, it generates a training dataset corresponding to the target chemical reaction rule.
[0066] The aforementioned target chemical reaction rule refers to any one of the at least one chemical reaction rule mentioned above. In this embodiment, the training dataset of the target model includes training datasets corresponding to each chemical reaction rule.
[0067] Optionally, the training data may contain one or more products. For example, if the target model can determine the reactants based on multiple target products, the training data may contain multiple products. In this case, the multiple products can be understood as a pair of products generated by the reactants in a simulated chemical reaction. If the target model can only determine the reactants based on one target product, the training data may contain one product. In this case, the one product can be understood as a certain type of product generated by the reactants.
[0068] Optionally, in the embodiments of this application, during the generation of the training dataset, the computer device may generate a table for data recording.
[0069] Optionally, the computer device generates a first data recording table based on the product generation results corresponding to each neutral molecular building block. This first data recording table records the number of neutral molecular building blocks of each type matched for each chemical reaction rule, as well as the number of product generation results obtained through simulated chemical reactions, categorized by chemical reaction rules. For example, the first data recording table is shown in Table 1 below:
[0070] Table 1 First Data Record Table
[0071]
[0072]
[0073] Optionally, the computer device generates a second data recording table based on the training dataset of the target model. This second data recording table records the quantity of each type of reactant corresponding to each chemical reaction rule in the training dataset of the target model, and the quantity of products generated through simulated chemical reactions, categorized by chemical reaction rules. For example, the second data recording table is shown in Table 2 below:
[0074] Table 2, Second Data Record Table
[0075]
[0076]
[0077] It should be noted that the above description of the target model is merely exemplary and explanatory. In exemplary embodiments, the function of the target model can be flexibly set and adjusted according to actual conditions. For example, the target model can also be used to determine the target product based on the reactants, and this application does not limit this.
[0078] In summary, the technical solution provided in this application reverse-engineers the reaction raw materials based on the target product using the target model, eliminating the need for manual analysis of the target product, thus improving the efficiency of determining the reaction raw materials and reducing manpower consumption in the process. Furthermore, by determining the training dataset for the target model using a set of neutral molecular building blocks and chemical reaction rules, it addresses the serious deficiencies in existing publicly available datasets regarding cyclization reactions, protection reactions, functional group addition reactions, and transformation reactions. The range of chemical reactions used in the training dataset is constrained by chemical reaction rules, improving the relevance of the training dataset and consequently the relevance of the target model. Based on the matching relationship between the neutral molecular building blocks and the reactant types in the chemical reaction rules, the product generation results corresponding to each neutral molecular building block are determined, providing a reliable source for both reactants and products in the training data, improving the accuracy of the training dataset, and consequently the accuracy of the target model. Additionally, by adjusting the set of neutral molecular building blocks and / or chemical reaction rules, different training datasets suitable for different target models can be generated, increasing the flexibility of training dataset generation. The basis for generating the training dataset can be flexibly adjusted according to actual conditions, ensuring that model training is not limited to a finite and singular training dataset.
[0079] The following section describes how the training dataset was obtained.
[0080] In an exemplary embodiment, step 304 above includes at least one of the following steps:
[0081] 1. Based on the product generation results corresponding to each neutral molecule building block, obtain the chemical reaction dataset corresponding to each chemical reaction rule.
[0082] In this embodiment of the application, after acquiring the product generation results corresponding to each neutral molecule building block, the computer device acquires the chemical reaction dataset corresponding to each chemical reaction rule. Taking the target chemical reaction rule as an example, the chemical reaction dataset corresponding to the target chemical reaction rule includes at least one chemical reaction data, which includes: a first neutral molecule building block obtained based on the target chemical reaction rule, and at least one product generation result corresponding to the first neutral molecule building block.
[0083] 2. Remove data from the chemical reaction dataset corresponding to the target chemical reaction rule that have the same first neutral molecule building block but different product formation results, and obtain the processed chemical reaction dataset corresponding to the target chemical reaction rule.
[0084] In this embodiment of the application, the computer device acquires the chemical reaction datasets corresponding to each of the above-mentioned chemical reaction rules, uses the chemical reaction rules as the classification standard, processes the chemical reaction datasets corresponding to each chemical reaction rule, removes data with the same first neutral molecule building blocks and different product generation results, so as to obtain the processed chemical reaction data corresponding to each chemical reaction rule.
[0085] In one possible implementation, during the data processing, for the chemical reaction dataset corresponding to the target chemical reaction rule, the number of product generation results for each chemical reaction data is obtained; chemical reaction data with a result number of not equal to one is removed, and chemical reaction data with a result number of one is retained, to obtain the processed chemical reaction dataset corresponding to the target chemical reaction rule.
[0086] In another possible implementation, during data processing, for the chemical reaction dataset corresponding to the target chemical reaction rule, the number of product generation results for each chemical reaction data is obtained. Further, for target chemical reaction data with multiple result counts, multiple split chemical reaction data are obtained based on the splitting of the target chemical reaction data. The split chemical reaction data includes groups split from the first neutral molecule building block and the product generation results corresponding to those groups. In this case, the processed chemical reaction dataset corresponding to the target chemical reaction rule includes: multiple split chemical reaction data, and chemical reaction data with a single result count.
[0087] 3. Based on the processed chemical reaction datasets corresponding to each chemical reaction rule, generate the training dataset for the target model.
[0088] In this embodiment of the application, the computer device generates a training dataset for the target model based on the processed chemical reaction dataset corresponding to each chemical reaction rule.
[0089] Optionally, for the target chemical reaction rule, the computer device performs clustering on the processed chemical reaction dataset corresponding to the target chemical reaction rule based on the similarity of the product generation results of each processed chemical reaction data in the dataset, obtaining at least one chemical reaction data class. Then, based on at least one processed chemical reaction data located at the cluster center of the chemical reaction data class, a training dataset corresponding to the target chemical reaction rule is generated. The training dataset includes at least one training data set. The training dataset for the target model includes training datasets corresponding to each chemical reaction rule.
[0090] In summary, the technical solution provided in this application removes data from the chemical reaction dataset that has the same reactants and the same chemical reaction rules but different products. The training dataset for the target model is generated based on the processed chemical reaction dataset, which improves the accuracy of the training dataset. This effectively reduces the influence of competing reactions on the model training process, avoids the situation where the same input corresponds to different labels during training, and improves the accuracy of the target model after training.
[0091] In another scenario, data with the same reactants and chemical reaction rules but different products can be directly discarded from the chemical reaction dataset, simplifying the operation and reducing the computational load on computer equipment. In yet another scenario, data with the same reactants and chemical reaction rules but different products can be split, and the product generation results can be directly correlated with the functional groups of neutral molecular building blocks, increasing the amount of data contained in the training dataset and thus improving the accuracy of model training.
[0092] The following section describes how the above-mentioned set of neutral molecular building blocks was obtained.
[0093] In an exemplary embodiment, step 301 above includes at least one of the following steps:
[0094] 1. Obtain the initial set of molecular building blocks.
[0095] The initial set of molecular building blocks includes multiple molecular building blocks, among which are neutral and non-neutral molecular building blocks. Optionally, the initial molecular building blocks can be data acquired in real time or pre-stored data; this embodiment of the application does not limit this.
[0096] Optionally, when obtaining the initial set of molecular building blocks, the computer device can obtain them directly from the network environment using web crawler technology, or it can obtain them from a fixed storage location based on the address configured by the user. This application embodiment does not limit this.
[0097] 2. Call the molecular block conversion program to convert the non-neutral molecular blocks in the initial molecular block set into neutral molecular blocks, and obtain the converted molecular block set.
[0098] Optionally, after obtaining the initial molecular building block set, the computer device performs desalting processing on the molecular building blocks in the initial molecular building block set, converting the non-neutral molecular building blocks into neutral molecular building blocks, to obtain the converted molecular building block set.
[0099] In this embodiment, a computer device invokes a molecular building block conversion program to convert non-neutral molecular building blocks in the initial molecular building block set into neutral molecular building blocks, thereby obtaining a converted molecular building block set. This molecular building block conversion program can be a pre-prepared program or a program configured in real-time based on the initial molecular building block set; this embodiment does not limit the specific program.
[0100] Optionally, in the embodiments of this application, during the desalting process, the computer device calls the molecular building block conversion program to remove the metal cations, ammonium ions, acid radicals and halogens contained in the molecular building blocks of the initial molecular building block set, to obtain a pre-treated molecular building block set; further, for the pre-treated molecular building block set, the neutral solvent molecules in the pre-treated molecular building block set are removed to obtain the converted molecular building block set.
[0101] It should be noted that when removing the above-mentioned neutral solvent molecules, the computer device may call the above-mentioned molecular building block conversion program to remove the neutral solvent molecules, or it may call other programs other than the molecular building block conversion program to remove the above-mentioned neutral solvent molecules. This application embodiment does not limit this.
[0102] 3. Remove the duplicate neutral molecular blocks from the transformed molecular block set to obtain the deduplicated molecular block set.
[0103] In this embodiment, after obtaining the converted molecular building block set, the computer device removes duplicate neutral molecular building blocks from the converted set to obtain a deduplicated molecular building block set. Optionally, the computer device calls a molecular building block deduplication program to remove duplicate neutral molecular building blocks from the converted set. The molecular building block deduplication program can be a pre-prepared program or a program configured in real-time.
[0104] 4. Remove the incorrect neutral molecular blocks from the deduplicated molecular block set to obtain the neutral molecular block set.
[0105] In this embodiment, after obtaining the deduplicated molecular building block set, the computer device removes incorrect neutral molecular building blocks from the deduplicated molecular building block set to obtain a neutral molecular building block set. Optionally, the computer device calls a molecular building block verification program to remove incorrect neutral molecular building blocks from the deduplicated molecular building block set. The molecular building block verification program can be a pre-prepared program or a program configured in real-time.
[0106] In summary, the technical solution provided in this application converts non-neutral molecular blocks in the initial molecular block set into neutral molecular blocks by removing metal cations, ammonium ions, acid radicals, and halogens. This avoids the impact of similar molecular blocks on the subsequent training dataset generation process and improves the accuracy of the training dataset generation. For example, for neutral molecular blocks, the presence of different metal cations or acid radicals can cause a neutral molecular block to become multiple non-neutral molecular blocks. However, the core structure of the neutral molecular blocks and the multiple non-neutral molecular blocks remains unchanged. During simulated chemical reactions, similar product generation results will be generated, affecting the accuracy of the training dataset. Therefore, performing desalting, deduplication, and correctness checks on the initial molecular block set can effectively reduce the impact and overhead of unnecessary data on the training data generation process, improving the accuracy and generation efficiency of the training dataset.
[0107] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0108] Please refer to Figure 5 This diagram illustrates a block diagram of a model training data generation apparatus according to an embodiment of this application. The apparatus has the function of implementing the above-described model training data generation method; this function can be implemented in hardware or by hardware executing corresponding software. The apparatus 500 can be a computer device or can be installed within a computer device. The apparatus 500 may include: a molecule acquisition module 510, a reactant determination module 520, a reactant reaction module 530, and a data generation module 540.
[0109] The molecule acquisition module 510 is used to acquire a set of neutral molecule building blocks and at least one chemical reaction rule; wherein the set of neutral molecule building blocks includes multiple neutral molecule building blocks, and the chemical reaction rule is used to indicate the type of reactant and the reaction mode.
[0110] The reactant determination module 520 is used to determine that the target neutral molecular block is a reactant corresponding to the chemical reaction rule in response to the match between the target neutral molecular block in the set of neutral molecular blocks and the type of reactant indicated by the chemical reaction rule.
[0111] The reactant reaction module 530 is used to simulate a chemical reaction on the target neutral molecular building block based on the reaction mode indicated by the chemical reaction rules, and to determine the product generation result corresponding to the target neutral molecular building block.
[0112] The data generation module 540 is used to generate a training dataset for the target model based on the product generation results corresponding to each of the neutral molecular building blocks. The training dataset includes multiple training data. Each training data includes at least one neutral molecular building block and the product generated by the at least one neutral molecular building block.
[0113] In an exemplary embodiment, the data generation module 540 includes:
[0114] The dataset generation unit is used to obtain chemical reaction datasets corresponding to each of the chemical reaction rules based on the product generation results corresponding to each of the neutral molecule building blocks; wherein, the chemical reaction dataset corresponding to the target chemical reaction rule includes at least one chemical reaction data, the chemical reaction data including: a first neutral molecule building block obtained by matching based on the target chemical reaction rule, and at least one product generation result corresponding to the first neutral molecule building block.
[0115] The data processing unit is used to remove data with the same first neutral molecule building block and different product generation results from the chemical reaction dataset corresponding to the target chemical reaction rule, so as to obtain the processed chemical reaction dataset corresponding to the target chemical reaction rule.
[0116] The data generation unit is used to generate the training dataset of the target model based on the processed chemical reaction datasets corresponding to each of the chemical reaction rules.
[0117] In an exemplary embodiment, the data processing unit is configured to, for the chemical reaction dataset corresponding to the target chemical reaction rule, obtain the number of product generation results for each of the chemical reaction data; remove chemical reaction data whose number of results is not one, and retain chemical reaction data whose number of results is one, to obtain the processed chemical reaction dataset corresponding to the target chemical reaction rule.
[0118] In an exemplary embodiment, the data processing unit is configured to, for the chemical reaction dataset corresponding to the target chemical reaction rule, obtain the number of product generation results for each of the chemical reaction data; for target chemical reaction data where the number of results is not one, obtain multiple split chemical reaction data obtained based on the splitting of the target chemical reaction data; wherein, the split chemical reaction data includes groups obtained from the first neutral molecular building block and the product generation results corresponding to the groups; wherein, the processed chemical reaction dataset corresponding to the target chemical reaction rule includes: the multiple split chemical reaction data, and the chemical reaction data where the number of results is one.
[0119] In an exemplary embodiment, the data generation unit is configured to perform clustering processing on the processed chemical reaction dataset corresponding to the target chemical reaction rule based on the similarity of the product generation results of each processed chemical reaction data in the processed chemical reaction dataset corresponding to the target chemical reaction rule, to obtain at least one chemical reaction data class; and generate a training dataset corresponding to the target chemical reaction rule based on at least one processed chemical reaction data located at the cluster center of the chemical reaction data class, the training dataset including at least one training data; wherein, the training dataset of the target model includes training datasets corresponding to each of the chemical reaction rules respectively.
[0120] In an exemplary embodiment, the molecule acquisition module 510 is configured to acquire an initial molecular block set, the initial molecular block set including multiple molecular blocks; call a molecular block conversion program to convert non-neutral molecular blocks in the initial molecular block set into neutral molecular blocks, obtaining a converted molecular block set; remove duplicate neutral molecular blocks in the converted molecular block set, obtaining a deduplicated molecular block set; and remove incorrect neutral molecular blocks in the deduplicated molecular block set, obtaining the neutral molecular block set.
[0121] In an exemplary embodiment, the molecule acquisition module 510 is further configured to call the molecule building block conversion program to remove metal cations, ammonium ions, acid radicals and halogens contained in the molecular building blocks of the initial molecular building block set, to obtain a pre-processed molecular building block set; and to remove neutral solvent molecules from the pre-processed molecular building block set to obtain the converted molecular building block set.
[0122] In an exemplary embodiment, such as Figure 6 As shown, the device 500 further includes a table generation unit 550.
[0123] The table generation unit 550 is used to generate a first data recording table based on the product generation results corresponding to each of the neutral molecular building blocks; wherein, the first data recording table is used to record the number of neutral molecular building blocks of each type matched by each chemical reaction rule, and the number of product generation results obtained by simulating chemical reactions, based on the chemical reaction rules as the classification standard.
[0124] In an exemplary embodiment, the table generation unit 550 is further configured to generate a second data recording table based on the training dataset of the target model; wherein the second data recording table is configured to record the number of reactants of each type corresponding to each chemical reaction rule in the training dataset of the target model, and the number of product generation results obtained by simulating chemical reactions, using the chemical reaction rules as the classification criteria.
[0125] In an exemplary embodiment, the chemical reaction rules include at least one of the following: cyclization reaction rules, protection reaction rules, functional group addition reaction rules, and transformation reaction rules.
[0126] In summary, the technical solution provided in this application reverse-engineers the reaction raw materials based on the target product using the target model, eliminating the need for manual analysis of the target product, thus improving the efficiency of determining the reaction raw materials and reducing manpower consumption in the process. Furthermore, by determining the training dataset for the target model using a set of neutral molecular building blocks and chemical reaction rules, it addresses the serious deficiencies in existing publicly available datasets regarding cyclization reactions, protection reactions, functional group addition reactions, and transformation reactions. The range of chemical reactions used in the training dataset is constrained by chemical reaction rules, improving the relevance of the training dataset and consequently the relevance of the target model. Based on the matching relationship between the neutral molecular building blocks and the reactant types in the chemical reaction rules, the product generation results corresponding to each neutral molecular building block are determined, providing a reliable source for both reactants and products in the training data, improving the accuracy of the training dataset, and consequently the accuracy of the target model. Additionally, by adjusting the set of neutral molecular building blocks and / or chemical reaction rules, different training datasets suitable for different target models can be generated, increasing the flexibility of training dataset generation. The basis for generating the training dataset can be flexibly adjusted according to actual conditions, ensuring that model training is not limited to a finite and singular training dataset.
[0127] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0128] Please refer to Figure 7 This diagram illustrates the structural block diagram of a computer device provided in one embodiment of this application. This computer device can be used to implement the functions of the above-described method for generating model training data. Specifically:
[0129] Computer device 700 includes a central processing unit (CPU) 701, a system memory 704 including random access memory (RAM) 702 and read-only memory (ROM) 703, and a system bus 705 connecting the system memory 704 and the CPU 701. Computer device 700 also includes a basic input / output system (I / O system) 706 that facilitates information transfer between various devices within the computer, and a mass storage device 707 for storing the operating system 713, application programs 714, and other program modules 715.
[0130] The basic input / output system 706 includes a display 708 for displaying information and an input device 709 for user input, such as a mouse or keyboard. Both the display 708 and the input device 709 are connected to the central processing unit 701 via an input / output controller 710 connected to the system bus 705. The basic input / output system 706 may also include the input / output controller 710 for receiving and processing input from multiple other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 710 also provides output to a display screen, printer, or other types of output devices.
[0131] Mass storage device 707 is connected to central processing unit 701 via a mass storage controller (not shown) connected to system bus 705. Mass storage device 707 and its associated computer-readable media provide non-volatile storage for computer device 700. That is, mass storage device 707 may include computer-readable media (not shown) such as hard disk or CD-ROM (CompactDisc Read-Only Memory) drive.
[0132] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory or other solid-state storage devices, CD-ROM, DVD (Digital Video Disc) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that computer storage media are not limited to the above-mentioned types. The system memory 704 and mass storage device 707 described above can be collectively referred to as memory.
[0133] According to various embodiments of this application, the computer device 700 can also be connected to a remote computer on a network, such as the Internet, for operation. That is, the computer device 700 can be connected to a network 712 via a network interface unit 711 connected to the system bus 705, or the network interface unit 711 can be used to connect to other types of networks or remote computer systems (not shown).
[0134] The memory also includes a computer program stored in the memory and configured to be executed by one or more processors to implement the above-described method for generating model training data.
[0135] In an exemplary embodiment, a computer-readable storage medium is also provided, the storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set, when executed by a processor, implements the above-described method for generating model training data.
[0136] Optionally, the computer-readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State Drives), or optical disc, etc. The random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0137] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method for generating the model training data described above.
[0138] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.
[0139] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for generating model training data, the method comprising: The method comprises: acquiring a neutral molecular block set and at least one chemical reaction rule; wherein the neutral molecular block set comprises a plurality of neutral molecular blocks, the neutral molecular block set is processed by desalting, deduplication and correctness verification, and the chemical reaction rule is used to indicate the type and reaction mode of reactants; in response to a target neutral molecular block in the neutral molecular block set matching the type of reactants indicated by the chemical reaction rule, determining that the target neutral molecular block is a reactant corresponding to the chemical reaction rule, in the matching process, matching based on the chemical reaction rule, if part of the neutral molecular blocks in the neutral molecular block set cannot match any of the chemical reaction rules, removing the neutral molecular blocks that cannot be matched; or, in the matching process, matching based on the neutral molecular block set, if part of the neutral molecular blocks in the neutral molecular block set cannot match any of the chemical reaction rules, acquiring new chemical reaction rules to match the neutral molecular blocks that cannot be matched; based on the reaction mode indicated by the chemical reaction rule, performing a simulated chemical reaction on the target neutral molecular block to determine the product generation result corresponding to the target neutral molecular block; based on the product generation result corresponding to each of the neutral molecular blocks, acquiring a chemical reaction data set corresponding to each of the chemical reaction rules; wherein the chemical reaction data set corresponding to a target chemical reaction rule comprises at least one chemical reaction data, and the chemical reaction data comprises a first neutral molecular block matched based on the target chemical reaction rule and at least one product generation result corresponding to the first neutral molecular block; for the chemical reaction data set corresponding to the target chemical reaction rule, acquiring the number of results of the product generation results of each of the chemical reaction data; for the target chemical reaction data whose result number is not one, acquiring a plurality of split chemical reaction data based on splitting the target chemical reaction data; wherein the split chemical reaction data comprises a group split from the first neutral molecular block and a product generation result corresponding to the group, and the processed chemical reaction data set corresponding to the target chemical reaction rule comprises the plurality of split chemical reaction data and the chemical reaction data whose result number is one; based on the processed chemical reaction data set corresponding to each of the chemical reaction rules, generating a training data set of a target model, and the training data set comprises a plurality of training data.
2. The method of claim 1, wherein, The method comprises: based on the similarity of the product generation results of each of the processed chemical reaction data in the processed chemical reaction data set corresponding to the target chemical reaction rule, performing clustering processing on the processed chemical reaction data set corresponding to the target chemical reaction rule to obtain at least one chemical reaction data class; generate a training data set corresponding to the target chemical reaction rule based on at least one processed chemical reaction data located at a cluster center of the chemical reaction data class, the training data set comprising at least one training data; wherein the training data set of the target model comprises a training data set corresponding to each of the chemical reaction rules.
3. The method of claim 1, wherein, The method further comprises: obtaining an initial set of molecular building blocks, the initial set of molecular building blocks comprising a plurality of molecular building blocks; calling a molecular building block conversion program to convert non-neutral molecular building blocks in the initial set of molecular building blocks into neutral molecular building blocks to obtain a converted set of molecular building blocks; removing duplicate neutral molecular building blocks in the converted set of molecular building blocks to obtain a deduplicated set of molecular building blocks; removing incorrect neutral molecular building blocks in the deduplicated set of molecular building blocks to obtain the set of neutral molecular building blocks.
4. The method of claim 3, wherein, The method further comprises: calling the molecular building block conversion program to remove metal cations, ammonium ions, acid ions, and halogens contained in the molecular building blocks in the initial set of molecular building blocks to obtain a preliminarily processed set of molecular building blocks; removing neutral solvent molecules in the preliminarily processed set of molecular building blocks to obtain the converted set of molecular building blocks.
5. The method according to any one of claims 1 to 4, characterized in that, The method further comprises: generating a first data record table based on product generation results corresponding to each of the neutral molecular building blocks; wherein the first data record table is used to record, as a classification standard, the number of each type of neutral molecular building block matched by each chemical reaction rule and the number of product generation results obtained by simulating chemical reactions.
6. The method according to any one of claims 1 to 5, characterized in that, The method further comprises: generating a second data record table based on the training data set of the target model; wherein the second data record table is used to record, as a classification standard, the number of each type of reactant corresponding to each chemical reaction rule in the training data set of the target model and the number of product generation results obtained by simulating chemical reactions.
7. The method according to any one of claims 1 to 6, characterized in that, The chemical reaction rule comprises at least one of the following: a ring-forming reaction rule, a protection reaction rule, a functional group addition reaction rule, and a transformation reaction rule.
8. A device for generating model training data, characterized in that, The apparatus comprises: a molecule obtaining module configured to obtain a set of neutral molecular building blocks and at least one chemical reaction rule; wherein the set of neutral molecular building blocks comprises a plurality of neutral molecular building blocks, the set of neutral molecular building blocks being processed by desalting, deduplication, and correctness verification, and the chemical reaction rule is used to indicate the type and reaction mode of reactants. The reactant determination module is configured to determine the target neutral molecular block as a reactant corresponding to the chemical reaction rule in response to a target neutral molecular block in the set of neutral molecular blocks matching a type of reactant indicated by the chemical reaction rule. In the matching process, the matching is performed based on the chemical reaction rule, and if some neutral molecular blocks in the set of neutral molecular blocks cannot match any of the chemical reaction rules, the neutral molecular blocks that cannot match are removed. Alternatively, in the matching process, the matching is performed based on the set of neutral molecular blocks, and if some neutral molecular blocks in the set of neutral molecular blocks cannot match any of the chemical reaction rules, new chemical reaction rules are obtained to match the neutral molecular blocks that cannot match. The reactant reaction module is configured to perform a simulated chemical reaction on the target neutral molecular block based on a reaction mode indicated by the chemical reaction rule, and determine a product generation result corresponding to the target neutral molecular block. The data generation module is configured to obtain a chemical reaction data set corresponding to each of the chemical reaction rules based on the product generation result corresponding to each of the neutral molecular blocks. The chemical reaction data set corresponding to a target chemical reaction rule includes at least one chemical reaction data, and the chemical reaction data includes a first neutral molecular block obtained based on the target chemical reaction rule and at least one product generation result corresponding to the first neutral molecular block. The data generation module is further configured to obtain a result quantity of the product generation result of each of the chemical reaction data for the chemical reaction data set corresponding to the target chemical reaction rule, and obtain a plurality of split chemical reaction data based on splitting of the target chemical reaction data, for the target chemical reaction data with the result quantity not being one. The split chemical reaction data includes a group split from the first neutral molecular block and a product generation result corresponding to the group, and the processed chemical reaction data set corresponding to the target chemical reaction rule includes the plurality of split chemical reaction data and the chemical reaction data with the result quantity being one. The data generation module is further configured to generate a training data set of a target model based on the processed chemical reaction data set corresponding to each of the chemical reaction rules. The training data set includes a plurality of training data.
9. A computer device, comprising: The computer device includes a processor and a memory. The memory stores a computer program. The computer program is loaded and executed by the processor to implement the model training data generation method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program. The computer program is loaded and executed by the processor to implement the model training data generation method of any one of claims 1 to 7.
11. A computer program product, characterised in that, The computer program product includes a computer program stored in a computer readable storage medium. The processor reads and executes the computer program from the computer readable storage medium to implement the model training data generation method of any one of claims 1 to 7.
Citation Information
Patent Citations
Image processing model training method and device, computer equipment and storage medium
CN114332500A