Lijuan Ma,Jing Zhang,Ling Lin,Tuanjie Wang,Chaofu Ma,Xiaomeng Wang,Mingshuang Li,Yanjiang Qiao,Yongxiang Wang,Guimin Zhang,Zhisheng Wu
Data-driven engineering framework with AI algorithm of Ginkgo Folium tablets manufacturing
Smart manufacturing,Data-driven engineering,Artificial intelligence,Information fusion,Process capability index,End-to-end,Quality traceability,Real-world Ginkgo Folium products
Smart manufacturing still remains critical challenges for pharmaceutical manufacturing. Here, an original data-driven engineering framework was proposed to tackle the challenges. Firstly, from sporadic indicators to five kinds of systematic quality characteristics, nearly 2,000,000 real-world data points were successively characterized from Ginkgo Folium tablet manufacturing. Then, from simplex to the multivariate system, the digital process capability diagnosis strategy was proposed by multivariate Cpk integrated Bootstrap-t. The Cpk of Ginkgo Folium extracts, granules, and tablets were discovered, which was 0.59, 0.42, and 0.78, respectively, indicating a relatively weak process capability, especially in granulating. Furthermore, the quality traceability was discovered from unit to end-to-end analysis, which decreased from 2.17 to 1.73. This further proved that attention should be paid to granulating to improve the quality characteristic. In conclusion, this paper provided a data-driven engineering strategy empowering industrial innovation to face the challenge of smart pharmaceutical manufacturing.
Data-driven engineering framework with AI algorithm of Ginkgo Folium tablets manufacturing

Smart manufacturing still remains critical challenges for pharmaceutical manufacturing. Here, an original data-driven engineering framework was proposed to tackle the challenges. Firstly, from sporadic indicators to five kinds of systematic quality characteristics, nearly 2,000,000 real-world data points were successively characterized from Ginkgo Folium tablet manufacturing. Then, from simplex to the multivariate system, the digital process capability diagnosis strategy was proposed by multivariate Cpk integrated Bootstrap-t. The Cpk of Ginkgo Folium extracts, granules, and tablets were discovered, which was 0.59, 0.42, and 0.78, respectively, indicating a relatively weak process capability, especially in granulating. Furthermore, the quality traceability was discovered from unit to end-to-end analysis, which decreased from 2.17 to 1.73. This further proved that attention should be paid to granulating to improve the quality characteristic. In conclusion, this paper provided a data-driven engineering strategy empowering industrial innovation to face the challenge of smart pharmaceutical manufacturing.

