Intelligent pharmaceutical production process monitoring and optimizing system

By combining multi-scale data acquisition and information entropy calculation with adaptive sensing and predictive control, the problems of lagging single-variable monitoring and insufficient insight into micro-root causes in the drug production process have been solved, achieving early warning and efficient control.

CN121455090APending Publication Date: 2026-02-03TAIYUAN UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511598446.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-04
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing drug manufacturing process monitoring strategies rely on univariate control charts, which result in delayed responses and an inability to capture early abnormal trends caused by multivariate collaborative drift. Furthermore, traditional monitoring methods cannot reveal the root causes of process instability at the micro level.

Method used

A multi-scale data acquisition module is used to acquire macroscopic and microscopic data. A process information entropy calculation module is used to quantify the stability of the production process. An adaptive sensing strategy module is used to adjust the data acquisition behavior. Combined with a predictive control module, key driving sources are identified, and targeted control commands are generated.

Benefits of technology

It enables early warning and highly sensitive monitoring of the drug production process, improves the system's operational efficiency and control accuracy, and reduces the risk of batch failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121455090A_ABST
    Figure CN121455090A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of pharmaceutical production process control, and discloses an intelligent pharmaceutical production process monitoring and optimizing system, which comprises a multi-scale data acquisition module, a data preprocessing module, a process information entropy calculation module, a self-adaptive sensing strategy module and a predictive control module, according to the method, the collected macroscopic and microscopic scale data are fused into a unified system state vector, the process information entropy is calculated according to the unified system state vector to quantify the overall stability of the system, on one hand, the system dynamically adjusts a sensing mode according to a PIE value, and optimal configuration of sensing resources is achieved; and on the other hand, when the PIE exceeds a preset threshold value, the system locates an unstable key driving source through an entropy increase contribution degree traceability technology, and generates a predictive control instruction in combination with a control knowledge base to perform active intervention. According to the invention, early instability early warning, on-demand distribution of sensing resources and accurate predictive control in the production process can be realized, and the stability and operation efficiency of the production process are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of pharmaceutical production process control, in particular to an intelligent pharmaceutical production process monitoring and optimization system. BACKGROUND

[0002] The stability and consistency of the pharmaceutical production process are directly related to the quality and safety of the final product. In order to achieve a deep understanding and control of the production process, the pharmaceutical industry has introduced process analysis technology. This technology uses near-infrared spectroscopy, Raman spectroscopy and other sensors to monitor key process parameters and key quality attributes in real time through online or in-situ methods.

[0003] However, the current monitoring strategy based on process analysis technology usually relies on statistical process control methods, such as setting up independent control charts for individual process parameters. This monitoring method based on single variable control charts is essentially a delayed response mechanism. The system will only generate an alarm when the measured value of a process parameter actually exceeds the preset statistical control limit. This alarm often occurs when the process deviation is already significant, which may result in untimely corrective measures or even the scrapping of the entire batch of products.

[0004] In addition, traditional monitoring strategies usually treat each process parameter in isolation, ignoring the complex coupling relationships between parameters in a multivariate system. In actual production, process instability is often not caused by a dramatic shift in a single parameter, but by small, coordinated drifts in multiple parameters within their respective normal ranges. Existing single variable monitoring methods are difficult to effectively capture this early abnormal trend caused by the combined action of multiple variables.

[0005] At the same time, existing process analysis technology mainly focuses on the measurement of macroscopic average properties of materials, such as overall component concentration, average temperature or particle size distribution. This monitoring limited to the macroscopic scale may not be able to uncover the microscopic root causes of process instability, such as local overheating, concentration unevenness or phase separation in the reactor. These microscopic events are often precursors of macroscopic process deviation, but their signals are weak and easily masked by macroscopic average measurements, thus missing the opportunity to intervene at an earlier stage. SUMMARY

[0006] To overcome the shortcomings of the prior art, the present application provides an intelligent pharmaceutical production process monitoring and optimization system, which solves the problems of single monitoring dimension, delayed abnormal response and insufficient intervention precision in the prior art.

[0007] To achieve the above purpose, the present application realizes the following technical scheme: an intelligent pharmaceutical production process monitoring and optimization system, which comprises: A multi-scale data acquisition module is configured to acquire macro-scale data and micro-scale data of a pharmaceutical production process. A data preprocessing module is connected to the multi-scale data acquisition module and configured to process the macro-scale data and micro-scale data to generate a unified system state vector. A process information entropy calculation module is connected to the data preprocessing module and configured to calculate a process information entropy and a process information entropy change rate based on the system state vector. An adaptive sensing strategy module is connected to the process information entropy calculation module and configured to generate a sensing mode switching instruction according to the process information entropy and the process information entropy change rate, and send the sensing mode switching instruction to the multi-scale data acquisition module to adjust a data acquisition behavior of the multi-scale data acquisition module. A predictive control module is connected to the process information entropy calculation module and configured to generate a predictive control instruction when the process information entropy or the process information entropy change rate exceeds a preset threshold.

[0008] In one specific embodiment, the data preprocessing module performs normalization processing on the acquired multi-scale data, and combines the normalized data at the same time point to construct the system state vector.

[0009] In another specific embodiment, the multi-scale data acquisition module includes a process analysis technology sensor configured to acquire the macro-scale data, and a diamond NV center quantum sensor configured to acquire the micro-scale data.

[0010] The present application introduces the concept of entropy in information theory into the quantitative evaluation of the stability of the entire production process. The process information entropy calculation module estimates the probability density function of a series of system state vectors within a time window, and calculates the process information entropy based on the estimation.

[0011] In one specific embodiment, the kernel density estimation (KDE) method is used to estimate the probability density function The calculation formula is as follows: ; wherein, is the total number of samples within the time window; is a bandwidth parameter; is the dimension of the state vector; is a kernel function; is any point in the state space; is the sample state vector within the time window.

