Artificial intelligence traditional Chinese medicine multi-stage manufacturing quality prediction and abnormity diagnosis method and device and electronic equipment

The Multi-Stage IQPD method addresses the challenges of small sample sizes and complex dependencies in TCM honey pill production by using DGAT and Bayesian networks, achieving improved quality prediction and anomaly detection in TCM honey pill manufacturing.

CN119090356APending Publication Date: 2024-12-06BEIJING UNIV OF CHINESE MEDICINE
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411271550.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Existing multi-stage manufacturing processes for traditional Chinese medicine, such as TCM honey pills, face challenges in quality prediction and anomaly detection due to small sample sizes, limited digitization, and complex dependencies between manufacturing stages, leading to poor generalization and accuracy of quality prediction models.

Method used

A multi-stage intelligent quality prediction and diagnosis method (Multi-Stage IQPD) using a Double Ensemble Graph Attention Network (DGAT) combining Monte Carlo resampling, autoencoders, and graph attention networks to model dependencies, along with a Bayesian network diagnosis model incorporating grey correlation analysis and expert knowledge for anomaly detection.

Benefits of technology

The method provides superior predictive ability and accurate anomaly detection, improving the efficiency and credibility of quality control in TCM honey pill production by enhancing data diversity, capturing complex graph dependencies, and reducing the impact of small sample sizes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090356A_ABST
    Figure CN119090356A_ABST
Patent Text Reader

Abstract

According to the method, firstly, the data diversity is enhanced through the Monte Carlo resampling technology, feature representation is optimized through an automatic encoder, and the capturing capacity of a model for potential structures in data is improved; according to the method, the dependency relationship between manufacturing processes is modeled into a directed graph, and a graph attention network is introduced to encode the dependency relationship, so that the product quality is predicted more accurately. And when a prediction result of the quality model deviates from a threshold value, tracking and diagnosing quality abnormity through a Bayesian network diagnosis model combining grey correlation analysis with expert knowledge, identifying a reason of the quality abnormity and providing corresponding regulation and control measures. Test results show that compared with an existing method, the method has better performance in the aspect of quality prediction, abnormal reasons are clear, and corresponding regulation and control measures are provided. The invention provides a complete solution for digital and intelligent quality control of traditional Chinese medicine production, and has important theoretical significance and application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent manufacturing technology, and specifically relates to an artificial intelligence-based traditional Chinese medicine multi-stage manufacturing quality prediction and abnormality diagnosis method, device and electronic equipment. Background Art

[0002] In recent years, the digitalization and intelligent production process control of traditional Chinese medicine has received widespread attention. The core of intelligent manufacturing of traditional Chinese medicine lies in the construction of intelligent quality prediction and diagnosis models, which can provide real-time insights and decision support, ultimately improving product consistency and ensuring compliance with strict quality standards. However, the complexity of the actual manufacturing process and the low level of digitalization of enterprises pose major challenges to achieving these goals.

[0003] Currently, a variety of deep learning methods have been developed for end-to-end quality prediction, which do not require complex feature engineering. However, existing quality prediction research mainly focuses on a single manufacturing process, ignoring the dependencies between multiple manufacturing processes. Therefore, these methods are not applicable to the more general multi-stage manufacturing process (MMP). At each stage of the MMP, the output serves as the input of the subsequent stage, and the product quality propagates between these stages. The cumulative changes in all stages lead to changes in the quality of the final product. Therefore, this complex production process requires accurate quality prediction to detect and solve potential production problems early.

[0004] A major challenge in quality prediction of multi-stage manufacturing processes is modeling the dependencies between units. At present, deep learning methods for multi-stage quality prediction models usually rely on a large amount of historical data accumulated by enterprises over a long period of time. For example, Liu et al. introduced a novel quality embedding model pool (QTD) framework and a bidirectional serial-parallel LSTM (Bi-SP-LSTM) model that can exploit machine dependencies to improve quality prediction (see ZYLiu, DHZhang, WQJia, XKLin, H.Liu, An adversarial bidirectional serial-parallel LSTM-based QTDframework for product quality prediction, J.Intell.Manuf.31(2020)1511-1529.). Similarly, Zhang et al. proposed a path enhanced bidirectional graph attention network (PGAT) for quality prediction in multistage continuous flow manufacturing processes (see DH Zhang, ZY Liu, WQ Jia, H. Liu, JR Tan, Path enhanced bidirectional graph attention network for quality prediction in multistage manufacturing process, IEEE Trans. Ind. Inform. 18 (2022) 1018-1027.). However, the limited degree of digitization of some manufacturing companies limits the amount of data that can be collected. These small samples cause the model to be prone to overfitting and poor generalization ability, which affects the prediction accuracy of the multi-stage quality prediction model. Therefore, the small sample size is the key problem that currently restricts the development of multi-unit quality prediction models.

[0005] The production of TCM honey pills is a typical multi-stage manufacturing process characterized by small sample sizes due to the complexity of the manufacturing process and the high cost and time-consuming nature of sampling and testing. The lack of a multi-stage quality prediction model for small sample sizes makes the high-quality production of TCM honey pills a difficult task. In addition, in a multi-stage manufacturing process, diagnosing quality anomalies is as important as predicting quality, as anomalies at each stage may propagate and lead to substandard quality of the final product. The traditional production process and reliance on manual experience in the multi-stage manufacturing process of TCM honey pills make early anomaly detection and correction difficult. Therefore, digital quality diagnosis of TCM honey pill production is essential to improve reliability and efficiency.