Artificial intelligence (Al) provides cognitive abilities like the human brain. By this, a powerful AI system applies knowledge across different fields, such as the discovery of novel drugs or disease diagnosis2, 3, 4, 5. Recently, based on AI system, smart manufacturing was an innovative mode as the industrial revolution led to global economic growth since the manufacturing strategies initiative6, 7, 8, 9, 10. Pharmaceutical manufacturing also entered the era of intelligence with the advocating of Indus-trial Internet in the US, Industry 4.0 in Germany initiative11, 12, 13. Thanks to the AI system and advanced manufacturing technology, many benchmarking companies and researchers achieved the cross-disciplinary integration of pharmaceutics and AI, including real-time monitoring and full traceability. However, pharmaceutical manufacturing is still at the primary digital stage of smart manufacturing16, 17, 18. There are still many challenges to the goal of digitalized, networked, and intelligent manufacturing. As the famous American quality management master JM Juran said, “the 21st century will be the century of quality”. Quality is the lifeline and centerpiece of the entire pharmaceutical manufacturing. US Food and Drug Administration (FDA) proposed that the quality assessment of drugs should include physical, chemical, biological, and microbiological characteristics, which were summarized as critical quality attributes (CQAs) in 2008,. Therefore, the digitization of quality is crucial for the manufacturing process, and a data-driven framework of quality is gradually being regarded as a necessity for smart manufacturing,. Then, the digitalization of quality attributes can be initially realized via primary sensors in simple systems. It remains a great challenge for these sensors to be applied to complex manufacturing systems, especially advanced hyperspectral imaging24, 25, 26, online near-infrared (NIR), and online Raman, etc., in which these sensors require the integration of AI algorithms. Furthermore, how to achieve systematic quality characterization based on lots of isolated data emerges as a novel difficulty because data collected by a certain sensor only represent a single dimension of quality characteristic. Information fusion provides it with a superior strategy by integrating and optimizing quality data obtained by multiple sensors through algorithms, and increases the credibility of the evaluation results,. Internationally, a multi-level information fusion approach was proposed by establishing a predictive model about blood pressure using electrocardiogram sensor data. Besides, information fusion technology was developed by a holonic processing framework for processing any level of information abstraction. Recently, information fusion has been applied in the quality evaluation of pharmaceutical manufacturing. Above information fusion strategies would achieve its goal of the systematic features for the quality digitization of smart pharmaceutical manufacturing,,. According to these information fusion strategies, how to understand our manufacturing level and gradually realize smart pharmaceutical manufacturing? The process capability index (Cpk) is an essential indicator for evaluating the capability of the production manufacturing. In the earliest process capability evaluation, JM Juran used the ratio of the upper and lower tolerance limits to the multiple of the variation degree of the process to define the Cpk in 1974. However, it was only capable of reflecting the process level under ideal conditions, which limited the application of Cpk to smart pharmaceutical manufacturing. Therefore, the second and third generations of Cpk have been developed. This called for a multivariate Cpk,. Notably, pharmaceutical manufacturing is a multivariate process. The multivariate Cpk would be successfully developed to assess the Sigma level of manufacturing and the digitalization of quality attributes. Thus, the primary challenge is to develop a suitable algorithm of multivariate Cpk calculation for the capability evaluation of smart manufacturing. Simultaneously, Migliaccio, pointed out that there were serious problems with the customer expectations of six Sigma and the manufacturing of three Sigma in the pharmaceuticals. Blackburn T from Pfizer demonstrated that the pharmaceutical manufacturing was approximately at the 2.5 to 3.5 Sigma level, in which the defective rate of production ranged from 6.7% to 30.9%. It meant that the quality flow of transferring the raw material to the final products could be affected by a series of manufacturing units. The Pharmaceutical Roundtable [founded by the American Chemical Society (ACS), Green Chemistry Institute (GCI), and several global pharmaceutical companies] emphasized the primacy of continuous manufacturing in the field of engineering44, 45, 46. The new-generation smart manufacturing required us to focus on the continuous, and end-to-end manufacturing49, 50, 51, 52. Multivariate statistical quality control model, was applied to processes quality control by calculating the overall Hotelling T2 and squared prediction error (SPE). It is urgent and significant to understand the end-to-end quality traceability for the digitization, continuity, and intelligence of pharmaceutical manufacturing. However, there are still many hurdles to be overcome during the implementation of quality traceability (end-to-end). Herein, the data-driven engineering strategy was proposed by process capability and end-to-end quality traceability of smart pharmaceutical manufacturing. Firstly, to overcome the shortcoming of sporadic indicators, nearly 2,000,000 data points were successively characterized according to the pharmaceutical plant, Ginkgo Folium tablets manufacturing. Based on these, two data-driven strategies were proposed for the evaluation of the digital manufacturing process capability and quality traceability (end-to-end), from simplex to multivariate integrated Bootstrap-t systematic manufacturing capability evaluation and from unit analysis to end-to-end quality traceability, respectively.

Physical quality attributes of the real-world samples were measured by BT-9300LD laser particle size distribution analyzer (Dandong Bettersize Instruments Co., Ltd., China), Bettersize3000Plus laser/image particle size analyzer (Dandong Bettersize Instruments Co., Ltd., China), BT-1000 powder comprehensive characteristics tester (Dandong Bettersize Instruments Co., Ltd., China), YPD-500C smart tablet hardness tester (Shanghai Huanghai Drug Inspection Instrument Co., Ltd., China), BSD-PS(M) full-automatic surface area porosity analyzer (Beijing Beishide Instrument Technology Co., Ltd., China), and BSD-TD automatic true density analyzer (Beijing Beishide Instrument Technology Co., Ltd., China). The hyperspectral image acquisition was completed on ChemaDAQ (SPECIM Corporation, Finland). The morphologies and optical quality attributes were investigated by a JSM-6700F scanning electron microscope (SEM) (JEOL Co., Ltd., Japan), and a CM-5 spectrophotometer (Konica Minolta Group, Japan). Near-infrared (NIR) spectra were measured by DS2500 NIR (Metrohm China limited, China). Chemical quality attributes were measured by Shimadzu LC-20AT high-performance liquid chromatography (HPLC) (Shimadzu Co., Ltd., Japan) and Agilent 1260 Infinity II HPLC (Agilent Technologies Inc., USA). Fifty-three batches of real-world Ginkgo Folium extracts were obtained from three manufacturers A (A1, A2, … A17), B (B1, B2, … B24), and C (C1, C2, … C12), respectively. Thirty batches of Ginkgo Folium intermediate granules were the products of the above extracts. These granules were named A (KA1, KA2, … KA11), and B (KB1, KB2, … KB19). Thirty batches of Ginkgo Folium tablets, TA1, TA2, … TA11 and TB1, TB2, … TB19, were the products of the above granules. The specific lot numbers of these samples were provided in Supporting Information. The reference substances of quercetin (lot 1116), isorhamnetin (lot 3215), kaempferol (lot 5730), bilobalide (lot 906), ginkgolide A (lot 5941), ginkgolide B (lot 5909) and ginkgolide C (lot 9057) were purchased from Shanghai Shidande Standard Technical Service Co., Ltd. Anhydrous sodium acetate (lot 20190118) and hydrochloric acid (lot 20170618) were provided by Beijing Chemical Plant Co., Ltd.