[0012] Based on the estimated probability density function, the calculation formula of the process information entropy (PIE) is as follows: ; wherein, is the process information entropy of the current time window; is the probability density value estimated at the sample point .

[0013] Based on the calculated process information entropy, the present application constructs a double closed-loop monitoring and optimization mechanism. The first closed loop is adaptive sensing. The state evaluation and mode triggering mechanism in the adaptive sensing strategy module compares the real-time process information entropy and the process information entropy change rate with the preset threshold value. When the process is stable, the instruction multi-scale data acquisition module works in the baseline monitoring mode. When the process information entropy exceeds the threshold value, the high-precision detection mode is triggered. The mode switching can be embodied as adjusting the sampling frequency or integration time of the PAT sensor, or adjusting the measurement sequence of the diamond NV center quantum sensor, such as switching from continuous wave light detection magnetic resonance sequence to pulsed measurement sequence.

[0014] The second closed loop is predictive control. When the process information entropy exceeds the threshold value, the entropy increase contribution degree tracing unit in the predictive control module is activated. This unit uses a Shapley value-based algorithm to identify the key driving source of entropy increase. The calculation formula of Shapley value is: ; wherein, is the contribution degree of the th input feature (i.e. sensor reading); is the set of all features; is the process information entropy value output by the model when only using the feature values in the feature subset .

[0015] After identifying the key driving source, the decision generation unit in the predictive control module queries the preset control knowledge base (CKB) based on the key driving source to match and generate predictive control instructions for correcting process deviation.

[0016] In an optional embodiment, the present system further includes an interface and execution module. This module delivers the predictive control instructions to the lower computer system through a set of instruction delivery and execution confirmation mechanism, and confirms the execution result of the instructions by reading back the actual process values, thereby ensuring the reliability of the entire control closed loop.

[0017] The second aspect of the present application provides an intelligent pharmaceutical production process monitoring and optimization method, which comprises the following steps: Using a multi-scale data acquisition module to collect macro-scale data and micro-scale data of the pharmaceutical production process; preprocessing the macro-scale data and the micro-scale data to generate a unified system state vector; calculating a process information entropy (PIE) and a process information entropy change rate based on the system state vector; generating a sensing mode switching instruction according to the process information entropy and the process information entropy change rate, and adjusting a data acquisition behavior of the multi-scale data acquisition module according to the instruction; when the process information entropy or the process information entropy change rate exceeds a preset threshold, generating a predictive control instruction to intervene in the drug production process.

[0018] The application provides an intelligent drug production process monitoring and optimization system. 1、The application realizes overall and early warning of production process stability by fusing macro and micro data obtained by the multi-scale data acquisition module into a unified system state vector, and quantifying the system state vector into a single process information entropy index by the process information entropy calculation module, can capture the increase of system-level uncertainty caused by the coordinated change of multiple parameters, and thus can identify the potential instability risk of the process before any single process parameter exceeds its specification limit, thereby significantly improving the sensitivity and foresight of monitoring.

[0019] 2、The application switches the multi-scale data acquisition module between a stable baseline monitoring mode and an unstable high-precision detection mode according to the process information entropy value by the adaptive sensing strategy module, avoids the resource waste caused by the traditional fixed sampling strategy when the process is stable, and ensures that sufficient high-quality data can be obtained for diagnosis when an abnormal trend occurs, thereby improving the operation efficiency of the system.

[0020] 3、The application sets a predictive control module, when the process information entropy is detected to increase, the entropy increase contribution degree tracing unit can locate the key driving source causing instability, then the decision generation unit matches and generates specific and targeted control instructions from the control knowledge base according to the tracing result, can directly intervene in the root cause of the problem, thereby improving the accuracy and effectiveness of control, and helping to reduce the risk of batch failure. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 is a system architecture diagram of the application; Figure 2 is a method flowchart of the application.

[0022] 10, multi-scale data acquisition module; 20, data preprocessing module; 30, process information entropy calculation module; 40, adaptive sensing strategy module; 50, predictive control module; 60, control instruction execution interface module. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of protection of the present application.

[0024] Embodiment: Please refer to the accompanying Figure 1 The embodiment of the present application provides an intelligent drug production process monitoring and optimization system, which comprises a multiscale data acquisition module 10, a data preprocessing module 20, a process information entropy calculation module 30, an adaptive sensing strategy module 40, a predictive control module 50, and a control instruction execution interface module 60.

[0025] The multiscale data acquisition module 10, the data preprocessing module 20, the process information entropy calculation module 30, the adaptive sensing strategy module 40, the predictive control module 50, and the control instruction execution interface module 60 communicate with each other through wired or wireless means to jointly constitute a closed-loop control system for process monitoring and optimization.

[0026] The multiscale data acquisition module 10 is used for acquiring multi-dimensional data in real time during the drug production process. The physical entity of the module includes two types of sensors deployed on the process unit. The first type is a macro-sensor group, which includes conventional sensors for measuring process parameters such as temperature, pressure, pH, stirring rate, flow rate, and near-infrared spectrometers or Raman spectrometers for acquiring chemical information such as material composition and molecular structure. The second type is a micro-sensor group, specifically a diamond nitrogen vacancy center quantum sensor array, which can be deployed in the following ways, including but not limited to: integrated in the form of a thin film coating on the inner wall or internal member surface of the process unit; or using surface-functionalized nanodiamond particles as suspended probes dispersed in the material at trace concentrations.

[0027] The data preprocessing module 20, the process information entropy calculation module 30, the adaptive sensing strategy module 40, and the predictive control module 50 are logically independent software functional modules and can be physically deployed in one or more industrial control computers or servers. The control instruction execution interface module 60 is responsible for communication between the system and the lower computer in the production site, such as a programmable logic controller or a distributed control system.

