Drug production quality detection system and method based on multi-source data fusion

By collecting and integrating data on stirring speed, torque, temperature, and conductivity in real time, a drug solution quality prediction model is constructed, which solves the problems of lag and insufficient adaptability in quality control in traditional drug production, and realizes real-time and precise quality control in the drug solution preparation process.

CN121660539BActive Publication Date: 2026-05-12JIANGSU CHANGJIANG PHARM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGSU CHANGJIANG PHARM CO LTD
Filing Date
2026-02-03
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Traditional drug manufacturing quality control models rely on offline sampling and testing, which cannot achieve real-time intervention, resulting in inconsistent quality within batches. Furthermore, they lack collaborative analysis and integration of multi-source process data, making it difficult to make adaptive adjustments.

Method used

By collecting real-time data on stirring speed, torque, temperature, and conductivity, we construct indicators for the physical homogenization and chemical stability of the drug solution, integrate them to generate a real-time prediction model for key quality attributes of the drug solution, and adjust process parameters in real time based on the model results.

Benefits of technology

It enables real-time, continuous quality assessment and precise adjustment of process parameters in the drug preparation process, solving the traditional lag problem and ensuring the adaptability and precision of the production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121660539B_ABST
    Figure CN121660539B_ABST
Patent Text Reader

Abstract

The application discloses a medicine production quality detection system and method based on multi-source data fusion, and relates to the technical field of intelligent monitoring and quality assurance of medicine production process. The method comprises the following steps: acquiring stirring speed, torque, temperature and online conductivity time series data of an injection liquid preparation process; calculating energy input and rheological state according to the speed and torque data to generate a physical homogenization process index; calculating apparent activation energy and equivalent conductivity trend according to the temperature and conductivity data to generate a chemical stability process index; fusing the above two indexes to obtain the active ingredient content spatial distribution standard deviation as the quality comprehensive evaluation result through a prediction model; comparing the result with a preset quality target to generate an instruction to adjust the stirring speed or the liquid temperature, thereby realizing closed-loop control. The application realizes real-time prediction and self-adaptive regulation and control of the quality of the liquid preparation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent monitoring and quality assurance technology for pharmaceutical manufacturing processes, specifically to a pharmaceutical manufacturing quality testing system and method based on multi-source data fusion. Background Technology

[0002] As sterile preparations injected directly into the human body, the production quality of injectable drugs directly affects medication safety and efficacy. The drug solution preparation process is a core step in injectable drug production, with the homogeneity of the active ingredient's dissolution and the chemical stability of the solution being key quality attributes. Traditional quality control methods rely on offline sampling inspection, which is inherently lagging and cannot provide real-time intervention in the preparation process, potentially leading to batch-specific quality inconsistencies.

[0003] The physical homogeneity of the pharmaceutical solution is primarily affected by the mixing process, with the mechanical energy input during mixing and the rheological properties of the materials determining the mixing efficiency. Chemical stability, on the other hand, is closely related to the thermodynamic conditions and ion balance of the dissolution process. Current technologies typically separate mixing parameters from temperature control, lacking collaborative analysis and fusion of multi-source process data, and failing to establish a real-time, quantitative relationship between process parameters and final quality attributes. This results in the production process relying solely on fixed formulas and empirical parameters, making it difficult to adaptively adjust to minor fluctuations in material properties or equipment performance drift, thus posing quality risks.

[0004] Therefore, there is an urgent need for a method that can collect and integrate multi-dimensional process data reflecting the physical mixing and chemical dissolution states in real time, construct key quality attribute prediction models through intelligent algorithms, and adjust process parameters in real time based on the prediction results, so as to achieve precise quality control in the preparation process of injectable drug solutions. Summary of the Invention

[0005] To overcome the aforementioned deficiencies in existing technologies, this invention provides a drug production quality testing method and system based on multi-source data fusion, aiming to achieve real-time prediction, evaluation, and closed-loop control of the quality of injectable drug preparation processes.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] In a first aspect, the present invention provides a method for drug production quality testing based on multi-source data fusion, comprising the following steps:

[0008] S1: Acquire the timing data of stirring speed, stirring torque, drug solution temperature and online conductivity of the injection drug solution preparation process;

[0009] S2: Based on the stirring speed time series data and stirring torque time series data, calculate the energy input characteristics and rheological state of the drug solution mixing process, and generate the drug solution physical homogenization process index;

[0010] S3: Based on the time-series data of drug solution temperature and online conductivity, analyze the influence of thermodynamic conditions on the dissolution and ion balance of active ingredients, and generate indicators of the chemical stability process of drug solution.

[0011] S4: Integrate the physical homogenization process index and the chemical stability process index of the drug solution to construct a real-time prediction model for key quality attributes of the drug solution and generate a comprehensive evaluation result of the drug solution preparation quality.

[0012] S5: Compare the comprehensive evaluation results of the drug solution preparation quality with the preset quality target range, and generate instructions for adjusting the preparation process parameters;

[0013] S6: Adjust the set values ​​of stirring speed and liquid temperature according to the preparation process parameter adjustment command.

[0014] According to the above technical solution, the acquisition of stirring speed timing data, stirring torque timing data, drug solution temperature timing data, and online conductivity timing data for the preparation process of injectable drug solutions includes:

[0015] The speed signal of the stirring motor in the drug preparation tank is collected in real time to obtain stirring speed time-series data; the torque signal of the torque sensor installed on the stirring shaft is collected in real time to obtain stirring torque time-series data; the temperature signal of the temperature sensor immersed in the drug solution is collected in real time to obtain drug solution temperature time-series data; and the conductivity signal of the online conductivity meter installed in the drug solution circulation pipeline is collected in real time to obtain online conductivity time-series data.

[0016] According to the above technical solution, the step of calculating the energy input characteristics and rheological state of the drug solution mixing process based on the stirring speed time-series data and stirring torque time-series data, and generating drug solution physical homogenization process indicators, includes:

[0017] The rotational speed values ​​at each sampling point in the stirring speed time-series data are converted into angular velocity values ​​by multiplying by a preset constant. Each converted angular velocity value is then multiplied by the corresponding time-synchronized stirring torque value to obtain the instantaneous stirring power value at each sampling point. These instantaneous stirring power values ​​are multiplied by the sampling time interval and accumulated to obtain the integral stirring power value within a set sampling period, serving as the energy input characteristic representing the accumulation of mixing energy. Spectral analysis is performed on the stirring torque time-series data within the same set sampling period. After removing the mean from the signal, a fast Fourier transform is performed to obtain the torque spectrum. The dominant frequency component corresponding to the stirring fundamental frequency is identified, and the entire period is divided into several sub-intervals for exponential decay fitting of the dominant frequency amplitude. The exponential decay rate parameter in the fitting function is extracted as the dominant frequency amplitude decay coefficient, yielding a characteristic reflecting the rheological state of the drug solution. The integral stirring power value and the dominant frequency amplitude decay coefficient are input into a preset physical homogenization evaluation function. This physical homogenization evaluation function calculates the drug solution physical homogenization process index by integrating the nonlinear synergistic effect of energy accumulation and rheological state improvement.

[0018] According to the above technical solution, the step of analyzing the influence of thermodynamic conditions on the dissolution and ion balance of active ingredients based on the time-series data of drug solution temperature and online conductivity, and generating indicators of the chemical stability process of the drug solution, includes:

[0019] Based on the time-series data of the drug solution temperature, within the currently set sampling period, the period is divided into multiple consecutive sub-windows. For each sub-window, the average slope of the online conductivity data changing with time within the sub-window is calculated as the average rate of change of conductivity, and the average value of the drug solution temperature data within the sub-window is also calculated. Then, using the reciprocal of the average thermodynamic temperature of each sub-window as the x-axis and the natural logarithm of the corresponding average rate of change of conductivity as the y-axis, multiple data points are obtained. A univariate linear regression is performed on these data points, and the slope of the fitted line is multiplied by the negative ideal gas constant to obtain the apparent activation energy characterizing the temperature sensitivity of the current dissolution process. Based on the time-series data of online conductivity, the slope of the linear regression within the set sampling period is calculated as the apparent activation energy. The rate of change of conductivity is corrected; based on a preset temperature correction coefficient and combined with the average value of the drug solution temperature time series data, the uncorrected rate of change of conductivity is corrected to the standard reference temperature to obtain the equivalent conductivity change trend value; the apparent activation energy and the equivalent conductivity change trend value are input into a preset chemical stability evaluation function. The chemical stability evaluation function first performs a ratio calculation and nonlinear mapping calculation on the apparent activation energy and a preset activation energy characteristic value to obtain a first value reflecting thermodynamic stability. At the same time, the equivalent conductivity change trend value is input into the ion balance process calculation formula to calculate a second value reflecting the ion balance process. Finally, the first value and the second value are multiplied to calculate and output the chemical stability process index of the drug solution.