Firstly, the physical attributes of real-world Ginkgo Folium products, 53 batches of extracts, and 30 batches of granules and tablets were digitally characterized (data 1 in Fig. 1). In detail, five first-level indicators, stackability, homogeneity, flowability, compressibility, and stability, including 29 s-level physical parameters, were selected to assess the digital characterization of the 53 batches of real-world Ginkgo Folium extracts. Similarly, 29 s-level physical parameters and five physical quality indicators were measured and calculated, to assess the digital quality characterization of thirty batches of Ginkgo Folium granules and Ginkgo Folium tablets, respectively. Each sample was measured 6 times in parallel, and the mean value was taken as the final data. Simultaneously, from micro to macro, the geometric attributes of 53 batches of real-world Ginkgo Folium extracts were characterized and analyzed by scanning electron microscope, specific surface area and true density measurement, and colorimetric analysis (data 2 in Fig. 1).

Secondly, hyperspectral imaging was used to assess the digital characterization of spatial distribution uniformity because spatial distribution uniformity is a critical quality parameter. One hundred and eight hyperspectral images of real-world Ginkgo Folium tablets were collected (data 3 in Fig. 1). The region of interest (ROI) with a size of 50 × 50 pixels of the hyperspectral image in each sample was extracted, which contains 2500 pixels. Then, partial least squares (PLS), classical least square (CLS), and matrix transformation (MTMF) algorithms were introduced to transform three-dimensional imaging data into a two-dimensional matrix. Moreover, the above hyperspectral images were subjected to black and white correction to avoid the influence of dark current and noise. The standard deviation threshold method was introduced to accurately locate and correct the dead pixels in the image. Four pre-processing methods, standard normal variate (SNV), multiplicative scatter correction (MSC), Savitzky‒Golay smoothing first derivative (1D) and second derivative (2D), were used to eliminate the interference caused by the unstable light source, the scattering of the sample surface and the noise of the instrument.

Furthermore, the API contents of real-world Ginkgo Folium extracts, granules, and tablets were determined according to the method prescribed in Chinese Pharmacopoeia (version 2020) (data 4 in Fig. 1). The chromatographic operating conditions of total flavonol glycosides were separated by Agilent ZORBAX SB-C18 (4.6 mm × 250 mm, 5 μm). The mobile phase was water (A) and methanol (B) in the ratio of 50/50 with a flow rate of 1.0 mL/min. And the contents of terpene lactones were separated by DiKMA Diamonsil C18 (4.6 mm × 250 mm, 5 μm) with an evaporative light scattering detector (ELSD) detector. The mobile phase was water (A) and methanol (B) in the ratio of 70/30 (v/v) with a flow rate of 1.0 mL/min. The temperature of the column was set as 35 °C. The injection volume of the mixed reference substance and the test substance was 10 and 20 μL. Each batch was measured four times in parallel and the mean value was taken. Finally, the NIR spectra of real-world Ginkgo Folium extracts, granules, and tablets were collected in the reflective mode with a resolution of 0.5 nm and a wavelength range of 1100–2300 nm (data 5 in Fig. 1). One spectrum of the sample was repeatedly scanned 32 times. Each sample was measured three times to obtain the average spectrum. Six samples represented one batch. To sum up, 2527 data points of physical quality attributes, 53 images of geometric attributes, 270,000 pixels of hyperspectral imaging, 678 data points of API contents, and 678 data bands of NIR spectra (1,627,200 data points) were digitally characterized from 53 batches of extracts, 30 batches of granules, and 30 batches of tablets.

The CQAs from nearly 2,000,000 data points were screened by in-depth quality evaluation. Firstly, the pairwise correlation matrixes of five first-level indicators were collected in sections 2.2.1, 2.2.2, 2.2.3 were implemented to investigate the association. Based on hierarchical clustering analysis (HCA) and principal component analysis (PCA), 53 batches of real-world Ginkgo Folium extract powder were divided into three categories, and corresponding batches of granules were divided into two categories. Then, orthogonal partial least square discriminate analysis (OPLS-DA) was introduced to compare the above categories. Finally, variable importance in the projection (VIP) algorithm, in which the VIP value was greater than one as the threshold, was integrated to determine the CQAs.