[0006] To date, no multi-unit quality diagnostic model has been established for TCM production. This challenge is further exacerbated by small sample sizes, making it more difficult to develop accurate quality diagnostic models. Summary of the invention

[0007] In order to solve the above problems, the inventors proposed a new multi-stage intelligent quality prediction and diagnosis method (Multi-stage intelligent quality prediction and diagnosis, Multi-Stage IQPD). In this method, a new double ensemble model (Double ensemble graph attention network, DGAT) was developed. The model combines Monte Carlo (MC) resampling, autoencoder (AE) and graph attention network (GAT) to meet the challenges of complex graph dependencies between modeling and manufacturing stages, and solve the problem of poor generalization ability of models based on small sample training. By comparing the predictive ability of large honey pill samples, the DGAT model shows superior predictive ability compared to Ridge regression (RR), support vector regression (SVR), multilayer perceptron (MLP), convolutional neural network (CNN) and GAT models. In addition, a small sample multi-stage quality anomaly diagnosis model combining grey correlation analysis and expert knowledge is established to improve the efficiency and credibility of quality diagnosis in the IQPD method. Finally, Multi-Stage IQPD was applied for the first time to quality prediction and abnormality diagnosis in the multi-stage manufacturing process of TCM honey pills. This innovative approach provides improvement suggestions for early decision-making on potential problems in the multi-stage manufacturing process.

[0008] The purpose of the present invention can be achieved through the following technical solutions:

[0009] In a first aspect, the present invention provides an artificial intelligence method for predicting the quality of traditional Chinese medicine multi-stage manufacturing and diagnosing abnormalities, the method comprising the following steps:

[0010] a) Resample the TCM manufacturing process data through Monte Carlo resampling technology to enhance data diversity;

[0011] b) Use autoencoders to optimize the feature representation of resampled data to improve the ability to capture potential structures in the data;

[0012] c) Modeling the dependencies between manufacturing processes as a directed graph;

[0013] d) Introducing a graph attention network to encode dependencies in directed graphs and constructing a dual integration model for quality prediction;

[0014] e) using the dual integrated model to predict product quality in the traditional Chinese medicine manufacturing process;

[0015] f) When the prediction results deviate from the threshold, the Bayesian network diagnosis model combining grey correlation analysis with expert knowledge is used to track and diagnose quality anomalies.

[0016] As an optional manner, in the above method, the Monte Carlo resampling technique in step a) includes random sampling and bootstrap sampling to generate a plurality of different sampling data sets.

[0017] As an optional manner, in the above method, the autoencoder in step b) includes one or more encoding layers and decoding layers, and the encoding layer is trained to learn the potential feature representation of the data.

[0018] As an optional manner, in the above method, the graph attention network in step d) adopts a multi-head attention mechanism to encode the nodes and their neighbor nodes in the directed graph.

[0019] As an optional manner, in the above method, the diagnostic model in step f) comprises the following steps:

[0020] a) Determine the faulty node: determine the node whose predicted output (Y^) exceeds the threshold from the multi-stage intelligent quality prediction model;

[0021] b) Establishing Bayesian network: Grey correlation analysis is used to establish the comprehensive correlation between abnormal nodes and their upstream nodes, thereby establishing a Bayesian network, and the network is corrected by combining mechanism knowledge and expert knowledge;

[0022] c) Calculate conditional probabilities: Calculate conditional probabilities in the Bayesian network based on historical data of the manufacturing process.

[0023] As an optional manner, in the above method, tracking and diagnosing quality anomalies includes the following steps:

[0024] a) Apply the Markov chain formula to calculate the probability of all upstream nodes causing anomalies;

[0025] b) Rank these probabilities to identify key anomaly causes.

[0026] In a second aspect, the present invention provides an artificial intelligence-based multi-stage manufacturing quality prediction and abnormality diagnosis device for traditional Chinese medicine, wherein the device uses the method described in the first aspect to perform multi-stage manufacturing quality prediction and abnormality diagnosis for traditional Chinese medicine, and the device comprises:

[0027] a) Resampling module: used to resample the data of the Chinese medicine manufacturing process through Monte Carlo resampling technology to enhance the diversity of the data;

[0028] b) Feature representation module: used to optimize the feature representation of the resampled data using an autoencoder;

[0029] c) Dependency modeling module: used to model the dependency between manufacturing processes as a directed graph;

[0030] d) Encoding module: used to introduce a graph attention network to encode dependencies in a directed graph and construct a dual integration model for quality prediction;

[0031] e) Prediction module: used to predict the product quality in the traditional Chinese medicine manufacturing process using the dual integrated model;

[0032] f) Diagnosis module: It is used to track and diagnose quality anomalies by combining grey correlation analysis with expert knowledge and provide control measures.

[0033] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for predicting the multi-stage manufacturing quality and diagnosing abnormalities of traditional Chinese medicine based on artificial intelligence as described in the first aspect above is implemented.

[0034] In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for predicting the multi-stage manufacturing quality and diagnosing abnormalities of traditional Chinese medicine based on artificial intelligence as described in the first aspect above.

[0035] Beneficial effects of the present invention:

[0036] Compared with the existing methods, the present invention shows better performance in quality prediction, clarifies the abnormal causes and provides corresponding control measures. The present invention provides a complete solution for the digital and intelligent quality control of traditional Chinese medicine production, which has important theoretical significance and application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1: Schematic diagram of the multi-stage manufacturing intelligent quality prediction and abnormal diagnosis (IQPD) method for Tongren Niuhuang Qingxin Pills. (A) Manufacturing process and multi-source multi-dimensional data as model input; (B) DGAT model establishment process; (C) Quality abnormality traceability and diagnosis process.