[0020] According to the above technical solution, the integration of the physical homogenization process index and the chemical stability process index of the drug solution constructs a real-time prediction model for key quality attributes of the drug solution, generating a comprehensive evaluation result of the drug solution preparation quality, including:

[0021] Data pairs of physical homogenization and chemical stability process indicators of the pharmaceutical solution, calculated according to a set cycle during the preparation process of historical production batches, are collected as input features. The standard deviation of the spatial distribution of active ingredient content, obtained through offline spatial distribution sampling and detection after the preparation process of these historical batches, is also collected as the corresponding target output value. The input features and corresponding target output values ​​are paired to form a training dataset. This dataset is used to train a fully connected feedforward neural network containing hidden layers to minimize the error between the predicted value and the target output value, thus constructing a trained real-time prediction model for key quality attributes of the pharmaceutical solution. The real-time calculated physical homogenization and chemical stability process indicators of the pharmaceutical solution are input into the real-time prediction model. The model first inputs the process indicator values ​​into the hidden layer for weighted summation and then performs a nonlinear transformation using a linear rectifier function. The output values ​​of the hidden layer are then transmitted to the output layer for linear weighted combination, ultimately generating the predicted standard deviation of the spatial distribution of active ingredient content at the output node. The predicted standard deviation of the spatial distribution of active ingredient content is used as the comprehensive evaluation result of the pharmaceutical solution preparation quality.

[0022] According to the above technical solution, the step of comparing the comprehensive evaluation result of the drug solution preparation quality with the preset quality target range and generating an instruction to adjust the preparation process parameters includes:

[0023] The upper and lower limits of the standard deviation of the spatial distribution of active ingredient content are preset to form a preset quality target range. If the standard deviation of the spatial distribution of active ingredient content is greater than the upper limit, the difference between the standard deviation of the spatial distribution of active ingredient content and the upper limit is calculated. The difference is divided by a preset difference normalization coefficient and then input into a hyperbolic tangent function. The output value of the hyperbolic tangent function is multiplied by a preset speed adjustment gain coefficient, and then multiplied by the allowable upward adjustment margin of the current stirring speed setting to calculate the positive adjustment amount of the stirring speed, and a first instruction containing this adjustment amount is generated. If the standard deviation of the spatial distribution of active ingredient content is greater than the upper limit, the difference between the standard deviation of the spatial distribution of active ingredient content and the upper limit is calculated. If the spatial distribution standard deviation is less than the allowable lower limit, the difference between the allowable lower limit and the spatial distribution standard deviation of the active ingredient content is calculated. The difference is divided by another preset difference normalization coefficient and then input into a hyperbolic tangent function. The output value of the hyperbolic tangent function is multiplied by a preset temperature adjustment gain coefficient, and then multiplied by the allowable upward adjustment margin of the current drug solution temperature setting to calculate the positive adjustment amount of the drug solution temperature, and a second instruction containing this adjustment amount is generated. If the comprehensive evaluation result of the drug solution preparation quality is not greater than the process allowable upper limit and not less than the process allowable lower limit, an instruction to keep the current process parameters unchanged is generated.

[0024] According to the above technical solution, adjusting the set values ​​of the stirring speed and the liquid temperature according to the preparation process parameter adjustment command includes:

[0025] After adjusting the stirring speed and liquid temperature settings according to the preparation process parameter adjustment instructions, the stirring speed time-series data, stirring torque time-series data, liquid temperature time-series data, and online conductivity time-series data for the next set sampling period are re-acquired. Based on the re-acquired time-series data, new liquid physical homogenization process indicators, new liquid chemical stability process indicators, and new standard deviation of active ingredient content spatial distribution are calculated. It is then determined whether the new standard deviation of active ingredient content spatial distribution falls within the preset quality target range. If the new standard deviation of active ingredient content spatial distribution does not fall within the preset quality target range, a new preparation process parameter adjustment instruction is generated based on the new standard deviation of active ingredient content spatial distribution.

[0026] Secondly, the present invention provides a pharmaceutical production quality testing system based on multi-source data fusion for implementing the above method, the system comprising:

[0027] The data acquisition module is used to acquire the time-series data of stirring speed, stirring torque, drug solution temperature, and online conductivity during the preparation process of injectable drug solutions.

[0028] The physical index calculation module is used to calculate the energy input characteristics and rheological state of the drug solution mixing process based on the stirring speed time series data and stirring torque time series data, and generate the physical homogenization process index of the drug solution.

[0029] The chemical index calculation module is used to analyze the influence of thermodynamic conditions on the dissolution and ion balance of active ingredients based on the time-series data of drug solution temperature and online conductivity, and to generate chemical stability process indicators of drug solution.

[0030] The fusion evaluation module is used to integrate the physical homogenization process indicators and the chemical stability process indicators of the drug solution, construct a real-time prediction model for key quality attributes of the drug solution, and generate a comprehensive evaluation result of the drug solution preparation quality.

[0031] The intelligent decision-making module is used to compare the comprehensive evaluation results of the drug solution preparation quality with the preset quality target range and generate instructions for adjusting the preparation process parameters.

[0032] The execution control module is used to adjust the set values ​​of the stirring speed and the liquid temperature according to the preparation process parameter adjustment instructions.

[0033] Thirdly, the present invention provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the program to implement the above-mentioned drug production quality testing method based on multi-source data fusion.

[0034] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the above-described method for drug production quality testing based on multi-source data fusion.

[0035] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0036] This invention overcomes the lag of traditional offline testing by synchronously collecting multi-source process data closely related to the physical mixing and chemical dissolution state of the drug solution. By quantifying energy input, rheological state, thermodynamic conditions, and ion balance process separately, and innovatively integrating and constructing a real-time prediction model for key quality attributes, it achieves online, continuous, and quantitative evaluation of the drug solution preparation quality. Based on the dynamic comparison of this evaluation result with the preset target, adaptive process parameter adjustment instructions are generated, and a saturation control algorithm is introduced to ensure smooth adjustment. Finally, through execution verification and closed-loop feedback mechanisms, the preparation process can perform real-time and precise self-optimization in response to fluctuations in material properties or changes in equipment status. Attached Figure Description

[0037] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0038] Figure 1 This is a schematic diagram of the overall process of the drug production quality testing method based on multi-source data fusion provided in the embodiments of this application;

[0039] Figure 2 This is a detailed diagram of the data acquisition process provided in the embodiments of this application;

[0040] Figure 3 This is a detailed diagram of the physical index calculation process provided in the embodiments of this application;

[0041] Figure 4 This is a detailed flowchart of the chemical index calculation process provided in the embodiments of this application;

[0042] Figure 5 This is a detailed diagram of the fusion evaluation and quality prediction process provided in the embodiments of this application;

[0043] Figure 6 This is a detailed flowchart of the intelligent decision-making and instruction generation process provided in the embodiments of this application;

[0044] Figure 7 This is a detailed diagram of the execution control and closed-loop feedback process provided in the embodiments of this application;

[0045] Figure 8 This is a schematic diagram of the structure of a drug production quality testing system based on multi-source data fusion provided in an embodiment of this application. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail and completely below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this invention.

[0047] Please see Figure 1 , Figure 1 This is a schematic diagram of the overall process of the drug production quality testing method based on multi-source data fusion provided in the embodiments of this application, which specifically includes the following steps:

[0048] S1: Acquire the timing data of stirring speed, stirring torque, drug solution temperature and online conductivity of the injection drug solution preparation process;

[0049] In this embodiment, step S1 includes the following specific contents, and the process can be found in the attached document. Figure 2 , Figure 2 Here is a detailed diagram of the data acquisition process provided in the embodiments of this application:

[0050] S110: Real-time acquisition of the rotation speed signal of the stirring motor in the drug preparation tank to obtain the stirring speed time sequence data;

[0051] First, an incremental photoelectric rotary encoder is rigidly connected and installed on the flange of the servo motor power output shaft that drives the stirring paddle of the medicine preparation tank. The internal grating disk of the incremental photoelectric rotary encoder rotates synchronously with the motor shaft and generates two square wave pulse signals with a phase difference of 90 degrees through an optocoupler.

[0052] Next, the encoder's pulse signal output cable is connected to the dedicated input channel of the high-speed counter module of the programmable logic controller; the high-speed counter module is configured to work in frequency measurement mode, reading and resetting the current value of the counter at a fixed frequency of ten times per second; then, the count value read each time is divided by the encoder's nominal number of pulses per revolution of one thousand, and then divided by the sampling period of 0.1 seconds to calculate the average speed of the motor within the sampling period, in revolutions per minute; each calculated speed value, along with its millisecond-precision timestamp, is packaged and sent to the real-time database of the host data server via the industrial Ethernet protocol for storage, thereby forming a continuous stirring speed time-series data stream;