The quality consistencies of the real-world Ginkgo Folium extracts, granules, and tablets were evaluated by about 2,000,000 data points of physical attributes, hyperspectral images, API contents, and NIR spectra obtained in Section 2.2. Firstly, hyperspectral images from 108 Ginkgo Folium products in 18 batches were collected and processed by the MTMF method. Simultaneously, the API contents measured in Section 2.2.3, were used as the reference value of the hyperspectral images. Then, the percentage of homogeneity (H%) of each Ginkgo Folium tablet was calculated to assess the API spatial distribution uniformity. Finally, the mean-range control chart was used to evaluate the consistency of spatial distribution uniformity, and diagnose the abnormal batches. As a data-driven process quality control method, multivariate statistical process control (MSPC) with two statistics of Hotelling T2 (simplified as T2) and the sum of squared prediction errors (SPE) was emitted to evaluate the quality consistency of three types of physical attributes, API contents, and NIR spectra. In MSPC, the two statistics were co-acted and complemented to diagnose the out-of-control samples. Notably, 95% control limits of the Hotelling T2 and SPE were used as the standard in this study.

Here, the information fusion strategy was applied to the multi-sensors data of real-world Ginkgo Folium products, and then the systematic quality consistency of real-world products was evaluated between batches by the MSPC model. In detail, the physical CQAs data was preprocessed by the mean standardization method. The NIR spectra were preprocessed by the Savitzky‒Golay convolution smoothing method with a window width of five. Then, data were fitted by binomial least squares. Furthermore, the PCA was used to extract the feature layer of physical and chemical CQAs. The fused data of physical and chemical CQAs in the feature layer were used for the subsequent information fusion by MSPC model construction.

Thirty CQAs were discovered in five data categories by the above methods. Then, it was necessary to assign weights to each CQAs. Here, the weight assignment with an integrated method of subjective analytic hierarchy process (AHP) and objective criteria importance though intercriteria correlation (CRITIC) was innovatively put forward in the CQAs of Ginkgo Folium products.

According to its contribution, each CQA of real-world Ginkgo Folium products was quantified as a weighted index. Then, a priority matrix with pairwise comparisons was conducted based on the priority order. Finally, the relative rating among the CQAs was performed by the 1–9 grade scale method. According to Eq. (1), the geometric mean in every row of the pairwise comparison matrix A of each scale data was calculated as Vi in Eq. (1):where i and j represented the row and column numbers of the matrix, respectively. n was the number of quality parameters in the pairwise comparison matrix. π was the symbol of the quadrature formula. According to Eq. (2), the normalization was performed to calculate the weight coefficients ωi of each quality parameter. The consistency test index of the index layer, CR, was calculated according to Eqs. (3), (4), (5):where CI was the consistency index. λmax was the maximum eigenvalue of the pairwise comparison matrix. (Eω)i was the product of the pairwise comparison matrix and the weight of the quality parameter. RI was the random consistency index, which was only related to the n order of the matrix.

The physical and chemical CQAs of three pharmaceutical processes were used to establish the original data matrix. The matrix data were normalized to eliminate the dimensional differences between different quality parameters, and the normalized matrix was obtained by Eq. (6):where xij was the value of the jth quality parameter of the ith sample. x was the measured value, and xmean, xmax, and xmin were the mean, maximum, and minimum values of each quality parameter, respectively. The correlation coefficient matrix was obtained by correlation analysis between each parameter. The contrast intensity and conflict were used to calculate the weight coefficients of quality parameters according to the following Eqs. (7), (8), (9):where Cj was the influence degree on the quality system of the j-th parameter; σj was the standard deviation of the j-th quality parameter, which indicates the contrast intensity sj of the quality parameter. rij was the correlation coefficient between the i-th and j-th quality parameters. δj indicated the conflict between the quality parameters, and ωj was the objective weight of the j-th quality parameter.

Based on the weight coefficients obtained through subjective and objective weighting methods, the comprehensive weight can be calculated according to Eq. (10):

The process capability index (Cpk) was introduced to evaluate the digital manufacturing process capability of real-world Ginkgo Folium extracting, granulating, and tableting by the CQAs with comprehensive weight.

Based on the real-world Ginkgo Folium products and previous research by our team, the range for each CQA was summarized as the normative upper and lower limits of process quality parameters, which was shown in Supporting Information.

