Method and system for dynamically adjusting synthetic reaction conditions of medical intermediates

Through real-time monitoring and dynamic adjustment of reaction conditions, the problem of fixing reaction conditions in the prior art that the reaction conditions cannot adapt to the changes in reactant state is solved, and the effect of improving the synthesis efficiency and yield of pharmaceutical intermediates is achieved.

CN120126587APending Publication Date: 2025-06-10GANZHOU KANGRUITAI PHARM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510056257.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

Existing pharmaceutical intermediate synthesis methods rely on fixed reaction conditions and are unable to adapt to changes in reactant state, resulting in the reaction deviating from the ideal path, increasing the generation of by-products or reducing the yield of target compounds.

Method used

By obtaining the real-time state feature set of reactants, using the pre-trained intermediate synthetic feature prediction model to predict the standard state feature set of reactants, calculate the reactant state feature deviation vector, and input it into the synthesis reaction dynamic regulation model to generate a reaction condition adjustment strategy and adjust the reaction conditions in real time.

Benefits of technology

Continuous monitoring and real-time adjustment of changes in the reaction process is achieved, preventing reactions from deviating from the ideal path, reducing by-product generation, improving the yield of target compounds, and improving the quality and yield of pharmaceutical intermediates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120126587A_ABST
    Figure CN120126587A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical synthesis reaction regulation, in particular to a dynamic regulation method and system for medical intermediate synthesis reaction conditions, and the method comprises the following steps: obtaining a reactant real-time state characteristic set, a synthesis operation starting time node and intermediate synthesis raw material component characteristics; according to a preset time node and the synthesis operation starting time node, calculating to obtain a synthesis reaction duration; inputting the component characteristics of the intermediate synthesis raw materials, the synthesis reaction duration and the initial synthesis reaction conditions into a pre-trained intermediate synthesis characteristic prediction model to obtain a reactant standard state characteristic set at a preset time node; and calculating a reactant state characteristic deviation vector between the reactant standard state characteristic set and the reactant real-time state characteristic set. The reaction conditions of the synthesis operation can be adjusted in time, the reaction is prevented from deviating from an ideal path, and the possibility of generation of byproducts is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of regulating pharmaceutical synthesis reactions, and particularly to a method and system for dynamically regulating the reaction conditions of pharmaceutical intermediate synthesis. Background Art

[0002] The synthesis of pharmaceutical intermediates is a key link in the process of drug research and development and production. The research and innovation of its synthesis process contribute to improving the speed and efficiency of drug research and development. High-quality pharmaceutical intermediates contribute to improving the safety and effectiveness of drugs.

[0003] Existing synthesis methods often rely on fixed reaction conditions, usually preset based on experimental data and empirical formulas. However, in the actual production process, the state of reactants is easily affected by various factors and will change continuously as the reaction progresses. Fixed reaction conditions cannot adapt to the changes that occur in the actual reaction process; existing methods lack an effective real-time monitoring and feedback adjustment mechanism and cannot respond in a timely manner to changes in the state of reactants or environmental factors, which may lead to the reaction deviating from the ideal path, increasing the generation of by-products or reducing the yield of the target compound. Summary of the Invention

[0004] To solve the above technical problems, the present invention provides a method and system for dynamically regulating the reaction conditions of pharmaceutical intermediate synthesis, which can timely adjust the reaction conditions of the synthesis operation, avoid the reaction deviating from the ideal path, and reduce the possibility of by-product generation.

[0005] In the first aspect, the present invention provides a method for dynamically regulating the reaction conditions of pharmaceutical intermediate synthesis, and the method includes: Obtain a set of real-time state characteristics of reactants, the start time node of the synthesis operation, and the characteristics of the components of the raw materials for intermediate synthesis; Calculate the synthesis reaction duration according to the preset time node and the start time node of the synthesis operation; Take the characteristics of the components of the raw materials for intermediate synthesis, the synthesis reaction duration, and the initial synthesis reaction conditions as inputs and input them into a pre-trained intermediate synthesis characteristic prediction model to obtain a set of standard state characteristics of reactants at the preset time node; Calculate the reactant state characteristic deviation vector between the set of standard state characteristics of reactants and the set of real-time state characteristics of reactants; Input the reactant state characteristic deviation vector into the synthesis reaction dynamic regulation model to obtain a reaction condition regulation strategy; Based on the reaction condition regulation strategy, adjust the reaction conditions of the pharmaceutical intermediate synthesis operation.

[0006] Further, the method for obtaining the set of real-time state characteristics of reactants includes: At a preset time node, collect the product concentration characteristics and the static surface images of the reactants in the synthesis operation of the pharmaceutical intermediate; Use a pre-trained reactant image feature recognition model to perform feature recognition on the static surface images of the reactants, and obtain the bubble size feature value, the bubble distribution feature value, the hue feature value, and the hue uniformity; Combine the product concentration characteristics, the bubble size feature value, the bubble distribution feature value, the hue feature value, and the hue uniformity in a preset order to obtain a set of real-time state characteristics of the reactants.

[0007] Further, the method for obtaining the product concentration characteristics includes: Obtain the reaction vessel structure design information used in the synthesis reaction and the liquid level height of the reactants in the reaction vessel; Perform structural feature recognition on the reaction vessel structure design information to obtain the center position at the bottom of the reaction vessel; Establish a three-dimensional coordinate system of the reaction vessel with the center position at the bottom of the reaction vessel as the origin; Input the liquid level height into a pre-trained concentration detection position setting model to obtain a set of real-time concentration detection positions; the set of real-time concentration detection positions includes the three-dimensional coordinates of multiple concentration detection positions in the three-dimensional coordinate system of the reaction vessel; According to the set of real-time concentration detection positions, perform product concentration detection on the reactants in the reaction vessel to obtain multiple real-time product concentrations; Extract the feature values from the multiple real-time product concentrations to obtain the product concentration characteristics.