[0053] S120: Real-time acquisition of torque signals from torque sensors mounted on the stirring shaft to obtain stirring torque time-series data;

[0054] A strain gauge dynamic torque sensor is installed in series at the coupling between the output shaft of the stirring motor and the main shaft of the stirring tank. When the stirring shaft rotates and is subjected to the resistance of the liquid, the elastic torsion bar inside the strain gauge dynamic torque sensor deforms, and the resistance value of the full-bridge strain gauge attached to the elastic torsion bar changes proportionally. Then, the millivolt-level differential voltage signal output by the strain gauge bridge is transmitted to a 24-bit high-precision analog input module via a shielded twisted pair cable. The analog input module first performs programmable gain amplification on the signal, and then performs analog-to-digital conversion to convert the voltage value into a digital quantity. The digital quantity is directly mapped to the corresponding torque value through the linear conversion coefficient calibrated inside the module. The analog input module transmits the torque digital quantity to the programmable logic controller in real time via the backplane bus at a sampling frequency of ten times per second. After the controller adds a timestamp, it is written to the upper data server via industrial Ethernet to form a stirring torque time-series data stream.

[0055] S130: Real-time acquisition of temperature signals from temperature sensors immersed in the liquid medicine to obtain time-series data of liquid medicine temperature;

[0056] First, a four-wire platinum resistance temperature sensor is selected, with its sensing element made of platinum resistance material conforming to general industrial measurement standards. The sensor probe is vertically inserted into the liquid via a process interface on the top of the preparation tank that conforms to hygienic design specifications, ensuring that its sensing end is completely submerged below the liquid surface. The four leads of the four-wire platinum resistance temperature sensor are connected to a dedicated temperature transmitter. This transmitter uses constant current source measurement technology to calculate the resistance value by measuring the precise voltage drop across the sensing element. The internal processor of the temperature transmitter, based on the standard resistance-temperature correspondence of this type of platinum resistance, uses a combination of table lookup and linear interpolation to convert the resistance value into the corresponding Celsius temperature value, and sends the temperature signal out through its standard analog current signal output interface. This current signal is connected to the analog input channel of the process control system, where it is acquired at a fixed frequency of once per second and converted into a temperature value, which, along with a timestamp, is uploaded to the data server, forming a time-series data stream of the liquid temperature.

[0057] S140: Real-time acquisition of conductivity signals from an online conductivity meter installed in the drug circulation pipeline to obtain online conductivity time-series data;

[0058] A four-electrode online conductivity analyzer is installed on the outlet circulation pipe of the drug solution preparation tank. The flow cell inside the analyzer ensures the continuously flowing drug solution remains in contact with the four electrodes. The mainboard of the analyzer generates a specific frequency AC sinusoidal voltage, which is applied to the two outer excitation electrodes. The potential difference between the two ends of the solution is precisely measured through the two inner measuring electrodes. Based on Ohm's law, the original conductivity value of the solution is calculated from the known applied current and the measured voltage. Simultaneously, the high-precision temperature sensor built into the analyzer measures the drug solution temperature in real time. The processor automatically compensates the original conductivity value to the equivalent value at the standard reference temperature using a preset temperature compensation algorithm. The compensated final conductivity value is transmitted to the communication gateway device via the analyzer's industrial digital communication interface, using a standard serial communication protocol, at a fixed frequency of once per second. The data is then converted into network data packets and stored in a real-time database, forming an online conductivity time-series data stream.

[0059] S2: Based on the stirring speed time series data and stirring torque time series data, calculate the energy input characteristics and rheological state of the drug solution mixing process, and generate the drug solution physical homogenization process index;

[0060] In this embodiment, step S2 includes the following specific details, which can be found in the flowchart below. Figure 3 , Figure 3 Here is a detailed flowchart of the physical index calculation process provided in the embodiments of this application:

[0061] S210: Based on the stirring speed time-series data and stirring torque time-series data within the set sampling period, calculate the stirring power integral value for the corresponding period as an energy input feature;

[0062] The stirring speed and stirring torque data sequences of all sampling points within a complete analysis period of 60 seconds are extracted from the time-series database, ensuring strict synchronization of the two sequences in terms of timestamps. For each sampling point, the speed value is first multiplied by a preset constant factor, which is calculated by multiplying 2 by pi and then dividing by 60, to convert the speed value into the corresponding angular velocity value. Then, the angular velocity value is multiplied by the torque value of the same sampling point to obtain the instantaneous stirring power value at that sampling moment. Next, the instantaneous stirring power values ​​calculated for all sampling points are multiplied by a fixed sampling time interval, and then all these products are summed. The result of this summation is the integral value of the stirring power within the 60-second analysis period, which is defined as the energy input characteristic.

[0063] S220: Perform spectral analysis on the stirring torque time-series data within the same set sampling period, and extract the main frequency amplitude attenuation coefficient that characterizes torque stability as the rheological state;

[0064] For the stirring torque time series data sequence within the same 60-second analysis period, first calculate the arithmetic mean of all data points in the stirring torque time series data sequence, and then subtract this average value from the value of each data point in the stirring torque time series data sequence to eliminate the DC component of the signal;

[0065] Next, the mean-reduced torque data sequence is input into a Fast Fourier Transform (FFT) algorithm, which converts the time-domain signal into a frequency-domain signal to obtain the spectrum of torque fluctuations. Within this spectrum, the frequency component with the largest amplitude is identified; this frequency component is the dominant frequency component corresponding to the fundamental frequency of the stirring shaft rotation. The entire 60-second analysis period is divided into six consecutive 10-second sub-intervals. The same mean-reducing and FFT operations are performed on the torque data within each sub-interval, and the amplitude of the dominant frequency component is extracted, resulting in a dominant frequency amplitude time series composed of six amplitude data points. As the drug mixture becomes more homogeneous, torque fluctuations weaken, and the dominant frequency amplitude series exhibits a decaying trend. Then, a nonlinear least squares fitting algorithm is used to fit the data points of the dominant frequency amplitude changing over time to an exponential decay function model. The exponential decay rate parameter extracted from this model is defined as the torque dominant frequency amplitude decay coefficient, which characterizes the rate of improvement in the rheological state.

[0066] S230: Input the integral value of the stirring power and the attenuation coefficient of the main frequency amplitude into a preset physical homogenization evaluation function to calculate the physical homogenization process index of the drug solution.

[0067] The physical homogenization process index of the drug solution is calculated using a pre-defined function that integrates the energy accumulation effect and the nonlinear synergistic effect of the rheological state.

[0068] The formula for calculating the physical homogenization process index of the drug solution is:

[0069] ;

[0070] In the formula, The index representing the physical homogenization process of the drug solution is a dimensionless scalar between zero and one. The closer its value is to one, the better the physical homogenization of the drug solution. E represents the integral value of the stirring power calculated in the current analysis cycle, which is obtained by numerically integrating the instantaneous power through the aforementioned steps. The integral value of stirring power is a dimensionless constant. In this embodiment, it is determined as follows: Production data from all successful batches of this product are statistically analyzed. Each batch is confirmed to meet the physical homogeneity standard through offline sampling and laser particle size distribution analysis. In this embodiment, the physical homogeneity standard is that the relative standard deviation of the active ingredient content from multiple sampling points is less than 2% and the particle size distribution span is less than 0.5%. For each batch that meets the standard, the sum of the integral values ​​of stirring power E for all analysis cycles from the start of stirring to the end of the process is calculated, i.e., the total stirring energy. Then, the arithmetic mean of the total stirring energy of all batches is taken as the reference value. β represents the attenuation coefficient of the main frequency amplitude calculated in the current analysis period, which is obtained through the aforementioned spectrum analysis and exponential fitting; The reference value for the main frequency amplitude attenuation coefficient is a dimensionless constant. In this embodiment, the determination method is as follows: From the data of the same group of successful batches that meet the standards, extract the β value calculated in the last five analysis cycles before each batch is judged to have reached the physical uniformity standard at the end of the preparation process. Calculate the arithmetic mean of these five values ​​as the typical main frequency amplitude attenuation coefficient for that batch; then take the statistical median of the typical main frequency amplitude attenuation coefficients of all batches as... α represents the weighting coefficient for energy input; γ represents the weighting coefficient for rheological state improvement; in this embodiment, the joint determination method for these two weighting coefficients is as follows: a large number of data points covering the early, middle, and late stages of mixing are selected from historical batch data, and each data point has a corresponding E divided by γ. The value of β divided by The value is used as the input feature, and the actual physical uniformity score, obtained by offline sampling after the corresponding time of the data point, measured by a laser particle size analyzer, and normalized to the zero-to-one range, is used as the target output; the above formula structure is fitted to the entire dataset using the Levonburg-Marquardt nonlinear least squares algorithm, and the formula prediction is solved through optimization iteration. The values ​​of α and γ that minimize the overall root mean square error between the values ​​and the offline measured normalized scores are taken as the values ​​of α and γ; exp represents the exponential function with the natural constant e as the base. The role of this exponential function is to transform the product term representing the synergistic effect of energy and rheological state into a value asymptotically approaching one from zero through nonlinear mapping, thereby simulating the saturation characteristics of the physical mixing process. That is, the closer the mixing is to complete homogeneity, the slower the rate of improvement of the process index becomes.