In the real-world manufacturing units, the mean value μ of the product quality parameter had a deviation from the normative center M. When the real-world distribution center was not consistent with the normative center, Cpk was calculated according to the following Eqs. (11), (12), (13), (14), (15):where U and L were the normative upper and lower limits of the processing quality in the manufacturing process, respectively. σ was the standard deviation of the quality parameter. d denoted the absolute deviation between the distribution center and the normative center of the process. k and Cp denoted the relative deviation and the classical Cpk under the two-sided test, respectively. Cpk = Cp, when μ = M. Furthermore, combining AHP and CRITIC, the comprehensive process capability indicators Cpk P, Cpk K, and Cpk T of three manufacturing units of real-world Ginkgo Folium products were calculated according to Eqs. (16), (17), (18):where Cpk ij (j = 1, 2, 3 … n) was the process capability index for the jth quality parameter of each preparation process, and ωp ij (j = 1, 2, 3 … n) was the weight coefficient corresponding to each quality parameter.

Cpk was calculated by randomly selecting 70% samples with replacement. The process was repeated 10,000 times to obtain the estimated values of Cpk, which were Ĉpk (1), Ĉpk (2), …, Ĉpk (10,000). The mean Ĉpk and variance of the estimated values were calculated. Finally, the confidence interval of Ĉpk was calculated at the confidence level of α = 0.05 (two-sided). Eq. (19) was as follows:where B was the number of repeated sampling Ŝe was the standard error of Ĉpk. The confidence interval of the Ĉpk was determined as (Ĉpk‒θ1-αŜe, Ĉpk‒θαŜe).

Here, using an integrated information fusion strategy, systematic quality traceability (end-to-end) was investigated from real-world Ginkgo Folium extracts, granules to tablets. The Euclidean distance of ward method was used to characterize the inter-class similarity coefficient. Monte-Carlo sampling (MCS) was used to select 70% of samples from the datasets to conduct the HCA model. The frequency histogram of the results was constructed 10,000 times the result of sampling modeling. Based on this, the quality feasible region was determined with 95% frequency distribution.

The image data processing and algorithms were completed on MATLAB R2019a (MathWorks Corporation, USA), UmBio Evince (Spectral Imaging Ltd., Finland), and ENVI 5.3 (Exelis Visual Information Solutions Corporation, USA). Statistical analysis of real-world data was performed on SPSS 13.0 (International Business Machines Corporation, USA).

Industrial quality data are the core driving force, which adds “brains” to the quality control of the products. Fig. 1A showed the manufacturing schematic of Ginkgo Folium products. Firstly, the physical quality attributes of 113 batches of real-world Ginkgo Folium products, including 53 batches of extracts, 30 batches of granules, and 30 batches of tablets, were characterized from zero to 2527 digital data points (data 1). Fig. 1B showed the fingerprints of the extracts, characterized by 1537 digital data points. Simultaneously, 990 digital data points of 28 physical quality attributes were characterized from 30 batches of the granules and the tablets, shown in Fig. 1C and D. Furthermore, for 53 batches of extracts, the geometric attributes were characterized by 53 images (data 2). Fig. 1E‒G showed that three of them were representative. It could be found that morphology and specific surface area (SSA) were the critical parameters for flowability and uniformity. In brief, the physical quality attributes were digitally characterized by 2527 digital data points.

Then, advanced hyperspectral imaging was introduced to characterize the spatial distribution uniformity of the real-world Ginkgo Folium products. As a result, 108 hyperspectral images and 270,000 pixels were obtained (data 3). Specifically, Fig. 1H–J were shown the API spatial distribution by the PLS, CLS, and MTMF methods, respectively. The total flavonoid glycosides and terpene lactones are the APIs of Ginkgo Folium products. The API contented of 113 batches of real-world Ginkgo Folium products, including 53 batches of extracts, 30 batches of granules, and 30 batches of tablets, were characterized by 4746 quality data points (data 4), as shown in Fig. 1K–M. The mean value of 53 batches of extracts was 26.32% for total flavonol glycosides and 8.67% for terpenoid lactones. The mean value of 30 batches of granules was 20.02% for total flavonol glycosides and 9.87% for terpenoid lactones. As for tablets, the mean value of total flavonol glycosides was 21.76% and terpenoid lactones were 8.06%. Fig. 1N–P (data 5) showed 678 NIR spectra (1,627,200 data points) from extracts, granules, and tablets. As can be seen, the moisture in extracts had a wide absorption peak at about 1450 nm and 1940 nm, and the spectral difference between different manufacturers was obvious. To sum up, given the deficiency of sporadic indicators, 2527 data points of physical quality attributes, 270,000 pixels of hyperspectral imaging, 678 data points of API contents, and 678 data bands of NIR spectra (1,627,200 data points) were digitally characterized from the 53 batches of extracts, 30 batches of granules, and 30 batches of tablets.