[0008] Further, the method for constructing the intermediate synthesis feature prediction model includes: Collect industrial historical production records and laboratory test results, clean the collected data, and remove outliers and noise; Determine the input features, where the input features include the intermediate synthesis raw material component features, the synthesis reaction duration, and the initial synthesis reaction conditions; Determine the output features, where the output features include the product concentration characteristics, the bubble size feature value, the bubble distribution feature value, the hue feature value, and the hue uniformity; Extract the determined output features and input features from the original data, mark them, and perform transformation on the extracted original features, including normalizing all numerical features so that data of different magnitudes can be compared on the same scale; for categorical variables, use one-hot encoding to convert them into numerical forms; Considering the chemical reaction kinetics in the synthesis process of the pharmaceutical intermediate, select a deep learning algorithm as the basic model framework of the intermediate synthesis feature prediction model; Train the selected basic model framework using the transformed output features and input features to learn the relationship between the input features and the output features; during the training process, use the cross-validation method to evaluate the model performance, and optimize the model effect by adjusting the hyperparameters; the goal is to enable the model to predict the set of reactant standard state features under the given input conditions.

[0009] Further, the reactant state feature deviation vector is expressed as: where D represents the reactant state feature deviation vector, represents the product concentration deviation value, represents the bubble size deviation value, represents the bubble distribution deviation value, represents the hue deviation value, represents the hue uniformity deviation value. Further, the synthesis reaction dynamic regulation model adopts a multi-layer analysis and decision-making mechanism, including: Normalize the values in the reactant state feature deviation vector to eliminate the influence of the dimensional difference between different features; The synthesis reaction dynamic regulation model has a rule library containing various control rules built in; When receiving the reactant state feature deviation vector, the synthesis reaction dynamic regulation model will query the rule library to find the control rule that best matches the current situation; Considering the mutual influence between multiple adjustment measures, perform multi-objective optimization to ensure that the generated adjustment strategy meets the physical and technical limitations in actual operation The optimized adjustment strategy will be output in the form of clear instructions to guide the operator or the automated control system to adjust the reaction conditions.

[0010] Further, the rule library includes product concentration deviation rules, bubble size deviation rules, bubble distribution deviation rules, hue deviation rules, and hue uniformity deviation rules.

[0011] On the other hand, the present application also provides a dynamic regulation system for the synthesis reaction conditions of a pharmaceutical intermediate, and the system includes: A data acquisition module for obtaining the set of real-time state features of the reactants, the start time node of the synthesis operation, and the component features of the intermediate synthesis raw materials; A time calculation module for calculating the synthesis reaction duration according to the preset time node and the start time node of the synthesis operation; A feature prediction module for taking the component features of the intermediate synthesis raw materials, the synthesis reaction duration, and the initial synthesis reaction conditions as inputs and inputting them into a pre-trained intermediate synthesis feature prediction model to obtain the set of reactant standard state features at the preset time node; A deviation calculation module for calculating a reactant state feature deviation vector between a reactant standard state feature set and a reactant real-time state feature set; A regulation strategy generation module for inputting the reactant state feature deviation vector into a synthetic reaction dynamic regulation model to obtain a reaction condition adjustment strategy; A reaction condition adjustment execution module for performing real-time reaction condition adjustment on the pharmaceutical intermediate synthesis operation according to the generated adjustment strategy.

[0012] In a third aspect, the present application provides an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored on the memory and executable on the processor. The transceiver, the memory, and the processor are connected through the bus. When the computer program is executed by the processor, the steps in any one of the above methods are implemented.

[0013] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in any one of the above methods are implemented.

