A pharmaceutical process quality intelligent control robot and control method
By introducing robot automation technology in the quality management of drug production, the drug production quality management software robot system of the drug production quality management software of Liusigma quality management and artificial intelligence algorithm, the problem of human factors in traditional methods and difficulty preventing quality in the traditional method, realizing the quality management of drug production Real -time monitoring, intelligent analysis and dynamic optimization.
Patent Information
- Application Number
- CN202411246421.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-09-06
AI Technical Summary
Traditional drug production quality management methods rely on manual monitoring and post-event testing, which are affected by human factors, difficult to prevent quality problems, and difficult to monitor and control complex production processes.
The drug production quality management software robot system with fusion robot automation technology, six Sigma quality management methods, and artificial intelligence algorithms can be used to achieve real -time monitoring, intelligent analysis and dynamic optimization of the entire process of drug production.
Through real -time monitoring and intelligent analysis, it can prevent potential quality problems, improve the efficiency and level of quality management of drug production, and achieve dynamic optimization and intelligent control of the production process.
Smart Images

Figure CN118780683B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of drug production management, and in particular to a pharmaceutical process quality intelligent control robot and control method. Background Art
[0002] In the current pharmaceutical production industry, the control of drug quality consistency is crucial to ensure the safety and efficacy of drug use. With the continuous improvement of the complexity and precision of the drug production process, traditional quality management methods have been unable to meet the needs of high-quality and high-efficiency production. Therefore, it is urgent to introduce advanced quality management concepts and technical means to improve and optimize drug production quality management.
[0003] Traditional drug production quality management mainly relies on manual monitoring and post-testing, which has many limitations. On the one hand, manual monitoring is easily affected by human factors, making it difficult to ensure the stability and accuracy of quality monitoring; on the other hand, post-testing can only detect problems that have already occurred, but cannot prevent potential quality problems. In addition, traditional methods also have certain difficulties in monitoring and controlling key parameters and indicators in complex production processes.
[0004] In order to overcome the limitations of traditional methods and improve the efficiency and level of drug production quality management, the present invention proposes a drug production quality management software robot system that integrates robot automation technology, Six Sigma quality management methods and artificial intelligence algorithms. The system uses advanced automation technology and intelligent algorithms to achieve real-time monitoring, intelligent analysis and dynamic optimization of the entire drug production process, thereby comprehensively improving the efficiency and level of drug production quality management. Summary of the invention
[0005] In view of the problems existing in the prior art, the present invention provides a pharmaceutical process quality intelligent control robot and a control method.
[0006] To achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0007] A control method for a pharmaceutical process quality intelligent control robot comprises the following steps: step S1, using a data acquisition module to collect drug quality data of several production batches, and performing a cleaning operation on the collected drug quality data, wherein the drug quality data includes drug material inspection data, finished product quality inspection data and production process parameter data; the cleaning operation process comprises the following steps: step S11: deleting batches that lack drug material inspection records or finished product quality inspection records, and deleting batches with more than 50% missing values of time series data in production process parameters; step S12: filling missing values in production process parameters using a forward filling strategy , that is, fill in the missing value with the previous non-missing value adjacent to the missing value; step S13: use maximum and minimum normalization to perform dimensionless processing on the data processed in step S12; step S14: use the DTW algorithm to align the time series data in the production process parameters in data cleaning; step S2, based on the drug quality data, use the process modeling module to build the association model between material attribute Z, process parameter X and target quality attribute Y: Y=f(X,Z); step S3: resample and perform batch optimization; step S4, visualize the quality management data through the Six Sigma quality management system.
[0008] Based on the above technical solution, further, in step S1, the drug material inspection data includes the active ingredient content, pesticide residues and heavy metal residues; the finished product quality inspection data includes the active ingredient content and the harmful ingredient content; the production process parameter data includes the process parameters of each process step.
[0009] Based on the above technical solution, further, in step S2, step S21: based on the data recorded in the production batch, use bootstrap sampling to expand the sample size; step S22: for the selected process steps to be modeled, each process parameter is constructed as a graph network according to the actual relationship of the production process, and then the time series data information is added to construct a spatiotemporal graph neural network, and the KMEANS algorithm is used to discretize each time series data, and several discrete categories or groups are used as modeling variables; step S23: using the resampled process parameter time series characteristics as input, and is the model output, where is the calculated value of the target quality attribute Y, As the mean value of the target quality attribute Y, a regression prediction model based on graph convolutional neural network is established, using the root mean square error RMSE and the determination coefficient R 2 The ability to predict the target quality attribute Y, where the regression prediction model is also an association model.
[0010] Based on the above technical solution, further, in step S21, the data recorded in the production batch are: the sampling frequency is 50Hz, that is, 50 samples are extracted each time to reconstruct the training set, and calculate and , where i represents the quality attribute number, the data set consisting of drug quality data was resampled 10,000 times, and the data set was divided into a training set and a test set at a ratio of 7:3, and then sampled 5,000 times as an external validation set; where, and The calculation process is: ; ; In the formula, is the mean of the sample data; LSL is the lower specification limit; USL is the upper specification limit; σ is the sample standard deviation.
[0011] Based on the above technical solution, further, in step S23, the graph convolutional neural network includes: input layer: including process parameters, which include temperature, pressure, flow rate and time; graph convolution layer: processing the relationship between each parameter in the captured process parameters; full connection layer: adjusting the number of layers and the number of neurons in each layer; output layer: the output layer predicts the final target quality attribute Y, including and is the model output.
[0012] Based on the above technical solution, further, in step S3, step S31: use the regression prediction model established in step S23 to predict the external validation set, Step S32: for the qualified batch set, filter out For the batch set that falls within the required interval (LSL to USL), the NSGA-II algorithm is used to find the Pareto optimal solution of the multi-objective function; where the multi-objective function is the required interval of each quality indicator, ; Step S33: Optimize the process parameter curve through the control tuning module, wherein all the time series data of the Pareto optimal solution obtained in step S32 are used as the preferred interval of the process parameters, and the average value curve of each time series variable sample is used as the optimal process parameter curve; Step S34: Update the data based on the model update module and perform batch optimization.
[0013] Based on the above technical solution, further, in step S34, the model is updated using a data adapter and a model adapter;
[0014] (1) The data adapter adaptively corrects the newly collected data based on the distribution difference between the training data and the test data;
[0015] Given incremental data :
[0016] ;
[0017] ;
[0018] G(x) usually represents a function that performs some transformation or processing on the input data x;
[0019] H(x,y) usually represents a function that jointly processes the input data x and the target variable y;
[0020] Represents the training data set after data preprocessing used in the k-th training; Represents the test data set after data preprocessing used in the k-th training; It indicates the test data set without data preprocessing; Represents the training dataset without data preprocessing.
[0021] (2) Model adapter Let the key quality attribute set be L. After the baseline model is established in step S33, the incremental data preprocessed in S32 is used as input to start the model adaptive update based on fine-tuning training. The following formula expresses the training loss Calculation method:
[0022] ;
[0023] In the formula, x represents the input data; y represents the target variable, which is the true label corresponding to the input data; Indicates that the model has parameters The predicted output for the input data x is:
[0024] After the updated model is completed, the batch optimization steps S31 to S33 will be repeated, thereby achieving automatic and continuous optimization of production quality.
[0025] A pharmaceutical process quality intelligent control robot comprises a data acquisition module, a data analysis module, a process modeling module and a tuning module; the data acquisition module acquires structured data, real-time process data, component content change data and full-cycle quality traceability data, and transmits all the acquired data to the data analysis module for analysis; the data analysis module also uses multivariate statistical analysis control charts to monitor quality deviations, and transmits the analyzed data to the process modeling module for modeling; the process modeling module uses a machine learning algorithm to establish an association model between material attributes, process parameters and target quality attributes, and uses incremental learning and transfer learning methods to continuously update and optimize the association model, and transmits the updated and optimized output to the tuning module; the tuning module automatically adjusts and optimizes production parameters according to the quality attribute model and analysis results.
[0026] Based on the above technical solution, further, the structured data at least includes process parameter setting values and equipment operating status, wherein a software robot system is used to automatically log in to the production execution MES system to extract the structured parameters.
[0027] Based on the above technical solution, further, the real-time process data includes at least temperature, pressure, flow and liquid level, and the real-time process data is collected from the automation system through an industrial communication protocol.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] (1) The present invention uses software robotics technology and a variety of sensors to collect key process parameters and material attribute data in the pharmaceutical production process in real time, and uses advanced data analysis methods and machine learning algorithms to analyze and process the collected data in real time, including operations such as cleaning, resampling, and visualization. At the same time, the system also introduces the Six Sigma quality management method, through in-depth analysis and management of data, identifies key influencing factors, and formulates corresponding improvement measures. In addition, the system also has the ability of adaptive learning and self-optimization, and can automatically adjust and optimize parameter settings according to the actual situation of the production process, realizing dynamic optimization and intelligent control of the production process.
[0030] (2) The pharmaceutical production quality management software robot system proposed in this invention integrates advanced automation technology, intelligent algorithms and Six Sigma quality management methods, bringing reference value to the field of pharmaceutical production quality management. This system not only improves the efficiency and level of pharmaceutical production quality management, but also promotes the high-quality development of the pharmaceutical industry, which is important for ensuring the safety and efficacy of patient medication.
[0031] (3) The present invention integrates advanced technologies such as robotic automation, Six Sigma management, and artificial intelligence to form a set of effective overall solutions for drug quality management, which comprehensively improves the automation and intelligence level of quality management; it realizes real-time online monitoring of the entire production process, and quality problems can be warned and fed back in a timely manner, greatly improving the timeliness and pertinence of quality control; the model is automatically corrected and updated, helping to achieve continuous optimization of the drug production process. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flowchart of the present invention. DETAILED DESCRIPTION
[0033] The present invention is further described and illustrated below in conjunction with the accompanying drawings and specific embodiments. The technical features of each embodiment of the present invention can be combined accordingly without conflicting with each other.
[0034] In order to make the above-mentioned purpose, features and advantages of the present invention more obvious and easy to understand, the specific implementation mode of the present invention is described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. The technical features in each embodiment of the present invention can be combined accordingly without conflicting with each other.
[0035] Example
[0036] Combination Figure 1 As shown, this embodiment provides a control method of a pharmaceutical process quality intelligent control robot, comprising the following steps:
[0037] Step S1, using a data acquisition module to collect drug quality data of several batches, and cleaning the collected quality data, wherein the drug quality data includes drug material inspection data, finished product quality inspection data and production process parameter data; wherein the drug material inspection data includes active ingredient content, pesticide residues, heavy metal residues, etc.; the finished product quality inspection data includes active ingredient content, harmful ingredient content, etc.; the production process parameter data includes each process parameter, taking the extraction process as an example, extraction temperature, extraction time, heating rate, etc.
[0038] In this embodiment, the cleaning operation process is:
[0039] Step S11: Delete batches that lack drug material inspection records or finished product quality inspection records, and delete batches with missing values of time series data in production process parameters exceeding 50%; the missing time series data may be caused by the sensor not being turned on, sensor failure, network transmission failure, and server storage failure.
[0040] Step S12: missing values in the production process parameters are filled using a forward filling strategy, that is, the missing value is filled with the previous non-missing value adjacent to the missing value;
[0041] Step S13: Use maximum and minimum normalization to perform dimensionless processing on the data processed in step S12; wherein, the maximum and minimum normalization operation is an existing method and will not be described in detail here.
[0042] Step S14: Use the DTW algorithm to perform alignment processing on the time series data in the production process parameters during data cleaning; specifically, the DTW (Dynamic Time Warping) algorithm is used to align the time series data. Generally speaking, the DTW algorithm is used to measure the similarity between two time series, especially for situations with unequal lengths or different rates. The principle of the DTW algorithm is to first create a cumulative distance matrix, the rows and columns of which correspond to each time point of the two time series. Each element in the matrix represents the cumulative distance from a certain time point in one time series to a certain time point in another time series. For example: A and B represent the time series data corresponding to the same production process parameters in two production batches: A=a1,a2,…,a e ,…,a m ; B = b1, b2, …, b f ,…,b n ; Construct an n×m cumulative distance matrix, the matrix element (f, e) represents a f The distance d between points be and fe (That is, the similarity between each point in sequence A and each point in sequence B. The smaller the distance, the higher the similarity.) Generally, Euclidean distance is used, d fe =(a f -b e ) 2 . Starting from the lower left corner of the matrix, through each cell, calculate the cumulative distance of the current cell. The cumulative distance is usually based on the local distance of the current cell (such as Euclidean distance) and the cumulative distance of adjacent cells (usually through some form of weighting). Select a path from the lower left corner to the upper right corner of the matrix, which must meet the monotonically increasing condition (that is, it cannot go back to the past time point) and minimize the cumulative distance. This path represents the best alignment between the two time series. According to the selected path, the corresponding points between the two time series can be obtained, thereby achieving the alignment of the time series.
[0043] Step S2: Based on the drug quality data, a process modeling module is used to construct an association model between material attribute Z, process parameter X and target quality attribute Y: Y=f(X,Z); wherein the process quality sigma level mainly evaluates the precision of the target quality attribute Y;
[0044] In this embodiment, the specific process is:
[0045] Step S21: The sampling frequency is 50 Hz, that is, 50 samples are extracted each time to reconstruct the training set and calculate and , where i represents the quality attribute number. The data set consisting of drug quality data was resampled 10,000 times, and divided into a training set and a test set at a ratio of 7:3. The data set was resampled 5,000 times as an external validation set.
[0046] in, and The calculation process is:
[0047] ; ; In the formula, is the mean of the sample data; LSL is the lower specification limit; USL is the upper specification limit; σ is the sample standard deviation;
[0048] Step S22: For the selected process steps to be modeled (such as extraction, concentration, granulation, etc.), each process parameter is constructed into a graph network according to the actual relationship of the production process, and then the time series data information is added to construct a spatiotemporal graph neural network, and the KMEANS algorithm or other clustering algorithms are used to discretize each time series data as a modeling variable; wherein, the process parameters include temperature, pressure, flow, time, etc.; the KMEANS clustering algorithm is used to divide the continuous data into several discrete categories or groups. The basic principle of the KMEANS algorithm is to assign data points to K clusters so that each data point belongs to the cluster center (mean) closest to it.
[0049] Step S23: Taking the resampled process parameter timing characteristics as input, and is the model output, where is the calculated value of the target quality attribute Y, As the mean value of the target quality attribute Y, a regression prediction model based on graph convolutional neural network is established, using the root mean square error RMSE and the determination coefficient R 2 The ability to predict the target quality attribute Y, where the root mean square error RMSE is used to measure the average deviation between the predicted value and the actual value; the coefficient of determination R² is used to measure the ability of the model to explain the variability of the data. Regression prediction model is also an association model.
[0050] In this embodiment, the graph convolutional neural network consists of the following parts:
[0051] Input layer: including important process parameters such as temperature, pressure, flow, time, etc. These parameters are resampled time series features and may have been discretized by KMEANS or other clustering algorithms.
[0052] Graph Convolutional Layer: This layer uses a graph convolutional neural network (GCN) to process the input data. GCN is able to capture the complex relationship between parameters, taking into account their mutual influence during production.
[0053] Fully connected layer: After the graph convolution layer, the regression prediction model uses a fully connected layer to further process features. Two fully connected layers are used here, and the number of layers and the number of neurons in each layer can be adjusted according to actual needs.
[0054] Output layer: The output layer predicts the final target quality attribute Y, which in this embodiment includes and is the model output.
[0055] Step S3: resampling and batch optimization;
[0056] In this embodiment, the specific process is:
[0057] Step S31: Use the regression prediction model established in step S23 to predict the external validation set. To limit the conditions, select qualified batch sets, preferably, To be a limiting condition;
[0058] Step S32: Filter out the qualified batch sets For the batch set that falls within the required interval (LSL to USL), the NSGA-II algorithm is used to find the Pareto optimal solution of the multi-objective function; where the multi-objective function is the required interval of each quality indicator, ;
[0059] Step S33: Optimizing the process parameter curve by controlling the tuning module, wherein all the time series data of the Pareto optimal solution obtained in step S32 are used as the process parameter optimization interval, and the average value curve of each time series variable sample is used as the optimal process parameter curve;
[0060] Step S34: Update data based on the model update module, perform batch optimization, realize dynamic model learning and updating, and always maintain the effectiveness of model prediction. Specifically, the Six Sigma robot can automatically collect production data and start the model adaptive update function to maintain model accuracy. The data adapter and model adapter are mainly used to update the model:
[0061] 1. Data-Adapter: When using a machine learning model, there is usually a training dataset (for training the model) and a test dataset (for evaluating the model). However, over time, the newly collected data (i.e., incremental data) may have a different distribution from the original training data. This distribution difference may cause the model to perform poorly on the new data. To solve this problem, a data adapter is used. The adapter will adaptively correct the newly collected data based on the distribution difference between the training data and the test data. This process can include: Standardization or normalization: Standardize or normalize the new data based on the statistical characteristics of the training data.
[0062] Feature transformation: Apply certain feature transformation techniques to make the distribution of new data more consistent with that of training data in feature space. Resampling techniques: Use resampling techniques (such as upsampling or downsampling) to adjust the distribution of new data to make it more similar to the distribution of training data. Through these adaptive correction methods, the model can better adapt to the new data, thereby improving its predictive performance. The data adapter performs adaptive correction on the newly collected data based on the distribution difference between the training data and the test data; given the incremental data :
[0063] ;
[0064] ;
[0065] G(x) usually represents a function that performs some transformation or processing on the input data x;
[0066] H(x,y) usually represents a function that jointly processes the input data x and the target variable y;
[0067] Represents the training data set after data preprocessing used in the k-th training; Represents the test data set after data preprocessing used in the k-th training; It indicates the test data set without data preprocessing; Represents the training dataset without data preprocessing.
[0068] 2. Model adapter Let the key quality attribute set be L. After the baseline model is established in step S33, the incremental data preprocessed in S32 is used as input to start the model adaptive update based on fine-tuning training. The fine-tuning training method is a commonly used algorithm method in machine learning algorithms, and the process is not described here. Specifically, the following formula represents the training loss Calculation method:
[0069] ;
[0070] In the formula, x represents the input data; y represents the target variable, which is the true label corresponding to the input data; Indicates that the model has parameters The predicted output for the input data x is obtained; after the update, the model will repeat the batch optimization steps S31 to S33, thereby achieving automatic and continuous optimization of production quality.
[0071] Step S4: Visualize the quality management data through the Six Sigma quality management system. Specifically, the Six Sigma quality management system also includes a quality data visualization module and a quality report automatic generation module. The quality data visualization module displays the key quality indicators (such as non-conforming rate, process capability index, etc.) and process capability level of the drug production process in real time through intuitive charts, dashboards, etc., providing managers with intuitive and accurate quality information and data support for quality decisions. The quality report automatic generation module automatically generates quality analysis reports regularly (such as daily / weekly / monthly) according to the preset report template, summarizes and analyzes quality data, evaluates the quality improvement effect, identifies the direction of continuous optimization, and realizes closed-loop improvement of quality management.
[0072] In another embodiment, a pharmaceutical process quality intelligent control robot is implemented, including a data acquisition module, a data analysis module, a process modeling module and a tuning module; the data acquisition module collects structured data, real-time process data, component content change data and full-cycle quality traceability data, and transmits all collected data to the data analysis module for analysis; and the data analysis module also uses multivariate statistical analysis control charts to monitor quality deviations, and transmits the analyzed data to the process modeling module for modeling; the process modeling module uses machine learning algorithms to establish an association model between material attributes, process parameters and target quality attributes, and uses incremental learning and transfer learning methods to continuously update and optimize the association model, and transmits the updated and optimized output to the tuning module; the tuning module automatically adjusts and optimizes production parameters according to the quality attribute model and analysis results.
[0073] Specifically, 1. The data acquisition module collects key process parameters and material attribute data in real time based on software robot technology and multiple sensors. Specifically, it includes: using the table input function of the data acquisition module of the software robot to automatically log in to the MES database of the production execution system, synchronize process parameter setting values (taking the Chinese medicine extraction process as an example, including temperature setting, extraction time, etc.), equipment operation status (equipment standby, equipment operation, equipment shutdown, equipment failure, etc.) and other structured data tables. Through industrial communication protocols such as OPC UA, the industrial Internet communication module independently set up in the software robot collects and stores real-time process parameters such as temperature, pressure, flow, and liquid level from automation systems such as PLC and DCS. The software robot machine vision module is independently deployed to automatically detect the appearance, color, and particle size of raw materials, excipients, semi-finished products, and finished products, and give the average distribution of pixels in the XYZ color space and the particle size. Use online analytical instruments such as near-infrared spectrometers or Raman spectrometers to monitor the changes in the material component content of each process step in real time. Through Internet of Things technologies such as RFID and barcodes, full-cycle quality traceability data such as material batches, flow directions, and storage conditions are automatically collected.
[0074] 2. Data analysis module: Use principal component analysis (PCA), partial least squares discriminant analysis (PLS-DA), cluster analysis, time series analysis and other methods to analyze the collected massive data in real time, and use multivariate statistical analysis control charts to monitor quality deviations. Specifically, it includes: using the PCA method to reduce the data dimension, extracting and finding the variable factors that contribute most to the quality classification, and realizing the visualization of high-dimensional data. The PLS-DA algorithm is used to establish a discriminant model for raw material attributes and drug quality, and to realize the rapid analysis of drug material quality. For example, the software robot vision module obtains the appearance, color, particle size and other data of multiple batches of raw materials and drugs. The quality grade of each batch of raw materials and drugs is known. The PLS-DA model is constructed to predict the quality grade based on the appearance, color, particle size and other data. Clustering algorithms such as K-means are used to cluster the process data of different production batches, and the clustering results are compared with the quality results of the production batch, and the process data of the production batch with better quality is selected as the direction of process optimization. Use time series models such as ARIMA and Prophet to predict trends and anomaly alarms for key quality parameters (quality items that have a significant impact on drug effectiveness and safety, such as the content of active ingredients, fingerprint similarity, etc.); among them, key quality parameters are quality items that have a significant impact on drug effectiveness and safety, such as the content of active ingredients, fingerprint similarity, etc.; when the standard range of key quality parameters or SPC statistical control limits are exceeded, an abnormal alarm is issued. Construct multivariate control charts based on statistical indicators such as Hotelling T² and SPE to monitor the quality status of the production process in real time. Among them, the Hotelling T² statistic is a statistic used for multivariate process monitoring. It can be regarded as the square of the distance from the multivariate data point to its mean, and the result is obtained after standardization; in quality control, the Hotelling T² statistic is used to detect joint anomalies of multiple related variables. It is one of the commonly used indicators in multivariate control charts; the specific calculation process is as follows: a sample x1 containing p variables, the Hotelling T² statistic calculation formula is:
[0075] ; where μ1 is the mean vector and S is the covariance matrix.
[0076] SPE is an indicator to measure the size of the prediction error, which represents the sum of the squared errors between the actual observations and the predicted values. In multivariate process monitoring, SPE is used to detect the deviation between the model prediction and the actual observations to help identify abnormal situations. For an observation vector x2, the prediction vector , the SPE calculation formula is: , x2 and are the actual value and the predicted value respectively, and c represents the number of indicators.
[0077] 3. The process modeling module uses machine learning algorithms to establish the association model Y=f(Z,X) between material attributes Z, process parameters X and target quality attributes Y, and uses incremental learning, transfer learning and other strategies to continuously update and optimize the model for quality prediction and process optimization. Specifically, it uses support vector machine (SVM), random forest (RF), XGBoost and other algorithms to build the association model Y=f(Z,X) to achieve real-time online prediction of key quality attributes (such as active ingredient content, dissolution, etc.). Bayesian optimization, grid search and other methods are used to optimize model hyperparameters to improve prediction accuracy and robustness; Bayesian optimization is an optimization method based on Bayesian theorem, which approximates the objective function by building a proxy model and finds the optimal hyperparameter combination through continuous updates; grid search is an exhaustive search method that tries each possible combination one by one through a predefined set of hyperparameters to find the optimal hyperparameter combination. Introduce an incremental learning mechanism to regularly use newly collected data to update and fine-tune the model online to adapt to dynamic changes in process conditions. Online updating means that the model can update it in real time when new data is received. This method is particularly suitable for streaming data scenarios. The implementation steps are as follows:
[0078] 1. Data preprocessing: Preprocess the newly collected data to ensure that its format is consistent with the original training data.
[0079] 2. Model update: Update the model using new data.
[0080] 3. Evaluation and Validation: Evaluate the performance of the model on new data to ensure that the updated model does not overfit or underfit.
[0081] Fourth, fine-tuning is usually used for deep learning models. It means using new data to further train some or all parameters of the model based on the pre-trained model. Its implementation steps are:
[0082] Load a pre-trained model: Load a model that has been pre-trained on a large-scale dataset.
[0083] Freeze some layers: Freeze the parameters of some layers as needed so that they do not participate in training. Usually, freeze the bottom-layer parameters and only fine-tune the top-layer parameters.
[0084] Train with New Data: Train unfrozen layers with new data.
[0085] By using transfer learning technology, the quality models of existing products can be migrated and applied to new product development, shortening the modeling cycle and improving development efficiency.
[0086] 3. The tuning module automatically adjusts production parameters according to the quality attribute model and analysis results, and uses adaptive control strategies, feedback mechanisms, and reinforcement learning algorithms to achieve dynamic optimization and intelligent control of the production process. Specifically, the optimization algorithm (such as genetic algorithm, particle swarm algorithm, etc.) simulates and solves the optimal process parameter combination on the quality attribute model to guide process optimization. Develop an adaptive control system based on model predictive control (MPC), dynamically obtain process parameters based on quality prediction results, and suppress external disturbances and parameter drift. By setting the quality objective function (such as specifying quality control indicators to set values, small precision between different batches, etc.) and constraints (parameter ranges required for drug production approval processes), quadratic programming, sequential minimum optimization (SMO) and other methods are used to solve the optimal control quantity and achieve multi-objective optimization. Introduce a reinforcement learning framework, and by designing a reward function, enable the software robot to learn process optimization strategies:
[0087] , where x represents the input data; y represents the target variable, which is the true label corresponding to the input data; Indicates that the model has parameters The predicted output for the input data x is obtained; and continuous improvement is made based on the feedback to achieve self-optimization of the production process. Start the adaptive quality optimization program: The Six Sigma quality management system is based on the DMAIC (Define, Measure, Analyze, Improve, Control) method to systematically analyze and manage the received quality data.
[0088] Finally, it should be noted that the above content is only used to illustrate the technical solution of the present invention, rather than to limit the scope of protection of the present invention. Simple modifications or equivalent substitutions of the technical solution of the present invention by ordinary technicians in this field do not deviate from the essence and scope of the technical solution of the present invention.
Claims
1. A method for controlling the quality of a pharmaceutical process intelligent control robot, characterized in that: The following steps are involved: Step S1, using a data acquisition module to collect drug quality data of several production batches, and performing a cleaning operation on the collected drug quality data, wherein the drug quality data includes drug material inspection data, finished product quality inspection data and production process parameter data; The cleaning operation process includes the following steps: Step S11: Delete batches that lack drug material inspection records or finished product quality inspection records, and delete batches with missing values of time series data in production process parameters exceeding 50%; Step S12: missing values in the production process parameters are filled using a forward filling strategy, that is, the missing value is filled with the previous non-missing value adjacent to the missing value; Step S13: using maximum and minimum normalization to perform dimensionless processing on the data processed in step S12; Step S14: using the DTW algorithm to perform alignment processing in data cleaning on the time series data in the production process parameters; Step S2: Based on the drug quality data, a process modeling module is used to construct an association model between material attribute Z, process parameter X and target quality attribute Y: Y=f(X,Z); Wherein, step S21: based on the data recorded in the production batch, the sample size is expanded using bootstrap sampling; The data recorded for a production batch include: The sampling frequency is 50 Hz, that is, 50 samples are taken each time to reconstruct the training set and calculate and , where i represents the quality attribute number. The data set consisting of drug quality data was resampled 10,000 times, and divided into a training set and a test set at a ratio of 7:
3. The data set was resampled 5,000 times as an external validation set. in, and The calculation process is: ; ; In the formula, is the mean of the sample data; LSL is the lower specification limit; USL is the upper specification limit; σ is the sample standard deviation; Step S22: for the selected process steps to be modeled, each process parameter is constructed into a graph network according to the actual relationship of the production process, and then the time series data information is added to construct a spatiotemporal graph neural network, and the KMEANS algorithm is used to discretize each time series data, and several discrete categories or groups are used as modeling variables; Step S23: Taking the resampled process parameter timing characteristics as input, and is the model output, where is the calculated value of the target quality attribute Y, As the mean value of the target quality attribute Y, a regression prediction model based on graph convolutional neural network is established, using the root mean square error RMSE and the determination coefficient R 2 The ability to predict the target quality attribute Y, where the regression prediction model is also a correlation model; Step S3: resampling and batch optimization; Step S4: Visualize the quality management data through the Six Sigma quality management system.
2. The control method of a pharmaceutical process quality intelligent control robot according to claim 1, characterized in that: In step S1, the drug quality inspection data includes the content of active ingredients, pesticide residues and heavy metal residues; the finished product quality inspection data includes the content of active ingredients and harmful ingredients; and the production process parameter data includes the process parameters of each process step.
3. The control method of a pharmaceutical process quality intelligent control robot according to claim 1, characterized in that: In step S23, the graph convolutional neural network includes: Input layer: includes process parameters, including temperature, pressure, flow rate and time; Graph convolution layer: processes the relationship between various parameters in the captured process parameters; Fully connected layers: adjust the number of layers and the number of neurons in each layer; Output layer: The output layer predicts the final target quality attribute Y, which includes and is the model output.
4. The method for controlling the pharmaceutical process quality intelligent control robot according to claim 1, characterized in that: In step S3, Step S31: Use the regression prediction model established in step S23 to predict the external validation set. To limit the conditions, select qualified batch sets; Step S32: Filter out the qualified batch sets For the batch set that falls within the required interval (LSL to USL), the NSGA-II algorithm is used to find the Pareto optimal solution of the multi-objective function; where the multi-objective function is the required interval of each quality indicator, ; Step S33: Optimizing the process parameter curve by controlling the tuning module, wherein all the time series data of the Pareto optimal solution obtained in step S32 are used as the process parameter optimization interval, and the average value curve of each time series variable sample is used as the optimal process parameter curve; Step S34: Update data based on the model update module and perform batch optimization.
5. The method for controlling the pharmaceutical process quality intelligent control robot according to claim 4, characterized in that: In step S34, the model is updated using the data adapter and the model adapter; (1) The data adapter adaptively corrects the newly collected data based on the distribution difference between the training data and the test data; Given incremental data : ; ; G(x) usually represents a function that performs some transformation or processing on the input data x; H(x,y) usually represents a function that jointly processes the input data x and the target variable y; Represents the training data set after data preprocessing used in the k-th training; Represents the test data set after data preprocessing used in the k-th training; It indicates the test data set without data preprocessing; Represents the training data set without data preprocessing; (2) Model adapter Let the key quality attribute set be L. After the baseline model is established in step S33, the incremental data preprocessed in S32 is used as input to start the model adaptive update based on fine-tuning training. The following formula expresses the training loss Calculation method: ; In the formula, x represents the input data; y represents the target variable, which is the true label corresponding to the input data; Indicates that the model has parameters The predicted output for the input data x is: After the updated model is completed, the batch optimization steps S31 to S33 will be repeated, thereby achieving automatic and continuous optimization of production quality.
6. An intelligent quality control robot for pharmaceutical process, characterized by: A control method using a pharmaceutical process quality intelligent control robot as described in any one of claims 1 to 5; It includes data acquisition module, data analysis module, process modeling module and tuning module; The data acquisition module collects structured data, real-time process data, component content change data and full-cycle quality traceability data, and transmits all collected data to the data analysis module for analysis; Furthermore, the data analysis module uses multivariate statistical analysis control charts to monitor quality deviations and transmits the analyzed data to the process modeling module for modeling; The process modeling module uses machine learning algorithms to establish the association model between material attributes, process parameters and target quality attributes, and uses incremental learning and transfer learning methods to continuously update and optimize the association model, and transmit the updated and optimized output to the tuning module; The tuning module automatically adjusts and optimizes production parameters based on quality attribute models and analysis results.
7. The pharmaceutical process quality intelligent control robot according to claim 6, characterized in that: The structured data at least includes process parameter setting values and equipment operating status, wherein a software robot system is used to automatically log into the production execution MES system to extract the structured parameters.
8. The pharmaceutical process quality intelligent control robot according to claim 6, characterized in that: The real-time process data at least includes temperature, pressure, flow and liquid level, and is collected from the automation system through an industrial communication protocol.
Citation Information
Patent Citations
Biological intelligent manufacturing quality monitoring method and device based on space-time diagram neural network
CN118505415A