The CQAs were determinate using above 2,000,000 digital data points. Firstly, based on five first-level indicators results, stickability, uniformity, flowability, compressibility, and stability, the matrix scatter plots of physical quality attributes of the extracts were constructed, respectively. Fig. 2A showed the protocol of CQAs screening. The results were shown in Fig. 2B‒G. There was an obvious correlation between the second-level indicators of stickability and that of uniformity under the confidence limit of 95%. Besides, the stickability of the above extracts was quite different. ρa and ρt, which represented the stickability, showed a good positive correlation. The nine indicators of D10, D50, D60, D90, uniformity, D[4,3], D[3,2], width, and Iθ, which represented the uniformity, had a good positive correlation. %Pf showed a negative correlation with all indicators. By contrast, the correlation between the indicators that characterized flowability was weak. The IC, which represented the compressibility, had a good positive correlation with Ie. Furthermore, there was no obvious correlation between Icd, IC, and Ie. Besides, there was no obvious correlation between %HR and %H, in which %HR and %H were the indicators of stability. Furthermore, OPLS-DA was used to analyze the 29 physical quality attributes of 53 batches of extracts. Based on HCA and PCA results, 30 batches of the extracts were divided into two groups, Group 1, PA1‒PA11, and Group 2, PB1‒PB19. The VIP value was shown in Fig. 2H‒J. There were 19 different indicators between the two groups, which were %Pf, Width, D90, D[4,3], D60, D50, Iθ, homogeneity (HG), D[3,2], ρt, ρa, D10, Ie, IC, IH, length-to-diameter ratio (L/D), extensibility (EX), length-to-width ratio (L/W), span, indicating that uniformity, stickability. Finally, compressibility was the critical first-level physical quality attribute of the extracts. Based on these results, seven physical quality indicators were selected, which were %Pf, D90, D50, ρt, ρa, D10, and L/W. Then, the PCA model was further established based on seven physical quality indicators. The results showed that the physical attributes of the extracts from the two manufacturers had a significant difference, which indicated that seven physical quality indicators were indeed the CQAs of the extracts. Simultaneously, the CQAs of the granules were D50, D90, D10, %HR, %H, %Pf, ρa, and the CQAs of the tablets were total flavonol glycosides, terpene lactones, Ts, tablet weight, and the first principal component (PC1) of NIR spectra. In a word, PCA, heat map, matrix scatter plot, and OPLS-DA coupled with VIP was introduced to determine the CQAs. Triumphantly, nearly thirty CQAs were obtained from two million data points.

Based on the nearly 2,000,000 data points and 30 CQAs mentioned above, quality consistency was evaluated by unilateral quality attributes, including hyperspectral imaging, physical quality, API content, and NIR spectra. Firstly, hyperspectral images of 108 real-world Ginkgo Folium products from 18 batches were acquired (Fig. 3A). According to the previous research on hyperspectral imaging and AI algorithm, the advantages of the MTMF method were used to reconstruct the hyperspectral images. Fig. 3B showed the chemical images obtained by the MTMF method. Insides, to remove the influence of impurities, the reference spectrum was selected, as shown in Fig. 3C. Among them, the pure reference spectrum was used as a priori information to construct a spectrum library. Then, feature extraction of hyperspectral images was performed. We found that when the number of eigenvalues was 150, the eigenvalues tended to be 0. Therefore, the first 150 eigenvalues were selected to represent the information of the hyperspectral image. Subsequently, the MTMF model was innovatively applied to eliminate the false-positive result. Fig. 3D represented the concentration distribution diagram, in which the MTMF model was greater than 0 as the threshold. Furthermore, API chemical image was converted into a binary image, as shown in Fig. 3E. Based on the previous study on the H% calculation method, the H% results of the API spatial distribution uniformity of the 108 tablets were shown in Fig. 3F. The uniformity of API spatial distribution ranged from 64.09% to 76.54%. Among them, only one batch had the smallest H% value, that was, the API spatial distribution uniformity was the lowest level. On the contrary, only one batch had the largest average H% value, indicating the highest degree of API spatial distribution uniformity. The relative standard deviation (RSD) value of all batches was 0.06%. This demonstrated that there was little difference in API spatial distribution uniformity of the tablets. Eventually, the MSPC model was introduced to diagnose batch-to-batch differences in the tablets of spatial distribution uniformity. Fig. 3G showed the mean-range control chart, in which upper control limit (UCL), control limit (CL), and lower control limit (LCL) represented the upper control limit, centerline, and lower control limit, respectively. The centerline represented the expected value; the values between LCL and UCL were considered target values, and the values beyond the range of LCL and UCL were diagnosed as discrepant samples. It could be seen from Fig. 3G that there was one batch that exceeded the lower control limit, thus diagnosed as an unqualified batch.