[0071] S3: Based on the time-series data of drug solution temperature and online conductivity, analyze the influence of thermodynamic conditions on the dissolution and ion balance of active ingredients, and generate indicators of the chemical stability process of drug solution.

[0072] In this embodiment, step S3 includes the following specific details, which can be found in the flowchart below. Figure 4 , Figure 4 Here is a detailed flowchart of the chemical index calculation process provided in the embodiments of this application:

[0073] S310: Based on the time-series data of the drug solution temperature, a linear fit is performed using an exponential relationship model between the dissolution reaction rate and temperature to obtain the apparent activation energy as a characterization of the temperature sensitivity of the dissolution process.

[0074] The current 60-second analysis period is divided into six consecutive 10-second sub-windows. For each sub-window, a univariate linear regression is performed on the online conductivity data within that sub-window to calculate the average slope of conductivity change over time, which is used as the average rate of change of conductivity for that sub-window.

[0075] Simultaneously, the arithmetic mean of all sampled drug solution temperatures within the sub-window is calculated, and this Celsius temperature value is converted to a thermodynamic temperature value. According to the Arrhenius equation of chemical kinetics, the reaction rate constant is exponentially related to the reciprocal of the thermodynamic temperature. Then, using the reciprocal of the average thermodynamic temperature of each sub-window as the x-axis and the natural logarithm of the corresponding average rate of change of conductivity as the y-axis, six data points are obtained. Then, a univariate linear regression analysis is performed on these six data points. The slope of the fitted line is multiplied by the negative ideal gas constant, which is an internationally recognized fundamental physicochemical constant with a standard value of 8.314 joules per mole per Kelvin, used to connect the energy scale and the temperature scale. The positive value obtained after this multiplication operation is the apparent activation energy value of the current dissolution process.

[0076] S320: Based on the online conductivity time series data, calculate the linear regression slope within the set sampling period as the uncorrected conductivity change rate; according to the preset temperature correction coefficient, combined with the average value of the drug solution temperature time series data, correct the uncorrected conductivity change rate to the standard reference temperature to obtain the equivalent conductivity change trend value;

[0077] For all online conductivity data points within the current 60-second analysis cycle, with sampling time as the independent variable and conductivity value as the dependent variable, perform univariate linear regression analysis to obtain the slope of the regression line. This slope is the original average rate of change of conductivity without considering the effect of temperature, and is called the uncorrected rate of change of conductivity.

[0078] Simultaneously, the arithmetic mean of all sampled drug solution temperatures within these sixty seconds is calculated as the average drug solution temperature. Since the conductivity measurement value is significantly dependent on temperature, temperature correction is required to accurately reflect the true trend of ion concentration changes. A conductivity temperature coefficient, pre-calibrated experimentally, is used. In this embodiment, this temperature coefficient is determined by the following method: In the laboratory, a potassium chloride standard solution with ionic strength and properties similar to the drug solution to be tested is prepared. The reason for choosing the potassium chloride standard solution is that it is chemically stable and has internationally recognized accurate conductivity data, making it a standard reference material. Then, the potassium chloride standard solution is placed in a precisely temperature-controlled constant-temperature water bath, and its conductivity values ​​are measured at 20°C, 25°C, and 30°C. The relative rate of change of conductivity with temperature is calculated, and the average relative rate of change near 25°C is taken as the temperature coefficient.

[0079] Then, the calculated uncorrected rate of change of conductivity is divided by a compensation factor. In this embodiment, the compensation factor is a value that is the difference between the average temperature of the liquid and 25 degrees Celsius plus a temperature coefficient, thereby correcting the rate of change of conductivity to the standard reference temperature of 25 degrees Celsius and obtaining the equivalent conductivity change trend value that eliminates temperature interference.

[0080] S330: Input the apparent activation energy and the trend value of the equivalent conductivity change into a preset chemical stability evaluation function to calculate the chemical stability progress index of the drug solution.

[0081] ;

[0082] In the formula, The chemical stability index of a drug solution is a dimensionless scalar between zero and one. The closer its value is to one, the better the chemical stability of the drug solution. The apparent activation energy is calculated by linear fitting of the Arrhenius equation based on the temperature and conductivity data of the drug solution. The activation energy characteristic value is a constant with energy dimensions. In this embodiment, the method for determining it is as follows: Based on the limit requirements for related substances in the predetermined quality standard of the drug, the chemical stability qualification standard is defined as the total content of related substances in the solution increasing by no more than 1.0 percent after storage for a specified time under accelerated stability test conditions; then, all batch data that meet this qualification standard in the product's R&D and production history are screened; the true activation energy of these qualified batches of drug solution formulations at the standard concentration is determined by laboratory precision differential scanning calorimetry experiments; the standard concentration here specifically refers to the target concentration of active ingredient clearly specified in the drug registration quality standard and production process specification of this injectable drug; the arithmetic mean of all these true activation energy values ​​is calculated, and this arithmetic mean is used as the... φ represents the response steepness coefficient, a dimensionless constant greater than one. In this embodiment, the method for determining φ is as follows: A large amount of historical batch data is collected, with each batch containing the apparent activation energy value calculated during the preparation process and the related substance content detection value of the final product; the related substance content detection results are converted into a stability score based on the above-mentioned qualification standards, with zero indicating non-compliance and one indicating complete compliance; using the activation energy ratio and stability score as the basic data, a nonlinear least squares method is used for fitting, and the value of φ is adjusted through an iterative optimization algorithm to maximize the coefficient of determination between the predicted output of the nonlinear least squares regression model and the actual stability score. The corresponding φ value at this point is the final value of φ; C represents the equivalent conductivity trend value obtained after temperature correction of the online conductivity change rate; σ represents the trend saturation constant, which is a normal number with the same dimension as the equivalent conductivity trend value. In this embodiment, the determination method is as follows: extract all time period data that are clearly determined to be completely dissolved and have reached chemical steady state from the historical database. This determination is based on the online conductivity curve entering the plateau period and the content of active ingredients and related substances detected by offline sampling during the same period reaching the predetermined standard; calculate the standard deviation of the equivalent conductivity trend value within these time periods; and set the value twice this standard deviation as σ.

[0083] The first term in the formula simulates the contribution of thermodynamic driving force to chemical stability. This term makes the activation energy dimensionless and compares it with eigenvalues. Through power functions and reciprocal operations, the activation energy is mapped to a thermodynamic stability factor between zero and one. The second term simulates the kinetic process of ion equilibrium approaching steady state. It is a monotonically increasing saturated function. As dissolution proceeds and the rate of change decreases, the value of this term decreases, characterizing the degree of progress of the process. The multiplication of the two terms constitutes a chemical stability process index that can comprehensively, continuously, and nonlinearly reflect the thermodynamic conditions and kinetic process state of the dissolution process. The formula inherently eliminates the units of each parameter through ratio operations and the introduction of reference constants, ensuring the dimensionless nature of the index.

[0084] S4: Integrate the physical homogenization process index and the chemical stability process index of the drug solution to construct a real-time prediction model for key quality attributes of the drug solution and generate a comprehensive evaluation result of the drug solution preparation quality.

[0085] In this embodiment, step S4 includes the following specific details, which can be found in the flowchart below. Figure 5 , Figure 5 Here is a detailed diagram of the fusion evaluation and quality prediction process provided in the embodiments of this application:

[0086] S410: Establish a neural network model with the physical homogenization process index and the chemical stability process index of the drug solution as input nodes, and construct a real-time prediction model for key quality attributes of the drug solution.

[0087] First, the historical database of the execution system is used to screen out all batches of final products produced within the past 24 months that have passed the release inspection. The pass criteria are based on the drug registration quality standards, namely, the content of active ingredients must be within the specified range and the content of related substances must be below the limit. Then, for each pass batch, a data snapshot is taken every 60 seconds from the middle to the end of the batch preparation process. Each data snapshot contains the calculated physical homogenization process index and chemical stability process index of the drug solution at that moment.

