Pharmaceutical data processing method, device and equipment

The deep neural network model is used to predict the moisture content of traditional Chinese medicine in real time during the drying process, which solves the lag and sparsity problems of traditional detection methods, realizes real-time monitoring and feedback of the moisture content of medicines, and improves the consistency and quality of medicine production.

CN120636612APending Publication Date: 2025-09-12JIANGSU KANION PHARMA CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510708159.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In the process of manufacturing traditional Chinese medicine, the moisture content detection in the drying process is lagging and sparse, and it is impossible to track and feedback the dynamic changes of the moisture content of traditional Chinese medicine during the drying process in real time, resulting in unstable drug quality.

Method used

A deep neural network model (such as TCN-GRU) is used to predict the moisture content of drugs in real time. By obtaining relevant parameters in the drying process for analysis, combined with feature engineering and dynamic time warping algorithms, the dynamic changes in the moisture content of drugs can be tracked and fed back in real time.

Benefits of technology

It realizes real-time monitoring and feedback of the moisture content of traditional Chinese medicine during the drying process, improves the consistency and quality stability of the drug production process, reduces the deviation of manual experience judgment, and ensures the quality of the medicine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120636612A_ABST
    Figure CN120636612A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of pharmacy, and discloses a pharmaceutical data processing method, device and equipment, and the method comprises the steps: obtaining target parameter data at a first moment in the drying process of a current batch of drugs, and the target parameters comprise parameters related to the moisture content of the drugs in the drying process of the drugs; analyzing and predicting the target parameter data by using a pre-trained drug moisture content prediction model, and outputting a prediction result; wherein the drug moisture content prediction model is a deep neural network model; and determining first drug moisture content data at the first moment based on the prediction result. The moisture content data of the medicine can be obtained in real time, so that the dynamic change of the moisture content of the medicine in the drying process is tracked and fed back in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of pharmaceutical technology, and in particular to a pharmaceutical data processing method, device and equipment. Background Art

[0002] Traditional Chinese medicine production is a dynamic, systematic process, involving a series of unit operations to prepare the API into a finished drug. Currently, batch production is common, encompassing multiple operational units and involving numerous process parameters and material properties, any variation of which could impact the final drug quality. Currently, the pharmaceutical industry is rapidly developing towards the application of advanced pharmaceutical technologies, and Traditional Chinese Medicine (TCM) manufacturing technology is also evolving from the traditional water-boiling and alcohol-precipitation process into a new era of digital and intelligent pharmaceutical manufacturing.

[0003] The drying process of traditional Chinese medicine (TCM) has long relied on manual experience and regular manual measurements. This manual measurement method typically involves operators removing small samples of TCM from the drying equipment at regular intervals and testing their moisture content using specialized tools such as moisture meters. However, this data collection method suffers from significant lag and sparseness, making it impossible to track and provide real-time feedback on the dynamic changes in moisture content during the drying process. Summary of the Invention

[0004] In view of this, the present invention provides a pharmaceutical data processing method, device and equipment to solve the problems of hysteresis and sparseness in the detection of moisture content of medicines during the medicine drying process.

[0005] In a first aspect, the present invention provides a pharmaceutical data processing method, the method comprising:

[0006] Obtaining target parameter data at the first moment during the drying process of the current batch of drugs, wherein the target parameter includes parameters related to the moisture content of the drugs during the drying process; the first moment includes multiple moments from the start of drying to the current moment;

[0007] Using a pre-trained drug moisture content prediction model, the target parameter data is analyzed and predicted, and a prediction result is output; wherein the drug moisture content prediction model is a deep neural network model;

[0008] Based on the prediction result, the moisture content data of the first drug at the first moment is determined.

[0009] In a second aspect, the present invention provides a pharmaceutical data processing device, comprising:

[0010] A first data acquisition module is used to obtain target parameter data at the first moment of the drying process of the current batch of medicines, wherein the target parameters include parameters related to the moisture content of the medicines during the drying process;

[0011] A first prediction module is configured to use a pre-trained drug moisture content prediction model to analyze and predict the target parameter data and output a prediction result; wherein the drug moisture content prediction model is a deep neural network model;

[0012] A determination module is used to determine the moisture content data of the first drug at a first moment based on the prediction result.

[0013] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the pharmaceutical data processing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0014] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the pharmaceutical data processing method of the first aspect or any corresponding embodiment thereof.

[0015] In a fifth aspect, the present invention provides a computer program product comprising computer instructions for causing a computer to execute the pharmaceutical data processing method of the first aspect or any corresponding embodiment thereof.

[0016] The pharmaceutical data processing method, apparatus, and device provided in the embodiments of the present invention obtain parameters related to the moisture content of the drug in real time during the drug drying process, and then use a pre-trained drug moisture content prediction model to analyze and predict these parameters, thereby obtaining the moisture content data of the drug in real time, thereby achieving real-time tracking and feedback of the dynamic changes in the moisture content of the drug during the drying process. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in related technologies, the following briefly introduces the drawings required for use in the specific embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 is a flow chart of a pharmaceutical data processing method according to an embodiment of the present invention;

[0019] Figure 2 This is one of the schematic diagrams of the correlation analysis results between various process parameters and the moisture content of the medicine during the medicine drying process according to an embodiment of the present invention;

[0020] Figure 3 This is a second schematic diagram of the correlation analysis results between various process parameters and the moisture content of the medicine during the medicine drying process according to an embodiment of the present invention;

[0021] Figure 4 is a schematic diagram of feature expansion using feature engineering according to an embodiment of the present invention;

[0022] Figure 5 2 is a schematic diagram of the structure of a drug moisture content prediction model according to an embodiment of the present invention;

[0023] Figure 6 is one of the schematic diagrams of the moisture content change curve of the current batch of medicines during the drying process and the matching target second moisture content change curve according to an embodiment of the present invention;

[0024] Figure 7 This is a second schematic diagram of a moisture content change curve of a current batch of medicines during a drying process and a matching target second moisture content change curve according to an embodiment of the present invention;

[0025] Figure 8 3. This is a schematic diagram of a moisture content variation curve of a historical batch of medicines obtained by polynomial curve fitting according to an embodiment of the present invention;

[0026] Figure 9 2. This is a schematic diagram showing the effect of using a regression model to expand manually collected sparse moisture content labels according to an embodiment of the present invention;

[0027] Figure 10 1 is a schematic diagram comparing the change curves of the moisture content (label) of a drug before and after smoothing and noise reduction processing according to an embodiment of the present invention;

[0028] Figure 11 is a structural block diagram of a pharmaceutical data processing device according to an embodiment of the present invention;

[0029] Figure 12 2 is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0031] According to an embodiment of the present invention, an embodiment of a pharmaceutical data processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of executable computer instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] In this embodiment, a pharmaceutical data processing method is provided, which can be used in various computer devices. The computer device can be used as a pharmaceutical process controller. Figure 1 is a flow chart of a pharmaceutical data processing method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0033] Step S101: Obtain target parameter data at the first moment during the drying process of the current batch of medicines, wherein the target parameters include parameters related to the moisture content of the medicines during the drying process. The first moment includes multiple moments from the start of drying to the current moment.