[0038] Figure 2 : Diagnosis results of quality abnormality of Tongren Niuhuang Qingxin Pills. (A) Manufacturing process and sample source; (B) Establishment of Bayesian network; (C)-(E) show the probability distribution of abnormality caused by indicators in each production stage calculated by the constructed network when the chewiness, hardness and adhesion of the finished product are abnormal. The abbreviations are defined as follows: RH means raw honey, RefH means old honey, HTH means Hetuo honey, HP means mixed powder, HTPB means Hetuo pills, and BHP means large honey pills.

[0039] Figure 3 : Schematic diagram of the device structure provided by the present invention.

[0040] Figure 4 : Schematic diagram of the structure of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0041] The following is further described in conjunction with the accompanying drawings and specific implementation examples, but the embodiments do not limit the scope of the method of the present invention.

[0042] Embodiment: An artificial intelligence-based method, device and electronic device for predicting the quality of multi-stage manufacturing of traditional Chinese medicine and diagnosing abnormalities equipment

[0043] 1. Artificial Intelligence-Based Method for Predicting Multi-Stage Manufacturing Quality and Diagnosing Abnormalities in Traditional Chinese Medicine

[0044] Aiming at the quality control problem in multi-stage manufacturing process, a multi-stage manufacturing quality intelligent prediction and diagnosis method is proposed. This method digitally represents the dependency between quality attributes and processes, and establishes a multi-stage quality prediction model (DGAT) to achieve intelligent prediction of manufacturing quality. In addition, a quality anomaly traceability and diagnosis model based on grey correlation analysis and expert knowledge is developed, which provides decision support for the optimization of enterprise manufacturing process, such as Figure 1 The specific steps are as follows:

[0045] Step 1: Multi-source data characterization: First, the quality attributes of the collected samples are measured, which describe the entire manufacturing process of the product from raw materials to finished products. At the same time, the dependencies between multi-stage manufacturing processes are encoded.

[0046] Step 2: Establishment of multi-stage quality prediction model (DGAT):

[0047] Step 1: Take the information collected in step 1 as input. Use the MC resampling method to sample with replacement from the training data set, use AE to extract features from the extracted samples, and make the feature dimensions uniform, so as to obtain a set of initial node features. The above process is repeated T times to obtain T MCAE sub-training sample sets.

[0048] Step 2: Use the obtained T MCAE sub-training sample sets, calculate through GAT, and output new features to update the node N is the number of nodes that remains unchanged, and F and F' are the feature numbers of each node before and after. The attention coefficient calculation formula is as follows:

[0049] r ij =a(W i ,Wx j )#(1)

[0050]

[0051] e ij Represents the original attention score, which is used to indicate the importance of the feature of node j to i. a is the weight vector. α ij represents the attention coefficient after normalization using the softmax function. W represents the weight matrix, and LeakyReLU is a nonlinear function. represents the neighborhood of node i. || is the join operation.

[0052] After calculating the attention coefficient, it is multiplied by the feature of the corresponding node and summed to obtain the new feature of each node

[0053]

[0054] K is the number of longs. Where σ represents the activation function. is the attention coefficient calculated by the Kth attention mechanism, W k is the weight matrix.

[0055] GAT uses a multi-head attention mechanism and calculates the average value of each node for node prediction, and finally obtains a training prediction model, and further establishes T prediction sub-models, namely G1(x), G2(x), ..., G T (x).

[0056] Step 3: Finally, for the inductive prediction problem, the prediction result (Y^) is obtained by calculating the average of the output results of all sub-models.

[0057] Therefore, the final model F(x) can be expressed as:

[0058]

[0059] Step 3: Prediction output evaluation: The model's prediction output (Y^) is compared with the set quality standard threshold. If the prediction output (Y^) exceeds the threshold, the anomaly diagnosis process is triggered.

[0060] Step 4: Bayesian network construction:

[0061] Step 1: Determine the faulty nodes from the multi-stage intelligent quality prediction model, i.e., the nodes whose predicted output (Y^) exceeds the threshold.

[0062] Step 2: Grey correlation analysis is used to establish the comprehensive correlation between abnormal nodes and their upstream nodes, thereby establishing a Bayesian network, and further combining mechanism knowledge and expert knowledge to modify the network.

[0063] Building a Bayesian network mainly includes structural learning and parameter calculation. Grey correlation analysis is to select a reference sequence as a benchmark, calculate the internal correlation degree, compare the similarity between the sequence and the reference sequence, and obtain the most relevant sequence. Combining grey correlation analysis with expert knowledge can greatly reduce the impact of small samples on the Bayesian network in the manufacturing process. The specific method is as follows.

[0064] For quality attribute i, there are n measurement samples, vector x i =[x i (1), x i (2), ..., x i (n)] T Represents the set of all samples of quality attribute i. Assuming there are m quality attributes, the original measurement matrix can be obtained by concatenating all quality attributes:

[0065]

[0066] Set the vector x={x i (1), x i (2), ..., x i (n)} T Subtract x from each term in i (1), we can get a matrix with the starting point being 0.

[0067]

[0068] It corresponds to the kth sample of the i-th attribute.

[0069] The trend difference between quality attributes is another factor that describes their similarity. The trend matrix can be obtained by transforming the vector x i =[x i (1), x i (2), ..., xi (n)] T Divide each element in by x i (1) Get.