[0088] Meanwhile, before the batch entered the next stage of the preparation process, samples were taken from nine different locations in the preparation tank using a pre-validated nine-point spatial distribution sampling method. The content of active ingredients in each sample was determined using a validated high-performance liquid chromatography (HPLC) method. The relative standard deviation of these nine content values ​​was calculated. This relative standard deviation represents the degree of spatial heterogeneity of the active ingredients in the batch of medicine solution at the time of preparation, and is used as the final quality label for the batch. The two process index values ​​of each data snapshot were used as a set of input features, and the final relative standard deviation value of the corresponding batch was used as the target output to form a training sample. More than two thousand samples from eighty batches were collected in total to form the training dataset.

[0089] Then, using the two process index values ​​of each sample in the training dataset as model inputs and the corresponding offline detection standard deviation as the training objective, a fully connected feedforward neural network is first constructed as the initial model. The structure and parameter configuration of the initial model are as follows: the input layer has two neuron nodes, which accurately receive the values ​​of the drug liquid physical homogenization process index and the drug liquid chemical stability process index, respectively; the hidden layer has six neuron nodes, and this layer uses a linear rectified function as the activation function; the output layer has one neuron node, which uses a linear activation function; the key hyperparameters for the initial model training are set as follows: in this embodiment, the adaptive moment estimation algorithm is used as the optimizer, the total number of training cycles is set to 200, 32 samples are processed in each batch, the initial learning rate is set to 0.001, and the loss function is the mean squared error function.

[0090] The model training process optimizes parameters by iteratively executing the following steps:

[0091] The first step is forward propagation to calculate the predicted value: A batch of sample data is input into a fully connected feedforward network; in the hidden layer, each neuron multiplies the two input values ​​it receives with its two currently stored weight values, and adds the two products to a bias value stored in the neuron to obtain a weighted sum; then, it is determined whether the weighted sum is greater than zero. If it is greater than zero, the original value of the weighted sum is output; if it is not greater than zero, zero is output, thus generating the output of the neuron; in the output layer, a single neuron multiplies the output values ​​of all six neurons in the hidden layer with its six currently stored weight values, adds all the products, and then adds its own stored bias value to calculate the predicted standard deviation of the spatial distribution of the active ingredient content of the sample.

[0092] The second step is to calculate the prediction error. The loss value is calculated using the mean square error function. Specifically, for all samples in this batch, the square of the difference between the prediction standard deviation output by the fully connected feedforward network and the corresponding real offline detection standard deviation in the training data is calculated, and the average of these squared values ​​is calculated to obtain the mean square error of the current fully connected feedforward network.

[0093] The third step is backpropagation to update parameters: Based on the calculated mean squared error, the influence of the error on each weight and bias value is calculated from the output layer to the hidden layer, i.e., the gradient; based on this gradient information, the adaptive moment estimation algorithm will automatically adjust the magnitude of all weight values ​​and bias values ​​in the model, and the adjustment direction is to reduce the mean squared error.

[0094] Repeat the above three steps until the average prediction error of the model on the entire training set no longer decreases significantly and stabilizes within a preset small range. At this point, stop training; save all the final weight values ​​and bias values ​​in the network at this time. The resulting model is the completed real-time prediction model for key quality attributes of the drug solution.

[0095] S420: Input the physical homogenization process index and the chemical stability process index of the drug solution obtained in real time into the real-time prediction model of the key quality attributes of the drug solution, and output the predicted standard deviation of the spatial distribution of active ingredient content.

[0096] During real-time production, after each 60-second cycle of data acquisition and analysis, and after calculating the latest physical homogenization process index and chemical stability process index of the drug solution, these two latest values ​​are immediately combined into a one-dimensional array. This one-dimensional array is used as an input vector and fed into the real-time prediction model for key quality attributes of the drug solution, which is loaded into memory and is in operation. The real-time prediction model for key quality attributes of the drug solution performs forward propagation calculation. The input data undergoes weighted summation and nonlinear transformation in the hidden layer, and then linear combination in the output layer. Finally, a single scalar value is generated at the output of the real-time prediction model for key quality attributes of the drug solution. This value is the standard deviation of the spatial distribution of the active ingredient content of the drug solution, predicted in real time by the real-time prediction model for key quality attributes of the drug solution based on the current status of the two latest process indices.

[0097] S430: The predicted standard deviation of the spatial distribution of active ingredient content is used as the comprehensive evaluation result of the drug solution preparation quality;

[0098] The standard deviation of the predicted spatial distribution of active ingredient content, calculated in real time by the real-time prediction model of key quality attributes of the drug solution, is directly used as the comprehensive evaluation result of the overall drug solution quality in the current preparation tank. This comprehensive evaluation result represents the key quality attributes predicted based on the fusion of multi-source process data. The value is directly related to the uniformity level of the drug solution, and the smaller the value, the better the predicted quality. This evaluation result realizes online real-time prediction of the final product quality.

[0099] S5: Compare the comprehensive evaluation results of the drug solution preparation quality with the preset quality target range, and generate instructions for adjusting the preparation process parameters;

[0100] In this embodiment, step S5 includes the following specific details, which can be found in the flowchart below. Figure 6 , Figure 6 Here is a detailed flowchart of the intelligent decision-making and instruction generation process provided in the embodiments of this application:

[0101] S510: The upper and lower limits of the permissible standard deviation of the spatial distribution of the active ingredient content constitute the permissible quality target range;

[0102] Based on the design space output from the product quality research, and combined with historical batch data accumulated during process performance verification and continuous process verification, statistical quantitative analysis is conducted to set two clear control thresholds. The upper limit is set at 2.5%. In this embodiment, the specific determination process for this value is as follows: collect offline sampling and testing data of all validation batches at the end of preparation, and calculate the spatial distribution standard deviation of the active ingredient content; perform correlation analysis between the final standard deviation values ​​of these batches and the long-term stability test results of the corresponding batch products; through statistical analysis, when the spatial distribution standard deviation at the end of preparation exceeds 2.5%, the probability of the related substance growth rate exceeding the specification limit in accelerated testing and long-term retention tests of this batch of products shows a statistically significant increase; therefore, to ensure the quality of the product throughout its entire shelf life, 2.5% is established as the process allowable upper limit that must be strictly controlled.

[0103] The lower limit is allowed to be set at 1.0%. The specific process for determining this value is as follows: From the historical production database, batches with all key quality attribute test results near the median and the best intra-batch uniformity are selected. Process data of these batches at key nodes in the preparation process are traced. Analysis reveals that when these batches reach the optimal uniformity state, the spatial distribution standard deviation output by the real-time prediction model of the key quality attributes of the drug solution is stable between 0.9% and 1.1%. To guide the production process towards this optimal state, 1.0% is set as the expected lower limit for internal process control. Therefore, the preset quality target range is that the spatial distribution standard deviation of the active ingredient content should be within a closed interval of 1.0% to 2.5%.

[0104] S520: If the standard deviation of the spatial distribution of the active ingredient content is greater than the upper limit of the allowable value, a first instruction is generated, the first instruction including a positive adjustment amount of stirring speed calculated based on the difference between the standard deviation of the spatial distribution of the active ingredient content and the upper limit of the allowable value;

[0105] When the received comprehensive evaluation result of the drug solution preparation quality, i.e. the predicted standard deviation of the spatial distribution of active ingredient content, is greater than the upper limit of the allowable value, the following operations are performed: First, calculate the difference between the standard deviation of the spatial distribution of active ingredient content and the upper limit of the allowable value; then, calculate the amount of adjustment that needs to be increased in stirring speed according to a preset control algorithm.

[0106] The specific execution steps of this control algorithm are as follows:

[0107] The first step is to divide the calculated difference by a preset difference normalization coefficient, which is used to adjust the difference to a suitable order of magnitude. In this embodiment, the specific method for determining the difference normalization coefficient is as follows: extract all cases that require adjustment of stirring speed from the historical production database. Each case contains the difference between the predicted standard deviation and the allowable upper limit value. Calculate the standard deviation of these difference samples to quantify the typical distribution width of the difference. To ensure that the difference values ​​corresponding to most cases requiring adjustment fall within the core region where the hyperbolic tangent function response is approximately linear after normalization, in this embodiment, half of the standard deviation value is selected as the normalization coefficient. This setting ensures that when the difference is one standard deviation, the normalized input value is approximately two, located in the region where the function transitions from linear to saturation, thereby achieving a balance between response sensitivity and output limiting under typical adjustment requirements.

[0108] The second step is to input the quotient obtained after the above division into the hyperbolic tangent function for calculation;