[0034] Specifically, the target parameter data described in the embodiment of the present invention is a target parameter data sequence arranged in chronological order. The target parameter data can be obtained regularly during the drying process of the current batch of medicines and then sorted in chronological order to obtain the target parameter data sequence.

[0035] The medicine in the embodiment of the present invention may be a traditional Chinese medicine, but is not limited to traditional Chinese medicine, and may also be other medicines.

[0036] In some optional specific embodiments, the target parameters include target process parameters and / or target characteristic parameters;

[0037] The target process parameters include at least one of the following: air inlet temperature, air outlet temperature and material temperature.

[0038] In some specific implementation manners, the target process parameters are determined according to the following method:

[0039] Step 1: Collect multiple process parameters during the drug drying process.

[0040] Specifically, the multiple process parameters collected may include: air intake volume, air intake proportional valve opening, pre-cooling temperature, expansion chamber pressure, dust concentration, pre-heating temperature, air outlet temperature, air intake temperature, air intake humidity, exhaust fan opening percentage, bottom pot pressure, top cover pressure, air intake temperature, atomization pressure, dry granulation motor speed, material temperature, etc.

[0041] Step 2: Obtain the Pearson correlation coefficient between each of the process parameters and the moisture content of the drug.

[0042] Specifically, the Pearson correlation coefficient is a statistic used to measure the degree of linear correlation between two variables. The value range of the Pearson correlation coefficient is [-1, 1]. The calculation formula for the Pearson correlation coefficient between any process parameter and the moisture content of the drug is as follows:

[0043]

[0044] Among them, (x i ,y i ) is the i-th sample data of the process parameters and the moisture content of the drug, n represents the number of samples, and is the sample mean, and r is the Pearson correlation coefficient.

[0045] Explanation of the meaning of the Pearson correlation coefficient: When r = 1, it indicates that there is a completely positive linear correlation between the two variables, that is, when the value of one variable increases, the value of the other variable will also increase in a fixed proportion; when r = -1, it indicates that there is a completely negative linear correlation between the two variables, that is, when the value of one variable increases, the value of the other variable will decrease in a fixed proportion; when r = 0, it indicates that there is no linear correlation between the two variables, but there may be other nonlinear relationships; when 0 < |r| < 1, the closer its absolute value is to 1, the stronger the linear correlation, and the closer its absolute value is to 0, the weaker the linear correlation.

[0046] Step 3: Obtain the Spearman correlation coefficient between each of the process parameters and the moisture content of the drug.

[0047] Specifically, the Spearman correlation coefficient is a non-parametric statistic used to measure the monotonic relationship between two variables. The Spearman correlation coefficient ranges from [-1, 1]. When the coefficient is -1, it indicates a perfect negative correlation; when the coefficient is 1, it indicates a perfect positive correlation; when the coefficient is 0, it indicates that there is no monotonic correlation between the two variables.

[0048] The calculation process of the Spearman correlation coefficient between any process parameter x and the moisture content y of the drug is as follows:

[0049] First, sort the data by size and convert it into a rank. For each pair of data points (x i ,y i ) calculate the difference d of their ranks i :d i =R(x i )-R(y i ), where R(x i ) and R(yi ) are x i 、y i rank.

[0050] Then, the rank difference d calculated in the previous step is i , substitute into the formula to calculate the correlation coefficient: Where ρ is the Spearman correlation coefficient.

[0051] Step 4: Based on the Pearson correlation coefficient and the Spearman correlation coefficient, the target process parameters are screened from the multiple process parameters. That is, through linear correlation analysis (Pearson correlation coefficient) and nonlinear correlation analysis (Spearman correlation coefficient), the strongly correlated parameters affecting the change of moisture content in the drug drying production process are obtained, including inlet air temperature, outlet air temperature and material temperature. The correlation analysis results are as follows: Figure 2 and Figure 3 Specifically, a strong correlation threshold can be set, such as a parameter with an absolute value greater than 0.6 being a strongly correlated parameter.

[0052] In the embodiment of the present invention, the Pearson and Spearman correlation coefficients are used to analyze the correlation between the process parameters of the drying process and the moisture content through linear and nonlinear correlation analysis, and the strongly correlated process parameters affecting the moisture content in the drying process are determined, including the inlet air temperature, outlet air temperature and material temperature.

[0053] In addition, the target characteristic parameter includes at least one of the following: temperature difference, temperature change rate, temperature ratio feature, sliding window statistical feature and time feature.

[0054] In some specific implementations, the target characteristic parameters are obtained by performing feature expansion on the target process parameters using feature engineering.

[0055] In the embodiment of the present invention, in view of the strong temporal characteristics of the drug drying process, feature engineering is used to expand the features of the strongly correlated process parameters that affect the moisture content in the drug drying process, and new features such as temperature difference, temperature change rate, temperature ratio features, sliding window statistical features, and time features are added.

[0056] Specifically, feature engineering is used to expand features, such as polynomial feature expansion, feature combination, etc. Figure 4 As shown, new features are added: temperature difference (inlet-outlet, material-inlet, outlet-material), temperature change rate (inlet temperature change rate, material temperature change rate, outlet temperature change rate), temperature ratio feature (inlet / outlet, material / inlet, outlet / material), sliding window statistical features (mean, variance, maximum value), and time feature (drying duration).

[0057] Among them, the temperature difference feature reflects the temperature difference between different locations or objects and is used to measure heat transfer efficiency and the heat absorption state of the material. Inlet-outlet temperature difference = inlet temperature - outlet temperature. The larger the difference, the more heat is absorbed by the material or consumed by water evaporation during the drying process. Material-inlet temperature difference = material temperature - inlet temperature. If it is a negative value, it means that the material temperature is lower than the inlet temperature and is in the heat absorption stage. Outlet-material temperature difference = outlet temperature - material temperature, which reflects the heat exchange equilibrium between the material and the hot air. The smaller the difference, the more likely it is that the drying process is nearing its end (the material and the hot air are in thermal equilibrium).

[0058] Temperature change rate characteristic: measures the rate of temperature change per unit time, used to capture the dynamic fluctuations of the drying process. t -Inlet air temperature t-1 ) / Δt, a positive value indicates an increase in the inlet air temperature, a negative value indicates a decrease, and a larger absolute value indicates a worse heat source stability. Material temperature change rate = (material temperature t -Material temperature t-1 ) / Δt, reflects the change in the evaporation rate of the material water. If it increases suddenly, it may indicate that a large amount of water has evaporated (such as in the constant rate drying stage); if it approaches 0, it may enter the decreasing rate drying stage (the water content is close to equilibrium). Outlet temperature change rate = (outlet temperature t -Air outlet temperature t-1 ) / Δt, combined with the material temperature change rate for analysis: If the outlet air temperature change rate increases while the material temperature change rate decreases, it means that the evaporation of material moisture decreases and the drying is close to the equilibrium state.