[0028] Please refer to the accompanying Figure 2 The present application provides an intelligent drug production process monitoring and optimization method, which can be applied to the aforementioned system and specifically comprises the following steps: S100, collecting process data: the multi-scale data collection module 10 collects macro process parameters, chemical component information and micro environmental physical quantity information in real time and in parallel during the production of the drug.

[0029] S200, preprocessing data and constructing state vectors: the data preprocessing module 20 performs data cleaning, timestamp alignment and normalization processing on the collected multi-source heterogeneous raw data, and constructs a unified high-dimensional system state vector which can comprehensively represent the overall state of the system at the current time .

[0030] S300, calculating process information entropy: the process information entropy calculation module 30 calculates the process information entropy and its change rate and based on a series of received system state vectors within a sliding time window .

[0031] S400, evaluating system state and adaptively adjusting sensing strategy: the adaptive sensing strategy module 40 compares and with the preset threshold to determine whether the system tends to be unstable. According to the judgment result, an instruction is generated and issued to make the multi-scale data collection module 10 dynamically switch between the baseline monitoring mode and the high-precision detection mode.

[0032] S500, performing predictive analysis and decision: the predictive control module 50 is triggered when or exceeds the warning threshold, i.e. the entropy increase contribution degree tracing algorithm is started immediately to identify the key factors leading to the increase of system instability, and the process adjustment instruction is generated based on the built-in control knowledge base.

[0033] S600, executing optimization control: the control instruction execution interface module 60 sends the generated process adjustment instruction to the lower computer control system in the production field, which drives the corresponding execution mechanism to operate, thereby completing the feedforward closed-loop optimization of the production process.

[0034] The specific technical implementation involved in each of the above steps will be described in detail below.

[0035] The multi-scale data collection module 10 includes a macro data collection unit. The macro data collection unit is composed of one or more groups of sensors deployed on the drug production process unit, which is used to obtain the macro state information of the production process.

[0036] The sensors included in the macro data collection unit can be specifically divided into two categories. The first category is the process parameter sensor for measuring basic process parameters, examples of which include but are not limited to: Temperature sensors for measuring material temperature, pressure sensors for measuring system pressure, pH electrodes for determining pH value, stirring rate sensors for monitoring material mixing intensity, and flow meters for metering material flow rate.

[0037] The second category is process analytical technology sensors for online or near online analysis of material chemical and physical properties. Examples include, but are not limited to, near infrared spectrometers or Raman spectrometers for determining material chemical composition or molecular vibration information, and focused beam reflectance measurement probes for monitoring particle size distribution.

[0038] The working mode of the macro data acquisition unit includes the following steps: Sensor deployment and integration: According to the measurement principle and process requirements, the above-mentioned various sensors are installed at appropriate positions of the process unit. For example, temperature probes and pH electrodes are inserted into the material through reserved interfaces; spectral probes are connected to the spectrometer host through optical fibers, and the probe end is placed in the reactor or integrated into the flow cell of the online circulation loop.

[0039] Parameter measurement and signal conversion: During system operation, each sensor continuously or periodically measures its target physical quantity or chemical property, and the physical signal obtained by measurement is converted into a standardized digital signal inside the sensor or its attached transmitter.

[0040] Data formatting and output: The converted digital signal is formatted into data points with accurate time stamps. For spectral sensors, each time stamp corresponds to a complete spectral data vector; for process parameter sensors, each time stamp corresponds to a scalar value. These time-stamped data collectively constitute the macro raw data stream.

[0041] Data transmission: The macro data acquisition unit transmits the macro raw data stream containing time stamps to the data preprocessing module 20 for subsequent processing, using the preset communication protocol through the industrial field bus or industrial Ethernet.

[0042] For the specific selection, installation specifications, calibration methods, and data communication configuration with the industrial control system of the various sensors in the above-mentioned macro data acquisition unit, the person skilled in the art can implement them according to the specific process requirements and equipment environment, and the technical solutions belong to the public knowledge in the field, which will not be described here.

[0043] The multi-scale data acquisition module 10 further comprises a micro-scale data acquisition unit. The micro-scale data acquisition unit is used to non-invasively acquire local micro-scale physical environment information inside the material system during the drug production process, which is difficult for the macro-scale sensor to effectively detect. The diamond nitrogen vacancy center quantum sensor array is a specific implementation of the micro-scale data acquisition unit.

[0044] The composition and deployment method of the micro-scale data acquisition unit includes but is not limited to the following two specific forms. The first form is the inner wall integrated form: a diamond thin film containing high-density NV centers is grown or coated on the surface of a specific component inside the process unit, such as the inner wall of the reaction kettle, the baffle or the heat transfer sleeve, by chemical vapor deposition or other techniques, forming a fixed sensor array.

[0045] The second form is the suspended probe form: nanodiamond particles containing single or a small number of NV centers are surface functionalized to ensure good dispersibility and chemical inertness in the material system, and then added to the material in trace concentration as free detection probes flowing with the material.

[0046] The working principle of the micro-scale data acquisition unit is described as follows: the nitrogen vacancy center in diamond is a solid-state point defect, and its electron spin has a quantumized energy level. The energy difference of this level shows extremely high sensitivity to changes in the surrounding magnetic field, electric field, stress and temperature and other physical quantities. By manipulating and reading the spin state of the NV center, the micro-scale physical environment information of the location can be inverted.

[0047] The working method of the micro-scale data acquisition unit can include the following steps: An external green laser is used to irradiate the NV center. This step uses spin-selective optical transitions and intersystem crossing processes to polarize the electron spin state of the NV center to a specific initial state, usually the state.

[0048] A precisely controlled microwave field is applied. When the frequency of the microwave field matches the energy difference between the ground state energy level splitting of the NV center electron spin under a specific magnetic field (i.e. the energy difference between the and states), resonance occurs, driving the spin state to transition between different energy levels. This technique is called optical detection magnetic resonance.