[0070]

[0071] In addition, the first th and i th The absolute correlation ε and correlation R between the quality attributes.

[0072]

[0073] In order to better describe the relationship between the two QAs, a comprehensive correlation degree is defined. By weighting the two indicators, the comprehensive correlation coefficient ψ for comprehensive evaluation of the correlation is obtained:

[0074] ψ=αε+(1-α)R#(12)

[0075] In general, α takes a value of 0.5. When considering both absolute correlation and relative correlation, the comprehensive correlation is most likely to determine the correlation order between QAs. The Bayesian network structure is further checked in combination with expert experience knowledge to form the final Bayesian network based on small samples.

[0076] Step 3: Calculate the conditional probabilities in the network based on the manufacturing process history data.

[0077]

[0078]

[0079] Vector X i =[x i (1), x i (2), ..., x i (n)] T represents the set of n samples in the i-th quality attribute. i ) represents the sample probability that the i-th quality attribute exceeds the threshold interval or confidence interval specified by the enterprise. If the quality attribute does not have upper and lower thresholds specified by the enterprise, then we use the confidence interval as the threshold interval of the quality. M represents x i (k) The number of values ​​outside the confidence interval, N represents x i The total number of (k), P(X i |X i-1 ) represents the probability that the result node (i-th quality attribute) also exceeds the confidence interval when the cause node (i-1th quality attribute) exceeds the confidence interval. M′ represents x i-1 (k) and x i(k) The number of times that the confidence interval is exceeded at the same time, N′ represents x i-1 (k) The number of confidence intervals exceeded.

[0080] Step 5: Quality anomaly tracing and diagnosis: Apply the Markov chain formula to calculate the probability of all upstream nodes causing anomalies. Sort these probabilities to identify key anomaly causes.

[0081]

[0082] 2. Artificial Intelligence-Based Multi-Stage Manufacturing Quality Prediction Model for Traditional Chinese Medicine

[0083] (1) Instruments and materials: 4 batches of raw honey from the honey refining process of Tongren Niuhuang Qingxin Pills, 28 batches of old honey and honey for compounding from the honey refining process of Tongren Niuhuang Qingxin Pills, mixed raw drug powder from the mixing process, compounding pills from the compounding process, and finished products from the pill making process were collected. All of them were real-world samples from the manufacturing process of Tongren Niuhuang Qingxin Pills at the Beijing Tongrentang Daxing production base. It is worth noting that the 4 batches of raw honey were used to obtain the corresponding 28 batches of old honey and 28 batches of compounding honey through the honey refining process, and the compounding honey and mixed drug powder were further compounded to obtain compounding pills, and finally the finished products were obtained through the pill making process. Therefore, the above intermediates and finished products were obtained through the process flow of the corresponding batches of large honey pills. Therefore, samples of 6 kinds of raw materials, excipients, intermediates and finished products in the 4 manufacturing processes of Tongren Niuhuang Qingxin Pills were selected as carriers, and a total of 59 physical and chemical properties were measured to construct the model.

[0084] ①Original honey-Old honey-Hetuo honey

[0085] Physical properties: The refining process removes impurities, reduces moisture and increases viscosity in honey through thermal processing. Rheology is a key indicator to characterize the quality of adhesives and is a key content of the physical quality properties in the honey refining process. Rheology includes the dynamic viscosity (DV) generated by the rotation of honey under external force, the complex viscosity (CV), viscous modulus (VM) and elastic modulus (EM) generated by oscillation, which are measured by a rotational rheometer (HAAKE ViscotesteriQ, Thermo Fisher, USA). In the rotation mode, the parameters for measuring the dynamic viscosity (DV) are set as follows: the shear rate is 50s-2 and the measurement temperature is 80°C. In the oscillation mode, the parameters for measuring the complex viscosity (CV), viscous modulus (VM) and elastic modulus (EM) are set as follows: the measurement temperature is 80°C, the shear frequency is 5HZ, and the shear strain is 50%. The physical properties of pH are measured using a pH meter (pHS-3E, Shanghai INESA Scientific Instruments).

[0086] Chemical properties: Moisture is the core chemical quality property that identifies the end point of the honey refining process. Sugar substances such as fructose, glucose, sucrose and maltose are the main chemical components of honey and are also the raw materials for the Maillard reaction in the honey refining process. The "Chinese Pharmacopoeia" stipulates that the total amount of fructose and glucose in honey should be greater than 60%, the ratio of fructose to glucose should be greater than 1.0, and the total amount of maltose and sucrose should be less than 5%. In addition, 5-HMF is an important indicator for honey safety control. The 2020 edition of the "Chinese Pharmacopoeia" stipulates that the limit of 5-HMF in honey is 40ppm.

[0087] According to the provisions of SNT0852-2012 "Regulations for the Inspection of Imported and Exported Honey" on moisture determination, the refractive index of honey is measured at 40°C using an Abbe refractometer, and the water content of the honey intermediate is calculated using formula (17). The conversion formula between the refractive index and moisture of honey at 40°C is:

[0088] X=100-[78+390.7(n-1.4768)]#(17)

[0089] Where X is the moisture content of honey in %; n is the refractive index of honey at 40°C.