[0109] The third step is to multiply the output value of the hyperbolic tangent function by a preset speed adjustment gain coefficient, which determines the benchmark for the adjustment intensity. In this embodiment, the specific method for determining the speed adjustment gain coefficient is as follows: First, a process model capable of characterizing the influence of stirring speed changes on the uniformity of drug mixing is established; then, process data from several representative historical production batches are selected as input, and a series of different speed adjustment gain coefficient values ​​are systematically tested in a simulation environment; for each tested speed adjustment gain coefficient, the closed-loop adjustment process according to this method is fully simulated in the simulation, and the average number of adjustments required from issuing the adjustment command to the predicted quality index falling into the target range is counted, while the stirring speed setpoints between two adjacent adjustments during the simulated adjustment process are calculated. The average of the absolute values ​​of the differences is used as a quantitative indicator of the speed fluctuation amplitude. Further, the determination coefficient between the final predicted uniformity result obtained after simulation adjustment using the speed adjustment gain coefficient and the uniformity result obtained from the offline actual test of the corresponding batch is calculated as a quantitative indicator of the uniformity improvement effect. Next, clear qualified thresholds are set for the average number of adjustments, speed fluctuation amplitude, and determination coefficient. Finally, from all tested speed adjustment gain coefficients, speed adjustment gain coefficients that simultaneously meet the requirements of the average number of adjustments not exceeding the qualified threshold, the speed fluctuation amplitude not exceeding the qualified threshold, and the determination coefficient not lower than the qualified threshold are selected. Within this selected range, the speed adjustment gain coefficient value that minimizes the average number of adjustments is selected as the final speed adjustment gain coefficient setting value.

[0110] The fourth step is to multiply the above product result by the allowable upward adjustment margin of the current stirring speed setting, which is the maximum stirring speed allowed by the process minus the current stirring speed setting.

[0111] Through these four calculations, a specific speed adjustment value is finally obtained. This speed adjustment value increases non-linearly as the initial difference increases, but when the difference is large, the adjustment value will tend to a maximum limit determined by the gain coefficient and the speed margin, thereby preventing over-adjustment. Finally, the first instruction is generated: increase the stirring speed setpoint by the calculated specific value.

[0112] S530: If the standard deviation of the spatial distribution of the active ingredient content is less than the allowable lower limit, a second instruction is generated, the second instruction including a positive adjustment amount of the drug solution temperature calculated based on the difference between the standard deviation of the spatial distribution of the active ingredient content and the allowable lower limit;

[0113] When the predicted standard deviation of the spatial distribution of the active ingredient content is less than the lower limit of the allowable value, the following operations are performed: First, calculate the difference between the lower limit of the allowable value and the standard deviation of the spatial distribution of the active ingredient content; then, calculate the amount of adjustment that needs to be increased in the liquid temperature according to another control algorithm.

[0114] The execution logic of this control algorithm is similar to that of the stirring speed adjustment algorithm, but the specific parameter settings are different. In this embodiment, the specific steps are as follows:

[0115] The first step is to divide the calculated difference by a preset difference normalization coefficient. This difference normalization coefficient is determined based on the difference fluctuation characteristics in the historical case data of temperature adjustment. The determination logic is the same as that of the speed adjustment normalization coefficient. However, since the difference range of temperature adjustment is smaller and the distribution is more concentrated, the calculated difference standard deviation is also smaller. Therefore, in this embodiment, this standard deviation is directly used as the difference normalization coefficient.

[0116] The second step is to input the quotient obtained by division into the hyperbolic tangent function;

[0117] The third step involves multiplying the hyperbolic tangent function output by a preset temperature adjustment gain coefficient. In this embodiment, the specific method for determining this temperature adjustment gain coefficient is as follows: Based on the Arrhenius equation describing the effect of temperature on dissolution rate and chemical stability, a chemical kinetic simulation model is established to assess the impact of drug solution temperature changes on the apparent activation energy and equivalent conductivity trend. Process data from multiple historical production batches are selected, and a series of different temperature adjustment gain coefficient values ​​are tested in the simulation model. For each tested temperature adjustment gain coefficient, a closed-loop adjustment simulation is performed, and the maximum heating rate, the fluctuation amplitude after temperature stabilization, and the long-term impact on the predicted chemical stability progress indicators are recorded during the process of the drug solution temperature reaching the new set value. Clear safety and performance thresholds are set: the maximum heating rate must not exceed the process safety limit, the fluctuation amplitude after temperature stabilization must be within the allowable range, and the adjusted chemical stability progress indicators should show the expected improvement trend. Finally, from all tested temperature adjustment gain coefficients that meet the above safety and performance thresholds, the temperature adjustment gain coefficient value that requires the fewest adjustments to achieve system stability is selected as the final temperature adjustment gain coefficient setting value.

[0118] The fourth step is to multiply the product by the allowable margin for adjustment of the current liquid temperature setting, which is the maximum temperature allowed by the process minus the current temperature setting.

[0119] Finally, the adjustment amount of the medicine solution temperature is calculated; then, a second instruction is generated: increase the medicine solution temperature setpoint by the calculated specific value;

[0120] S540: If the comprehensive evaluation result of the drug solution preparation quality is not greater than the upper limit of the process allowable value and not less than the lower limit of the process allowable value, generate an instruction to keep the current process parameters unchanged;

[0121] When the predicted standard deviation of the spatial distribution of the active ingredient content is within the range of greater than or equal to the lower limit and less than or equal to the upper limit, it is determined that the current drug solution preparation quality has met the preset target; at this time, a third instruction is generated to keep the current set values ​​of stirring speed and drug solution temperature unchanged and continue operation.

[0122] S6: Adjust the set values ​​of stirring speed and liquid temperature according to the preparation process parameter adjustment command;

[0123] In this embodiment, step S6 includes the following specific details, which can be found in the flowchart below. Figure 7 , Figure 7 Here is a detailed flowchart of the execution control and closed-loop feedback process provided in the embodiments of this application:

[0124] S610: After adjusting the stirring speed setting and the liquid temperature setting according to the preparation process parameter adjustment command, the stirring speed timing data, stirring torque timing data, liquid temperature timing data and online conductivity timing data are collected again in the next set sampling period.

[0125] First, the generated instructions for adjusting the preparation process parameters are transmitted to the distributed control system controlling the drug preparation tank via an industrial data network. If the received instruction is the first instruction, which requires increasing the stirring speed setting, a new frequency instruction is sent to the frequency converter of the stirring motor. The frequency converter, based on its internally set gradual increase rate, gradually increases the motor speed from the current value to the specific value contained in the first instruction. If the received instruction is the second instruction, which requires increasing the drug temperature setting, the heating regulating valve on the circulating water pipeline of the preparation tank jacket is adjusted to increase the opening degree and increase the flow of the heat medium, so that the temperature of the drug in the tank slowly rises to the specific value contained in the second instruction according to the preset safe heating rate.

[0126] After confirming that the actuator has completed its action, a process stabilization timer is started. The specific duration of this stabilization waiting period is derived from previous process verification studies. By measuring and statistically analyzing the time required for the stirring flow field to achieve a uniform distribution and the temperature field to achieve re-equilibrium under different production scales, a fixed duration covering the slowest response scenario is determined. In this embodiment, this duration is set to 180 seconds. Once the stabilization waiting period ends, a new round of data acquisition is immediately triggered. Strictly following the methods and cycles defined in the data acquisition steps of this embodiment, a new round of time-series data on four types—stirring speed, stirring torque, liquid temperature, and online conductivity—is collected simultaneously.

[0127] S620: Based on the re-acquired time-series data, calculate new physical homogenization process indicators of the drug solution, new chemical stability process indicators of the drug solution, and new standard deviation of the spatial distribution of active ingredient content.

[0128] Using the newly acquired time-series data, the entire process from physical index calculation, chemical index calculation to fusion evaluation and prediction is completely re-executed. Based on the newly obtained stirring speed and stirring torque data, the integral value of stirring power is recalculated within a complete set sampling period, and the torque data is re-performed spectral analysis to extract the main frequency amplitude attenuation coefficient. These two recalculated feature values ​​are input into the physical homogenization evaluation function to obtain a new index of the physical homogenization process of the drug solution.

[0129] Meanwhile, based on the newly obtained drug solution temperature and online conductivity data, the linear fitting based on the Arrhenius equation was re-executed to obtain a new apparent activation energy, and the slope of the conductivity change trend was recalculated. After temperature correction, a new equivalent conductivity change trend value was obtained. These two recalculated characteristic values ​​were input into the chemical stability evaluation function to obtain a new chemical stability process index of the drug solution.

[0130] Subsequently, this new set of physical homogenization process indicators and chemical stability process indicators are input into the real-time prediction model of key quality attributes of the drug solution that has been trained and deployed. The forward calculation of the real-time prediction model of key quality attributes of the drug solution is performed, and a new standard deviation of the spatial distribution of active ingredient content is output based on the latest adjusted process state.

[0131] S630: Determine whether the standard deviation of the spatial distribution of the new active ingredient content falls within the preset quality target range;