[0049] After or at the same time as applying the microwave field, the NV center is irradiated again with a green laser, and the red fluorescence emitted by the NV center is collected. The fluorescence intensity of the NV center in the state is higher than that in the state, therefore, by measuring the change in fluorescence intensity, it can be determined whether spin resonance has occurred.

[0050] Scanning microwave frequency and continuously monitoring fluorescence intensity, one or more ODMR spectra of fluorescence intensity versus microwave frequency can be obtained, and the valley value on the spectrum corresponds to the resonance frequency. Changes in external physical quantities will cause the resonance frequency to move. For example, the spin Hamiltonian of the NV center The description can be simplified as: ; Wherein, is the zero-field splitting parameter, sensitive to temperature and stress; is the electron g-factor; is the Boltzmann constant; is the external magnetic field component along the NV axis direction; is the spin operator.

[0051] When the external magnetic field changes, the resonance frequency will have measurable Zeeman splitting and frequency shift; when the temperature changes, the lattice thermal expansion will cause the zero-field splitting parameter to change, also causing the resonance frequency to move. By accurately measuring the displacement amount of these resonance frequencies, the local magnetic field, temperature, stress and other microscopic physical parameters of the location where the NV center is located can be inverted.

[0052] Data formatting and transmission: the micro data acquisition unit will attach the values of the demodulated multiple microscopic physical parameters, accurate time stamp and spatial position information to form a micro raw data stream. The data stream is then sent to the data preprocessing module 20 through the standard industrial communication protocol.

[0053] The data preprocessing module 20 includes a data synchronization and alignment mechanism, which is used to process the multi-source heterogeneous data streams provided by the multi-scale data acquisition module 10, which have different sampling frequencies and potential time reference deviations, to generate a strictly aligned data set in the time dimension, providing a basis for subsequent construction of accurate system state vectors.

[0054] The implementation of the data synchronization and alignment mechanism can include the following steps: To ensure that all data sources in the system have a unified time reference, all sensors participating in data acquisition, data acquisition cards and servers performing data processing in the system are periodically synchronized through the network time protocol or more accurate precise time protocol. Through this step, the clocks of all devices are calibrated to a common master clock source, so that the time stamp attached to each sensor output data has global consistency. The deployment and configuration of NTP or PTP protocol belong to the known technology in the art, and will not be described here.

[0055] Because the sampling periods of each sensor are different, even under a unified time reference, the distribution of the raw data points on the time axis is non-uniform and non-aligned. Therefore, this mechanism defines a unified, high-resolution reference time grid, with time intervals... The data alignment process, where the sampling period is less than or equal to the fastest of all sensors, involves resampling the raw data sequences from all sensors onto the reference time grid at various time points. Resampling methods include, but are not limited to, nearest neighbor interpolation, linear interpolation, or higher-order spline interpolation. For example, for any given sensor... If you need a specific point in time on the reference time grid Obtain its reading at that time point. It falls exactly on two consecutive actual sampling points and Between (i.e.) ), then it is in Time estimate It can be calculated using the following formula: ; in, For sensors At reference time point The estimated value; and For sensors exist The timestamps corresponding to the two most recent actual sampling points are respectively and By repeatedly performing this resampling process on the raw data streams of all sensors, the system obtains a new set of data sequences in which the data points of all sensors correspond one-to-one with the nodes of the defined reference time grid in time, thereby achieving precise alignment of multi-source heterogeneous data in the time dimension.

[0056] After completing data synchronization and alignment, the data preprocessing module 20 performs data normalization processing and constructs a system state vector. This step aims to eliminate the influence of differences in physical dimensions and numerical ranges between different sensor data, ensuring that the data in each dimension is comparable in subsequent calculations.

[0057] The specific implementation method for this step is as follows: After data synchronization and alignment steps, at the reference time point Estimates for each sensor on the device Numerical scaling is performed. In one specific embodiment, the min-max normalization method is used to linearly map the data to an interval. The calculation formula is as follows: ; wherein, is the normalized value of the th sensor at time point ; is the aligned value of the th sensor at time point and are the minimum and maximum values that the th sensor can record in its entire operating range or in one typical production batch, which can be pre-set or obtained by statistical analysis of historical data.

[0058] It should be understood that the data normalization method is not limited to this, and in other embodiments, methods such as Z-score standardization can also be used. Z-score standardization converts data into a distribution with a mean of 0 and a standard deviation of 1, and its calculation formula is: ; wherein, and are the mean and standard deviation of the historical data set of the th sensor, respectively. The choice of normalization method can be determined by a person skilled in the art according to the distribution characteristics of the specific data and the requirements of the subsequent algorithm.

[0059] After completing the normalization processing of all sensor data streams, the module combines (or concatenates) all normalized data at the same reference time point in a predetermined fixed order to form a dimensional column vector, i.e., the system state vector . Its mathematical form is represented as: ; wherein, represents the system state vector at time ; the total dimension of the system state vector is equal to the sum of the number of macro and micro sensors; the superscript represents vector transposition. The system state vector is a complete, unified and dimensionless mathematical description of the state of the process system at this time, which is output to the process information entropy calculation module 30 in real time for subsequent quantitative analysis of system stability.

[0060] ​The process information entropy calculation module 30 introduces the concept of process information entropy, which is used to quantitatively characterize the overall stability of the drug production process. The theoretical basis of this index is derived from information theory, and its core is to map the dynamic behavior of the entire production system into a trajectory in a high-dimensional state space, and to judge the stability of the system by evaluating the uncertainty of the trajectory.

[0061] At any time, the system state vector constructed by the data preprocessing module 20 can be regarded as a point in -dimensional state space, and as time goes on, this series of points connects into a trajectory, which completely depicts the dynamic evolution history of the production process.

[0062] For a stable and robust production process, the system state will fluctuate around an ideal steady-state operating point or within a limited and explicit operating region. In the state space, the trajectory will be constrained in a relatively concentrated and small local area, which means that within any time window, the distribution of the system state is highly concentrated, and the future state has high predictability.