To obtain systematic quality information on real-world Ginkgo Folium products, feature information fusion of physical and chemical CQAs was carried out. Firstly, for the PCA, 13, 11, and 7 principal components were selected from 11 batches of the extracts, granules, and tablets from manufacturer A, respectively, which were summarized in Supporting Information Table S1. Then, the MSPC model was conducted to diagnose batch and batch differences, and Fig. 4A displayed the schematic diagram. Fig. 4B–G showed the Hotelling T2 and SPE results of the extracts, granules, and tablets from manufacturer A. There was no sample, which exceeded the 95% confidence threshold Hotelling T2. However, the SPE score of TA10 exceeded the threshold of 1.11, indicating that this batch of the tablets had different characteristics. TA10 was determined as a discrepant batch. Simultaneously, the extracts and tablets from manufacturer B had higher consistency, which was proved by the control charts of Hotelling T2 and SPE (Fig. 4H–M). However, one batch (KB15) of the granules exceeded the control line. In short, the developed strategy was successfully applied to the quality diagnosis of real-world products. Based on this, two discrepant batches were discriminated from 53 batches of extracts, 30 batches of granules, and 30 batches of tablets.

Data-driven and model-based approaches are critical engineers for smart manufacturing. Based on the about two million data points, an integrated approach was established to evaluate the process capability. The first challenge was the weight assignment due to the different influences of various CQAs. For this, a novel approach, subjective AHP integrated objective CRITIC, was put forward in the weight assignment of various CQAs of the real-world Ginkgo Folium products. Supporting Information Fig. S1 and Table S2 showed the weight assignment of CQAs by AHP, CRITIC, and AHP-CRITIC approaches, respectively. As a result, the impact of various CQAs on the extracts was presented in the following subsequence from great to little, total flavonol glycosides, terpene lactones, %Pf = D50 > D90, ρt, ρa, D10, NIR(PC1), length-width ratio. Besides, the consistency validation index, CR was 0.098, which was less than 0.1, indicating that the weight coefficients of these quality parameters were reliable and valid. Meanwhile, the impact sequence of different CQAs on the granules was as follows, total flavonoid glycosides, terpene lactones, D50, D90, %HR, %H, D10, %Pf, ρa, NIR (PC1). The consistency validation index, CR value was 0.07. In addition, the order of the CQAs from important level to unimportant level was total flavonoid glycosides, terpenoids lactones, Ts, tablet weight, and NIR (PC1). The consistency validation results were that the CR value was 0.06. According to the pairwise comparison matrix, geometric mean matrix of weight parameters, and weight coefficient matrix, the comprehensive weight of ten CQAs of extracts, twelve CQAs of granules, and five CQAs of tablets were assigned for the subsequent calculation of the Cpk.

According to the requirements of quality control and economic cost, the Cpk values, ranging from 1.33 to 1.67, generally indicate sufficient production process capability in manufacturing. Firstly, based on the comprehensive weight of CQAs, the upper and lower limits of the CQAs of real-world Ginkgo Folium products were determined, as shown in Supporting Information Table S3. Next, an innovative and compositive Cpk of the extracts, granules, and tablets from manufacturers A and B were calculated in Fig. 5. In this, the Cpk value of the extracts, granules, and tablets from manufacturer A were 0.54, 0.37, and 0.69, respectively. Approximatively, there was a similar result of the Cpk of those from manufacturers B, in which the values were 0.64, 0.46, and 0.87, respectively. Due to the complex process which cannot be fully represented by the above Cpk, based on a 95% confidence interval and 10,000-times sampling, the Bootstrap-t confidence interval was presented. The overall process capability values of the extracting, granulating, and tableting from manufacturer A were 0.45–0.63, 0.34–0.41, and 0.67–0.79, respectively, which were shown in Fig. 5 and Supporting Information Table S4. Meanwhile, the overall process capability values from manufacturer B were between 0.58 and 0.69, 0.43–0.49, and 0.80–0.94, respectively. Based on the three manufacturing processes, extracting, granulating and tableting, the results showed that the digital process capability of tableting was the highest, and that of granulating was the lowest. Markedly, the process capability of these three manufacturing units was all less than 1.0, indicating that the process capability was seriously insufficient. It was urgent to adopt a measurement strategy for improving the process quality. In addition, the source of Ginkgo Folium was the most volatile factor during extracting process. This was a clue to evaluating the digital manufacturing process capability and discovering the important process.