[0059] Temperature Ratio Characteristics: The Inlet / Outlet Temperature Ratio = Inlet Temperature / Outlet Temperature reflects the thermal energy attenuation ratio. A ratio greater than 1 indicates that the inlet air temperature is higher than the outlet air temperature, indicating heat loss. The Material / Inlet Temperature Ratio = Material Temperature / Inlet Air Temperature. This ratio of material temperature to inlet air temperature can be used to determine whether the material has reached thermal saturation. The Outlet / Material Temperature Ratio = Outlet Air Temperature / Material Temperature. This ratio reflects the relationship between the outlet air and material temperatures. A ratio approaching 1 may indicate that drying is near equilibrium.

[0060] Sliding window feature: Based on historical data within a fixed time window, statistics are calculated to capture local trends and fluctuations.

[0061] Assume that the sliding window size is w, and the window contains the parameter values ​​X from time t-w+1 to t={x t-w+1 ,x t-w+2 ,…,x t},but:

[0062] Reflects the average level of parameters within the window.

[0063] Measures the fluctuation range of parameters: the larger the variance, the worse the stability of the drying process.

[0064] Maximum = max(X), captures the extreme value of the parameter within the window.

[0065] Time characteristic: The cumulative time from the start of the drying process to the current moment, used to correlate the change in moisture content over time. Drying duration = current moment - drying start time.

[0066] The above process of determining target process parameters and / or target characteristic parameters needs to be performed before training the drug moisture content prediction model in order to collect training sample data for the model.

[0067] Step S102: Use a pre-trained drug moisture content prediction model to analyze and predict the target parameter data, and output a prediction result; wherein the drug moisture content prediction model is a deep neural network model.

[0068] Specifically, the drug moisture content prediction model is a deep neural network model based on TCN (Temporal Convolutional Network)-GRU (Gated Recurrent Unit). Figure 5 As shown in the figure, the drug moisture content prediction model mainly consists of a TCN layer and a GRU layer. The TCN layer is responsible for feature extraction and representation learning of time series data, while the GRU layer receives the output of the TCN layer and performs further sequence modeling and prediction. This model combines the parallel computing of convolutional neural networks with the memory performance of recurrent neural networks to capture long-term dependencies in process data. Figure 5 In the figure, Residual Block represents the residual block, Dilated Causal Conv represents the void causal convolution or dilated causal convolution, Weight norm represents weight normalization, Input to next Residual Block represents the input of the next residual block, and Output from previous Residual Block represents the output from the previous residual block.

[0069] Step S103: Determine the moisture content data of the first drug at the first moment based on the prediction result.

[0070] In an embodiment of the present invention, by acquiring parameters related to the moisture content of the drug in real time during the drug drying process, and then using a pre-trained drug moisture content prediction model to analyze and predict these parameters, the moisture content data of the drug can be obtained in real time, thereby achieving real-time tracking and feedback of the dynamic changes in the moisture content of the drug during the drying process.

[0071] In some optional specific implementations, after step S103, that is, after determining the moisture content data of the first drug at the first moment based on the prediction result, the following steps are further included:

[0072] Step S104 , obtaining first moisture content change data during the drying process of the current batch of medicines, wherein the first moisture content change data includes a plurality of first medicine moisture content data and corresponding time points predicted by the medicine moisture content prediction model.

[0073] Step S105 , matching the first moisture content change data with the second moisture content change data, where the second moisture content change data includes the moisture content data of the second medicine during the drying process of the previous batch of medicines and the corresponding time.

[0074] Specifically, there are multiple sets of second moisture content change data, each set of which is the moisture content data of the drug collected at different times during the previous drug drying process. Therefore, the second moisture content change data is also the moisture content change trajectory data of the historical batch of drug drying processes. These second moisture content change data can be stored in a dedicated database. In addition, a fitting curve corresponding to the second moisture content change data can be obtained, and then the second moisture content change curve data can be stored in the database. When storing the second moisture content change curve data in the database, it can be stored according to a specific data format specification.

[0075] Step S106: determining the remaining drying time of the current batch of medicines based on the matched target second moisture content change data.

[0076] In the embodiment of the present invention, when the drying process of the current batch of medicines has not yet ended, Figure 6As shown, the moisture content data of the medicines at multiple moments that have been acquired can be matched with the moisture content data changes during the drying process of the previous batch of medicines, and then the remaining drying time of the current batch of medicines can be determined based on the matched moisture content data of the second medicines during the drying process of the previous batch of medicines. Specifically, it can be considered that the moisture content change data after the current moment (the relative moment calculated according to the start time of the medicine drying process) in the matched target second moisture content change data is the moisture content change data of the current batch of medicines after the current moment. It is also possible to use the change data after the moisture content equal to the current moisture content of the current batch of medicines in the matched target second moisture content change data as the moisture classification change data of the current batch of medicines after the current moment, even if the actual moisture content change data of the current batch of medicines in the subsequent drying process is not completely consistent with the matched target second moisture content change data (such as Figure 7 shown).

[0077] In addition, when determining the remaining drying time of the current batch of medicines, if the target moisture content of the current batch of medicines is inconsistent with the moisture content at the end time in the matched target second moisture content change data, the remaining drying time needs to be determined in combination with the target moisture content.

[0078] In some specific implementations, step S105, i.e., matching the first moisture content change data with the second moisture content change data, includes:

[0079] Step S1051: Obtain a curve fitting polynomial corresponding to the second moisture content change data.

[0080] A polynomial curve fitting can be performed on the second drug moisture content data and the corresponding time data in the second moisture content change data to obtain a corresponding curve fitting polynomial. This process can be performed on the second drug moisture content data and the corresponding time data obtained after the drying process of the previous batch of drugs is completed, and the polynomial curve fitting is stored in the above-mentioned database. The general formula for polynomial curve fitting is as follows:

[0081] f(t)=a0+a1t+a2t 2 +…+a n t n

[0082] Where f(t) is the moisture content, t is the drying time, a0, a1,…, a n are the coefficients to be determined, and n are the coefficients of the polynomial.

[0083] In the embodiment of the present invention, the trend curve of the change of the water content of the medicine over time can be accurately depicted by polynomial curve fitting, wherein the curve corresponding to a set of second water content change data is as follows: Figure 8 shown.

[0084] Step S1052: Calculate the cumulative distance between the curves corresponding to the first moisture content change data and the second moisture content change data based on a sliding window of a preset size and a curve fitting polynomial corresponding to the second moisture content change data.

[0085] Step S1053 : Using the second moisture content change data corresponding to the minimum cumulative distance as the target second moisture content change data.

[0086] Step S1054: Calculate the remaining drying time of the current batch of medicines based on the curve fitting polynomial corresponding to the target second moisture content change data.

[0087] Specifically, we set the sliding window size, construct the cost matrix of the current batch window data and the historical curve, calculate the minimum cumulative distance path as the optimal matching path, calculate the similarity score based on the optimal path, and select the best matching curve. The formula is as follows:

[0088] For sliding window: Let the time series be X={x1,x2,…,x n}, the sliding window size is w, then the i-th window W i for:

[0089] W i ={x i ,x i+1 ,…,x i+w-1}

[0090] Among them, 1≤i≤n-w+1.

[0091] Assume that the current batch window data sequence is P = {p1, p2, ..., p m}, the historical curve data sequence is Q={q1,q2,…,q n}, then the element d(i,j) of the cost matrix D represents p i With q j The distance between them is usually calculated using Euclidean distance:

[0092]

[0093] The minimum cumulative distance path is obtained by recursively calculating the cumulative cost matrix C:

[0094]

[0095] Among them, C(1,1)=d(1,1), i=2,…,m,j=2,…,n, and the final minimum cumulative distance path is the path from C(m,n) back to C(1,1), which is the optimal matching path.

[0096] In an embodiment of the present invention, the Euclidean distance between the current batch window data and each point on the historical curve is calculated based on the sequences P and Q, and a cost matrix is ​​constructed (the elements in the cost matrix represent the distance between two points). Then, a path is found from the upper left corner to the lower right corner of the cost matrix (moving only in three directions at a time: right, down, and lower right, and taking the minimum value), and finally the sum of the elements on the path is minimized and used as the best matching path.

[0097] The best matching path can measure the similarity between two time series of different lengths by calculating the minimum cumulative distance. The smaller the distance, the higher the similarity between the moisture content change curves of the historical batch of drugs and the current batch of drugs.

[0098] For the best matching curve, it is necessary to calculate the similarity of the moisture change curves of all historical batches of drugs in the database and the current batch of drugs, and select the historical batch curve with the greatest similarity as the best matching curve for the current batch.

[0099] After obtaining the best matching curve, the moisture content predicted by the current model and the target moisture content are substituted into the matching curve respectively to calculate the remaining drying time from the target moisture content. The specific calculation process is as follows: the polynomial function corresponding to the matching curve is y=f(t), where t represents the drying time and y represents the moisture content at time t; the moisture content predicted by the current model y1 and the target moisture content y0 are substituted into the function y=f(t) respectively to obtain t1=f -1 (y1) and t0 = f -1 (y0), then the drying time Δt from the target moisture content = t0-t1.

[0100] In the embodiment of the present invention, based on the sliding window mechanism, a dynamic time warping (DTW) algorithm is used to online match the moisture content change curves of the current batch and the historical batches, and the remaining drying time is calculated in real time.

[0101] In addition, after the drying process of the current batch of drugs is completed, the drug moisture content change data during the drying process of the current batch of drugs can be saved in the database. Specifically, the fitting curve data corresponding to the drug moisture content change data during the drying process of the current batch of drugs can be saved in the database. As described above, the fitting curve data corresponding to the drug moisture content change data can be obtained using a polynomial curve fitting method.

[0102] When the fitted curve data corresponding to the moisture content change data of the current batch of drugs during the drying process is saved in the database, it is also stored according to specific data format specifications. Specifically, an incremental learning method can be used to update the moisture content change curve database. In this way, a database of moisture content change curves during the drying process is gradually built up and continuously updated and improved to improve the accuracy and adaptability of the remaining drying time calculation.

[0103] In the embodiment of the present invention, a dedicated database is used to completely and comprehensively record the moisture content change trajectory data of historical batches, providing strong data support for subsequent in-depth analysis of the stability of the drying process, optimization of drying parameters, calculation of remaining drying time, and product quality traceability.

[0104] In the related art, the drying process of pharmaceuticals relies on regular manual measurement of the drug's moisture content and manual experience to control the drying process, including using the manually measured drug moisture content and manual experience to determine the remaining drying time and the end time. However, manual judgment based on experience lacks precise quantitative standards, and the judgment results of different operators are prone to large deviations, which poses a serious challenge to the consistency of the drug production process and is difficult to effectively ensure. In the embodiments of the present invention, not only are parameters related to the drug's moisture content acquired in real time during the drug drying process and the moisture content data of the drug obtained in real time using a pre-trained drug moisture content prediction model, but the drug moisture content data collected during the current batch of drug drying is also matched with the moisture content changes during the drying process of historical batches of drug. The remaining drying time is then determined using the matched moisture content change data during the drying process of the historical batches of drug. Compared with the method of determining the remaining drying time based on manual experience, the embodiments of the present invention solve the problem of large deviations in the judgment results obtained by different operators based on experience, ensuring the consistency of the drug production process and the quality of the drug.

[0105] In addition, at the monitoring level of the drug drying process, traditional monitoring focuses only on a few limited parameters such as drying temperature and time, and lacks in-depth and comprehensive understanding of the complex moisture migration process within traditional Chinese medicine. At present, most traditional Chinese medicine drying equipment is only equipped with basic temperature and humidity sensors, and is unable to fully obtain key data information that can accurately reflect the drying status of traditional Chinese medicine. In addition, traditional control methods have great difficulties in precise regulation. Once the moisture content fluctuates during the drying process, it is difficult for operators to quickly and accurately make reasonable adjustments to the drying parameters. This situation can easily lead to problems such as unstable drug quality, such as reduced efficacy and drug deterioration, which seriously restrict the quality improvement of traditional Chinese medicine products and thus have a very adverse impact on their market competitiveness. To this end, in the embodiment of the present invention, not only parameters such as the inlet temperature, outlet temperature and material temperature during the drug drying process are monitored, but also key parameter data such as temperature difference, temperature change rate, temperature ratio characteristics, sliding window statistical characteristics and time characteristics are obtained.

[0106] In summary, the method provided by the embodiment of the present invention can be applied to collect parameters related to the moisture content of the drugs in the drying process in real time during the production process of each batch of drug drying, and obtain the moisture content change curve of the current batch of drugs through the TCN-GRU deep neural network moisture content prediction model; match the moisture change curve of the current batch of drugs with the curves in the moisture content change database of historical batches of drugs, and reasonably set the sliding window size based on the data characteristics and actual pharmaceutical process requirements to ensure that the dynamic changes of the data can be effectively captured; based on the sliding window, use the dynamic time warping algorithm (DTW) to calculate the similarity between the current curve and the historical curve, and select the best matching curve from many historical curves based on the score.

[0107] Based on the matched optimal historical curve, the moisture content predicted by the current model and the target moisture content are substituted into the matching curve. Utilizing the functional relationship and data patterns inherent in the curve, the remaining drying time to the target moisture content is accurately calculated. This calculated remaining drying time is fed back to production operators to facilitate the rational arrangement of subsequent production processes, thus achieving intelligent adjustment of the pharmaceutical production process.

[0108] After each batch of pharmaceuticals is dried, the moisture curve data for the new batch is first carefully preprocessed to remove possible outliers and noise to ensure data quality. Next, using incremental learning methods, the processed moisture curve data for the new batch is added to the moisture curve database. During this addition process, the existing data structure in the database is optimized and adjusted to better accommodate the new data. Once added, the system automatically conducts in-depth analysis and integration of the entire database, continuously updating and improving it. This allows the method for calculating remaining drying time based on this database to better adapt to changing production conditions, significantly improving the adaptability and accuracy of this method.