[0063] On the contrary, when the production process is disturbed by unknown disturbances, the parameters drift or potential faults occur, the system will gradually deviate from the normal running track, and in the state space, the trajectory will become divergent and begin to explore a wider and more disordered area, which means that within the same time window, the distribution of the system state becomes extensive and flat, and the future state has high uncertainty.

[0064] Process information entropy is a mathematical tool for quantitatively describing this state distribution uncertainty. It is defined as the Shannon entropy of the probability density function of the system state vector within a time window. Its theoretical calculation formula is: ; wherein, is the process information entropy; is the system state vector; is the probability density function of the system state vector in the state space; is the logarithm with base 2, so that the unit of information entropy is bit.

[0065] According to the definition, the physical meaning of the value is as follows: A lower PIE value corresponds to a sharp, narrow peak probability density function This indicates that the system state is highly concentrated in a specific region of the state space, and the system's operating state is singular, orderly, and predictable, signifying that the process is in a highly stable state.

[0066] A higher PIE value corresponds to a flat, broad probability density function. This indicates that the system state is widely distributed across multiple regions of the state space, and the system's operating state is diverse, chaotic, and unpredictable, signifying a decline in the overall stability of the process and a potential risk of instability. Therefore, by calculating and monitoring a single scalar value of PIE, this invention can achieve a comprehensive assessment of the overall stability of the entire multivariable production system. An increase in the PIE value can serve as a model-independent, non-specific early warning signal of potential system anomalies, and its indicative effect occurs before any single process parameter exceeds its preset specification limit.

[0067] Before calculating the process information entropy, the process information entropy calculation module 30 needs to estimate the probability density function of the system state vector in its state space. In a specific embodiment of the present invention, a non-parametric kernel density estimation method is used to accomplish this task. This method does not require any assumptions about the prior distribution of the data and is suitable for processing complex industrial process data.

[0068] The implementation of this state-space probability density estimation includes the following steps: The estimation process is performed over a width of The process is executed within a sliding time window. The process information entropy calculation module 30 receives and collects a series of data within a time window from the data preprocessing module 20. A continuous system state vector forms a sample set. , as input for probability density estimation.

[0069] for any point in the 3D state space Its probability density By checking all within the window The kernel function contributions of each sample point are estimated by stacking and averaging. The calculation formula is as follows: ; in, For the state point The probability density value obtained at the estimated location; This represents the total number of samples within the time window. For bandwidth parameters; The dimension of the state vector; The first within the time window Each sample state vector; This is the kernel function.

[0070] kernel function is a function that determines the shape of the contribution of a single sample point, in a specific embodiment, a Gaussian kernel function is adopted, which has the form: ; wherein, It should be understood that the selection of the kernel function is not limited thereto, and other functions such as Epanechnikov kernel, uniform kernel or triangular kernel can also be applied in the present application.

[0071] Determination of the bandwidth parameter: bandwidth parameter is a smoothing parameter, the value of which determines the smoothness of the estimated probability density function curve, and has a direct impact on the accuracy of the estimation result, in an embodiment of the present application, the bandwidth parameter can be determined by the Silverman empirical rule, which balances between computational efficiency and rationality. For multi-dimensional data, the calculation formula is: ; wherein, is the estimated value of the standard deviation of the sample data, for example, the average of the standard deviations of each dimension; is the dimension of the data; is the number of samples. In other embodiments, the bandwidth parameter can also be selected by the more computationally intensive cross-validation method to obtain a better fitting effect. The specific implementation of the cross-validation method belongs to the prior art and will not be described here.

[0072] Through the above steps, the process information entropy calculation module 30 can generate a continuous and calculable probability density function for the system state in any given time window, providing a basis for subsequent quantitative calculation of process information entropy.

[0073] After completing the state space probability density estimation, the process information entropy calculation module 30 performs the quantitative calculation process of the process information entropy according to the estimation result, which aims to convert the theoretical information entropy definition into a calculation step that can be performed on discrete sampling data.

[0074] The quantitative calculation process of the PIE can include the following steps: For each state vector in the sample set collected in the current sliding time window, the process information entropy calculation module 30 calculates the probability density estimation value of the point itself using the kernel density estimation model established in the previous step .

[0075] In a preferred embodiment, to improve the robustness of the estimation, this step can employ a leave-one-out strategy, i.e. the kernel density estimation model used in the calculation of the probability density at a particular sample point is constructed based on the rest of the sample points excluding itself.

[0076] The process information entropy calculation module 30 calculates the process information entropy of the current time window by Monte Carlo approximation of the integral in the information entropy theoretical formula, using the probability density information of the sample set itself. The calculation formula is: ; wherein, is the process information entropy of the current time window (ending at time ); is the total number of samples in the time window; is the probability density value estimated at sample point ; is the base-2 logarithm, and is a scalar value assigned to the end time of the current time window.

[0077] To capture the dynamic trend of system stability, the process information entropy calculation module 30 also calculates the rate of change of the process information entropy . This rate of change can be approximately obtained by backward difference of the PIE values calculated for two consecutive time windows. The calculation formula is: ; wherein, is the rate of change of the process information entropy at time ; is the process information entropy value calculated at the current time; is the process information entropy value calculated for the previous time window; is the time step of the sliding time window moving forward, i.e. the time interval between two consecutive PIE calculations.

[0078] Finally, the process information entropy calculation module 30 outputs the two key indicators, the real-time calculated process information entropy and its rate of change , to the adaptive sensing strategy module 40 and the predictive control module 50, as the basis for subsequent system state assessment and decision-making.

[0079] ​The adaptive sensing strategy module 40 is a core component for realizing the intelligent monitoring and optimization functions of this invention. The operation of this adaptive sensing strategy module 40 establishes an evaluation of the overall system state, adjusting the monitoring system's own operating mode rather than directly controlling the drug production process parameters. The principle of this closed-loop feedback control lies in the fact that the adaptive sensing strategy module 40 uses the process information entropy output by the process information entropy calculation module 30. and the rate of change of information entropy in the process As its sole input.