The Cpk evaluation strategy provided a clue to focus on the end-to-end quality traceability in the overall batch-to-batch manufacturing. Fig. 6A showed the Schematic diagram of quality data flow traceability. First, the HCA frequency distribution histogram of 11 batches of extracts-granules-tablets from manufacturer A was shown in Fig. 6B, D, and F. Then, the mean, standard deviation, kurtosis, and skewness of the frequency distribution histogram were calculated. Obviously, the kurtosis value of granules was the largest and the skewness value was the smallest, indicating that the quality of granules was more consistent than extracts and tablets. The kurtosis value of the tablets was the smallest and the skewness value was the largest, suggesting that the quality fluctuation outliers exist in the tablets. This was consistent with the result by MSPC. Furthermore, the results of systematic quality traceability were shown in Fig. 6. As for the extracts provided by manufacturer A, the parallel distances of systematic quality ranged from 1.87 to 2.47. Likewise, the parallel distance of the granules ranged from 1.49 to 2.25; and the parallel distance of the tablets was ranged from 1.29 to 2.11. The mean values of the parallel distance of the extracts, granules, and tablets were 2.17, 1.87, and 1.73, respectively. It demonstrated that quality discrepancy gradually decreased from the extracts to the tablets. Simultaneously, as for manufacturer B, the median values of the parallel distance of extracts, granules, and tablets gradually decreased from 2.38 to 2.14. Fig. 6 C, E, and G showed the combined distance of the systematic quality of the extracts, granules, and tablets. The quality discrepancy among batches was gradually decreased from extracts to the final products. The same disciple has been discovered in the products of manufacturer B. In summary, product quality discrepancies were gradually decreasing from extracting, granulating to tableting. It indicated that the increase in processes had narrowed the differences between batches. In addition, combined with the results of Cpk, the granulating process should be focused on to improve the quality of the final product. In brief, an original data-driven engineering strategy integrating about ten AI algorithms was proposed for smart pharmaceutical manufacturing. By this engineering framework, firstly, from sporadic indicators to nearly 2,000,000 data points, the systematic quality characteristic was achieved via five kinds of advanced technologies. Triumphantly, two discrepant batches were discriminated from real-world samples. Secondly, from simplex to a multivariate system, a multivariate Cpk integrated Bootstrap-t was developed, and Cpk of Ginkgo Folium manufacturing was discovered, which of extracts, granules, and tablets were 0.59, 0.42, and 0.78, respectively, indicating a relatively weak process capability, especially in granulating. Finally, from unit analysis to end-to-end traceability, we found that the systematic quality of the real-world extracts, granules, and tablets decreased from 2.17 to 1.73. This further proved that attention should be paid to the granulating process to improve the quality. These creatively provided perfect engineering guidance for smart manufacturing.

In this paper, a data-driven engineering strategy was developed and applied successfully to the process capability and end-to-end quality traceability of smart pharmaceutical manufacturing. We provided superior integrated engineering guidance which included three highlights, overcoming sporadic indicators by five kinds of systematic quality characteristics, promoting simplex to multivariate integrated Bootstrap-t systematic manufacturing capability evaluation, and innovating end-to-end quality traceability from the unit analysis. Moreover, a successful application was achieved in the pharmaceutical plant of Ginkgo Folium products. Taken together, the present study provided a novel guideline for digitalized, networked, and intelligent pharmaceutical engineering.

This work was co-supported by National Outstanding Youth Science Fund Project of 10.13039/501100001809National Natural Science Foundation of China (Grant No. 82022073, China), Major scientific and technological R&D projects in Jiangxi Province (Grant No. 20203ABC28W018, China), and 10.13039/501100012166National Key Research and Development Program of China (Grant No. 2018YFC1706900, China). In addition, Prof. Gao Wei was knowledgeable, diligent, friendly, and had given us great support for our team. We were deeply saddened by his sudden departure and hoped this article will express our nostalgia.

Zhisheng Wu designed the research. Lijuan Ma wrote and revised the manuscript. Lijuan Ma and Jing Zhang carried out the experiments and performed data analysis. Ling Lin participated part of the experiments. Chaofu Ma participated part of the manuscript writing and figures drawing. Tuanjie Wang, Yongxiang Wang, and Guimin Zhang provided experimental real-word products. Other authors checked and corrected the manuscript. All of the authors have read and approved the final manuscript.

The authors declare no conflicts of interest.