[0109] The method provided in the embodiment of the present invention may be implemented by a corresponding application program, and the operating environment of the application program may be, for example, as shown in the following table:

[0110] Table 1

[0111]

[0112] In the embodiment of the present invention, a pre-trained drug moisture content prediction model is used to predict drug moisture content data. The following example illustrates the training process of the drug moisture content prediction model.

[0113] In some optional specific embodiments, the use of a pre-trained drug moisture content prediction model to analyze and predict the target parameter data, and before outputting the prediction result, further includes:

[0114] Step S001, obtaining the third drug moisture content change data and historical target parameter data actually measured during the drying process of historical batches of drugs; the third drug moisture content change data includes the third drug moisture content data at multiple second moments during the drying process of the historical batches of drugs; the historical target parameter data is the target parameter data at each second moment.

[0115] Specifically, the third drug moisture content data here can be manually measured moisture content data. The specific process of manually measuring the drug moisture content data during the drug drying process can be: the operator removes a small amount of drug sample from the drying equipment at regular time intervals and uses a professional tool such as a moisture meter to perform moisture content testing.

[0116] In an embodiment of the present invention, after obtaining the actual measured moisture content change data of the third drug (including the moisture content data of the drug at multiple moments (i.e., the second moment) during the drying process of historical batches of drugs (i.e., the moisture content data of the third drug)), data governance can be performed first. Data governance, that is, data processing, aims to identify and eliminate abnormal data to ensure the accuracy of the training data set and drug moisture content label subsequently constructed based on the actual measured moisture content change data of the third drug. Specifically, the data governance process includes: cleaning the data, identifying and eliminating abnormal data, and aligning timestamps.

[0117] Step S002: constructing a target parameter data sample and a corresponding drug moisture content label based on the third drug moisture content change data and the historical target parameter data.

[0118] In some optional specific implementations, step S002, i.e., constructing a target parameter data sample and a corresponding drug moisture content label based on the third drug moisture content change data and historical target parameter data, includes:

[0119] Step S0021, obtaining the first spectral data at the corresponding moment of the moisture content data of each of the third drugs; the first spectral data is the spectral data collected for the historical batch of drugs at the second moment during the drying process of the historical batch of drugs.

[0120] Step S0022: Based on the moisture content data of the third drug and the corresponding first spectral data, a regression model of spectral characteristics and moisture content is constructed using a partial least squares regression method.

[0121] In an embodiment of the present invention, the first spectral data and the third drug moisture content data can be collected simultaneously. That is, during the drying production process of a previous batch of drugs, while collecting the third drug moisture content data at a second moment, the first spectral data of the drug at the second moment is also collected. The first spectral data can be near-infrared spectral data, which can be collected using a spectral acquisition device.

[0122] After collecting the first spectral data and the third drug's moisture content data, data governance was performed on the third drug's moisture content data. This included cleaning the manually measured moisture content data, identifying and removing abnormal data that significantly deviated from the normal range by setting a reasonable data range, and filling in missing values. Furthermore, the data was timestamped based on time information to ensure the data's chronological order was accurate, providing a reliable foundation for subsequent analysis.

[0123] Specifically, step S0022, i.e., constructing a regression model of spectral characteristics and moisture content using partial least squares regression based on the moisture content data of the third drug and the corresponding first spectral data, includes:

[0124] Step S00221: extract target spectrum features from the first spectrum data.

[0125] Specifically, the principal component analysis (PCA) method can be used to extract the key spectral features, that is, the target spectral features. The specific process can be as follows:

[0126] Step a: Perform standard normal transformation on the first spectral data to eliminate the influence of the data mean and standard deviation on subsequent analysis and make the data comparable. The formula for standard normal transformation is as follows:

[0127]

[0128] Wherein, μ is the mean of the first spectral data, and σ is the standard deviation.

[0129] Step b: Perform moving average smoothing on the first spectral data after the standard normal transformation. Moving average smoothing is based on the idea of ​​local averaging of the data sequence. The data is averaged within a window of fixed length. As the window moves sequentially on the data sequence, the average value of the data within the window is calculated each time, and the average value is used as the smoothed value of the data at the center of the window, thereby obtaining a new smoothed data sequence. In this way, the noise and fluctuation of the data can be effectively reduced, and the data can be smoothed to make the data trend more obvious. The formula for moving average smoothing can be:

[0130]

[0131] Where x(n+k) represents the original signal sequence, specifically the first spectral data sequence after standard normal transformation, k is the offset of the sequence, WSZ is the size of the sliding window (i.e., the number of data points involved in the average calculation), and y(n) is the output value at time n after moving average smoothing.

[0132] The above steps a and b are for preprocessing and standardizing the originally collected first spectral data. Next, it is necessary to perform principal component analysis on the preprocessed and standardized first spectral data to extract target spectral features.

[0133] Step c: Decentralize the preprocessed and standardized first spectral data and calculate the covariance matrix; perform eigenvalue decomposition on the covariance matrix to obtain a characteristic matrix, and take the first k columns to form a new matrix; convert the original data (here refers to the preprocessed and standardized first spectral data) into a new coordinate system composed of the first k principal components to obtain the spectral data after dimension reduction.

[0134] Specifically, the original data (here refers to the first spectral data after preprocessing and standardization) are organized into a matrix X by columns; each row of the matrix X is decentralized (zero-meaned), that is, the mean of this row is subtracted; the covariance matrix C of X is calculated; the eigenvalues ​​and corresponding eigenvectors of the covariance matrix C are calculated; the eigenvectors of the covariance matrix are arranged into a matrix by rows from top to bottom according to the corresponding eigenvalue size, and the first k columns are taken to form a new matrix P; the original data is converted to a new coordinate system composed of the first k principal components to obtain the spectral data after dimension reduction, that is, the target spectral characteristics.

[0135] Specifically, the formula for decentralizing each row of the matrix X is:

[0136]

[0137] in, A row of m spectral data x i The mean of (i=1,2,…,m).

[0138] The formula for calculating the covariance matrix C of X is:

[0139]

[0140] The formula of the target spectral characteristics is expressed as:

[0141] Y=PX

[0142] Among them, Y is the target spectral feature data after dimensionality reduction, and P is a matrix in which the eigenvectors of the covariance matrix are normalized and arranged in columns (the first k columns).

[0143] In the embodiment of the present invention, by extracting key features of spectral data, the data dimension of the spectral data is reduced, thereby improving the efficiency of subsequent analysis.

[0144] Step S00222: Determine the target spectral feature as the independent variable X, and determine the moisture content data of the third drug as the dependent variable Y.

[0145] Step S00223, performing standard normal transformation on the target spectral characteristics and the moisture content data of the third drug respectively, and the formula is expressed as follows:

[0146]