[0080] These two indicators, from an information theory perspective, comprehensively reflect the overall certainty and stability of the entire pharmaceutical production system within the current time window. The adaptive sensing strategy module 40 receives... and Then, it is compared with the internally set threshold. The result of this comparison directly determines the instruction that the module will output. This instruction is sent to the multi-scale data acquisition module 10 to change its data acquisition behavior mode.

[0081] The multi-scale data acquisition module 10 adjusts the operating parameters of its various internal sensors according to the received instructions. This adjustment of operating parameters directly changes the density and accuracy of the raw data input to the data preprocessing module 20 at the next moment. As the input data changes, the results of subsequent data preprocessing, state vector construction, and process information entropy calculation also change, forming a complete closed loop from system state quantification (PIE calculation) to state evaluation (threshold comparison) to sensor behavior adjustment, ultimately affecting system state quantification.

[0082] This invention implements a dynamic, on-demand sensor resource management strategy, which is applicable when the production process is stable. When the value is low, the system instructs the multi-scale data acquisition module 10 to operate in a baseline monitoring mode with low resource consumption; however, once a value is detected... When the value rises abnormally, indicating a decrease in system stability, the system is immediately instructed to switch to a high-precision detection mode that provides richer diagnostic information. This architecture allows the system of the present invention to avoid the problems of resource waste or information loss caused by traditional fixed sampling strategies.

[0083] The adaptive sensing strategy module 40 interprets the indicators provided by the process information entropy calculation module 30 through its internal state evaluation and mode triggering mechanism, and makes decisions accordingly. The implementation of this mechanism is the key to connecting system state quantification and sensing behavior adjustment. The specific implementation of this state evaluation and mode triggering mechanism may include the following steps: This mechanism pre-sets one or more sets of thresholds for state assessment; in one specific embodiment, these thresholds include a process information entropy threshold. and process information entropy change rate threshold The determination method of the thresholds can be based on statistical analysis of operation data of a plurality of historical gold batches.

[0084] Specifically, the operation data of the gold batches in the entire production cycle are collected and calculated. and time series, and the thresholds are set according to the statistical distribution thereof. In order to prevent the system from frequently switching the sensing mode near the critical state, the present application can also introduce a hysteresis comparison mechanism. The mechanism sets a high threshold for triggering the high-precision mode and a low threshold for returning to the baseline mode , for example, may be set as the 99th percentile of the gold batch value, and may be set as the 90th percentile.

[0085] The adaptive sensing strategy module 40 receives and processes real-time and values at preset time intervals. The triggering logic inside the module makes a judgment according to the following rules and generates a sensing mode switching instruction: if the current sensing mode is the baseline monitoring mode and the conditions ) or ) are met, the mechanism judges that the system stability has decreased significantly and needs more accurate data for diagnosis. At this time, the module generates an instruction to switch to the high-precision detection mode and sends it to the multi-scale data acquisition module 10. If the current sensing mode is the high-precision detection mode and the conditions and ) are met, the mechanism judges that the system has returned to a stable state. At this time, the module generates an instruction to switch to the baseline monitoring mode and sends it to the multi-scale data acquisition module 10. If the above conditions are not met, the system maintains the current sensing mode unchanged and does not generate a new switching instruction. Through this judgment logic based on hysteresis comparison, the mechanism completes the evaluation of the system state and realizes the triggering and switching of the sensing mode.

[0086] After receiving the sensing mode switching instruction issued by the adaptive sensing strategy module 40, the multi-scale data acquisition module 10 performs dynamic switching of the sensing mode. The implementation process is to convert the abstract mode instruction into accurate adjustment of the working parameters of the specific sensor.

[0087] The specific implementation of the dynamic switching of the sensing mode can include the following steps: The control logic unit inside the multi-scale data acquisition module 10 first parses the received instructions, identifies whether the target mode is a baseline monitoring mode or a high-precision detection mode, and then distributes the corresponding parameter configuration set to the lower-level drive controllers of the macro data acquisition unit and the micro data acquisition unit.

[0088] The two sensing modes defined in the present application are essentially preset sensor operating parameter configuration tables.

[0089] The parameter configuration of the baseline monitoring mode is for the purpose of saving computing and storage resources and maintaining basic process monitoring. In this mode, the sampling frequency of the sensor is low, and the data volume is small.

[0090] The parameter configuration of the high-precision detection mode is for the purpose of obtaining high signal-to-noise ratio and high time resolution diagnostic information. In this mode, the sampling frequency of the sensor is high, and the measurement is more precise, but it will occupy more system resources.

[0091] When the instruction switches to the high-precision detection mode, for process analysis technology sensors such as near-infrared spectrometers or Raman spectrometers, the number of spectral scans or integration time of a single measurement can be increased to improve the signal-to-noise ratio of the spectrum; at the same time, the sampling interval can be shortened, for example, from every 5 minutes to every 30 seconds, to capture faster dynamic changes. For conventional process parameter sensors, the sampling frequency can also be increased accordingly. When the instruction switches to the baseline monitoring mode, the above parameters return to their initial low-frequency, low-resource consumption configuration.

[0092] For diamond NV center quantum sensors as micro data acquisition units, the operating parameter adjustment is more precise.

[0093] When the instruction is switched to the high-precision detection mode, the micro data acquisition unit can perform one or more of the following adjustments: When the instruction is switched to the baseline monitoring mode, the micro data acquisition unit returns to the lower-resource consumption CW-ODMR measurement sequence and lower sampling frequency.

[0094] Through the above steps, the multi-scale data acquisition module 10 completes the closed-loop adjustment of its own data acquisition behavior according to the evaluation decision of the upstream module, and realizes the dynamic optimization configuration of the sensing resources.