[0090] Sugar substances such as fructose, glucose, sucrose and maltose are the main chemical components of honey. The Chinese Pharmacopoeia stipulates that the total amount of fructose and glucose in honey should be greater than 60%, the ratio of fructose to glucose should be greater than 1.0, and the total amount of maltose and sucrose should be less than 5%. In addition, 5-HMF is an important indicator for honey safety control. The 2020 edition of the Chinese Pharmacopoeia stipulates that the limit of 5-HMF in honey is 40ppm. When determining the sugar content, an Agilent 1260 high-performance liquid chromatograph equipped with an evaporative light scattering detector (ELSD) and a 4.6nm×250mm×5μmDIkma polyamino HILIC column was used. The parameters were set as follows: mobile phase water: acetonitrile = 30%: 70% isocratic elution; flow rate 1.0mL·min-1; column temperature 30℃; nebulizer temperature 30℃, drift tube temperature 90℃, carrier gas flow rate 1.6SLM, carrier gas pressure 0.4MPa.

[0091] When determining the content of 5-HMF, a Shimadzu LC-20AT high performance liquid chromatograph equipped with a 4.6 nm × 250 mm × 5 μm Agilent ZORBAXSB-C18 chromatographic column was used, and the parameters were set as follows: mobile phase water: methanol = 85%: 15% isocratic elution; flow rate 1.0 mL·min-1; column temperature 35°C; diode array detector (DAD) detection wavelength 284 nm. 5-HMF (≥98.0%, ST00720120), the above standards were all from Shanghai Shidande Standard Technology Service Co., Ltd.; chromatographic methanol, chromatographic acetonitrile, all from Beijing Dicoma Technology Co., Ltd.; Watsons purified water.

[0092] ②Mixed powder

[0093] Physical properties: Homogeneity refers to the uniformity of the powder particle size distribution, including 9 quality parameters: the particle size corresponding to 10%, 50%, 60%, and 90% of the cumulative particle size distribution (D10, D50, D60, and D90), particle size distribution width (Span), percentage of particles <50μm (%Pf), relative uniformity index (Iθ), particle size range (Width), and uniformity;

[0094] Stability indicates the stability of the powder in an air environment, which is characterized by drying loss (%HR); bulking indicates the packing capacity and filling characteristics of the powder, including true density (ρ); chromaticity value (L*, a*, b*, E*); specific surface area (SSA) is a key parameter affecting uniformity, a total of 16 physical indicators. The specific measurement methods of some indicators are as follows:

[0095] Particle size (D10, D50, D60, D90): Determined by laser particle size distribution analyzer. Weigh about 1g of the sample to be tested and place it in the storage funnel of the dry dispersion system. Set the appropriate air pressure intensity, adjust the feed height and feed speed, control the shading rate between 5% and 10%, and use air as the medium to measure the sample D10 (particle size corresponding to 10% of the cumulative particle size distribution number), D50 (particle size corresponding to 50% of the cumulative particle size distribution number), D60 (particle size corresponding to 50% of the cumulative particle size distribution number), and D90 (particle size corresponding to 90% of the cumulative particle size distribution number).

[0096] Use a laser particle size distribution analyzer to add an appropriate amount of the sample to be tested into the dry sampler, adjust the feed amount and speed so that it enters the funnel evenly, use air as the dispersion medium, the analysis mode is general, the number of consecutive times is 3, and the test air pressure is 0.1MPa.

[0097] Relative uniformity index (Iθ): Based on the above laser particle size distribution analysis results, the percentage of particles in each particle size range is calculated. According to the particle size values ​​measured for the mixed raw powder, 4 particle size nodes of 102.60, 53.05, 27.40, and 14.16 μm are selected and calculated using formula (18).

[0098]

[0099] Fm is the mass percentage of samples with a particle size range of 100 to 200 μm, F m-1 50~100μm.

[0100] Mass percentage of samples in the particle size range, F m+1 is the mass percentage of samples with a particle size range of 200 to 250 μm, n is the number of particles in the determined particle size range, and d m The average particle size of the sample in the range of 100 to 200 μm, d m-1 The average particle size of the sample in the range of 50-100 μm, d m+1 is the average particle size of the sample in the range of 200 to 250 μm. m is the mass percentage of particles with a diameter ranging from 27.40.11 to 53.05 μm, F m-1 is the mass percentage of particles with a diameter ranging from 14.16 to 27.40 μm, F m+1 is the mass percentage of particles with a diameter ranging from 53.05 to 102.60 μm, d m d m-1 d m+1 is the average particle size in the corresponding particle size range.

[0101] Particle size <50μm percentage (%Pf): Determined by laser particle size distribution analyzer. Weigh about 1g of the sample to be tested, place it in the storage funnel of the dry dispersion system, set the appropriate air pressure intensity, adjust the feed height and feed speed, control the shading rate between 5% and 10%, and use air as the medium to determine the sample %Pf.

[0102] Specific surface area (SSA): Determined by specific surface and pore size analyzer. Take an appropriate amount of the sample to be tested, weigh it accurately and put it into the sample tube. Use the multi-point method and set the instrument parameters as follows: degassing temperature is 40°C, degassing time is 150 minutes, nitrogen is selected as the adsorption gas, 5 to 10 pressure points are taken in the range of partial pressure of 0.02 to 0.30, and the equilibrium time is 120 seconds. The monolayer adsorption amount at each pressure point is measured, and the specific surface area is calculated by the BET adsorption equation.

[0103] True density (ρ): Determined by a true density analyzer. Take the sample to be tested that is dried to almost no moisture, weigh it accurately and put it into the sample pool. Use the exhaust method, helium as the carrier gas, set the instrument parameters: test temperature 28°C, test pressure 0.90bar, constant pressure condition 0.01bar, evacuation time 30.0s, test 6 times, and take the relatively stable value as the true density.