[0147] Among them, X, X std Respectively represent the target spectral characteristics before and after standard normal transformation, μ X represents the mean of the target spectral feature, σ X Indicates the standard deviation of the target spectral characteristics; Y, Y std Respectively represent the target spectral characteristics before and after standard normal transformation, μ Y represents the mean of the target spectral feature, σ Y Indicates the standard deviation of the target spectral feature.

[0148] Step S00224, iteratively extracting corresponding latent variables based on the target spectral characteristics after standard normal transformation and the moisture content data of the third drug.

[0149] Among them, regarding the iterative extraction of latent variables, the nonlinear iterative partial least squares (NIPALS) algorithm can be used to extract the kth principal component (k = 1, 2, ..., K) according to the following steps:

[0150] a. Initialize the weight vector:

[0151] Where X0 = X std , Y0=Y std ,X k-1 and Y k-1 is the residual matrix after the k-1th iteration;

[0152] b. Calculate the score vector and loading vector:

[0153] t k =X k-1 w k

[0154]

[0155] c. Update the residual matrix:

[0156]

[0157] d. Stopping criterion: when the cumulative explained variance Or the iteration is terminated when the number of extracted principal components K is greater than or equal to 10. The 0.95 and 10 here are only used as examples and can be adjusted according to actual needs.

[0158] Step S00225: construct the regression model using the extracted latent variables.

[0159] Specifically, the process of building a regression model can be: after extracting K principal components, establish a partial least squares regression (PLSR) regression equation to obtain the final regression model coefficients:

[0160]

[0161] β=W(P T W) -1 BQ T

[0162] Where T=[t1,t2,…,t k ] is the score matrix, Q=[q1,q2,…,q k ] is the dependent variable loading matrix, B is the diagonal matrix, e is the residual matrix; β is the final regression coefficient vector, W=[w1,w2,…,w k ],P=[p1,p2,…,p k ].

[0163] Step S0023, obtaining second spectral data collected at a third moment; the third moment includes multiple moments in the drying process of the historical batch of medicines except the second moment.

[0164] Step S0024: using the regression model, obtain fourth drug moisture content data corresponding to the second spectral data.

[0165] Specifically, the principal component analysis can be performed on the second spectral data obtained from the original collection to extract the corresponding spectral key features; then, the extracted spectral key features are subjected to a standard normal transformation; then, the spectral key features after the standard normal transformation are projected into the principal component space of the partial least squares method (PLSR) regression model, and the score vector and the load vector are calculated; finally, the calculated score vector and the load vector are input into the regression equation (i.e., the regression model) to obtain the moisture content value predicted based on the second spectral data (i.e., the moisture content data of the fourth drug).

[0166] Step S0025: Based on the third drug moisture content data and the corresponding historical target parameter data, as well as the fourth drug moisture content data and the target parameter data at the third moment, construct the target parameter data sample and the corresponding drug moisture content label. Specifically, each target parameter data (including the historical target parameter data and the target parameter data at the third moment) is timestamped with the moisture content data (including the third drug moisture content data and the fourth drug moisture content data) to construct a sample dataset for training the drug moisture content prediction model.

[0167] In the embodiment of the present invention, the partial least squares regression method (PLSR) is used to construct a regression model of spectral characteristics and moisture content, and fit the moisture content change curve during the drying process. That is, the regression model can be used to expand the sparse moisture content labels collected manually. Figure 9 A schematic diagram showing the effect of using a regression model to expand manually collected sparse moisture content labels.

[0168] In other embodiments, instead of using a regression model to expand the manually measured drug moisture content data (i.e., the third drug moisture content data), manually measured drug moisture content data from a sufficient number of historical batches of drug drying processes can be collected, and a drug moisture content prediction model with sufficiently high prediction accuracy can be trained. Alternatively, the target parameter data sample and the corresponding drug moisture content label can be constructed based solely on the fourth drug moisture content data and the target parameter data at the third moment. In other words, the sample data can be constructed using only the drug moisture content label predicted by the regression model and the target parameter data at the corresponding moment, without using the manually measured drug moisture content label and the target parameter data at the corresponding moment.

[0169] The present invention realizes the real-time prediction of moisture content in the drug drying process through data-driven and artificial intelligence methods, thereby providing a solution for realizing intelligent regulation of the drug production process.

[0170] In some other specific embodiments, before constructing the target parameter data sample and the corresponding drug moisture content label based on the third drug moisture content data and the corresponding historical target parameter data, as well as the fourth drug moisture content data and the target parameter data at the third moment, the method further includes:

[0171] Based on the moisture content data of the third drug, a Savitzky-Golay filter (i.e., a Savitzky-Golay filter, also often referred to as an SG filter or a Savitzky-Golay smoothing filter) is applied to the moisture content data of the fourth drug belonging to the same drying batch of drugs for smoothing and noise reduction processing.

[0172] In an embodiment of the present invention, a Savitzky-Golay filter is applied to perform smoothing and noise reduction processing on the drug moisture content label (i.e., the fourth drug moisture content data) predicted by the regression model. This can improve the accuracy of the label data without changing the signal trend and width, thereby improving the prediction accuracy of the trained drug moisture content prediction model.

[0173] The specific process of applying the Savitzky-Golay filter to smooth and reduce noise on the drug moisture content labels predicted by the regression model includes:

[0174] Step 1: Determine the window size and polynomial order: The window size determines the number of data points involved in the fitting and is usually an odd number; the polynomial order is selected based on the complexity of the data and the features that need to be retained;

[0175] Step 2: Construct the least squares fit: In each window, let the polynomial be y=a0+a1x+a2x 2 +…+a n x n (n is the polynomial order), and the coefficients a0, a1, a2, ..., a of the polynomial are solved by minimizing the sum of squares of the errors between the actual values ​​of the data points in the window and the polynomial fitting values. n ;

[0176] Step 3: Calculate the smoothed value: Substitute the value at the center of the window into the fitting polynomial to obtain the smoothed value of the point and replace the original data point;

[0177] Step 4: Slide the window to the right one point at a time, and repeat steps 2 and 3 until the smoothing and noise reduction processing is completed for the entire data sequence.

[0178] Figure 10 A schematic diagram showing a comparison of the change curves of the moisture content (label) of a drug before and after smoothing and noise reduction processing.

[0179] Step S003: Use the target parameter data samples and the corresponding drug moisture content labels to train, test and verify the drug moisture content prediction model.

[0180] Specifically, during the training of the drug moisture content prediction model, the gradient descent algorithm is used to minimize the mean square error between the model-predicted moisture content data and the drug moisture content labels to optimize the model parameters and obtain the trained model weights. Loading the trained model weights yields the trained drug moisture content prediction model. The model loss function and the model parameter update process are expressed as follows:

[0181]

[0182] Where L is the loss function, is the model prediction value (i.e. the drug moisture content data predicted by the model), y i is the true value (i.e., the water content label of the drug), n is the number of training samples, θ is the model parameter, t is the number of iterations, α is the learning rate, is the loss function at the current parameter θ t The gradient of time.

[0183] Using the target parameter data samples and the corresponding drug moisture content labels, the drug moisture content prediction model is trained, tested, and verified, mainly including the following processes:

[0184] The dataset containing the target parameter data samples and the corresponding drug moisture content labels was divided into a training set, a test set, and a validation set according to a specific ratio. The training set data was divided into batches of 100×17 and then fed into a moisture content prediction model based on a TCN-GRU deep neural network for training. During training, appropriate hyperparameters were set, such as a learning rate of 0.001, 100 training cycles, and a batch size of 32. The model parameters were continuously adjusted to gradually reduce the loss function value on the training set, achieving a good fit. The trained model was evaluated using the test set data, and metrics such as prediction accuracy and mean squared error were calculated to verify the model's performance. If the model performance did not meet expectations, further adjustments to hyperparameters or data processing methods were made and the model was retrained. Finally, the model was validated using the validation set data.

[0185] In an embodiment of the present invention, the target parameter data samples and the corresponding dataset of the drug moisture content labels are used to train a moisture content prediction model, so that the model can learn the complex relationship between the characteristic parameters and the moisture content, thereby achieving accurate prediction of the moisture content.

[0186] To ensure model prediction accuracy, the trained moisture content prediction model is applicable to the same drug dried using the same drying process. If the drug or drying process is different, retraining can be performed to ensure accuracy. However, this does not limit the application of the embodiments of the present invention. In other words, in some cases, the trained moisture content prediction model can also be applied to moisture content prediction under different drying processes and / or different drug conditions.

[0187] In summary, in the embodiments of the present invention, based on the spectral data and relevant parameter data such as the production process during the drug drying process, artificial intelligence technology is used in an industrial big data-driven manner to achieve real-time prediction of the moisture content in the drug drying production process. Through real-time feedback control technology, production parameters are adjusted in a timely manner according to real-time data to ensure the stability of the production process and the quality of the finished product. With a clear structure, specific implementation methods and certain portability, it provides a new method with high efficiency and practical application value for achieving real-time prediction of moisture content in the drug drying process, and provides a solution for realizing intelligent control of the traditional Chinese medicine production process.

[0188] This embodiment also provides a pharmaceutical data processing device for implementing the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0189] This embodiment provides a pharmaceutical data processing device, such as Figure 11 Shown, including:

[0190] The first data acquisition module 1101 is used to obtain target parameter data at the first moment in the drying process of the current batch of drugs, wherein the target parameter includes parameters related to the moisture content of the drugs during the drying process; the first moment includes multiple moments from the start of drying to the current moment;

[0191] The first prediction module 1102 is configured to use a pre-trained drug moisture content prediction model to analyze and predict the target parameter data and output a prediction result; wherein the drug moisture content prediction model is a deep neural network model;

[0192] The determination module 1103 is configured to determine the moisture content data of the first drug at the first moment based on the prediction result.

[0193] In some optional embodiments, the target parameters include target process parameters and / or target characteristic parameters; the target process parameters include at least one of the following: inlet air temperature, outlet air temperature and material temperature; the target characteristic parameters include at least one of the following: temperature difference, temperature change rate, temperature ratio characteristic, sliding window statistical characteristic and time characteristic.

[0194] In some optional embodiments, the target characteristic parameters are obtained by performing feature expansion on the target process parameters using feature engineering.

[0195] In some optional embodiments, the device further comprises:

[0196] Collection module, used to collect multiple process parameters during the drug drying process;

[0197] A first correlation acquisition module is used to respectively obtain the Pearson correlation coefficient between each of the process parameters and the moisture content of the drug;

[0198] A second correlation acquisition module is used to respectively obtain the Spearman correlation coefficient between each of the process parameters and the moisture content of the drug;

[0199] A screening module is used to screen the target process parameters from the multiple process parameters based on the Pearson correlation coefficient and the Spearman correlation coefficient.

[0200] In some optional embodiments, the device further comprises:

[0201] A second data acquisition module is configured to acquire first moisture content change data during the drying process of a current batch of medicines, wherein the first moisture content change data includes a plurality of first medicine moisture content data and corresponding time points predicted by the medicine moisture content prediction model;

[0202] a matching module for matching the first moisture content change data with second moisture content change data, wherein the second moisture content change data includes the moisture content data of the second drug during the drying process of a previous batch of drugs and the corresponding time;

[0203] The remaining drying time determination module is used to determine the remaining drying time of the current batch of medicines based on the target second moisture content change data obtained by matching.

[0204] In some optional implementations, the matching module includes:

[0205] a curve fitting polynomial obtaining unit, configured to obtain a curve fitting polynomial corresponding to the second moisture content change data;

[0206] a cumulative distance calculation unit, configured to calculate a cumulative distance between curves corresponding to the first moisture content change data and the second moisture content change data based on a sliding window of a preset size and a curve fitting polynomial corresponding to the second moisture content change data;

[0207] a matching data determining unit, configured to use the second moisture content change data corresponding to the minimum cumulative distance as the target second moisture content change data;

[0208] The remaining drying time calculation unit is used to calculate the remaining drying time of the current batch of medicines based on the curve fitting polynomial corresponding to the target second moisture content change data.

[0209] In some optional embodiments, the device further comprises:

[0210] a third data acquisition module, configured to acquire actual measured third drug moisture content change data and historical target parameter data obtained during the drying process of historical batches of drugs; the third drug moisture content change data includes the third drug moisture content data at multiple second moments during the drying process of the historical batches of drugs; and the historical target parameter data includes the target parameter data at each of the second moments;

[0211] a sample construction module, configured to construct a target parameter data sample and a corresponding drug moisture content label based on the third drug moisture content change data and the historical target parameter data;

[0212] The model training module is used to train, test and verify the drug moisture content prediction model using the target parameter data samples and the corresponding drug moisture content labels.

[0213] In some optional embodiments, the sample construction module includes:

[0214] a first spectral data acquisition unit, configured to acquire first spectral data at a time corresponding to the moisture content data of each of the third drugs; the first spectral data being spectral data collected for the historical batch of drugs at the second time during the drying process of the historical batch of drugs;

[0215] A regression model building unit, configured to build a regression model of spectral characteristics and moisture content using a partial least squares regression method based on the moisture content data of the third drug and the corresponding first spectral data;

[0216] A second spectral data acquisition unit is configured to acquire second spectral data collected at a third moment; the third moment includes multiple moments in the drying process of the historical batch of medicines except the second moment;

[0217] a moisture content prediction unit, configured to obtain moisture content data of a fourth drug corresponding to the second spectral data using the regression model;

[0218] A sample construction unit is used to construct the target parameter data sample and the corresponding drug moisture content label based on the third drug moisture content data and the corresponding historical target parameter data, as well as the fourth drug moisture content data and the target parameter data at the third moment.

[0219] In some optional embodiments, the regression model construction unit is specifically used to extract target spectral features from the first spectral data; determine the target spectral features as independent variables, and determine the third drug moisture content data as dependent variables; perform standard normal transformation on the target spectral features and the third drug moisture content data, respectively; iteratively extract corresponding latent variables based on the target spectral features and the third drug moisture content data after standard normal transformation; and use the extracted latent variables to construct the regression model.