[0095] The predictive control module 50 includes an entropy increase contribution tracing unit, which functions to locate the root cause of the entropy increase when the system process information entropy increases significantly, indicating a decline in system stability, and attribute the macroscopic system uncertainty to each specific input variable, i.e. the reading of each macroscopic or microscopic sensor, thereby identifying the key driving source that leads to system instability.

[0096] In one specific embodiment, the entropy contribution tracing unit implements its function by applying the SHAP algorithm, which is derived from the Shapley value theory in game theory, the core idea of which is to fairly allocate the model's predicted output value to each input feature to measure the contribution of each feature to the final prediction result. In the present invention, the complete calculation process from the system state vector to the process information entropy is regarded as a complex model to be explained , i.e. .

[0097] The specific working mode of the entropy contribution tracing unit can include the following steps: The unit is designed to be activated under certain conditions, when the adaptive sensing strategy module 40 judges that the process information entropy or its rate of change exceeds the preset threshold, the predictive control module 50 will trigger this tracing unit and transfer the data set in the time window that causes the entropy increase to the unit.

[0098] For the time window that causes the entropy increase, the unit performs SHAP analysis on the value it calculates. The SHAP algorithm calculates the contribution of each component (corresponding to the th sensor) in the state vector to the value, and this contribution value is called the SHAP value, denoted as The theoretical calculation formula of the Shapley value is: ; where is the SHAP value of feature for model when the input is ; is the set of all features; is any subset of features excluding feature ; and are the number of features in the set, respectively; is the value of the model output when only the feature values in the feature subset are used for prediction.

[0099] ​In practical computation, the SHAP values are usually estimated by using the efficient approximation algorithm based on model characteristics in the SHAP library. For the detailed implementation of this algorithm, it belongs to the known technology in the field of explainable artificial intelligence, which will not be described here.

[0100] The calculated SHAP values have the property of additivity, that is, the sum of the SHAP values of all features is equal to the difference between the actual output PIE value of the model and the baseline PIE value, a larger positive SHAP value indicates that the th sensor has a significant impact on the PIE value in this time window, and is the main reason for the increase in the PIE value. Therefore, the SHAP value is directly defined as the contribution of the th sensor to the current entropy increase.

[0101] After calculating the SHAP values corresponding to all sensors in the current time window, the entropy increase contribution tracing unit sorts these SHAP values. A number of sensors with the largest positive SHAP values are identified as the key driving sources that cause the increase in system instability this time. The unit finally outputs a sorted list that clearly indicates which macro or micro parameters have the largest contribution to the current system entropy increase. This list is then passed to the control knowledge base and decision generation unit as a direct basis for formulating accurate control strategies.

[0102] The predictive control module 50 also includes a control knowledge base construction and decision generation unit. The function of this unit is to generate specific and executable predictive control actions or operation suggestions based on the key driving sources identified by the entropy increase contribution tracing unit by querying a pre-constructed knowledge base.

[0103] The control knowledge base is a structured information repository, and its core content is the mapping relationship between abnormal causes and corrective measures in the drug production process. The construction process of this knowledge base can integrate multiple sources of information: The knowledge and judgment of process development engineers and experienced field operators are transformed into a series of formal IF-THEN rules.

[0104] Through retrospective analysis of historical production batches, especially batches that have experienced process deviation but have been successfully corrected. Using the entropy increase contribution tracing method described above, the key driving sources in historical abnormal events are identified, and the effective intervention measures taken by the operating personnel at the time are associated. These verified effective problem solving solutions are extracted and stored in the CKB.

[0105] The decision generation unit is a component that actively queries and performs logical reasoning. Its specific working mode can include the following steps: The decision generation unit receives the list of key drivers sorted by contribution degree output by the entropy increase contribution degree tracing unit.

[0106] The unit takes the key driver with the highest contribution degree as the main search term and performs a matching query in the control knowledge base. The goal of the query is to find all IF-THEN rules related to the key driver.

[0107] The query result may contain multiple potential control suggestions. The unit selects an optimal control action from the multiple candidates according to a preset decision logic, which may consider the following factors: When building the CKB, each rule can be assigned a priority, for example, based on the risk, cost, or effectiveness of the operation. The decision unit will preferentially select rules with high priority.

[0108] The decision unit will filter out the control rules that best match the current working condition in combination with the specific stage of the current production and the states of other related process parameters.

[0109] After determining the unique control action, the decision generation unit formats it into a standard control instruction that clearly defines the process parameter to be regulated and the target set value or adjustment amount of the parameter. This control instruction is then sent to the underlying process control system or distributed control system for execution, or presented in the form of an operation suggestion on the human-machine interaction interface for confirmation by the operator.

[0110] The present application also includes an interface and execution module 60, which is a bridge connecting the information processing system of the present application and the underlying process control system or distributed control system of the drug production site. The module realizes the issuance of upper-level decision instructions and the uploading of underlying process data through standardized industrial communication protocols.

[0111] In a specific embodiment, the interface protocol is implemented based on the OPC Unified Architecture standard. OPC UA is chosen as the interface protocol because of its platform independence, high security, and ability to support complex data structures, which can meet the needs of multi-scale, heterogeneous data transmission and structured instruction issuance in the present application. The configuration and implementation of the OPC UA protocol server and client are known in the art and will not be described here.

[0112] The workflow of the interface and execution module 60 can be specifically divided into two aspects: instruction issuance and data uploading.

[0113] The data uploading process and the instruction issuing process work in parallel. The multi-scale data acquisition module 10, through an interface and the execution module 60, also uses the OPC UA protocol to subscribe to the current values of all the macro-process parameters required from the OPC UA server of the PCS or DCS as a client. Through this subscription mechanism, the real-time data of the underlying system is continuously and efficiently uploaded to the system of the application, which constitutes the basis of the entire closed-loop information flow.