[0132] The calculated predicted standard deviation of the spatial distribution of the new active ingredient content is compared with the pre-stored preset quality target range. It is then determined whether the predicted value simultaneously meets the following two conditions: the value is not less than 1.0% of the lower allowable limit, and the value is not greater than 2.5% of the upper allowable limit.

[0133] S640: If the new standard deviation of the spatial distribution of the active ingredient content does not fall within the preset quality target range, a new formulation process parameter adjustment instruction is generated based on the new standard deviation of the spatial distribution of the active ingredient content.

[0134] If the new predicted value fails to meet both of the above conditions simultaneously, i.e., it does not fall within the preset quality target range, then this latest predicted value is established as the comprehensive evaluation result of the drug solution preparation quality at the current moment. Immediately afterwards, using this latest evaluation result as input, the complete intelligent decision-making process is restarted. The latest evaluation value is compared again with the upper limit of allowable value of 2.5% and the lower limit of allowable value of 1.0%. Based on the comparison result, the corresponding control algorithm is selected to recalculate the process parameter adjustment amount, thereby generating a new round of preparation process parameter adjustment instructions. This process is repeated, forming a dynamic closed-loop real-time quality control loop, continuously guiding the process parameters to adjust in the direction of achieving the quality target, until the predicted quality result stabilizes within the target range.

[0135] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of the pharmaceutical production quality testing system based on multi-source data fusion provided in the embodiments of this application;

[0136] This embodiment demonstrates the overall system architecture for implementing the above method; the system constructs a complete technology chain from multi-source process data acquisition, physical and chemical state assessment, quality attribute fusion prediction to closed-loop control of process parameters through the collaborative work of six core functional modules;

[0137] The data acquisition module serves as the system's sensing and data input interface, responsible for real-time acquisition of key process parameters in the preparation of injectable solutions. Specifically, it is responsible for real-time acquisition of the rotation speed signal of the stirring motor in the solution preparation tank to obtain stirring speed time-series data, real-time acquisition of the torque signal of the torque sensor installed on the stirring shaft to obtain stirring torque time-series data, real-time acquisition of the temperature signal of the temperature sensor immersed in the solution to obtain solution temperature time-series data, and real-time acquisition of the signal of the online conductivity meter installed in the solution circulation pipeline to obtain online conductivity time-series data, providing a real and continuous underlying data source for subsequent in-depth analysis and decision-making.

[0138] The physical index calculation module, as a quantitative analysis unit for the physical mixing state, is responsible for analyzing the kinetic characteristics of the drug-liquid mixing process based on the time-series data of stirring speed and stirring torque. Specifically, it calculates the integral value of stirring power as an energy input feature based on the time-series data within a set sampling period, performs spectral analysis on the torque data within the same period to extract the attenuation coefficient of the main frequency amplitude, which characterizes torque stability, as a rheological state, and then inputs these two feature values ​​into a preset physical homogenization evaluation function to finally calculate and generate quantitative indexes characterizing the physical homogenization process of the drug-liquid.

[0139] The chemical index calculation module, as a quantitative analysis unit for chemical dissolution and stability, is responsible for analyzing the influence of thermodynamic conditions on the chemical state of the drug solution based on the time-series data of drug solution temperature and online conductivity. Specifically, it uses the Arrhenius equation to fit the temperature data to obtain the apparent activation energy characterizing the temperature sensitivity of the dissolution process, calculates the trend of its change based on the conductivity data and obtains the equivalent conductivity change trend value after temperature correction, and then inputs these two characteristic values ​​into a preset chemical stability evaluation function to finally calculate and generate a quantitative index characterizing the chemical stability process of the drug solution.

[0140] The fusion evaluation module, as a multi-source information fusion and key quality attribute prediction unit, is responsible for integrating physical and chemical process indicators to achieve online real-time prediction of the final quality attributes of the drug solution. Specifically, it establishes a neural network model with physical homogenization process indicators and chemical stability process indicators as inputs as a real-time prediction model for key quality attributes of the drug solution. The two process indicators calculated in real time are input into the model, and the predicted standard deviation of the spatial distribution of active ingredient content is output. This predicted value is used as the comprehensive evaluation result of the drug solution preparation quality.

[0141] The intelligent decision-making module, acting as the generation unit for process parameter adjustment strategies, is responsible for comparing the predicted quality assessment results with preset targets and generating precise control instructions. Specifically, it presets the upper and lower limits of the allowable upper and lower limits of the standard deviation of the spatial distribution of active ingredient content to form the quality target range. It compares the comprehensive assessment results with this range. If the result exceeds the upper limit, it calculates a positive adjustment amount for the stirring speed based on the difference using a control algorithm with saturation characteristics, and generates a first instruction containing this adjustment amount. If the result is less than the lower limit, it calculates a positive adjustment amount for the liquid temperature based on the difference using a more conservative control algorithm, and generates a second instruction containing this adjustment amount. If the result is within the target range, it generates an instruction to maintain the current process parameters unchanged.

[0142] The execution control module, as the final execution and verification unit of the closed-loop control, is responsible for translating decision commands into process actions and verifying the control effect. Specifically, it drives the underlying control system to adjust the set values ​​of stirring speed or liquid temperature based on the received commands. After the adjustment is completed and the process stabilization waiting period is over, it triggers the data acquisition module to re-acquire a new round of process timing data. Based on the new data, it drives the aforementioned calculation and evaluation module to generate new quality prediction results and determines whether they meet the standards. If they do not meet the standards, the new results are fed back to the intelligent decision module to generate a new round of adjustment commands, thus forming a dynamic and adaptive closed-loop quality control loop.

[0143] Embodiments of the present invention also provide an electronic device, including a memory, a processor, and a communication bus; the memory and the processor are connected via the communication bus. The memory stores a pharmaceutical production quality testing method based on multi-source data fusion, which can be loaded and executed by the processor as provided in the above embodiments.

[0144] The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function, and instructions for implementing the drug production quality testing method based on multi-source data fusion provided in the above embodiments, etc. The data storage area may store data involved in the drug production quality testing method based on multi-source data fusion provided in the above embodiments, etc.

[0145] The processor may include one or more processing cores. The processor executes instructions, programs, code sets, or instruction sets stored in memory, and calls data stored in memory to perform various functions and process data as described in this application. The processor may be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), controller, microcontroller, and microprocessor. It is understood that, for different devices, the electronic devices used to implement the above-described processor functions may also be other types, and the embodiments of this application do not specifically limit this.

[0146] A communication bus can include a pathway for transmitting information between the aforementioned components. The communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Communication buses can be categorized as address buses, data buses, control buses, etc.

[0147] This application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and executed as described in the above embodiments, which is a method for testing the quality of pharmaceutical production based on multi-source data fusion.

[0148] In this embodiment, a computer-readable storage medium can be a tangible device that holds and stores instructions used by an instruction execution device. A computer-readable storage medium can be, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination thereof. Specifically, a computer-readable storage medium can be a portable computer disk, a hard disk, a USB flash drive, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), spoofing random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory stick, floppy disk, optical disk, magnetic disk, mechanical encoding device, or any combination thereof.

[0149] The terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0150] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the foregoing application concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions claimed in this application.

Claims

1. A drug production quality testing method based on multi-source data fusion, characterized in that, Includes the following steps: S1: Acquire the timing data of stirring speed, stirring torque, drug solution temperature and online conductivity of the injection drug solution preparation process; S2: Based on the stirring speed time series data and stirring torque time series data, calculate the energy input characteristics and rheological state of the drug solution mixing process, and generate the drug solution physical homogenization process index; S3: Based on the time-series data of drug solution temperature and online conductivity, analyze the influence of thermodynamic conditions on the dissolution and ion balance of active ingredients, and generate indicators of the chemical stability process of drug solution. S310: Based on the time-series data of the liquid temperature, within the currently set sampling period, the period is divided into multiple consecutive sub-windows. For each sub-window, the average slope of the online conductivity data changing with time within the sub-window is calculated as the average rate of change of conductivity, and the average value of the liquid temperature data within the sub-window is calculated. Then, multiple data points are obtained by using the reciprocal of the average thermodynamic temperature of each sub-window as the horizontal axis and the natural logarithm of the corresponding average rate of change of conductivity as the vertical axis. Perform a univariate linear regression on these data points, and multiply the slope of the fitted line by the negative ideal gas constant to obtain the apparent activation energy characterizing the temperature sensitivity of the current dissolution process. S320: Based on the online conductivity time series data, calculate the linear regression slope within the set sampling period as the uncorrected conductivity change rate; according to the preset temperature correction coefficient, combined with the average value of the drug solution temperature time series data, correct the uncorrected conductivity change rate to the standard reference temperature to obtain the equivalent conductivity change trend value; S330: Input the apparent activation energy and the equivalent conductivity change trend value into a preset chemical stability evaluation function. The chemical stability evaluation function first performs a ratio calculation and nonlinear mapping calculation on the apparent activation energy and a preset activation energy characteristic value to obtain a first value reflecting thermodynamic stability. At the same time, it inputs the equivalent conductivity change trend value into the ion balance process calculation formula to obtain a second value reflecting the ion balance process. Finally, it multiplies the first value and the second value to calculate and output the chemical stability process index of the drug solution. S4: Integrate the physical homogenization process index and the chemical stability process index of the drug solution to construct a real-time prediction model for key quality attributes of the drug solution and generate a comprehensive evaluation result of the drug solution preparation quality. S5: Compare the comprehensive evaluation results of the drug solution preparation quality with the preset quality target range, and generate instructions for adjusting the preparation process parameters; S6: Adjust the set values ​​of stirring speed and liquid temperature according to the preparation process parameter adjustment command.