[0220] In some optional implementations, the sample construction module further includes:

[0221] The smoothing and noise reduction processing unit is used to apply a Savitzky-Golay filter to perform smoothing and noise reduction processing on the moisture content data of the fourth drug belonging to the same drying batch of drugs based on the moisture content data of the third drug.

[0222] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0223] The pharmaceutical data processing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0224] The embodiment of the present invention also provides a computer device having the above Figure 11 The pharmaceutical data processing device shown.

[0225] See also Figure 12 , Figure 12 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 12 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 12 A processor 10 is taken as an example.

[0226] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0227] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0228] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0229] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0230] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 12 The bus connection is taken as an example.

[0231] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0232] The computer device further includes a communication interface for the computer device to communicate with other devices or a communication network.

[0233] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0234] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0235] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A pharmaceutical data processing method, characterized in that: The method comprises: Obtaining target parameter data at the first moment during the drying process of the current batch of drugs, wherein the target parameter includes parameters related to the moisture content of the drugs during the drying process; the first moment includes multiple moments from the start of drying to the current moment; Using a pre-trained drug moisture content prediction model, the target parameter data is analyzed and predicted, and a prediction result is output; wherein the drug moisture content prediction model is a deep neural network model; Based on the prediction result, the moisture content data of the first drug at the first moment is determined.

2. The method according to claim 1, characterized in that The target parameters include target process parameters and / or target characteristic parameters; The target process parameters include at least one of the following: air inlet temperature, air outlet temperature and material temperature; The target characteristic parameter includes at least one of the following: temperature difference, temperature change rate, temperature ratio feature, sliding window statistical feature and time feature.

3. The method according to claim 2, characterized in that The target characteristic parameters are obtained by performing feature expansion on the target process parameters using feature engineering.

4. The method according to claim 2, characterized in that The target process parameters are determined according to the following method: Collect multiple process parameters during drug drying process; Obtaining the Pearson correlation coefficient between each of the process parameters and the moisture content of the drug respectively; Obtaining the Spearman correlation coefficient between each of the process parameters and the moisture content of the drug; Based on the Pearson correlation coefficient and the Spearman correlation coefficient, the target process parameter is obtained by screening from the multiple process parameters.

5. The method according to claim 1, wherein After determining the moisture content data of the first drug at the first moment based on the prediction result, the method further includes: Acquire first moisture content change data during the drying process of a current batch of medicines, wherein the first moisture content change data includes a plurality of first medicine moisture content data predicted by the medicine moisture content prediction model and corresponding time points; matching the first moisture content change data with second moisture content change data, where the second moisture content change data includes the moisture content data of the second drug during the drying process of the previous batch of drugs and the corresponding time; Based on the matched target second moisture content change data, the remaining drying time of the current batch of medicines is determined.

6. The method according to claim 5, characterized in that The matching of the first moisture content change data with the second moisture content change data includes: Obtaining a curve fitting polynomial corresponding to the second moisture content change data; Calculating a cumulative distance between curves corresponding to the first moisture content change data and the second moisture content change data based on a sliding window of a preset size and a curve fitting polynomial corresponding to the second moisture content change data; using the second moisture content change data corresponding to the minimum cumulative distance as the target second moisture content change data; Based on the curve fitting polynomial corresponding to the target second moisture content change data, the remaining drying time of the current batch of medicines is calculated.

7. The method according to any one of claims 1 to 6, characterized in that The method further includes: using a pre-trained drug moisture content prediction model to analyze and predict the target parameter data, and outputting the prediction results before the prediction results are output; Acquire actual measured third drug moisture content change data and historical target parameter data obtained during the drying process of historical batches of drugs; the third drug moisture content change data includes the third drug moisture content data at multiple second moments during the drying process of the historical batches of drugs; the historical target parameter data is the target parameter data at each of the second moments; constructing a target parameter data sample and a corresponding drug moisture content label based on the third drug moisture content change data and the historical target parameter data; The target parameter data samples and the corresponding drug moisture content labels are used to train, test and verify the drug moisture content prediction model.

8. The method according to claim 7, characterized in that The step of constructing a target parameter data sample and a corresponding drug moisture content label based on the third drug moisture content change data and historical target parameter data includes: Obtaining first spectral data at a corresponding moment of the moisture content data of each of the third drugs; the first spectral data being spectral data collected for the historical batch of drugs at the second moment during the drying process of the historical batch of drugs; Based on the moisture content data of the third drug and the corresponding first spectral data, a regression model of spectral characteristics and moisture content is constructed using a partial least squares regression method; Acquiring second spectral data collected at a third moment; the third moment includes multiple moments in the drying process of the historical batch of medicines except the second moment; Using the regression model, obtaining fourth medicine moisture content data corresponding to the second spectral data; Based on the third drug moisture content data and the corresponding historical target parameter data, as well as the fourth drug moisture content data and the target parameter data at the third moment, the target parameter data sample and the corresponding drug moisture content label are constructed.

9. The method according to claim 8, characterized in that The method of constructing a regression model of spectral characteristics and moisture content based on the moisture content data of the third drug and the corresponding first spectral data using a partial least squares regression method includes: extracting target spectral features from the first spectral data; Determine the target spectral feature as an independent variable and the moisture content data of the third drug as a dependent variable; Performing standard normal transformation on the target spectral characteristics and the moisture content data of the third drug respectively; Iteratively extracting corresponding latent variables based on the target spectral characteristics after standard normal transformation and the moisture content data of the third drug; The regression model is constructed using the extracted latent variables.

10. The method according to claim 9, characterized in that Before constructing the target parameter data sample and the corresponding drug moisture content label based on the third drug moisture content data and the corresponding historical target parameter data, as well as the fourth drug moisture content data and the target parameter data at the third moment, the method further includes: Based on the moisture content data of the third drug, a Savitzky-Golay filter is applied to the moisture content data of the fourth drug belonging to the same drying batch of drugs to perform smoothing and noise reduction processing.

11. A pharmaceutical data processing device, characterized in that: The device comprises: A first data acquisition module is used to obtain target parameter data at the first moment of the drying process of the current batch of medicines, wherein the target parameters include parameters related to the moisture content of the medicines during the drying process; A first prediction module is configured to use a pre-trained drug moisture content prediction model to analyze and predict the target parameter data and output a prediction result; wherein the drug moisture content prediction model is a deep neural network model; A determination module is used to determine the moisture content data of the first drug at a first moment based on the prediction result.

12. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the pharmaceutical data processing method according to any one of claims 1 to 10 by executing the computer instructions.

Citation Information

Patent Citations

  • PVC moisture content prediction method based on LSTM deep recurrent neural network

    CN113241129A

  • Medicine drying control method and system

    CN116222198A

  • Air inlet amount control method and device in fluidized bed drying process

    CN117537599A

  • Method and device for judging drying end point of fluidized bed

    CN117760193A

  • Drying anomaly detection method

    CN117870763A