[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: By obtaining the real-time state feature set of the reactants, the present invention can continuously monitor the changes in the reaction process, thereby timely capturing any situation deviating from the ideal path and immediately taking measures to correct it; By using the pre-trained intermediate synthesis feature prediction model, the present invention can predict the reactant standard state feature set at a preset time node, which helps to accurately calculate the reactant state feature deviation vector, thereby more accurately determining the reaction condition adjustment strategy; By calculating the reactant state feature deviation vector and inputting it into the synthetic reaction dynamic regulation model, the present invention can obtain the reaction condition adjustment strategy in real time and timely adjust the reaction conditions of the synthesis operation, avoiding the reaction deviating from the ideal path, reducing the possibility of by-product generation, and increasing the yield of the target compound; Since the synthesis reaction conditions can be more precisely controlled, the quality and yield of the pharmaceutical intermediate are improved, which helps to speed up the drug research and development speed, improve the research and development efficiency, and promote the development of the pharmaceutical industry. Description of the Drawings

[0015] Figure 1 is a flowchart of the method for dynamically adjusting the reaction conditions of the pharmaceutical intermediate synthesis in Embodiment 1; Figure 2 is a structural diagram of the system for dynamically adjusting the reaction conditions of the pharmaceutical intermediate synthesis in Embodiment 2. Detailed Embodiments

[0016] In the description of the present application, those skilled in the art should understand that the present application can be implemented as a method, a device, an electronic device, and a computer-readable storage medium. Therefore, the present application can be specifically implemented in the following forms: complete hardware, complete software (including firmware, resident software, microcode, etc.), and a combination of hardware and software. In addition, in some embodiments, the present application can also be implemented in the form of a computer program product in one or more computer-readable storage media, and the computer-readable storage media contain computer program code.

[0017] The above-mentioned computer-readable storage media can adopt any combination of one or more computer-readable storage media. Computer-readable storage media include: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of computer-readable storage media include: portable computer disks, hard disks, random access memories, read-only memories, erasable programmable read-only memories, flash memories, optical fibers, compact disc read-only memories, optical storage devices, magnetic storage devices, or any combination of the above. In the present application, the computer-readable storage media can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or component.

[0018] In the technical solution of the present application, the acquisition, storage, use, processing, etc. of data all comply with the relevant provisions of national laws.

[0019] The present application describes the provided method, device, and electronic device through flowcharts and / or block diagrams.

[0020] It should be understood that each block of the flowchart and / or block diagram, as well as the combination of blocks in the flowchart and / or block diagram, can be implemented by computer-readable program instructions. These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, thereby producing a machine. These computer-readable program instructions are executed by a computer or other programmable data processing devices, resulting in a device that implements the functions / operations specified in the blocks of the flowchart and / or block diagram.

[0021] These computer-readable program instructions can also be stored in a computer-readable storage medium that enables a computer or other programmable data processing device to work in a specific manner. In this way, the instructions stored in the computer-readable storage medium produce an instruction device product that includes the functions / operations specified in the blocks of the flowchart and / or block diagram.

[0022] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices, causing a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other devices to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus can provide a process for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.

[0023] The present application will be described below with reference to the accompanying drawings in the present application.

[0024] Embodiment 1: As Figure 1 shown, a method for dynamically adjusting the synthesis reaction conditions of a pharmaceutical intermediate according to the present invention specifically includes the following steps: Step S1, obtain a set of real-time state characteristics of the reactants, the start time node of the synthesis operation, and the characteristics of the raw material components for the synthesis of the intermediate; In step S1, it is necessary to construct a set of real-time state characteristics of the reactants through multi-dimensional data collection. Specifically; Among them, the method for obtaining the set of real-time state characteristics of the reactants includes: Step S11, at a preset time node, based on a preset concentration measurement method, use an on-line analyzer (such as high performance liquid chromatography HPLC, gas chromatography GC, ultraviolet-visible spectrophotometer UV-Vis, etc.) to measure the concentration of the product in the synthesis operation of the pharmaceutical intermediate in real time; also at the preset time node, use a high-resolution camera or other imaging device to capture a static surface image of the reactants in the reaction vessel for subsequent feature recognition and analysis to evaluate the physical properties of the reactants; Step S12, perform deep learning processing on the collected static surface images using a pre-trained reactant image feature recognition model; the reactant image feature recognition model has been trained with a large number of samples and can automatically identify and extract key features in the image, including but not limited to: Bubble size characteristic value: Measure and count the size distribution of all bubbles appearing in the image; Bubble distribution characteristic value: Analyze the distribution density and pattern of bubbles in the entire reaction area; Hue characteristic value: Determine the color values (i.e., hue) of different color regions in the image, which helps to judge the existence form and changes of the reactants or products; Hue uniformity: Evaluate the consistency of the colors of the entire image to infer the mixing degree of the reactants and the reaction uniformity; Step S13: Combine the product concentration feature, bubble size feature value, bubble distribution feature value, hue feature value, and hue uniformity in a preset order to form a complete set of real-time state features of the reactants; the set of real-time state features of the reactants includes the product concentration feature and various physical property parameters (bubble size, bubble distribution, hue, and its uniformity) extracted from the image; such a combination not only reflects the change in chemical composition but also covers the information of the physical form, providing detailed data support for subsequent deviation calculation and condition adjustment.

[0025] Among them, the method for obtaining the product concentration feature includes: Step S111: Collect detailed information about the reaction vessel used in the synthesis reaction, including its structural design, dimensions, shape, etc.; this information can usually be obtained from the design documents of the reaction vessel, data provided by the manufacturer, or actual measurements; at the same time, it is also necessary to measure the liquid level height of the reactants in the reaction vessel, which can be completed by a liquid level sensor, ruler, or other measuring tools; the liquid level height is a key factor in determining the volume of the reactants and the concentration detection position. Step S112: Use technologies such as computer vision, image processing, or geometric analysis to perform feature recognition on the structural design information of the reaction vessel, including identifying features such as the bottom shape, edges, and corners of the vessel, so as to determine the center position of the bottom of the reaction vessel; this center position will be used as the origin of the subsequent three-dimensional coordinate system. Step S113: Based on the center position of the bottom of the reaction vessel determined in step S122, establish a three-dimensional coordinate system; the three-dimensional coordinate system will be used to locate each point in the reaction vessel, including the concentration detection position; the X-axis and Y-axis of the coordinate system can respectively represent the horizontal and vertical directions of the bottom of the vessel, while the Z-axis represents the vertical direction from the bottom to the top of the vessel. Step S114: Use the liquid level height obtained in step S121 as an input and input it into a pre-trained concentration detection position setting model; the concentration detection position setting model is trained based on a large amount of historical data and experimental data and can predict the optimal set of concentration detection positions according to the liquid level height and the structural characteristics of the reaction vessel; the set of concentration detection positions includes the three-dimensional coordinates of multiple concentration detection points in the three-dimensional coordinate system and is used for subsequent product concentration detection. Step S115: Use an appropriate concentration detection instrument or sensor to perform product concentration detection on the reactants in the reaction vessel according to the set of real-time concentration detection positions obtained in step S124; this can be completed by sampling, analysis, or on-line monitoring, etc.; the detection results will be multiple real-time product concentration values, reflecting the concentration distribution of the reactants at different positions. Step S116: Extract eigenvalue from the real-time concentrations of multiple products obtained in step S125, including calculating statistical features such as the average value, standard deviation, maximum value, minimum value, etc. of the concentration, or using machine learning algorithms to extract more complex features as the product concentration features for subsequent analysis and adjustment.

[0026] At the moment when the synthesis operation starts, use a high-precision timer to accurately record the start time node of the synthesis operation; this time node is an important benchmark for calculating the synthesis reaction duration and predicting the reaction process in the subsequent steps. Before the synthesis operation starts, enter the detailed component information of the raw materials required for the intermediate synthesis into the system; this information includes key parameters such as the type, proportion, and purity of the raw materials, which are important bases for predicting the reaction process and generating the standard state feature set.

[0027] Step S2: Calculate the synthesis reaction duration based on the preset time node and the start time node of the synthesis operation. Step S2 determines the time length elapsed from the start of the synthesis operation to the preset time node by comparing the preset time node (i.e., the expected reaction completion time point) with the actual start time of the synthesis operation, so as to provide the necessary time parameter for predicting the standard state features of the reactants at the preset time node in the subsequent steps. Specifically, the execution process of step S2 is as follows: Setting of the preset time node: Before the synthesis reaction starts, set one or more preset time nodes according to the requirements and expected goals of the synthesis process; these time nodes usually correspond to the key stages of the reaction, such as the starting stage, intermediate stage, and ending stage of the reaction. Recording of the start time node of the synthesis operation: When the synthesis reaction actually starts, record this time point as the start time node of the synthesis operation; this time point can be recorded through an automated system or manually to ensure the accuracy of the time. Calculation of the reaction duration: Use the preset time node and the start time node of the synthesis operation to calculate the time interval from the start of the reaction to each preset time node through mathematical calculations, that is, the synthesis reaction duration, which reflects the time required for the reaction to reach each key stage from the start; for example, if the preset time node is the 6th hour and the synthesis operation starts at the 0.5th hour, the synthesis reaction duration is 5.5 hours; the calculated synthesis reaction duration will be used in the subsequent steps as one of the input parameters provided to the feature prediction model, which helps the model to more accurately predict the standard state feature set of the reactants and formulate corresponding adjustment strategies accordingly.

[0028] Through step S2, the system can accurately grasp the time information in the reaction process, thereby providing a reliable time benchmark for the subsequent dynamic adjustment of reaction conditions, ensuring that the adjustment of reaction conditions can respond in a timely manner to the changes in the reaction process, and improving the efficiency of the synthesis reaction and the quality of the product.

[0029] Step S3: Use the intermediate synthesis raw material component characteristics, synthesis reaction duration, and initial synthesis reaction conditions as inputs, and input them into a pre-trained intermediate synthesis characteristic prediction model to obtain the set of standard reactant state characteristics at a preset time node. The intermediate synthesis characteristic prediction model in step S3 outputs the set of standard reactant state characteristics at a preset time node by inputting the intermediate synthesis raw material component characteristics, synthesis reaction duration, and initial synthesis reaction conditions. The set of standard reactant state characteristics includes the standard product concentration characteristic, standard bubble size characteristic value, standard bubble distribution characteristic value, standard hue characteristic value, and standard hue uniformity. The construction method of the intermediate synthesis characteristic prediction model includes: Step S31: The data required for model training comes from multiple sources, including laboratory experiment results, industrial production records, literature reports, and simulation simulations. These data cover the results of pharmaceutical intermediate synthesis under different conditions, including the concentration changes of reactants and products, and key parameters such as temperature, pressure, and pH value. Clean the collected data to remove outliers and noise to ensure data quality. Then label each sample, marking the corresponding reaction conditions (such as raw material types, ratios, purities, reaction times) and the final obtained reactant state characteristics (such as product concentration, bubble size, bubble distribution, hue and its uniformity). Step S32: Determine the input characteristics. The input characteristics include intermediate synthesis raw material component characteristics, synthesis reaction duration, and initial synthesis reaction conditions. The intermediate synthesis raw material component characteristics include information such as the types, ratios, and purities of raw materials. The synthesis reaction duration reflects the time length from the start of the reaction to the preset time node. The initial synthesis reaction conditions include temperature, pressure, stirring speed, catalyst type, and concentration, etc. Step S33: Determine the output characteristics. The output characteristics include the product concentration characteristic, bubble size characteristic value, bubble distribution characteristic value, hue characteristic value, and hue uniformity. Step S34: Extract the above-mentioned output features and input features from the original data, mark them, and transform the extracted original features to extract more useful information; for example, the time feature can be transformed into a reaction rate, the bubble size and distribution features can be transformed into a mixing efficiency index, etc.; normalize or standardize all numerical features (such as temperature, pressure, pH value, etc.) so that data of different magnitudes can be compared on the same scale; for categorical variables (such as raw material types), use one-hot encoding or other appropriate encoding methods to transform them into numerical forms; Step S35: Considering the complex chemical reaction kinetics involved in the synthesis process of pharmaceutical intermediates, select machine learning or deep learning algorithms that can handle non-linear relationships and have good interpretability, including random forests, gradient boosting trees, neural networks, Step S36: Use the prepared labeled dataset to train the selected model to learn the relationship between the input features and the output features; during the training process, use the cross-validation method to evaluate the model performance and optimize the model effect by adjusting the hyperparameters; the goal is to enable the model to accurately predict the set of standard state features of the reactants under the given input conditions; Step S36: Use the test set data to evaluate the trained model, and calculate indicators such as the accuracy, recall rate, and F1 score of the model; since the output features include multiple dimensions, it is necessary to evaluate the prediction performance of each feature separately; analyze the prediction error of the model to find out the reasons for the poor model performance, such as data noise, inappropriate feature selection, insufficient model complexity, etc.; according to the error analysis results, further optimize the model, such as adding features, adjusting the model structure, using more complex algorithms, etc.

[0030] The intermediate synthesis feature prediction model constructed through the above steps can receive the intermediate synthesis raw material component features, synthesis reaction duration, and initial synthesis reaction conditions as inputs, and the output is the set of standard state features of the reactants at the preset time node, including key parameters such as product concentration features, bubble size feature values, bubble distribution feature values, hue feature values, and hue uniformity, providing an important basis for subsequent reaction condition adjustment; by selecting specific features, the prediction ability and generalization performance of the model can be significantly improved. Especially in a complex and variable field such as the synthesis of pharmaceutical intermediates, effective feature engineering can capture key information and exclude noise interference, thus ensuring the accuracy and reliability of the model.

[0031] Step S4: Calculate the reactant state feature deviation vector between the set of standard state features of the reactants and the set of real-time state features of the reactants; The core task of step S4 is to calculate the difference between the set of standard state characteristics of the reactants at a preset time node and the set of real-time state characteristics of the reactants obtained through actual measurement, that is, the deviation vector of the reactant state characteristics. The deviation vector of the reactant state characteristics is used to quantify the gap between the current reaction state and the ideal state, providing a basis for subsequent condition adjustment. The specific implementation process is as follows: Step S41: The set of standard state characteristics of the reactants is predicted by the intermediate synthesis characteristic prediction model in step S3 based on the input parameters (characteristics of the intermediate synthesis raw material components, synthesis reaction duration, and initial synthesis reaction conditions). It includes key indicators such as the standard characteristic of product concentration, the standard characteristic value of bubble size, the standard characteristic value of bubble distribution, the standard characteristic value of hue, and the standard uniformity of hue. Step S42: The set of real-time state characteristics of the reactants is obtained through multi-dimensional data collection in step S1, including the product concentration measured by an on-line analyzer and the physical characteristics (such as bubble size, bubble distribution, hue, and its uniformity) extracted by image processing technology. Step S43: Ensure that the feature items in the two sets of state characteristics correspond one by one. For example, compare the predicted product concentration with the measured product concentration, and compare the bubble size characteristic values with the bubble size characteristic values, and so on. Step S44: For each pair of corresponding feature items, calculate their differences. For numerical features (such as product concentration, bubble size), subtraction operations can be directly performed. For categorical or ordinal features (such as hue characteristic values), appropriate distance measurement methods (such as Euclidean distance, Manhattan distance, or Hamming distance) can be used to quantify the differences. Step S45: Combine all the calculated differences into a vector to form the final deviation vector of the reactant state characteristics. The deviation vector of the reactant state characteristics not only represents the absolute differences in each feature item but also retains the relative relationships between them. Specifically, it is represented as: where D represents the deviation vector of the reactant state characteristics, represents the deviation value of product concentration, represents the deviation value of bubble size, represents the deviation value of bubble distribution, represents the deviation value of hue, represents the deviation value of hue uniformity. Through step S4, the difference between the current state of the reactants and the expected ideal state can be accurately quantified, providing a scientific basis for the subsequent dynamic adjustment of reaction conditions, not only improving the understanding and control ability of complex chemical reactions but also promoting the quality and efficiency of pharmaceutical intermediate synthesis. In addition, through continuous monitoring and calculation of the deviation vector, closed-loop feedback control can be achieved to ensure that the reaction always proceeds along the optimal path, reducing the generation of by-products and increasing the yield of the target compound.

[0032] Step S5: Input the reactant state feature deviation vector into the synthetic reaction dynamic regulation model to obtain a reaction condition adjustment strategy; To ensure that the generated reaction condition adjustment strategy is both scientific and effective, the synthetic reaction dynamic regulation model in Step S5 adopts a multi-layer analysis and decision-making mechanism during internal processing; the following is the detailed internal processing flow: Step S51: Standardize the values in the reactant state feature deviation vector to eliminate the influence of dimensional differences between different features; for example, subtract the mean value of each feature from it and divide by its standard deviation, or normalize it to the interval [0, 1]; this helps to improve the accuracy of subsequent analysis; Step S52: The synthetic reaction dynamic regulation model has a rule library containing various control rules, which are predefined based on historical data, experimental experience, and expert knowledge; when receiving the reactant state feature deviation vector, the model will query the rule library to find the control rule that best matches the current situation; Step S53: Considering the mutual influence between multiple adjustment measures, the model will perform multi-objective optimization; for example, when adjusting the temperature and pressure simultaneously, it is necessary to ensure that the two do not conflict, but instead can work together to achieve the best effect; ensure that the generated adjustment strategy complies with the physical and technical limitations in actual operation; for example, the temperature cannot exceed the safety upper limit of the equipment, and the pressure adjustment cannot cause the system to be unstable, etc.; if possible, the model will perform a quick simulation verification on the generated adjustment strategy to simulate the reaction state changes after execution to ensure the effectiveness and safety of the strategy; Step S54: The optimized adjustment strategy will be output in the form of clear instructions to guide the operator or the automated control system to adjust the reaction conditions; these instructions should clearly explain when, how, and how much to adjust to ensure the accuracy and consistency of execution.

[0033] To effectively respond to various deviation situations that may occur during the synthesis of pharmaceutical intermediates, the rule library is an important part of the synthetic reaction dynamic regulation model; it predefines a series of control rules based on historical data, experimental experience, and expert knowledge, and these rules are used to guide how to adjust according to specific deviation items (such as product concentration deviation value, bubble size deviation value, bubble distribution deviation value, hue deviation value, and hue uniformity deviation value); The rule library is organized in the form of condition-action pairs, and each rule contains one or more conditions (i.e., specific deviation features) and corresponding actions (i.e., adjustment measures); the rules can be simple "if-then" statements or more complex logical expressions involving combinations of multiple conditions; specific examples are as follows: Product concentration deviation rule: Rule 1: If the deviation value of the product concentration is greater than 5%, increase the reaction temperature by 0.5 °C and increase the stirring speed by 5%; a larger deviation in product concentration indicates that the reaction rate may be slow, and accelerating the reaction process can be achieved by raising the temperature and enhancing the mixing; Rule 2: If the deviation value of the product concentration is less than -3%, decrease the reaction temperature by 0.3 °C and reduce the feed flow rate by 10%; an excessive product concentration may mean that the reaction is too intense, and appropriate cooling and slowing down the raw material supply can help stabilize the reaction; Bubble size deviation rule: Rule 3: If the deviation value of the average bubble size is greater than 0.2 mm, increase the stirring speed by 10% and check the gas inlet rate; larger bubbles may affect the mass transfer efficiency, and enhancing stirring helps to break up large bubbles to ensure better mixing effect; Rule 4: If the deviation value of the average bubble size is less than -0.1 mm, slightly decrease the stirring speed by 5% to prevent the disappearance of tiny bubbles caused by excessive shear; too small bubbles may indicate the presence of too much fine foam in the system, and moderately decreasing the stirring speed can avoid this situation; Bubble distribution deviation rule: Rule 5: If the change in bubble distribution from "high" to "medium" is significant, adjust the angle or position of the stirrer to ensure uniform distribution; non-uniform bubble distribution may lead to differences in the local reaction environment, and adjusting the stirrer settings can improve this situation; Rule 6: If the deviation of the bubble distribution continues to deteriorate, consider introducing additional gas dispersion devices such as static mixers; when conventional measures cannot solve the problem, it may be necessary to use specialized equipment to forcefully improve the bubble distribution; Hue deviation rule: Rule 7: If the change in hue deviation value from "blue" to "light blue" is obvious, slightly adjust the pH value to 7.2 to optimize the reaction environment; the change in hue may reflect changes in chemical composition or reaction path, and appropriate pH adjustment can help restore the ideal reaction conditions; Rule 8: If the hue deviation value shows abnormal fluctuations, suspend the reaction, conduct a detailed analysis, and continue after excluding potential problems; abnormal hue fluctuations may indicate more serious problems, and further investigation is needed to avoid unnecessary risks; Hue uniformity deviation rule: Rule 9: If the change in hue uniformity from "high" to "medium" is significant, increase the stirring intensity by 10% to promote uniform mixing; a decrease in hue uniformity may mean insufficient mixing, and enhancing stirring can improve this situation; Rule 10: If the deviation of hue uniformity persists, check the inner wall of the reaction vessel for residues or contamination and clean the vessel if necessary; physical obstacles inside the vessel may interfere with the mixing effect, and timely cleaning can eliminate these adverse factors.

[0034] Step S5 ensures that the generated reaction condition adjustment strategy is both scientific and effective through a multi-layer analysis and decision-making mechanism; First, the standardization process eliminates the dimensional differences between different features, improving the accuracy of subsequent analysis; The built-in rule library, based on historical data, experimental experience, and expert knowledge, can quickly match the most suitable control rules; The multi-objective optimization takes into account the mutual influence between multiple adjustment measures, ensuring that the adjustment strategy works synergistically and complies with physical and technical limitations; The rapid simulation verification further guarantees the effectiveness and safety of the strategy; Finally, the clear instruction output guides the operator or the automated control system to make precise adjustments; This method not only enhances the understanding and control ability of complex chemical reactions, but also significantly promotes the quality and efficiency of pharmaceutical intermediate synthesis, and realizes closed-loop control, ensuring that the reaction always proceeds along the optimal path.

[0035] Step S6: Adjust the reaction conditions for the pharmaceutical intermediate synthesis operation based on the reaction condition adjustment strategy. Step S6 actually adjusts the reaction conditions in the pharmaceutical intermediate synthesis process according to the reaction condition adjustment strategy generated in Step S5; The aim is to ensure that the reaction can quickly return to the ideal path through precise control measures, thereby increasing the yield of the target compound and reducing the generation of by-products; The specific implementation process is as follows: Step S61: The operator or the automated control system receives the specific adjustment strategy instructions output from Step S5; These instructions detail when, how, and by how much to adjust, including but not limited to adjustments in temperature, pressure, pH value, stirring speed, and feed flow rate, etc. Step S62: If an automated control system is used, the system will directly automatically adjust the relevant parameters according to the received instructions; For example, change the temperature by adjusting the heater power, or adjust the feed flow rate by controlling the pump speed; In some cases, the operator may need to manually execute the adjustment measures; At this time, the operator will strictly make adjustments according to the instructions and record the time points and specific contents of each operation for subsequent review and analysis. Step S63: While implementing the adjustment measures, the system continuously monitors the state characteristics of the reactants (such as product concentration, bubble size, bubble distribution, hue, and its uniformity); This can be achieved through on-line analytical instruments and imaging equipment to ensure that any new changes can be captured in a timely manner. Step S64: According to the real-time monitoring data, if a new deviation is found, the system can immediately re-enter the loop of steps S4 - S6, calculate the deviation vector again, and generate a new adjustment strategy; this closed-loop feedback mechanism ensures that the reaction conditions are always in the optimal state.

[0036] Through step S6, the system can quickly respond to and correct the deviations that occur during the reaction process, ensuring that the reaction conditions are always maintained in the optimal state; this method not only improves the understanding and control ability of complex chemical reactions, but also significantly promotes the quality and efficiency of the synthesis of pharmaceutical intermediates; in addition, through continuous monitoring and feedback adjustment, the system realizes closed-loop control, ensuring that the reaction always proceeds along the predetermined ideal path, reducing the generation of by-products and increasing the yield of the target compound.

[0037] Example two: As Figure 2 shown, a dynamic reaction condition adjustment system for the synthesis of pharmaceutical intermediates of the present invention specifically includes the following modules; Data acquisition module, used to obtain the real-time state feature set of reactants, the start time node of the synthesis operation, and the component features of the raw materials for the synthesis of intermediates; through sensors and data acquisition systems, the physical and chemical properties of reactants are monitored in real time, the start time of the synthesis operation is recorded, and the component information of the raw materials is input. Time calculation module, used to calculate the synthesis reaction duration according to the preset time node and the start time node of the synthesis operation; using the time difference calculation formula, determine the time interval from the start of synthesis to the preset time node. Feature prediction module, used to input the component features of the raw materials for the synthesis of intermediates, the synthesis reaction duration, and the initial synthesis reaction conditions into a pre-trained intermediate synthesis feature prediction model to obtain the set of standard state features of reactants at the preset time node. Deviation calculation module, used to calculate the reactant state feature deviation vector between the set of standard state features of reactants and the set of real-time state features of reactants; through vector operations, compare the differences between the standard state and the real-time state to obtain the deviation degree and direction. Regulation strategy generation module, used to input the reactant state feature deviation vector into the synthesis reaction dynamic regulation model to obtain the reaction condition adjustment strategy; based on the deviation vector and a preset control algorithm (such as a PID controller), generate specific adjustment measures, such as adjustment schemes for temperature, pressure, flow rate, etc. Reaction condition adjustment execution module, used to perform real-time reaction condition adjustment on the pharmaceutical intermediate synthesis operation according to the generated adjustment strategy; through an automated control system, adjust relevant equipment and parameters according to the adjustment strategy to ensure that the reaction is always in the optimal state.

[0038] In this embodiment, by integrating six major modules including data acquisition, time calculation, feature prediction, deviation calculation, regulation strategy generation, and reaction condition adjustment execution, the comprehensive monitoring and intelligent adjustment of the synthesis process are realized; the system uses sensors to monitor the state of reactants in real time to ensure the timeliness and accuracy of data, and combines preset time nodes and initial reaction conditions, and uses a pre-trained model to predict the ideal state feature set; by comparing the deviation vector between the standard state and the actual state, the system can accurately identify the deviations in the reaction process and quickly formulate and implement targeted adjustment strategies through advanced control algorithms; this adaptive adjustment mechanism not only overcomes the variable factors that are difficult to handle under traditional fixed reaction conditions, but also significantly reduces the uncertainty brought by human intervention, improves the reaction efficiency and product quality; in addition, the system supports closed-loop feedback to continuously optimize the reaction conditions, which helps to reduce the by-product generation rate, improve the yield of the target compound, and thus enhance the safety and effectiveness of the drug; at the same time, the automated control system ensures the precise execution of the adjustment measures, improves the stability and reliability of production, accelerates the R & D cycle, reduces the production cost, and provides strong technical support for the efficient and high-quality synthesis of pharmaceutical intermediates.

[0039] The various change modes and specific embodiments of the method for dynamically adjusting the reaction conditions of the pharmaceutical intermediate synthesis in the foregoing Embodiment 1 are equally applicable to the system for dynamically adjusting the reaction conditions of the pharmaceutical intermediate synthesis in this embodiment. Through the foregoing detailed description of the method for dynamically adjusting the reaction conditions of the pharmaceutical intermediate synthesis, those skilled in the art can clearly know the implementation method of the system for dynamically adjusting the reaction conditions of the pharmaceutical intermediate synthesis in this embodiment. Therefore, for the sake of brevity of the specification, it will not be described in detail herein.

[0040] In addition, the present application also provides an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored on the memory and executable on the processor. The transceiver, the memory, and the processor are respectively connected through the bus. When the computer program is executed by the processor, it realizes each process of the method embodiment for controlling the output data, and can achieve the same technical effect. To avoid repetition, it will not be described in detail here.

[0041] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A method for dynamically adjusting reaction conditions of a pharmaceutical intermediate synthesis, characterized in that: The method comprises: Obtain the real-time status feature set of reactants, the start time node of the synthesis operation, and the component features of the intermediate synthesis raw materials; The synthesis reaction time is calculated according to the preset time node and the synthesis operation start time node; The intermediate synthesis raw material component characteristics, synthesis reaction time and initial synthesis reaction conditions are input into a pre-trained intermediate synthesis feature prediction model to obtain a reactant standard state feature set at a preset time node; Calculating a reactant state feature deviation vector between the reactant standard state feature set and the reactant real-time state feature set; Inputting the reactant state characteristic deviation vector into a synthetic reaction dynamic control model to obtain a reaction condition adjustment strategy; Based on the reaction condition adjustment strategy, the reaction conditions of the pharmaceutical intermediate synthesis operation are adjusted.

2. The method for dynamically adjusting reaction conditions of a pharmaceutical intermediate synthesis according to claim 1, wherein: The method for acquiring the reactant real-time state feature set comprises: At preset time points, collect product concentration characteristics and static surface images of reactants in pharmaceutical intermediate synthesis operations; Using the pre-trained reactant image feature recognition model, feature recognition is performed on the reactant static surface image to obtain bubble size feature values, bubble distribution feature values, hue feature values ​​and hue uniformity; The product concentration characteristics, bubble size characteristic values, bubble distribution characteristic values, hue characteristic values ​​and hue uniformity are combined in a preset order to obtain a reactant real-time state characteristic set.

3. The method for dynamically adjusting reaction conditions of a pharmaceutical intermediate synthesis as claimed in claim 2, characterized in that: The method for obtaining the product concentration characteristics comprises: Obtaining structural design information of a reaction vessel used in a synthesis reaction and liquid level height of reactants in the reaction vessel; Performing structural feature recognition on the structural design information of the reaction container to obtain the center position of the bottom of the reaction container; Taking the center position of the bottom of the reaction container as the origin, establishing a three-dimensional coordinate system of the reaction container; Inputting the liquid level height into a pre-trained concentration detection position setting model to obtain a real-time concentration detection position set; the real-time concentration detection position set includes three-dimensional coordinates of multiple concentration detection positions in the three-dimensional coordinate system of the reaction container; According to the real-time concentration detection position set, the product concentration of the reactants in the reaction container is detected to obtain multiple real-time concentrations of the products; Characteristic values ​​are extracted from the real-time concentrations of a plurality of the products to obtain the product concentration characteristics.

4. The method for dynamically adjusting reaction conditions of a pharmaceutical intermediate synthesis as claimed in claim 2, characterized in that: The method for constructing the intermediate synthesis characteristic prediction model comprises: Collect industrial historical production records and laboratory test results, clean the collected data, and remove outliers and noise; Determine input characteristics, the input characteristics include intermediate synthesis raw material component characteristics, synthesis reaction time and initial synthesis reaction conditions; Determining output characteristics, the output characteristics include the product concentration characteristics, bubble size characteristic values, bubble distribution characteristic values, hue characteristic values ​​and hue uniformity; Extract the determined output features and input features from the original data, mark them, and transform the extracted original features, including normalizing all numerical features so that data of different magnitudes can be compared on the same scale; for categorical variables, use one-hot encoding to convert them into numerical form; Considering the chemical reaction kinetics in the synthesis process of pharmaceutical intermediates, a deep learning algorithm is selected as the basic model framework of the intermediate synthesis feature prediction model; The selected basic model framework is trained using the converted output features and input features to learn the relationship between the input features and the output features. The cross-validation method is used during the training process to evaluate the model performance, and the model effect is optimized by adjusting the hyperparameters. The goal is to enable the model to predict the standard state feature set of reactants under given input conditions.

5. The method for dynamically adjusting reaction conditions of a pharmaceutical intermediate synthesis as claimed in claim 2, characterized in that: The reactant state characteristic deviation vector is expressed as: Where D represents the reactant state characteristic deviation vector, represents the product concentration deviation value, Indicates the bubble size deviation value, Indicates the bubble distribution deviation value, Indicates the hue deviation value. Indicates the hue uniformity deviation value.

6. The method for dynamically adjusting reaction conditions of a pharmaceutical intermediate synthesis as claimed in claim 5, characterized in that: The synthetic reaction dynamic control model adopts a multi-layer analysis and decision-making mechanism, including: The values ​​in the reactant state characteristic deviation vector are standardized to eliminate the influence of the dimension difference between different characteristics; The synthetic reaction dynamic control model has a built-in rule library containing a variety of control rules; When receiving the reactant state characteristic deviation vector, the synthetic reaction dynamic control model will query the rule base to find the control rule that best matches the current situation; Considering the mutual influence between multiple regulation measures, multi-objective optimization is performed to ensure that the generated regulation strategy meets the physical and technical limitations in actual operation. The optimized regulation strategy will be output in the form of clear instructions to guide operators or automated control systems to adjust reaction conditions.

7. The method for dynamically adjusting reaction conditions of a pharmaceutical intermediate synthesis as claimed in claim 6, characterized in that: The rule base includes product concentration deviation rules, bubble size deviation rules, bubble distribution deviation rules, hue deviation rules and hue uniformity deviation rules.

8. A system for dynamically adjusting reaction conditions of pharmaceutical intermediate synthesis, characterized in that: The system comprises: The data acquisition module is used to obtain the real-time state feature set of reactants, the start time node of the synthesis operation and the component features of the intermediate synthesis raw materials; A time calculation module, used to calculate the synthesis reaction time according to the preset time node and the synthesis operation start time node; A feature prediction module is used to input the intermediate synthesis raw material component characteristics, synthesis reaction time and initial synthesis reaction conditions into a pre-trained intermediate synthesis feature prediction model to obtain a reactant standard state feature set at a preset time node; A deviation calculation module, used to calculate a reactant state feature deviation vector between a reactant standard state feature set and a reactant real-time state feature set; A control strategy generation module is used to input the reactant state characteristic deviation vector into the synthesis reaction dynamic control model to obtain the reaction condition adjustment strategy; The reaction condition adjustment execution module is used to adjust the reaction conditions of the pharmaceutical intermediate synthesis operation in real time according to the generated adjustment strategy.

9. An electronic device for dynamically adjusting reaction conditions of a pharmaceutical intermediate synthesis, comprising a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are connected via the bus, and characterized in that: When the computer program is executed by the processor, the steps in the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 7 are implemented.