[0114] The interface and execution module 60 also implements an instruction issuing and execution confirmation mechanism to ensure that the control instructions generated by the predictive control module 50 can be accurately executed by the lower machine system. This mechanism, through a rigorous process, constitutes a reliable closed loop from the upper decision to the lower physical execution, avoiding the uncertainty brought by sending instructions without feedback.

[0115] The implementation of the instruction issuing and execution confirmation mechanism can include the following steps: Before sending any control instruction to the lower machine system, the interface and execution module 60 first performs internal verification on the instruction. This verification step includes checking whether the target set value in the instruction is within the preset safe operating range. This step ensures that the predictive control function of the application will not trigger any action that endangers the safety of equipment or production.

[0116] After security verification, the interface and execution module 60 encapsulates the instruction according to the predetermined interface protocol and sends it to the lower machine system through the write service. The protocol server of the lower machine system returns an operation status code after receiving the write request. This status code serves as a preliminary confirmation at the transport layer and application layer, indicating that the instruction has been received and understood by the control logic of the lower machine system, but the physical world execution result has not been confirmed.

[0117] To confirm the final physical execution effect of the instruction, the interface and execution module 60 will immediately monitor the actual process value corresponding to the set value through the protocol's read service or subscription service after issuing a set value instruction.

[0118] The module determines whether the instruction is successfully executed through a logic containing a timeout and a tolerance. The logic is as follows: When a new set value is issued, the system starts timing. If the read actual process value enters a tolerance range centered on the new set value within the preset timeout , i.e., it satisfies the condition: ; then the module determines that the instruction execution is successful.

[0119] If the read actual process value If the success condition is not met, the module determines that the command execution has failed. This failure event can mean that the lower-level actuator has failed, the control loop parameters are inappropriate, or the communication has been interrupted. In this case, the interface and execution module 60 will generate a clear instruction execution failure alarm, which is presented to the operator through the human-machine interface and is also fed back to the predictive control module 50. This enables the upper-level decision unit to know that its control intention has not been achieved, and accordingly initiates a backup control strategy or further diagnostic procedures.

Claims

1. An intelligent pharmaceutical production process monitoring and optimization system, characterized in that, include: The multi-scale data acquisition module is used to collect macro-scale and micro-scale data of the drug production process. The data preprocessing module, connected to the multi-scale data acquisition module, is used to process the macro-scale data and micro-scale data to generate a unified system state vector. The process information entropy calculation module, connected to the data preprocessing module, is used to calculate the process information entropy and the process information entropy change rate based on the system state vector. An adaptive sensing strategy module, connected to a process information entropy calculation module, is used to generate a sensing mode switching instruction based on the process information entropy and the process information entropy change rate, and send it to the multi-scale data acquisition module to adjust its data acquisition behavior. A predictive control module, connected to the process information entropy calculation module, is used to generate predictive control commands when the process information entropy or the rate of change of process information entropy exceeds a preset threshold.

2. The intelligent pharmaceutical production process monitoring and optimization system according to claim 1, characterized in that, The data preprocessing module is used for: The macro-scale and micro-scale data are normalized, and the normalized data are combined at the same point in time to construct the system state vector.

3. The intelligent pharmaceutical production process monitoring and optimization system according to claim 1, characterized in that, The multi-scale data acquisition module includes: At least one process analysis technology sensor for acquiring the macroscale data; At least one diamond NV central quantum sensor for acquiring the microscale data.

4. The intelligent pharmaceutical production process monitoring and optimization system according to claim 1, characterized in that, The process information entropy calculation module is used for: The kernel density estimation method is used to process the system state vector within a time window to estimate its probability density function, and the process information entropy is calculated based on the probability density function.

5. The intelligent pharmaceutical production process monitoring and optimization system according to claim 1, characterized in that, The adaptive sensing strategy module includes a state evaluation and mode triggering mechanism, which is used for: The process information entropy and the rate of change of process information entropy received in real time are compared with a preset threshold to trigger the generation of the sensing mode switching command.

6. The intelligent pharmaceutical production process monitoring and optimization system according to claim 5, characterized in that, In response to the sensing mode switching command, the multi-scale data acquisition module performs at least one of the following operations: Adjust the sampling frequency or integration time of the sensor in the process analysis technology; Adjust the measurement sequence of the diamond NV central quantum sensor.

7. The intelligent pharmaceutical production process monitoring and optimization system according to claim 1, characterized in that, The predictive control module includes an entropy increase contribution tracing unit, which is used for: When the process information entropy or the rate of change of process information entropy exceeds a preset threshold, the key driving source causing the entropy increase is identified.

8. The intelligent pharmaceutical production process monitoring and optimization system according to claim 7, characterized in that, The predictive control module further includes a decision generation unit, which is used for: Based on the key driving source, a preset control knowledge base is queried to match and generate the predictive control commands.

9. The intelligent pharmaceutical production process monitoring and optimization system according to claim 1, characterized in that, It also includes an interface and execution module (60) connected to the predictive control module (50). The interface and execution module (60) implements an instruction issuance and execution confirmation mechanism. This mechanism is used to: issue the predictive control instruction to the lower-level machine system and read back the corresponding actual process value to confirm that the instruction was executed successfully.

10. An intelligent method for monitoring and optimizing a pharmaceutical manufacturing process, comprising an intelligent pharmaceutical manufacturing process monitoring and optimization system according to any one of claims 1-9, characterized in that, Includes the following steps: A multi-scale data acquisition module is used to collect macro-scale and micro-scale data of the drug production process; The macro-scale and micro-scale data are preprocessed to generate a unified system state vector; Based on the system state vector, the process information entropy and the rate of change of process information entropy are calculated. Based on the process information entropy and the rate of change of process information entropy, a sensing mode switching instruction is generated, and the data acquisition behavior of the multi-scale data acquisition module is adjusted according to the instruction. When the process information entropy or the rate of change of process information entropy exceeds a preset threshold, predictive control instructions are generated to intervene in the drug production process.