[0104] Chromaticity value (L*, a*, b*, E*): measured by spectrophotometer. Place the sample to be tested into the colorimetric dish until the bottom of the dish is completely opaque (approximately to 2 / 3 of the dish volume), select D65 as the measuring light source, and start the measurement at a 10° viewing angle. Record the L*, a*, and b* values ​​of the sample, and then calculate E* using the following formula:

[0105]

[0106] Water content (%HR): Take the sample to be tested and measure it according to the second method (drying method) of Part 4 Water Determination Method of the 2020 edition of the Chinese Pharmacopoeia.

[0107] ③Combined balls and finished products

[0108] Physical properties: Texture physical properties are important aspects of quality control in the production process of Tongren Niuhuang Qingxin Pills, including information such as hardness, cohesion, elasticity, adhesion, stickiness and chewiness. Hardness is the maximum force to resist a given deformation; cohesion is the degree of deformation before the sample breaks; elasticity refers to the rate from a deformed state to an undeformed state; adhesion is the work of overcoming the attractive force of the sample surface; chewiness refers to the energy required to chew solid food to a state that can be swallowed. The texture properties of Hetuo pills and finished products were measured using a texture analyzer (TMS-Touch, Food Technology Corporation, USA) equipped with a cylindrical probe accessory and equipped with a 50N load cell and a cylindrical probe with a diameter of 2mm. The parameters were set consistently: data acquisition resolution of 100Hz, data acquisition interval of 0.01s, minimum trigger force of 0.15N, test speed of 30mm / min, deformation percentage of 70%, interval of 15s, and the average value of three repeated measurements was calculated to characterize the results of texture property determination. The texture profile analysis (TPA) test mode was used to calculate the textural attributes such as hardness, cohesion, elasticity, adhesion, stickiness and chewiness using displacement-force curves during two compressions.

[0109] (2) Comparison of different methods: A multi-stage manufacturing quality prediction model (DGAT) of Tongren Niuhuang Qingxin was established to predict the texture properties of large honey pills, including chewiness, hardness and adhesion. Chewiness, as a key indicator of texture, is crucial to the taste of the finished product and the sensory experience of consumers. Hardness and adhesion are also important indicators for evaluating product texture. Hardness reflects the ability of a material to resist deformation, while adhesion describes the ability of a material to adhere to other substances on its surface. These two indicators directly affect consumers' perception and acceptance of the product.

[0110] In order to test the prediction performance of the DGAT model, the program was run independently 20 times, and the average of the 20 results of absolute error (MAE), root mean square error (RMSE), mean square error (MSE) and correlation coefficient (R) was used as the evaluation index, and the standard deviation (STD) of the 20 independent model predictions was recorded to evaluate the stability of the model. A variety of common prediction models were compared, including simple linear regression (RR), support vector regression (SVR), multilayer perceptron (MLP), convolutional neural network (CNN), and graph attention network (GAT). The results are summarized in Table 1.

[0111] In terms of chewiness prediction, the RMSE and MSE values ​​of the DGAT model were 0.2926 and 0.0856, respectively, which were better than other models, and showed the highest correlation coefficient (0.9101) among all models, indicating that the MCAE-GAT model achieved the best prediction performance for chewiness prediction. The better performance of DGAT than GAT indicates that the dual integration strategy can more effectively identify and utilize important information in graph data, thereby improving the performance of the model. At the same time, the standard deviation of DGAT is also the lowest among all neural network models, indicating that MC resampling can overcome the instability and poor generalization of neural network results. It is worth noting that compared with the MLP and CNN models, the GAT and MCAE-GAT models achieved better prediction performance, indicating that the graph-based method better utilizes the dependencies between processes and improves modeling accuracy.

[0112] In the prediction of hardness and adhesion, the DGAT model once again showed its superiority. Specifically, in the prediction of hardness, its MAE, RMSE, and MSE values ​​were lower than those of other models, while maintaining the highest correlation coefficient (0.8651). In the prediction of adhesion, its RMSE and MSE values ​​were lower than those of other models, while maintaining the highest correlation coefficient (0.8413). This result further confirms that DGAT shows good prediction accuracy and stability in predicting the quality and structural attributes of large honey pills.

[0113] In summary, the R values ​​of the DGAT and GAT models in the three texture attributes are better than those of other models, and they have good prediction accuracy, which is due to their ability to better capture the complex dependencies between multi-unit processes and between processes and quality when processing graph structure data. DGAT achieved the best prediction performance and stability in the prediction of the three texture attributes, further indicating that the dual integration strategy enables the deep learning model to achieve stable prediction results in the prediction of small samples, which is convenient for promotion and application.

[0114]

[0115] 3. Artificial Intelligence-Based Diagnosis of Abnormal Quality of Traditional Chinese Medicine

