A process optimization method for the preparation of 2-amino-4,6-dimethoxypyrimidine
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-22
- Publication Date
- 2026-08-11
AI Technical Summary
当前该化合物的工业化制备以传统化学反应工艺为主,工艺参数调控多依赖研发人员经验试错与小批量实验摸索,缺乏数据驱动、智能化的工艺优化体系,实际生产中存在产率波动大、原料利用率低、工艺适配性差等问题,难以满足精细化、高效化的生产需求
[0038]与现有技术相比,本发明的优点和积极效果在于,突破传统工艺依赖经验试错、优化周期长、产率波动大的行业痛点,解决了现有数据驱动优化方法小样本泛化能力弱、机理与数据融合不充分、优化算法易陷入局部最优的核心缺陷。通过产率关联加权预处理提升数据质量,借助分层约束式变分自编码器实现高保真数据集扩充;构建融合反应机理先验的高斯过程回归模型,兼顾机理可解释性与预测精准度;最终通过改进梦境优化算法实现全局最优工艺参数快速求解,提升2-氨基-4,6-二甲氧基嘧啶的制备产率与工艺稳定性,适配工业化精细化生产需求。
Smart Images

Figure CN122551965A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of process optimization technology, and particularly relates to a process optimization method for the preparation of 2-amino-4,6-dimethoxypyrimidine. Background Technology
[0002] 2-Amino-4,6-dimethoxypyrimidine is a key raw material for the synthesis of sulfonylurea pesticides and pharmaceutical intermediates. Its preparation yield and process stability directly affect the production cost, purity, and industrial production efficiency of downstream products. Currently, the industrial preparation of this compound mainly relies on traditional chemical reaction processes. Process parameter control largely depends on the experience and trial-and-error of researchers and small-batch experiments, lacking a data-driven, intelligent process optimization system. In actual production, problems such as large yield fluctuations, low raw material utilization, and poor process adaptability exist, making it difficult to meet the demands for refined and efficient production. Summary of the Invention
[0003] To address the technical problems existing in the background art described above, this invention proposes an optimized process method for the preparation of 2-amino-4,6-dimethoxypyrimidine.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0005] S1. Collect historical experimental data sets during the preparation of 2-amino-4,6-dimethoxypyrimidine. The experimental data sets include process parameters and final yield during the production process. The process parameters include raw material ratio, reaction temperature, reaction time, pH value, catalyst type and dosage.
[0006] S2. Perform data preprocessing on the experimental dataset and standardize it to obtain feature vectors;
[0007] S3. The experimental dataset is augmented using a variational autoencoder to obtain an augmented dataset without yield labels.
[0008] S4. Use historical experimental data as the training set to train the Gaussian process regression (GPR) model to build a data-driven model. Incorporate the prediction results of the mechanistic model as prior information into the covariance function of the GPR. Input the unlabeled yield dataset into the trained data-driven model to obtain the yield prediction labels.
[0009] S5. Using the experimental data and extended data as the total dataset, set the objective function, and solve the objective function through the improved dream optimization algorithm to obtain the globally optimal combination of process parameters; the improved dream optimization algorithm is implemented through dynamic switching of dream stages and memory genetic evolution mechanism.
[0010] Preferably, step S2, which involves preprocessing and standardizing the experimental dataset to obtain feature vectors, is implemented as follows:
[0011] S21. Perform one-hot encoding on the discrete variables in the experimental dataset, divide all experimental samples into 5 equal-frequency bins according to the yield from low to high, and ensure that the number of samples in each bin is not less than the minimum set threshold.
[0012] S22. Calculate the local mean of the yield within each bin. and local standard deviation Where j is the equal-frequency bin index, if the yield of a certain sample satisfies If it is an outlier, it will be removed. Let be the yield of the i-th sample;
[0013] S23. Assign yield-related weights to samples in each experimental dataset: ,in, These represent the maximum and minimum yields in the dataset, respectively;
[0014] S24. Calculate the weighted mean of each feature. Weighted standard deviation: ,in, Let k be the feature value of the i-th sample;
[0015] S25. Perform weighted standardization on each feature value: This leads to the final feature vector.
[0016] Preferably, step S3 uses a variational autoencoder to augment the experimental dataset to obtain an augmented dataset without yield labels. The specific implementation of this step is as follows:
[0017] S31. Construct a hierarchical constrained variational autoencoder, adopting an encoder-decoder symmetric architecture. The encoder consists of two fully connected layers: a shallow feature encoding layer and a deep semantic encoding layer. The latent space uses a Gaussian mixture prior distribution instead of a single standard normal distribution to fit the multi-feature clustering characteristics of the experimental dataset. The decoder adopts a two fully connected layer corresponding to the encoder and outputs the reconstructed process parameter vector.
[0018] S32. Obtain the posterior distribution of latent variables through encoder inference, reconstruct the improved variational evidence lower bound loss function, and add the original data feature distribution regularization constraint to constrain latent space sampling to not deviate from the feature manifold of the original dataset.
[0019] S33. An improved reparameterization technique is used to sample latent variables in batches from the Gaussian mixture latent space and input them into the decoder to generate a large batch of candidate augmented datasets without yield labels.
[0020] S34. Calculate the cosine similarity between each candidate sample and the feature center of the original dataset. Use an adaptive threshold mask to filter and remove distorted and outlier redundant samples to obtain the final high-matching unlabeled augmented dataset.
[0021] Preferably, step S4 uses historical experimental data as a training set to train a Gaussian process regression (GPR) model to construct a data-driven model, incorporating the prediction results of the mechanistic model as prior information into the covariance function of the GPR; the specific implementation of inputting the unlabeled yield dataset into the trained data-driven model to obtain the yield prediction label is as follows:
[0022] S41. Construct a mechanistic model and obtain the predicted yield through the mechanistic model;
[0023] S42. Design a hybrid covariance function that integrates prior information about the mechanism, encoding the prediction error of the mechanism model as a covariance term of the GPR. The hybrid covariance function is as follows: ,in, For the sample The mixture covariance function, For data-driven kernel functions, a quadratic exponential kernel is used: ,in, For signal variance, For the characteristic length dimension; Let the mechanistic prior kernel function be defined as the covariance of the prediction error of the mechanistic model: ,in, For mechanism error variance, For the mechanistic characteristic length, For noise variance, The Kronecker function;
[0024] S43. Using historical experimental datasets as the training set, optimize the hyperparameter set of the GPR model using maximum likelihood estimation. This yields a trained data-driven model;
[0025] S44. Input the feature vector of the obtained unlabeled augmented dataset into the trained GPR model, and calculate the mean and variance of the yield prediction for each sample.
[0026] S45. Set a prediction variance threshold, and retain only the samples with prediction variance less than the prediction variance threshold and their corresponding yield prediction mean as valid labels to obtain an expanded dataset with predicted yield labels.
[0027] Preferably, the improved dream optimization algorithm in step S5 is specifically implemented through the dynamic switching of dream stages and the genetic evolution mechanism of memory as follows:
[0028] S51. Calculate the fitness dispersion of the population at the t-th iteration: ,in, For population size, Let zq be the fitness value of the zq-th individual in the t-th iteration. Let be the average fitness value of the population in the t-th iteration;
[0029] S52. For each individual in the population, calculate its genetic memory weight: ,in, The average fitness value across all iterations in the population history. This is the historically optimal fitness value of the population, and ;
[0030] S53, Based on fitness dispersion With genetic memory weight To classify dream stages and develop individual update strategies.
[0031] Preferably, step S53 is based on the fitness dispersion. With genetic memory weight The specific implementation of the dream stage division and individual renewal strategy is as follows:
[0032] S531, Set the dispersion threshold and ,and The algorithm iteration process is automatically divided into a rapid dream exploration stage. Co-evolutionary Dream Stage and the stage of fine convergence of dreams ;
[0033] S532. During the rapid dream exploration phase, all individuals perform a global random forgetting update: each individual randomly forgets 3 dimensions of information, and the forgotten dimensions are regenerated within the set feasible domain of all parameters; at the same time, cross-individual memory fragment exchange is performed with a probability of 0.7.
[0034] S533. In the co-evolutionary dream stage, individuals are divided into elite memory bodies based on genetic memory weights. ≥0.6, ordinary memory 0.2≤ <0.6 and new memory <0.2; Elite memory randomly forgets 1 dimension and generates a new value within ±15% of the current value; ordinary memory randomly forgets 2 dimensions and generates a new value within ±20% of the current value; new memory randomly forgets 3 dimensions and generates a new value within ±30% of the current value; at the same time, one-way memory transfer is performed from elite memory to ordinary memory and new memory with a probability of 0.4, transferring 2 optimal dimension information each time;
[0035] S534. During the fine convergence of the dream phase, all individuals perform targeted forgetting updates based on the population's historical best solution: each individual only randomly forgets one dimension, and the forgotten dimension is perturbed by Gaussian within ±5% of the dimension corresponding to the historical best solution; at the same time, cross-individual memory exchange is stopped, and only the memory self-optimization within the individual is retained;
[0036] S535. Every 4 iterations, the population fitness dispersion is recalculated and the corresponding dream stage is switched. Every 8 iterations, the 10% of individuals with the lowest genetic memory weight are eliminated, and new individuals are randomly generated from the neighborhood of the top 20% of the best solutions in history to supplement them. The initial genetic memory weight of the new individuals is set to 0.4.
[0037] Preferably, the global optimal solution update and termination condition judgment of the improved dream optimization algorithm is as follows: calculate the fitness value of all individuals after each iteration update; if there is an individual fitness value greater than the current global optimal value, then update the global optimal solution and the optimal fitness value; if the maximum number of iterations is reached or the global optimal fitness value fails to meet the set improvement threshold for three consecutive iterations, the termination condition is met, and the global optimal process parameter combination is output.
[0038] Compared with existing technologies, the advantages and positive effects of this invention are that it overcomes the industry pain points of traditional processes, such as reliance on experience-based trial and error, long optimization cycles, and large yield fluctuations. It also solves the core defects of existing data-driven optimization methods, such as weak generalization ability with small samples, insufficient fusion of mechanisms and data, and the tendency of optimization algorithms to get trapped in local optima. Data quality is improved through yield-related weighted preprocessing, and a high-fidelity dataset is expanded using a hierarchical constrained variational autoencoder. A Gaussian process regression model integrating prior knowledge of the reaction mechanism is constructed, balancing mechanism interpretability and prediction accuracy. Finally, an improved dream optimization algorithm is used to quickly solve for globally optimal process parameters, improving the preparation yield and process stability of 2-amino-4,6-dimethoxypyrimidine, thus meeting the needs of refined industrial production. Attached Figure Description
[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a schematic flowchart of an optimized process for the preparation of 2-amino-4,6-dimethoxypyrimidine. Detailed Implementation
[0041] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0042] Numerous specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways than those described herein, and therefore the invention is not limited to the specific embodiments disclosed in the following specification.
[0043] In this example, 2-amino-4,6-dimethoxypyrimidine, as a core raw material for sulfonylurea herbicides and pyrimidine pharmaceutical intermediates, is industrially prepared under the coupled influence of multiple parameters such as raw material ratio, reaction temperature, and catalyst characteristics. Traditional empirical trial-and-error methods suffer from problems such as long optimization cycles, limited yield improvements, and poor process stability. Existing data-driven process optimization methods generally suffer from drawbacks such as weak generalization ability with small sample data, insufficient fusion of mechanisms and data, and the optimization algorithm's tendency to get trapped in local optima.
[0044] To address the aforementioned technical challenges, this invention provides a process optimization method for the preparation of 2-amino-4,6-dimethoxypyrimidine. The method improves data quality through yield-correlated weighted preprocessing, expands the dataset to high fidelity using a hierarchical constrained variational autoencoder, constructs a Gaussian process regression model incorporating prior knowledge of the reaction mechanism for accurate yield prediction, and finally solves for the globally optimal combination of process parameters using an improved optimization algorithm with dynamic switching of dream stages and a memory genetic mechanism, significantly improving the preparation yield and process stability. Specific implementation details are as follows: Figure 1 As shown.
[0045] Step S1 involves collecting experimental datasets from historical 2-amino-4,6-dimethoxypyrimidine preparation processes. These datasets include process parameters and final yields. The process parameters include raw material ratios, reaction temperature, reaction time, pH value, and catalyst type and dosage. Specifically, a complete dataset of 2-amino-4,6-dimethoxypyrimidine batch synthesis experiments from a chemical company over the past three years was collected. All experiments used dimethyl malonate and guanidine nitrate as the core raw materials, and the cyclization reaction was carried out in a methanol solvent system. The dataset contains six core process parameters and final yield indicators: the raw material ratio is the molar ratio of dimethyl malonate to guanidine nitrate, ranging from 1.0:1.0 to 1.5:1.0; the reaction temperature ranges from 60℃ to 120℃; the reaction time ranges from 2h to 8h; the pH value of the reaction system ranges from 8 to 12; the catalyst types include sodium methoxide, sodium ethoxide, and sodium hydroxide; the catalyst dosage is a percentage of the total mass of the raw materials, ranging from 5% to 15%; the final yield is quantitatively determined by high-performance liquid chromatography with external standard method, with a determination accuracy of ±0.2%. All data are stored in structured CSV format, including a unique sample identifier, columns for each process parameter, and a yield column. After removing invalid samples with missing experimental records, the initial valid experimental data were obtained.
[0046] Step S2 involves preprocessing the experimental dataset and standardizing it to obtain feature vectors. Specifically, discrete process parameters, such as catalyst type, are first converted into numerical values. The experimental dataset samples are then divided into five equal-frequency bins based on yield from low to high, ensuring that the number of samples in each bin is no less than a minimum set threshold.
[0047] Calculate the local mean of the yield within each bin. and local standard deviation Where j is the equal-frequency bin index, if the yield of a certain sample satisfies If it is an outlier, it will be removed. The yield of the i-th sample; assign yield-related weights to samples in each experimental dataset: ,in, The maximum and minimum yields in the dataset are given, respectively; the weighted mean of each feature is calculated. Weighted standard deviation: ,in, Let k be the feature value of the i-th sample; finally, perform weighted standardization on each feature value: This leads to the final feature vector.
[0048] Step S3 uses a variational autoencoder to augment the experimental dataset, obtaining an augmented dataset without yield labels. Specifically, a hierarchical constrained variational autoencoder model is constructed. This model adopts an encoder-decoder symmetric architecture, where the encoder consists of two fully connected layers: a shallow feature encoding layer and a deep semantic encoding layer. The prior distribution in the latent space uses a Gaussian mixture distribution instead of a single standard normal distribution to fit the inherent multi-feature clustering characteristics of the experimental dataset. The Gaussian mixture prior distribution is defined as: Where z is a latent variable and G is the number of Gaussian mixture components. Let g be the weighting coefficient of the g-th mixture component, satisfying =1, Let be the mean and variance of the g-th Gaussian component, respectively, and I be the identity matrix.
[0049] The shallow feature encoding layer takes the standardized feature vector from the previous step as input and outputs an intermediate feature vector, using the ReLU activation function; the deep semantic encoding layer takes the intermediate feature vector as input and outputs the set of parameters for the posterior distribution of the latent variables. ,in These are the posterior mixture coefficients. and These are the mean and variance of the g-th posterior Gaussian component, respectively; the decoder adopts a two-layer fully connected structure, with the latent variable z as the input and the reconstructed process parameter vector as the output.
[0050] Latent space probabilistic inference and optimization of variational lower bound loss function: By performing probabilistic inference on the input feature vector through the encoder, the posterior distribution of the latent variables is obtained. The variational evidence lower bound ELBO is reconstructed and improved, while incorporating a regularization constraint on the original data feature distribution to ensure that latent space sampling does not deviate from the feature manifold of the original dataset; the improved variational evidence lower bound is defined as: ,in, To reconstruct the log-likelihood expectation, the feature is calculated using mean squared error; The KL divergence between the posterior and prior distributions is calculated using the Monte Carlo approximation. This is the regularization coefficient, ranging from 0.1 to 0.3; The feature distribution regularization term of the original data is used, and the maximum mean difference (MMD) is used to calculate the feature distribution distance between the generated sample and the original sample: ,in, This is the original experimental dataset. Generate a sample set for the current batch.
[0051] Latent space reparameterization sampling and decoder generation of augmented samples: An improved reparameterization technique is used to sample latent variables in batches from the Gaussian mixture latent space, which are then input into the decoder for reverse reconstruction to generate a large batch of candidate augmented datasets without yield labels; the improved reparameterization technique specifically involves: firstly, based on the posterior mixture coefficients... The mixed component index is obtained through category distribution sampling. Then from the corresponding posterior Gaussian distribution The latent variable z is sampled in the middle, and the sampling process satisfies the reparameterization invariance: ,in, The noise is standard normal; the number of latent variables sampled in batches is 8 to 12 times the sample size of the original experimental dataset, and the input to the decoder generates a corresponding number of candidate augmented samples.
[0052] Finally, feature similarity masking is used to refine the final expanded dataset. The cosine similarity between each candidate expanded sample and the feature centers of the original dataset is calculated. An adaptive threshold mask is set to remove distorted, outlier, or redundant samples with similarity below the threshold, retaining only the high-matching unlabeled expanded dataset. The adaptive threshold... Defined as: ,in, This represents the mean cosine similarity between all samples in the original dataset and the feature centers. The corresponding standard deviation is... The threshold coefficient is set between 1.0 and 1.5; all cosine similarities less than the adaptive threshold are removed. The remaining samples constitute the final unlabeled augmented dataset.
[0053] Step S4 involves using historical experimental data as the training set to train a Gaussian process regression (GPR) model to construct a data-driven model. The prediction results of the mechanistic model are incorporated as prior information into the covariance function of the GPR. The unlabeled yield dataset is then input into the trained data-driven model to obtain the predicted yield labels. Specifically, a kinetic mechanism model for the synthesis reaction of 2-amino-4,6-dimethoxypyrimidine is first established. Based on the Arrhenius law, a temperature-dependent reaction rate constant equation is established, and a pre-exponential factor and activation energy are introduced to characterize the effect of temperature on the reaction rate. Simultaneously, a catalyst activity term is constructed, using an exponential function to describe the promoting effect of catalyst concentration on the reaction rate, distinguishing the inherent activity differences of different basic catalysts. Based on the material balance of a batch reactor, the rate equation is integrally derived to obtain a quantitative correlation between yield and reaction time, reaction temperature, catalyst dosage, and feedstock ratio. The model parameters were obtained by fitting historical experimental data. A finite-memory quasi-Newton method (L-BFGS-B) nonlinear least-squares optimization algorithm with boundary constraints was employed to iteratively solve for the process parameters, aiming to minimize the sum of squared residuals between the predicted and experimental yield values. After fitting, the model accuracy was evaluated using leave-one-out cross-validation. This mechanistic model can reflect the influence of process parameters on yield at a physicochemical level, providing reliable prior information for subsequent Gaussian process regression models.
[0054] Then, a hybrid covariance function that integrates prior information about the mechanism is designed, encoding the prediction error of the mechanism model as the covariance term of the GPR. The hybrid covariance function is as follows: ,in, For the sample The mixture covariance function, For data-driven kernel functions, a quadratic exponential kernel is used: ,in, For signal variance, For the characteristic length dimension; Let the mechanistic prior kernel function be defined as the covariance of the prediction error of the mechanistic model: ,in, For mechanism error variance, For the mechanistic characteristic length, For noise variance, For the Kronecker function, To predict yields using mechanistic models.
[0055] Next, using historical experimental datasets as the training set, maximum likelihood estimation is employed to optimize the hyperparameter set of the GPR model. The trained data-driven model is obtained. Specifically, the set of hyperparameters to be optimized is defined, corresponding to five adjustable parameters of the mixture covariance function: signal variance and feature length of the squared exponential kernel; mechanism error variance and mechanism feature length of the mechanism prior kernel; and noise variance of the noise kernel. All hyperparameters are constrained to be positive. Next, a logarithmic marginal likelihood function is constructed as the optimization objective. GPR assumes that the training set yield vector follows a multivariate normal distribution with a mean of 0 and a covariance matrix of K. The logarithmic marginal likelihood is obtained by taking the logarithm, and finally, the L-BFGS-B bounded constraint optimization algorithm is used to solve for the minimum value of the negative logarithmic marginal likelihood. The algorithm converges when it reaches the maximum number of iterations (1000), outputting the optimal hyperparameter set and completing the training of the data-driven model.
[0056] Finally, the feature vectors of the unlabeled augmented dataset are input into the trained GPR model to calculate the yield prediction mean and prediction variance for each sample. A prediction variance threshold is set, and only samples with prediction variance less than the prediction variance threshold and their corresponding yield prediction mean are retained as valid labels, thus obtaining the augmented dataset with predicted yield labels.
[0057] Step S5: Using the experimental data and augmented data as the total dataset, set the objective function and solve the objective function using the improved dream optimization algorithm to obtain the globally optimal combination of process parameters. The improved dream optimization algorithm is implemented through dynamic switching of dream stages and a memory genetic evolution mechanism. Specifically, the following algorithm hyperparameters are initialized first, including population size, maximum number of iterations, and dispersion threshold. An initial population is randomly generated within the parameter feasible region, where each individual represents a reasonable combination of process parameters. The mechanism of dividing the exploration / development stages with a fixed number of iterations in the standard dream optimization algorithm DOA is replaced and updated to a dynamic stage switching based on the population fitness distribution, enabling the algorithm to adaptively adjust its strategy according to the actual search progress. The population fitness dispersion at iteration t is: ,in, For population size, Let zq be the fitness value of the zq-th individual in the t-th iteration. Let be the average fitness value of the population in the t-th iteration; for each individual in the population, calculate its genetic memory weight: ,in, The average fitness value across all iterations in the population history. This is the historically optimal fitness value of the population, and Based on fitness dispersion With genetic memory weight Dream stage segmentation and individual update strategies were implemented. A dispersion threshold was set. and ,and The algorithm iteration process is automatically divided into a rapid dream exploration stage. Co-evolutionary Dream Stage and the stage of fine convergence of dreams During the rapid dream exploration phase, all individuals undergo a global random forgetting update: each individual randomly forgets three dimensions of information, and the forgotten dimensions are regenerated within the set feasible domain of all parameters; simultaneously, cross-individual memory fragment exchange is performed with a probability of 0.7; during the co-evolutionary dream phase, individuals are divided into elite memory bodies according to their genetic memory weights. ≥0.6, ordinary memory 0.2≤ <0.6 and new memory <0.2; Elite memory cells randomly forget 1 dimension and generate a new value update within ±15% of the current value; ordinary memory cells randomly forget 2 dimensions and generate a new value update within ±20% of the current value; newborn memory cells randomly forget 3 dimensions and generate a new value update within ±30% of the current value; simultaneously, one-way memory transfer is performed from elite memory cells to ordinary memory cells and newborn memory cells with a probability of 0.4, transferring 2 optimal dimension information each time; during the fine convergence dream stage, all individuals perform directional forgetting updates based on the population's historical best solution: each individual only randomly forgets 1 dimension, and the forgotten dimension is Gaussian perturbed within ±5% of the dimension corresponding to the historical best solution; at the same time, cross-individual memory exchange is stopped, and only the memory self-optimization within the individual is retained; every 4 iterations, the population fitness dispersion is recalculated and the corresponding dream stage is switched; every 8 iterations, the 10% of individuals with the lowest genetic memory weight are eliminated, and new individuals are randomly generated from the neighborhood of the top 20% of historical best solutions to supplement them, with the initial genetic memory weight of the new individuals set to 0.4.
[0058] Finally, the fitness values of all individuals are calculated after each iteration. If an individual's fitness value is greater than the current global optimum, the global optimum and its fitness value are updated. Termination occurs when the maximum number of iterations is reached or the global optimum fitness value fails to meet the set improvement threshold after three consecutive iterations, and the globally optimal process parameter combination is output. It's worth noting that if the final discrete data, such as the catalyst type, is a decimal, the values are taken as the two integers closest to that decimal. Experiments are then conducted on the process parameter combinations corresponding to these two integers to obtain the optimal process parameter combination corresponding to the optimal yield.
[0059] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A process optimization method for the preparation of 2-amino-4,6-dimethoxy pyrimidine, characterized in that, Includes the following steps: S1. Collect historical experimental data sets during the preparation of 2-amino-4,6-dimethoxypyrimidine. The experimental data sets include process parameters and final yield during the production process. The process parameters include raw material ratio, reaction temperature, reaction time, pH value, catalyst type and dosage. S2. Perform data preprocessing on the experimental dataset and standardize it to obtain feature vectors; S3. The experimental dataset is augmented using a variational autoencoder to obtain an augmented dataset without yield labels. S4. Use historical experimental data as the training set to train the Gaussian process regression (GPR) model to build a data-driven model. Incorporate the prediction results of the mechanistic model as prior information into the covariance function of the GPR. Input the unlabeled yield dataset into the trained data-driven model to obtain the yield prediction labels. S5. Using the experimental data and extended data as the total dataset, set the objective function, and solve the objective function through the improved dream optimization algorithm to obtain the globally optimal combination of process parameters; the improved dream optimization algorithm is implemented through dynamic switching of dream stages and memory genetic evolution mechanism.
2. The optimized process method for the preparation of 2-amino-4,6-dimethoxypyrimidine according to claim 1, characterized in that, The specific implementation of step S2, which involves data preprocessing and standardization of the experimental dataset to obtain feature vectors, is as follows: S21. Perform one-hot encoding on the discrete variables in the experimental dataset, divide all experimental samples into 5 equal-frequency bins according to the yield from low to high, and ensure that the number of samples in each bin is not less than the minimum set threshold. S22. Calculate the local mean of the yield within each bin. and local standard deviation Where j is the equal-frequency bin index, if the yield of a certain sample satisfies If it is an outlier, it will be removed. Let be the yield of the i-th sample; S23. Assign yield-related weights to samples in each experimental dataset: ,in, These represent the maximum and minimum yields in the dataset, respectively; S24. Calculate the weighted mean of each feature. Weighted standard deviation: ,in, Let k be the feature value of the i-th sample; S25. Perform weighted standardization on each feature value: This leads to the final feature vector.
3. The optimized process method for the preparation of 2-amino-4,6-dimethoxypyrimidine according to claim 1, characterized in that, The specific implementation of step S3, which uses a variational autoencoder to augment the experimental dataset to obtain an augmented dataset without yield labels, is as follows: S31. Construct a hierarchical constrained variational autoencoder, adopting an encoder-decoder symmetric architecture. The encoder consists of two fully connected layers: a shallow feature encoding layer and a deep semantic encoding layer. The latent space uses a Gaussian mixture prior distribution instead of a single standard normal distribution to fit the multi-feature clustering characteristics of the experimental dataset. The decoder adopts a two fully connected layer corresponding to the encoder and outputs the reconstructed process parameter vector. S32. Obtain the posterior distribution of latent variables through encoder inference, reconstruct the improved variational evidence lower bound loss function, and add the original data feature distribution regularization constraint to constrain latent space sampling to not deviate from the feature manifold of the original dataset. S33. An improved reparameterization technique is used to sample latent variables in batches from the Gaussian mixture latent space and input them into the decoder to generate a large batch of candidate augmented datasets without yield labels. S34. Calculate the cosine similarity between each candidate sample and the feature center of the original dataset. Use an adaptive threshold mask to filter and remove distorted and outlier redundant samples to obtain the final high-matching unlabeled augmented dataset.
4. The optimized process method for the preparation of 2-amino-4,6-dimethoxypyrimidine according to claim 1, characterized in that, Step S4 uses historical experimental data as a training set to train a Gaussian process regression (GPR) model to construct a data-driven model, incorporating the prediction results of the mechanistic model as prior information into the covariance function of the GPR. The specific implementation of inputting the unlabeled yield dataset into the trained data-driven model to obtain the yield prediction labels is as follows: S41. Construct a mechanistic model and obtain the predicted yield through the mechanistic model; S42. Design a hybrid covariance function that integrates prior information about the mechanism, encoding the prediction error of the mechanism model as a covariance term of the GPR. The hybrid covariance function is as follows: ,in, For the sample The mixture covariance function, For data-driven kernel functions, a quadratic exponential kernel is used: ,in, For signal variance, For the characteristic length dimension; Let the mechanistic prior kernel function be defined as the covariance of the prediction error of the mechanistic model: ,in, For mechanism error variance, For the mechanistic characteristic length, For noise variance, The Kronecker function; S43. Using historical experimental datasets as the training set, optimize the hyperparameter set of the GPR model using maximum likelihood estimation. This yields a trained data-driven model; S44. Input the feature vector of the obtained unlabeled augmented dataset into the trained GPR model, and calculate the mean and variance of the yield prediction for each sample. S45. Set a prediction variance threshold, and retain only the samples with prediction variance less than the prediction variance threshold and their corresponding yield prediction mean as valid labels to obtain an expanded dataset with predicted yield labels.
5. The optimized process method for the preparation of 2-amino-4,6-dimethoxypyrimidine according to claim 1, characterized in that, The improved dream optimization algorithm in step S5 is specifically implemented through the dynamic switching of dream stages and the genetic evolution mechanism of memory as follows: S51. Calculate the fitness dispersion of the population at the t-th iteration: ,in, For population size, Let zq be the fitness value of the zq-th individual in the t-th iteration. The average fitness value of the population in the t-th iteration; S52. For each individual in the population, calculate its genetic memory weight: ,in, The average fitness value across all iterations in the population history. This is the historically optimal fitness value of the population, and ; S53, Based on fitness dispersion With genetic memory weight To classify dream stages and develop individual update strategies.
6. The optimized process method for the preparation of 2-amino-4,6-dimethoxypyrimidine according to claim 5, characterized in that, Step S53 is based on fitness dispersion With genetic memory weight The specific implementation of the dream stage division and individual renewal strategy is as follows: S531, Set the dispersion threshold and ,and The algorithm iteration process is automatically divided into a rapid dream exploration stage. Co-evolutionary Dream Stage and the stage of fine convergence of dreams ; S532. During the rapid dream exploration phase, all individuals perform a global random forgetting update: each individual randomly forgets 3 dimensions of information, and the forgotten dimensions are regenerated within the set feasible domain of all parameters; at the same time, cross-individual memory fragment exchange is performed with a probability of 0.
7. S533. In the co-evolutionary dream stage, individuals are divided into elite memory bodies based on genetic memory weights. ≥0.6, ordinary memory 0.2≤ <0.6 and new memory <0.2; Elite memory randomly forgets 1 dimension and generates a new value within ±15% of the current value; ordinary memory randomly forgets 2 dimensions and generates a new value within ±20% of the current value; new memory randomly forgets 3 dimensions and generates a new value within ±30% of the current value; at the same time, one-way memory transfer is performed from elite memory to ordinary memory and new memory with a probability of 0.4, transferring 2 optimal dimension information each time; S534. During the fine convergence of the dream phase, all individuals perform targeted forgetting updates based on the population's historical best solution: each individual only randomly forgets one dimension, and the forgotten dimension is perturbed by Gaussian within ±5% of the dimension corresponding to the historical best solution; at the same time, cross-individual memory exchange is stopped, and only the memory self-optimization within the individual is retained; S535. Every 4 iterations, the population fitness dispersion is recalculated and the corresponding dream stage is switched. Every 8 iterations, the 10% of individuals with the lowest genetic memory weight are eliminated, and new individuals are randomly generated from the neighborhood of the top 20% of the best solutions in history to supplement them. The initial genetic memory weight of the new individuals is set to 0.
4.
7. The optimized process method for the preparation of 2-amino-4,6-dimethoxypyrimidine according to claim 6, characterized in that, The improved dream optimization algorithm determines the global optimal solution update and termination conditions as follows: calculate the fitness value of all individuals after each iteration update; if there is an individual whose fitness value is greater than the current global optimal value, then update the global optimal solution and the optimal fitness value; if the maximum number of iterations is reached or the global optimal fitness value fails to meet the set improvement threshold after 3 consecutive iterations, the termination condition is met, and the global optimal process parameter combination is output.