2. The method for drug production quality testing based on multi-source data fusion according to claim 1, characterized in that, The acquisition of timing data for stirring speed, stirring torque, drug solution temperature, and online conductivity during the preparation of the injectable drug solution includes: S110: Real-time acquisition of the rotation speed signal of the stirring motor in the drug preparation tank to obtain the timing data of the stirring speed; S120: Real-time acquisition of torque signal from torque sensor installed on stirring shaft to obtain stirring torque time-series data; S130: Real-time acquisition of temperature signals from temperature sensors immersed in the liquid medicine to obtain time-series data of liquid medicine temperature; S140: Real-time acquisition of conductivity signals from an online conductivity meter installed in the drug circulation pipeline to obtain online conductivity time-series data.

3. The method for drug production quality testing based on multi-source data fusion according to claim 2, characterized in that, The process of calculating the energy input characteristics and rheological state of the drug solution mixing process based on the stirring speed time-series data and stirring torque time-series data, and generating indicators of the physical homogenization process of the drug solution, includes: S210: The rotation speed values ​​of each sampling point in the stirring speed time series data are converted into angular velocity values ​​by multiplying by a preset constant. The converted angular velocity values ​​are multiplied by the corresponding stirring torque values ​​synchronized with the time to obtain the instantaneous stirring power values ​​of each sampling point. The instantaneous stirring power values ​​are multiplied by the sampling time interval and then accumulated to obtain the integral value of stirring power within the set sampling period, which serves as the energy input feature characterizing the accumulation of mixing energy. S220: Perform spectral analysis on the stirring torque time-series data within the same set sampling period, perform fast Fourier transform on the signal after removing the mean to obtain the torque spectrum, identify the main frequency component corresponding to the stirring fundamental frequency, and perform exponential decay fitting of the main frequency amplitude by dividing the entire period into several sub-intervals, extract the exponential decay rate parameter in the fitting function as the main frequency amplitude decay coefficient, and obtain the characteristics reflecting the rheological state of the drug liquid. S230: Input the integral value of the stirring power and the attenuation coefficient of the main frequency amplitude into a preset physical homogenization evaluation function. The physical homogenization evaluation function calculates the physical homogenization process index of the drug solution by integrating the nonlinear synergistic effect of energy accumulation effect and rheological state improvement.

4. The method for drug production quality testing based on multi-source data fusion according to claim 3, characterized in that, The physical homogenization process index and the chemical stability process index of the drug solution are integrated to construct a real-time prediction model for key quality attributes of the drug solution, generating a comprehensive evaluation result of the drug solution preparation quality, including: S410: Collect a large number of data pairs of physical homogenization process indicators and chemical stability process indicators of the drug solution calculated according to a set cycle during the preparation process of historical production batches as input features, and collect the standard deviation of the spatial distribution of active ingredient content obtained by offline spatial distribution sampling and detection after the preparation process of these historical batches as the corresponding target output value; pair the input features with the corresponding target output values ​​to form a training dataset; use the dataset to train a fully connected feedforward neural network containing hidden layers to minimize the error between the predicted value and the target output value, and construct a real-time prediction model for key quality attributes of the drug solution that has been trained. S420: The real-time calculated physical homogenization process index and chemical stability process index of the drug solution are input into the real-time prediction model of the key quality attributes of the drug solution. The real-time prediction model of the key quality attributes of the drug solution first inputs the input process index values ​​into the hidden layer for weighted summation calculation, and performs nonlinear transformation through a linear rectifier function. Then, the output value of the hidden layer is transmitted to the output layer for linear weighted combination, and finally the predicted standard deviation of the spatial distribution of active ingredient content is generated at the output node. S430: The predicted standard deviation of the spatial distribution of active ingredient content is used as the comprehensive evaluation result of the drug solution preparation quality.

5. The method for drug production quality testing based on multi-source data fusion according to claim 4, characterized in that, The step of comparing the comprehensive evaluation results of the drug solution preparation quality with the preset quality target range and generating adjustment instructions for the preparation process parameters includes: S510: The upper and lower limits of the permissible standard deviation of the spatial distribution of the active ingredient content constitute the permissible quality target range; S520: If the standard deviation of the spatial distribution of the active ingredient content is greater than the upper limit of the allowable value, calculate the difference between the standard deviation of the spatial distribution of the active ingredient content and the upper limit of the allowable value; divide the difference by a preset difference normalization coefficient and input it into a hyperbolic tangent function; multiply the output value of the hyperbolic tangent function by a preset speed adjustment gain coefficient, and then multiply by the allowable upward adjustment margin of the current stirring speed setting value to calculate the positive adjustment amount of the stirring speed, and generate a first instruction containing this adjustment amount; S530: If the standard deviation of the spatial distribution of the active ingredient content is less than the allowable lower limit, calculate the difference between the allowable lower limit and the standard deviation of the spatial distribution of the active ingredient content; divide the difference by another preset difference normalization coefficient and input it into a hyperbolic tangent function; multiply the output value of the hyperbolic tangent function by a preset temperature adjustment gain coefficient, and then multiply by the allowable upward adjustment margin of the current drug solution temperature setting to calculate the positive adjustment amount of the drug solution temperature, and generate a second instruction containing this adjustment amount; S540: If the comprehensive evaluation result of the drug solution preparation quality is not greater than the upper limit of the process allowable value and not less than the lower limit of the process allowable value, generate an instruction to keep the current process parameters unchanged.

6. The method for drug production quality testing based on multi-source data fusion according to claim 5, characterized in that, The step of adjusting the set values ​​of the stirring speed and the liquid temperature according to the preparation process parameter adjustment command includes: S710: After adjusting the stirring speed setting and the liquid temperature setting according to the preparation process parameter adjustment command, the stirring speed timing data, stirring torque timing data, liquid temperature timing data and online conductivity timing data are collected again in the next set sampling period. S720: Based on the re-acquired time-series data, calculate new physical homogenization process indicators of the drug solution, new chemical stability process indicators of the drug solution, and new standard deviation of the spatial distribution of active ingredient content. S730: Determine whether the standard deviation of the spatial distribution of the new active ingredient content falls within the preset quality target range; S740: If the new standard deviation of the spatial distribution of the active ingredient content does not fall within the preset quality target range, a new formulation process parameter adjustment instruction is generated based on the new standard deviation of the spatial distribution of the active ingredient content.

7. A pharmaceutical production quality testing system based on multi-source data fusion, used to implement the pharmaceutical production quality testing method based on multi-source data fusion as described in any one of claims 1 to 6, characterized in that, include: The data acquisition module is used to acquire the time-series data of stirring speed, stirring torque, drug solution temperature, and online conductivity during the preparation process of injectable drug solutions. The physical index calculation module is used to calculate the energy input characteristics and rheological state of the drug solution mixing process based on the stirring speed time series data and stirring torque time series data, and generate the physical homogenization process index of the drug solution. The chemical index calculation module is used to analyze the influence of thermodynamic conditions on the dissolution and ion balance of active ingredients based on the time-series data of drug solution temperature and online conductivity, and to generate chemical stability process indicators of drug solution. The fusion evaluation module is used to integrate the physical homogenization process indicators and the chemical stability process indicators of the drug solution, construct a real-time prediction model for key quality attributes of the drug solution, and generate a comprehensive evaluation result of the drug solution preparation quality. The intelligent decision-making module is used to compare the comprehensive evaluation results of the drug solution preparation quality with the preset quality target range and generate instructions for adjusting the preparation process parameters. The execution control module is used to adjust the set values ​​of the stirring speed and the liquid temperature according to the preparation process parameter adjustment instructions.

8. An electronic device comprising a processor and a memory, wherein, The memory stores a computer program that can be called by the processor; the processor executes the drug production quality testing method based on multi-source data fusion as described in any one of claims 1 to 6 by calling the computer program stored in the memory.

9. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the pharmaceutical production quality testing method based on multi-source data fusion as described in any one of claims 1 to 6.