[0116] In order to further explore the reasons for abnormal quality of finished products during the production of traditional Chinese medicine, this study used a Bayesian network model based on grey correlation analysis combined with expert knowledge to conduct a detailed analysis of the four manufacturing processes of Tong Ren Tang Niu Huang Qing Xin Wan. First, the physical and chemical properties of raw materials, excipients, intermediates and products were systematically measured. Furthermore, the measured quality attributes were combined with the multi-stage manufacturing process to construct a Bayesian network to reveal how these attributes interact and ultimately affect the quality of the finished product, such as Figure 2 shown. Figure 2 (A) shows the four main production stages of Tong Ren Tang Niu Huang Qing Xin Wan, including the honey refining process, mixing process, pilling process and pill making process. In these stages, six key materials and intermediate products, including raw honey, old honey, honey for pilling, mixed medicine powder, pills and large honey pills, were selected as samples for analysis. Figure 2 (B) is a Bayesian network diagram constructed based on the physical and chemical properties of the above sample tests using grey correlation analysis and expert knowledge. Figure 2 (C) Figure 2 (D) and Figure 2 (E) shows the probability distribution of abnormalities in the chewiness, hardness and adhesion of the finished product, calculated through the constructed network. Figure 2 In (C), it can be found that the Iθ powder property of the mixed powder has the highest probability of affecting the abnormal chewability of the finished product. Figure 2 In (D), the hardness and chewing properties of the Hetuo pellets have the highest probability of affecting the abnormal hardness of the finished product. Figure 2 (E) indicates that the sucrose content of the honey for the combined pills has the highest probability of affecting the abnormal adhesion of the finished product. In summary, when the chewiness, hardness, and adhesion of the texture attributes of the large honey pill product are abnormal, the sucrose content of the honey for the combined pills, the hardness and chewiness of the combined pills, and the Iθ powder properties of the mixed powder should be checked. Engineers should give priority to regulating the temperature of the honey refining process and the time and speed of the crushing process.

[0117] 4. Artificial intelligence-based traditional Chinese medicine multi-stage manufacturing quality prediction and abnormality diagnosis method, device and electronic equipment

[0118] Based on the same inventive concept, the embodiments of the present application also provide a device corresponding to the method for predicting the multi-stage manufacturing quality and diagnosing abnormalities of traditional Chinese medicine. Since the principle of the problem solved by the device in the embodiments of the present application is similar to the above-mentioned method in the embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repetitive parts will not be repeated.

[0119] See also Figure 3 , Figure 3 A schematic diagram of a method and apparatus for predicting and diagnosing the quality of multi-stage manufacturing of traditional Chinese medicine provided in an embodiment of the present application. The apparatus 400 includes a resampling module, a feature representation module, a dependency modeling module, an encoding module, a prediction module, a quality abnormality node determination module, a grey correlation analysis module, a Bayesian network establishment module, an expert knowledge correction network module, and a quality abnormality diagnosis module. The specific functions and working principles of each module are as follows:

[0120] The resampling module 401 is used to resample the traditional Chinese medicine manufacturing process data by Monte Carlo resampling technology to enhance the diversity of the data. The resampling technology includes random sampling and self-service sampling to generate multiple different sampling data sets and improve the generalization ability of the model.

[0121] The feature representation module 402 uses an autoencoder to optimize the feature representation of the resampled data. The autoencoder is trained through one or more encoding layers and decoding layers so that the encoding layer learns the potential feature representation of the data and improves the model's ability to capture the potential structure in the data.

[0122] The dependency modeling module 403 is used to model the dependency between manufacturing processes as a directed graph. The relationship between each process step is analyzed and represented as a directed graph for subsequent coding and prediction.

[0123] The encoding module 404 introduces a graph attention network to encode the dependency relationship in the directed graph. The graph attention network uses a multi-head attention mechanism to encode the nodes and their neighboring nodes in the directed graph, thereby constructing a dual integration model for quality prediction.

[0124] The prediction module 405 uses the dual integration model to predict the product quality in the traditional Chinese medicine manufacturing process. By predicting the quality of the multi-stage manufacturing process, possible quality problems can be identified in advance.

[0125] The module 406 for determining nodes with abnormal quality is used to determine faulty nodes from the multi-stage intelligent quality prediction model, that is, nodes whose prediction output exceeds a threshold value. By analyzing the prediction results, nodes with abnormal quality are identified to facilitate subsequent abnormal diagnosis.

[0126] Grey correlation analysis module 407 uses grey correlation analysis method to establish comprehensive correlation between abnormal nodes and their upstream nodes. Grey correlation analysis can be used to find the relationship between abnormal nodes and upstream nodes, providing a basis for establishing a Bayesian network.

[0127] The Bayesian network module 408 is established to establish a Bayesian network model based on the results of the grey correlation analysis. The network is modified by combining the mechanism knowledge and the expert knowledge so that the network model can more accurately reflect the dependency relationship in the actual manufacturing process.

[0128] The expert knowledge correction network module 409 is used to correct the established Bayesian network by combining the mechanism knowledge and the expert knowledge, and further optimize the network structure and parameters through the experience and knowledge of the experts to improve the accuracy of abnormal diagnosis.

[0129] The quality anomaly diagnosis module 410 is used for tracing and diagnosing quality anomalies. This module uses the Markov chain formula to calculate the probability of all upstream nodes causing anomalies, and sorts these probabilities to identify key anomaly causes. By analyzing the key anomaly causes, corresponding control measures are provided to help engineers adjust parameters in the manufacturing process to improve product quality.

[0130] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0131] This embodiment realizes quality prediction and abnormality diagnosis in the multi-stage manufacturing process of traditional Chinese medicine through the collaborative work of multiple modules. The generalization ability and feature representation ability of the model are improved through Monte Carlo resampling technology and autoencoder; the dependency relationship of the manufacturing process is effectively modeled and encoded through the graph attention network; the abnormal nodes are deeply analyzed and diagnosed through grey correlation analysis and Bayesian network; the accuracy of the network model is optimized through the correction of expert knowledge. This method provides a complete solution for the digital and intelligent quality control of traditional Chinese medicine production, which has important theoretical significance and application value.

[0132] The present application embodiment also provides an electronic device 400, such as Figure 4 FIG. 4 is a schematic diagram of the structure of an electronic device 400 provided in an embodiment of the present application, including:

[0133] Processor 410: used to process data and perform computing tasks;

[0134] Memory 420: used to store data and programs, including internal memory and external memory;

[0135] Communication interface 430: used for communication connection with other devices;

[0136] Communication bus 440: used to connect the processor 410, the memory 420 and the communication interface 430, and provide a data transmission channel.

[0137] In this embodiment, the processor 410 may include one or more central processing units (CPUs), graphics processing units (GPUs), and other processing units. The memory 420 includes a memory for storing temporary data and an external memory for storing long-term data. The communication interface 430 may include wired and wireless communication interfaces, supporting a variety of data transmission protocols. The communication bus 440 may use a bus structure such as PCIe, I2C, SPI, etc.

[0138] During the operation of the system, the processor 410 reads program codes from the memory 420 and executes related tasks, and exchanges data with the memory 420 and the communication interface 430 through the communication bus 440 to implement data processing and transmission functions.

[0139] The electronic device 400 of this embodiment can be applied to various scenarios such as smart terminal devices, embedded systems and computer systems. Through this structural design, it can efficiently process and transmit data, meet diverse application needs, and improve the overall performance and stability of the system.

[0140] In an optional embodiment of the present application, each functional module of the electronic device 400 can be specifically implemented as hardware, software, or a combination of hardware and software. In an optional embodiment, the processor 410 can be specifically embodied as a computer storage medium, and in another optional embodiment, the computer program product is specifically embodied as a software product, such as a software development kit (SDK).

[0141] The memory 420 may further include an internal memory and an external memory for storing temporary data and long-term data respectively. The internal memory may be a random access memory (RAM), and the external memory may be a flash memory or a hard disk.

[0142] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. An artificial intelligence-based method for predicting the quality of multi-stage manufacturing of traditional Chinese medicine and for diagnosing abnormalities, characterized in that: The method comprises the following steps: a) Resample the TCM manufacturing process data through Monte Carlo resampling technology to enhance data diversity; b) Use autoencoders to optimize the feature representation of resampled data to improve the ability to capture potential structures in the data; c) Modeling the dependencies between manufacturing processes as a directed graph; d) Introducing a graph attention network to encode dependencies in directed graphs and constructing a dual integration model for quality prediction; e) using the dual integrated model to predict product quality in the traditional Chinese medicine manufacturing process; f) When the prediction results deviate from the threshold, the Bayesian network diagnosis model combining grey correlation analysis with expert knowledge is used to track and diagnose quality anomalies.

2. The method according to claim 1, characterized in that The Monte Carlo resampling technique in step a) includes random sampling and bootstrap sampling to generate a plurality of different sampling data sets.

3. The method according to claim 1, characterized in that The automatic encoder in step b) includes one or more encoding layers and decoding layers, and the encoding layer is trained to learn the potential feature representation of the data.

4. The method according to claim 1, characterized in that: The graph attention network in step d) adopts a multi-head attention mechanism to encode the nodes and their neighboring nodes in the directed graph.

5. The method according to claim 1, characterized in that The diagnostic model in step f) comprises the following steps: a) Determine the faulty node: determine the node whose predicted output (Y^) exceeds the threshold from the multi-stage intelligent quality prediction model; b) Establishing Bayesian network: Grey correlation analysis is used to establish the comprehensive correlation between abnormal nodes and their upstream nodes, thereby establishing a Bayesian network, and the network is corrected by combining mechanism knowledge and expert knowledge; c) Calculate conditional probabilities: Calculate conditional probabilities in the Bayesian network based on historical data of the manufacturing process.

6. The method according to claim 1, characterized in that Tracking and diagnosing quality anomalies includes the following steps: a) Apply the Markov chain formula to calculate the probability of all upstream nodes causing anomalies; b) Rank these probabilities to identify key anomaly causes.

7. An artificial intelligence-based Chinese medicine multi-stage manufacturing quality prediction and abnormality diagnosis device, characterized in that: The device adopts the method of claim 1 to perform multi-stage manufacturing quality prediction and abnormality diagnosis of traditional Chinese medicine, and the device comprises: a) Resampling module: used to resample the data of the Chinese medicine manufacturing process through Monte Carlo resampling technology to enhance the diversity of the data; b) Feature representation module: used to optimize the feature representation of the resampled data using an autoencoder; c) Dependency modeling module: used to model the dependency between manufacturing processes as a directed graph; d) Encoding module: used to introduce a graph attention network to encode dependencies in a directed graph and construct a dual integration model for quality prediction; e) Prediction module: used to predict the product quality in the traditional Chinese medicine manufacturing process using the dual integrated model; f) Diagnosis module: It is used to track and diagnose quality anomalies by combining grey correlation analysis with expert knowledge and provide control measures.

8. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for predicting the multi-stage manufacturing quality and diagnosing abnormalities of traditional Chinese medicine based on artificial intelligence according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium, characterized in that: A computer program is stored on the storage medium, and when the computer program is executed by the processor, the method for predicting the multi-stage manufacturing quality and diagnosing abnormalities of traditional Chinese medicine based on artificial intelligence according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Multi-process manufacturing quality prediction method based on auto-encoder and graph attention network

    CN119359156A