Traditional Chinese medicine production online detection method and quality control system

By integrating a six-way valve assembly and near-infrared spectroscopy technology, combined with isothermal quantification and data analysis, the problems of poor detection stability and low efficiency in the production process of traditional Chinese medicine have been solved, realizing low-consumption, high-efficiency online detection and adaptive quality control in the production process of traditional Chinese medicine.

CN122018475APending Publication Date: 2026-05-12ZHONGBEI UNIV
View PDF 13 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGBEI UNIV
Filing Date
2026-04-14
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In the production process of traditional Chinese medicine, existing online detection systems suffer from poor detection stability and low efficiency, which easily leads to waste. They also make it difficult to achieve real-time detection and adaptive quality control. Furthermore, near-infrared spectroscopy is susceptible to environmental interference, with severe spectral overlap, making it difficult to establish quantitative models.

Method used

A six-way valve assembly is used to switch fluid pathways. Combined with a constant temperature and quantitative unit, a drive and cleaning unit, a detection and circulation unit, and a control and data analysis unit, online quality control of traditional Chinese medicine production is achieved. Through real-time monitoring of near-infrared spectral data, a spectral-quality correlation model is established to dynamically adjust process parameters.

Benefits of technology

It enables low-consumption and high-efficiency online detection in the production process of traditional Chinese medicine, reduces environmental interference, improves detection stability and efficiency, realizes real-time monitoring and adaptive control of key quality attributes, and improves the quality consistency of the production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122018475A_ABST
    Figure CN122018475A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of detection and analysis control, and discloses a traditional Chinese medicine production online detection method and a quality control system.The system forms sampling circulation, constant-temperature quantitative circulation and detection circulation through channel switching of a six-way valve set, online collection, constant-temperature quantitative treatment and near infrared spectrum detection of liquid medicine are achieved, and the quality of the liquid medicine is improved. A quality analysis module and a control strategy module are embedded in the control and data analysis unit, and the quality analysis module outputs a key quality attribute real-time value after preprocessing the collected near infrared spectrum data; and the control strategy module dynamically adjusts process parameters to realize self-adaptive quality control in the production process. According to the invention, dynamic control of low-consumption and high-efficiency online detection and quality driving in the traditional Chinese medicine production process is realized, and the quality stability and uniformity of the product are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of detection, analysis, control and regulation technology, and particularly relates to a detection and regulation system in the production process of traditional Chinese medicine, specifically an online detection method and quality control system for traditional Chinese medicine production. Background Technology

[0002] Key quality attributes are important parameters for the quality of traditional Chinese medicine (TCM) production, and their detection methods are mostly sampling inspection or end-point testing. Currently, TCM production largely employs fixed process parameters, which, while improving production efficiency to some extent, still suffers from poor quality stability and uniformity in TCM products.

[0003] Currently, a small number of online detection systems have been applied to the production of traditional Chinese medicine, but they mainly rely on high-flow external circulation, resulting in a large number of samples collected for testing. However, the detection stability is poor and the efficiency is low, which can easily lead to product waste and is not conducive to the real-time detection and control of key quality attributes in the production process of traditional Chinese medicine.

[0004] In actual production processes, the production of traditional Chinese medicine (TCM) involves increasingly complex steps, making it difficult for traditional detection methods to meet the technical requirements of online monitoring in modern production. Non-contact analytical techniques, such as near-infrared spectroscopy, Raman spectroscopy, and mid-infrared spectroscopy, are gradually becoming widely adopted methods in online monitoring and represent an important direction for its development. However, in practical applications, the most suitable spectroscopic method must be selected based on the specific state of the material to ensure the quality of the obtained data. Near-infrared spectroscopy, with its advantages of non-invasiveness and rapid response, can perform qualitative and quantitative analysis of key quality attributes of TCM, demonstrating excellent application potential. Its diverse sampling methods also enhance its applicability in TCM production.

[0005] However, existing near-infrared spectroscopy technology still faces several technical bottlenecks in online detection of traditional Chinese medicine production, mainly in the following four aspects: I. Near-infrared spectroscopy is extremely sensitive to the online detection environment. Fluctuations in temperature and humidity, vibration, and ambient light interference can significantly affect the stability and signal-to-noise ratio of the spectral signal. Second, in order to ensure stable testing conditions, it is often necessary to maintain the solution in a relatively static state for a long time, which seriously restricts the efficiency of real-time testing. Third, due to the complexity of the components of traditional Chinese medicine and the severe spectral overlap between the components, it is difficult to establish a robust and transferable quantitative model, which makes it difficult to guarantee the prediction accuracy of key quality attributes. Fourth, there is currently no mature and reliable solution for achieving closed-loop control and adaptive optimization of process parameters based on near-infrared spectral data in terms of algorithm integration and engineering implementation.

[0006] Therefore, developing an online detection system for the production process of traditional Chinese medicine that is low-consumption, high-efficiency, highly adaptable, and capable of real-time detection and adaptive quality control has become an urgent technical problem to be solved in this field. Summary of the Invention

[0007] This invention addresses the problems of outdated and uncontrollable detection methods for key quality attributes in the current production of traditional Chinese medicine (TCM), low detection system efficiency, and waste. Furthermore, promising near-infrared online detection technology suffers from issues such as susceptibility to interference, high environmental requirements, difficulty in handling spectral overlap in complex TCM systems, difficulty in establishing robust and transferable quantitative models, and immature closed-loop control technology. Therefore, this invention provides an online detection method and quality control system for TCM production.

[0008] This invention is achieved using the following technical solution: This invention provides an online quality control system for traditional Chinese medicine production, comprising: A six-way valve manifold is used to switch different fluid paths under the action of a control signal; The sampling unit includes a production container, and the outlet and return inlet of the production container are connected to the fifth and sixth ports of the six-way valve assembly through sampling pipelines and circulation pipelines, respectively. The constant temperature quantitative unit is used to perform constant temperature quantitative processing of the drug solution, accurately control the volume and temperature of the test sample, and ensure that the drug solution in the loop maintains a constant temperature. It includes a constant temperature quantitative chamber with a fixed volume cavity. The inlet and outlet of the constant temperature quantitative chamber are connected to the first port and the fourth port of a six-way valve group, respectively. The inlet of the constant temperature quantitative chamber is equipped with a flow meter, and the constant temperature quantitative chamber is equipped with a constant temperature controller. The drive and cleaning unit provides driving force and system cleaning, including an eluent bottle. The outlet of the eluent bottle is connected to the third port of a six-way valve assembly via a distilled water pipe. A metering pump is installed on the distilled water pipe. The detection circulation unit is used to extract the drug solution and collect the near-infrared spectral data of the drug solution. It includes a flow cell, the inlet of which is connected to the second port of the six-way valve group, and the outlet of which is connected to a waste liquid tank. The flow cell is equipped with an optical fiber probe of a near-infrared spectrometer, which is immersed in the drug solution to collect near-infrared spectral data in real time. A temperature sensor is installed at the top of the flow cell to monitor the sample temperature in real time. The control and data analysis unit is used for system control, receiving and processing near-infrared spectral data, and outputting real-time data of key quality attributes. The control and data analysis unit is electrically connected to the six-way valve assembly, sampling unit, isothermal quantitative unit, drive and cleaning unit, and detection cycle unit. It includes an industrial control computer, which integrates a quality analysis module and a control strategy module. The quality analysis module calculates real-time values ​​of key quality attributes based on the near-infrared spectral data collected by the near-infrared spectrometer. The control strategy module outputs control signals based on the real-time values ​​of the key quality attributes to control the adjustment mechanism for the traditional Chinese medicine production process parameters. The control and data analysis unit is configured to control the switching of the six-way valve group to different path states to form sampling cycle, isothermal quantitative cycle, and detection cycle respectively.

[0009] Furthermore, the sampling cycle connects the fifth and sixth ports of the six-way valve assembly. The imported metering pump provides power for the extraction and circulation of the drug solution, the imported solenoid valve controls the flow of the drug solution, and the sampling solenoid valve collects the drug solution and places it into a sampling beaker for offline detection of the content of key quality attribute components of the drug solution by the staff. The constant temperature quantitative circulation system connects the sixth port and the first port of the six-way valve group, and the fourth port and the fifth port. That is, the temperature of the medicine liquid in the constant temperature quantitative chamber is adjusted by the constant temperature controller to achieve constant temperature control of the medicine liquid. The detection cycle involves connecting the third and fourth ports of the six-way valve assembly, as well as the first and second ports, to send a quantitative, temperature-controlled drug solution into the flow cell for near-infrared spectroscopy acquisition. Excess drug solution and the drug solution after testing are discharged into the waste liquid tank.

[0010] Furthermore, the six-way valve assembly includes a six-way valve body, and a port valve seat is installed at the front end inside the six-way valve body. The port valve seat has six ports in sequence along the circumference, namely the first port, the second port, the third port, the fourth port, the fifth port, and the sixth port. Each port is provided with an internal thread for connection with the pipeline. The main shaft is rotatably mounted inside the housing of the six-way valve via bearings. The front end of the main shaft has three flow grooves, each flow groove corresponding to two adjacent ports. Each flow groove is configured to connect to the two adjacent ports when the main shaft rotates to a preset angle, so that the six ports form three sets of connecting channels through the three flow grooves. The middle part of the spindle is equipped with a sealing ring in front of the bearing. The sealing ring is tightly fitted between the spindle and the inner wall of the six-way valve housing to achieve dynamic sealing when the spindle rotates. The six-way valve housing also contains a servo motor and a reducer. The servo motor is connected to the tail end of the spindle via the reducer and is used to drive the spindle to rotate in order to switch the connection state between the ports. A six-way valve controller is mounted on the outside of the six-way valve housing via a six-way valve bracket. The six-way valve controller is electrically connected to the servo motor and is used to receive control signals and drive the servo motor to rotate to a preset angle.

[0011] Furthermore, a straight-tube filter, an inlet solenoid valve, and an inlet metering pump are installed sequentially on the sampling pipeline. The straight-tube filter contains two layers of filter screens, with 100 mesh and 200 mesh respectively, which effectively filter impurities in the detection process. The inlet solenoid valve controls the opening and closing of the sampling unit and controls the flow of the drug solution. The inlet metering pump provides power for the extraction and circulation of the drug solution. The circulation pipeline is equipped with a branch pipe containing a sampling solenoid valve. The outlet of this branch pipe is connected to a sampling beaker for collecting the drug solution. Staff then perform offline testing of the content of key quality attributes of the drug solution. Online testing of the samples is conducted using this system.

[0012] Furthermore, the industrial control computer also integrates a database module to store near-infrared spectral data, key quality attribute data, process parameter data, and online detection and control data, which meets the functions of historical data backtracking and online analysis, and helps with quality supervision and review.

[0013] This invention also provides an online detection method for traditional Chinese medicine production using the above system, comprising the following steps: S1. Start the constant temperature quantitative chamber to the specified temperature, start the imported quantitative pump and imported solenoid valve to inject the drug solution into the constant temperature quantitative chamber, open the sampling solenoid valve. After the constant temperature quantitative chamber is filled, the drug solution flows into the sampling beaker. The initial portion of the drug solution is not representative and should be discarded. After the drug solution stabilizes, take the sample to complete the offline drug solution sampling and obtain the offline sample. Subsequently, simultaneously acquire the near-infrared spectrum and high-performance liquid chromatography data of the offline sample, and establish a corresponding relationship model for data measurement and correspondence. The specific steps include: After filtering, the offline samples were divided into two portions, each sealed, and labeled with the batch, time, and specifications of the samples. The two portions of offline samples were used to collect near-infrared spectral data and high-performance liquid chromatography data, respectively. A reference solution was prepared as a standard, a concentration gradient was set, and high-performance liquid chromatography (HPLC) data were collected at different concentration gradients. Chromatograms were recorded according to the chromatographic conditions. A standard curve was plotted with the peak area of ​​the standard as the ordinate and the concentration of the standard solution as the abscissa. The correlation coefficient was determined, and then key quality attributes were measured and correlated with near-infrared spectral data. The correlation between the content and the corresponding near-infrared spectral data was completed, and the established spectral-quality correlation model was input into the database module for use in the control strategy module.

[0014] S2, shut off the inlet metering pump and the inlet solenoid valve, and monitor and regulate the temperature of the medicine solution in the constant temperature metering chamber through the constant temperature controller. Once the set temperature is reached, the metering and constant temperature process is completed.

[0015] S3. Start the detection pump to inject distilled water from the elution solvent bottle into the constant temperature quantitative chamber, pushing the drug solution in the constant temperature quantitative chamber into the flow cell. Start the near-infrared spectrometer to collect online near-infrared spectral data. The setting parameters for the online near-infrared spectral data acquisition process are exactly the same as those for offline sample near-infrared spectrum acquisition, that is, the data acquisition optical path, scanning speed, and number of repeated tests are exactly the same, thus completing the online drug solution detection.

[0016] S4, the quality analysis module in the industrial control computer receives online near-infrared spectral data, processes it, and outputs real-time values ​​of key quality attributes; The processing of near-infrared spectral data includes the following steps: S41, Perform cubic Hermite spline interpolation (CHSI) preprocessing on the online near-infrared spectral data, and use the preprocessed online sample spectral data as the training input sample of VAE (variational autoencoder); S42, take the near-infrared spectral data of the offline samples corresponding to the online near-infrared spectral data, and input them together with the online sample spectral data preprocessed in step S41 and the preset loss function into the VAE for training to obtain the trained VAE generation model. S43. Input the online near-infrared spectral data from the test dataset into the trained VAE generative model to obtain generated near-infrared spectral data. Input the generated near-infrared spectral data into the PLS (partial least squares) regression layer for predicting key quality attributes to obtain the predicted values ​​of key quality attributes. S44. Preprocess the offline near-infrared spectral data in the test dataset using ridge regression (RR), then input it into the PLS regression layer, determine the optimal model parameters based on the results, and obtain the prediction results of key quality attributes. S45. Store the key quality attribute prediction results obtained in step S44 into the database module for the control strategy module to call to adjust the parameters of traditional Chinese medicine production process.

[0017] S5, the control strategy module in the industrial control computer generates control signals based on the real-time values ​​of key quality attributes and references data in the database module, and controls the adjustment mechanism of the traditional Chinese medicine production process parameters to dynamically adjust the process parameters.

[0018] S6. After data acquisition, inject the distilled water from the elution solvent bottle into the constant temperature quantitative chamber. Use the distilled water from the elution solvent bottle to rinse the constant temperature quantitative chamber and flow cell. Push the waste liquid into the waste liquid pool to ensure the accuracy of the next test.

[0019] Compared with the prior art, the present invention has the following beneficial effects: This invention provides an online detection method and quality control system for traditional Chinese medicine (TCM) production. It utilizes a six-way valve assembly to achieve rapid switching between multiple cycles, offering flexible switching, reducing the amount of medicinal sample, and lowering the risk of contamination during production. This achieves a low-consumption and high-efficiency online detection system for TCM. A constant-temperature quantitative chamber precisely controls the temperature and volume of the sample, and it efficiently and with low consumption acquires near-infrared spectral data during TCM production. Combined with a quality analysis module, it effectively suppresses environmental interference with the spectral signal, obtaining real-time production quality data. Through a control strategy module, it achieves quality-driven process control of the production process, forming a safe, reliable, and high-quality dynamic control system for the production process.

[0020] The online detection method for traditional Chinese medicine production of the present invention is characterized by low consumption, high efficiency and flexible use. It is not only applicable to different production processes of traditional Chinese medicine, but also enables online detection of multiple components. Furthermore, it can reduce the interference of detection equipment on the production process and solve the problems of poor stability, low efficiency, waste and difficulty in control during the detection process.

[0021] The online quality control system for traditional Chinese medicine production of this invention uses real-time data of key quality attributes to adaptively control the production process, effectively improving the original fixed-time control strategy, greatly improving production efficiency and consistency of production process quality, accurately realizing the real-time collection, quantification and detection of medicinal liquid samples during the extraction process of traditional Chinese medicine, realizing real-time monitoring of key quality attributes in the production process of traditional Chinese medicine, and realizing dynamic control of general systems for quality-driven traditional Chinese medicine production based on online key quality attribute data. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the structure prepared according to the present invention.

[0023] Figure 2 This is a schematic diagram of the constant temperature quantitative chamber in this invention.

[0024] Figure 3 This is a perspective view of the flow cell in this invention.

[0025] Figure 4 This is a schematic diagram of the six-way valve assembly in this invention.

[0026] Figure 5 This is a cross-sectional schematic diagram of the six-way valve assembly in this invention.

[0027] Figure 6 This is a diagram of the algorithm model of the present invention.

[0028] Figure 7 This is the near-infrared spectrum of Example 2.

[0029] Figure 8 This is the near-infrared spectral processing diagram of Example 2.

[0030] Figure 9 This is a flowchart of the key quality attribute detection process in Example 2.

[0031] Figure 10 This is a flowchart illustrating the control of key process parameters during the production process in Example 2.

[0032] Figure 11 This is a flowchart of the key process parameter control strategy for Example 2.

[0033] In the diagram: 1. Production container; 2. Straight-tube filter; 3. Inlet solenoid valve; 4. Inlet metering pump; 5. Six-way valve assembly; A. First port; B. Second port; C. Third port; D. Fourth port; E. Fifth port; F. Sixth port; 501. Servo motor; 502. Reducer; 503. Six-way valve controller; 504. Six-way valve bracket; 505. Port valve seat; 506. Six-way valve housing; 507. Main shaft; 508. Bearing; 509. Flow channel; 510. Sealing ring; 6. Sampling solenoid valve; 7. Sampling beaker; 8. Constant temperature metering chamber; 9. Constant temperature controller; 10. Detection metering pump; 11. Elution solvent bottle; 12. Flow cell; 1201. Inlet; 1202. Temperature sensor; 1203. Outlet; 13. Waste liquid pool; 14. Near-infrared spectrometer; 1401. Fiber optic probe; 15. Industrial control computer. Detailed Implementation

[0034] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings. Example 1

[0035] An online quality control system for traditional Chinese medicine production, such as Figures 1-6 As shown, it includes: The six-way valve assembly 5 is used to switch different fluid paths under the action of a control signal; specifically, such as... Figure 4 , 5 As shown in the figure, the servo motor 501 and the reducer 502 are connected in a common way in the prior art. The figure is only for positional illustration. The six-way valve group 5 includes a six-way valve body 506. A port valve seat 505 is installed at the front end inside the six-way valve body 506. There are six ports along the circumference of the port valve seat 505, namely the first port A, the second port B, the third port C, the fourth port D, the fifth port E, and the sixth port F. Each port is provided with an internal thread for connection with the pipeline. A main shaft 507 is rotatably mounted inside the six-way valve housing 506 via a bearing 508. The front end of the main shaft 507 has three flow grooves 509, each corresponding to two adjacent ports. Each flow groove 509 is configured to connect to the two adjacent ports when the main shaft 507 rotates to a preset angle, thus forming three sets of connecting channels through the three flow grooves 509. In this embodiment, the six-way valve group 5 has two pathway states: the first state connects the first port A and the second port B, the third port C and the fourth port D, and the fifth port E and the sixth port F; the second state connects the sixth port F and the first port A, the second port B and the third port C, and the fourth port D and the fifth port E. A sealing ring 510 is annularly mounted in the middle of the main shaft 507, located in front of the bearing 508. The sealing ring 510 is tightly fitted between the main shaft 507 and the inner wall of the six-way valve housing 506 to achieve dynamic sealing when the main shaft 507 rotates. The six-way valve housing 506 is also equipped with a servo motor 501 and a reducer 502. The servo motor 501 is connected to the tail end of the spindle 507 through the reducer 502 and is used to drive the spindle 507 to rotate in order to switch the connection state between the ports. A six-way valve controller 503 is mounted on the outside of the six-way valve housing 506 via a six-way valve bracket 504. The six-way valve controller 503 is electrically connected to the servo motor 501 and is used to receive control signals and send drive signals to drive the servo motor 501 to rotate to a preset angle.

[0036] The sampling unit includes a production container 1, which can be an extraction tank, a concentration tank, an alcohol precipitation tank, etc., depending on the actual production. It contains the medicinal liquid from the Chinese medicine production process. The medicinal liquid generally has the characteristics of being a mixed solution containing impurity particles and bubbles. During the production process, the temperature of the medicinal liquid usually fluctuates drastically between 15 and 100°C. The outlet and return inlet of production container 1 are connected to the fifth port E and the sixth port F of six-way valve group 5 through sampling pipeline and circulation pipeline, respectively. In this embodiment, the pipeline is made of stainless steel pipe. A straight cylinder filter 2, an inlet solenoid valve 3, and an inlet metering pump 4 are installed in sequence on the sampling pipeline. The straight cylinder filter 2 contains two layers of filter screen, which are 100 mesh and 200 mesh respectively. The middle and lower layers of the production container are also equipped with filter screens, which work together with the straight cylinder filter 2 to effectively filter impurities in the detection process. The inlet solenoid valve 3 controls the opening and closing of the sampling unit, and the inlet metering pump 4 provides power to the sampling unit. A branch pipe is installed on the circulation pipeline, which is equipped with a sampling solenoid valve 6, and a sampling beaker 7 is connected to the outlet of the branch pipe.

[0037] The isothermal quantitative unit is used for isothermal quantitative processing of drug solutions, such as... Figure 2As shown, the thermostatic metering chamber 8 includes an inner cavity with a fixed volume. The inlet and outlet of the thermostatic metering chamber 8 are respectively connected to the first port A and the fourth port D of the six-way valve group 5. A flow meter is provided at the inlet of the thermostatic metering chamber 8, and a thermostatic controller 9 is provided on the thermostatic metering chamber 8.

[0038] The drive and cleaning unit, used to provide driving force and system cleaning, includes an elution solvent bottle 11. The outlet of the elution solvent bottle 11 is connected to the third port C of the six-way valve group 5 via a distilled water pipe and an industrial control computer 15. A detection metering pump 10 is installed on the distilled water pipe.

[0039] The detection circulation unit is used to extract the drug solution and collect its near-infrared spectral data, such as... Figure 3 As shown, the system includes a flow cell 12, with the inlet 1201 of the flow cell 12 connected to the second port B of the six-way valve assembly 5. The outlet 1203 of the flow cell 12 is connected to a waste liquid tank 13. The flow cell 12 is equipped with an optical fiber probe 1401 of a near-infrared spectrometer 14, which is immersed in the drug solution. A temperature sensor 1202 is provided at the top of the flow cell 12.

[0040] The control and data analysis unit is used for system control, receiving and processing near-infrared spectral data, and outputting real-time data of key quality attributes. The control and data analysis unit is electrically connected to the six-way valve group 5, the sampling unit, the constant temperature quantitative unit, the drive and cleaning unit, and the detection cycle unit. It includes an industrial control computer 15, which integrates a quality analysis module and a control strategy module. The quality analysis module is used to calculate the real-time values ​​of key quality attributes based on the near-infrared spectral data collected by the near-infrared spectrometer 14. The control strategy module is used to output control signals based on the real-time values ​​of key quality attributes to control the adjustment mechanism of the traditional Chinese medicine production process parameters.

[0041] Preferably, the industrial computer 15 also integrates a database module for storing near-infrared spectral data, key quality attribute data, process parameter data, and online detection and control data, which meets the functions of historical data backtracking and online analysis and helps with quality supervision and review.

[0042] The control and data analysis unit is configured to control the switching of the six-way valve group 5 to different path states to form sampling cycle, constant temperature quantitative cycle, and detection cycle respectively.

[0043] Specifically, the sampling cycle connects the fifth port E and the sixth port F of the six-way valve assembly 5. During the sampling cycle, liquid medicine is drawn from production container 1, filtered by the straight-tube filter 2, and then returned to ensure that the liquid medicine entering subsequent units is representative. Under the action of the inlet metering pump 4, the liquid medicine in production container 1 flows out from the outlet, enters the fifth port E of the six-way valve assembly 5 through the sampling pipeline, and enters the circulation pipeline from the sixth port F. Part of the liquid medicine returns to the return inlet of production container 1 through the circulation pipeline, while the remaining liquid medicine enters the sampling beaker 7 through the sampling solenoid valve 6 via a branch pipe in the circulation pipeline, completing the manual sampling.

[0044] The constant-temperature quantitative circulation system connects the sixth port F and the first port A of the six-way valve group 5, and the fourth port D and the fifth port E. The liquid medicine is introduced into the constant-temperature quantitative chamber 8, and the temperature of the liquid medicine is stabilized at the set value, achieving constant temperature control of the liquid medicine. Under constant-temperature quantitative circulation, the liquid medicine in the sampling pipeline enters from the sixth port F of the six-way valve group 5 and flows out from the first port A, entering the constant-temperature quantitative chamber 8 for heating or cooling. Simultaneously, the temperature of the liquid medicine is monitored and adjusted by the constant-temperature controller 9. After the constant-temperature controller 9 is full, the liquid medicine flows out through the fourth port D and the fifth port E of the six-way valve group 5, returning to the production container 1 via the circulation pipeline, or flowing into the sampling beaker 7 via the branch pipe and the sampling solenoid valve 6.

[0045] The detection cycle involves connecting the third port C and the fourth port D of the six-way valve group 5, and connecting the first port A and the second port B. The constant-temperature quantitative liquid is pushed out from the constant-temperature quantitative box 8 and sent to the flow cell 12 for near-infrared spectroscopy detection. After the detection is completed, the waste liquid is discharged into the waste liquid pool 13. During the detection cycle, the detection metering pump 10 is started. Driven by the detection metering pump 10, the distilled water in the elution solvent bottle 11 enters the third port C of the six-way valve group 5 through the distilled water pipe and flows out from the fourth port D, entering the inlet of the constant temperature metering chamber 8. The injection of distilled water pushes the constant temperature drug solution in the constant temperature metering chamber 8 out. The drug solution flows out from the second port B through the first port A of the six-way valve group 5 and enters the flow cell 12 of the detection cycle unit. The drug solution immerses the fiber optic probe 1401. At this time, the near-infrared spectrometer 14 collects the near-infrared spectral data of the drug solution through the fiber optic probe 1401, and the temperature sensor 1202 monitors the temperature of the drug solution simultaneously. After the spectral acquisition is completed, the detection metering pump 10 continues to run, and distilled water is continuously injected to push the drug solution in the flow cell 12 into the outlet. At the same time, it is cleaned to ensure that there is no drug solution residue. The cleaning waste liquid is discharged into the waste liquid pool 13. After the cleaning is completed, the detection metering pump 10 is turned off, and the detection cycle ends. Example 2

[0046] An online detection method for traditional Chinese medicine production includes the following steps: S1. Start the constant temperature quantitative chamber 8 to the specified temperature, start the imported quantitative pump 4 and the imported solenoid valve 3 to inject the drug solution into the constant temperature quantitative chamber 8, open the sampling solenoid valve 6, after the constant temperature quantitative chamber 8 is filled, the drug solution flows into the sampling beaker 7. The initial part of the drug solution is not representative and should be discarded. After the drug solution stabilizes, take the sample to complete the offline drug solution sampling and obtain the offline sample; then, simultaneously collect the near-infrared spectrum and high performance liquid chromatography data of the offline sample, and establish a corresponding relationship model for data measurement and correspondence, which specifically includes the following steps: After filtering, the offline samples were divided into two portions, each sealed, and labeled with the batch, time, and specifications of the samples. The two portions of offline samples were used to collect near-infrared spectral data and high-performance liquid chromatography data, respectively. Prepare a standard solution as a reference standard and set a concentration gradient. The concentration gradient of the standard solution is 0.0025 mg / mL, 0.005 mg / mL, 0.0125 mg / mL, 0.025 mg / mL, 0.05 mg / mL, 0.125 mg / mL, 0.25 mg / mL, and 0.375 mg / mL. Collect high-performance liquid chromatography (HPLC) data at different concentration gradients, record chromatograms according to the chromatographic conditions, plot a standard curve with the peak area of ​​the standard solution as the ordinate and the concentration of the standard solution as the abscissa, determine the correlation coefficient, measure key quality attributes, and correlate them with near-infrared spectral data. Input the data into the database module for use in the control strategy module.

[0047] S2, shut off the inlet metering pump 4 and the inlet solenoid valve 3, and monitor and regulate the temperature of the liquid medicine in the constant temperature metering chamber 8 through the constant temperature controller 9. Once the set temperature is reached, the metering and constant temperature process is completed.

[0048] S3. Start the detection quantitative pump 10, inject the distilled water in the elution solvent bottle 11 into the constant temperature quantitative chamber 8, push the drug solution in the constant temperature quantitative chamber 8 into the flow cell 12, start the near-infrared spectrometer 14, and collect online near-infrared spectral data. The setting parameters of the online near-infrared spectral data acquisition process are exactly the same as those of the offline sample near-infrared spectrum acquisition, that is, the data acquisition optical path, scanning speed, and number of repeated tests are exactly the same, and the online drug solution detection is completed.

[0049] At this time, during online drug solution detection, the amount of drug solution in the flow cell 12 only needs to cover the fiber optic probe 1401 of the infrared spectrometer 14 to complete the detection. Only a small portion needs to be drawn from the constant temperature quantitative chamber 8 for detection. That is, the amount of constant temperature drug solution contained in the constant temperature quantitative chamber 8 is much greater than the amount of drug solution discharged from the constant temperature quantitative chamber 8 for detection. Preferably, the amount of constant temperature drug solution contained in the constant temperature quantitative chamber 8 is more than 5 times the amount of drug solution discharged from the constant temperature quantitative chamber 8 for detection. In other words, the amount of constant temperature drug solution contained in the constant temperature quantitative chamber 8 is much greater than the volume of distilled water from the elution solvent bottle 11. Therefore, the drug solution dilution and temperature change caused by the injection of distilled water into the constant temperature quantitative chamber 8 are ignored. At the same time, since the flow path between the constant temperature quantitative chamber 8 and the flow cell 12 is short, the temperature change of the drug solution from the constant temperature quantitative chamber 8 to the flow cell 12 is ignored.

[0050] S4, the quality analysis module inside the industrial control computer 15 receives online near-infrared spectral data, processes it, and outputs real-time values ​​of key quality attributes.

[0051] Among them, such as Figures 6-9 As shown, processing near-infrared spectral data includes the following steps: S41, Perform cubic Hermite spline interpolation (CHSI) preprocessing on the online near-infrared spectral data, and use the preprocessed online sample spectral data as the training input sample of VAE (variational autoencoder); S42, take the near-infrared spectral data of the offline samples corresponding to the online near-infrared spectral data, and input them together with the online sample spectral data preprocessed in step S41 and the preset loss function into the VAE for training to obtain the trained VAE generation model. S43. Input the online near-infrared spectral data from the test dataset into the trained VAE generative model to obtain generated near-infrared spectral data. Input the generated near-infrared spectral data into the PLS (partial least squares) regression layer for predicting key quality attributes to obtain the predicted values ​​of key quality attributes. S44. Preprocess the offline near-infrared spectral data in the test dataset using ridge regression (RR), then input it into the PLS regression layer, determine the optimal model parameters based on the results, and obtain the prediction results of key quality attributes. S45. Store the key quality attribute prediction results obtained in step S44 into the database module for the control strategy module to call to adjust the parameters of traditional Chinese medicine production process.

[0052] S5, the control strategy module within the industrial control computer 15 generates control signals based on the real-time values ​​of key quality attributes and references data from the database module, thereby controlling the process parameter adjustment mechanism of the traditional Chinese medicine production equipment and dynamically adjusting the process parameters.

[0053] S6. After data acquisition, distilled water from the elution solvent bottle 11 is injected into the constant temperature quantitative chamber 8. The constant temperature quantitative chamber 8 and the flow cell 12 are rinsed with the distilled water from the elution solvent bottle 11. The waste liquid is pushed into the waste liquid pool 13 to ensure the accuracy of the next test.

[0054] At this point, the amount of distilled water from the elution solvent bottle 11 is greater than the capacity of the constant temperature quantitative chamber 8, so all the drug solution from the previous test is pushed out, and the waste liquid is completely rinsed to avoid cross-contamination of the drug solution.

[0055] Specifically, in this embodiment, the production container 1 is an extraction tank, which is the core device in the extraction process of traditional Chinese medicine production. During the production process, the outlet of the industrial park's steam main pipe is connected to the inlet of the steam regulating valve through a pipeline. The high-pressure steam supplied by the industrial park's steam main pipe provides energy. The steam regulating valve controls the pressure of the high-temperature steam in the jacket, thereby controlling the heating rate of the extraction tank. The outlet of the steam regulating valve is connected to the steam inlet of the jacket through a pipeline. The jacket covers the outside of the extraction tank body, and the inside of the jacket is heated by high-temperature steam. The steam outlet at the top of the extraction tank is connected to the heat medium inlet of the condenser tube through a pipeline. The heat medium outlet of the condenser tube is connected to the return port of the extraction tank through a pipeline, so that the condensed droplets flow back into the tank body. The heated medicinal liquid vapor in the extraction tank passes through the condenser tube, and after being cooled by circulating water, the condenser tube forms droplets that flow back into the tank body, reducing the loss of medicinal liquid in the extraction tank.

[0056] Specifically, the control structure of an online quality control system is as follows: Figure 10 As shown.

[0057] When the control system starts running, the traditional Chinese medicine production process model is imported. The production process model is represented as follows: In the formula: Indicates the concentration of key quality attributes. ; , Indicates production time. Indicates the liquid level of the extraction tank. Indicates the jacket steam pressure. Indicates the temperature of the circulating water. This indicates the temperature of the medicinal solution inside the extraction tank. Indicates the temperature of the main steam pipe. This indicates the pressure in the main steam pipe. This indicates the pressure inside the extraction tank; The number of base learners.

[0058] The industrial computer 15 receives real-time data on key quality attributes and controls production by using the difference between the key quality attributes detected online and those output by the production process model. The controller can be a steam regulating valve, heating power, etc. The specific algorithm is as follows: In the formula, for Key quality attributes for controlling model output over time. The time interval for real-time acquisition of process parameters is 1 second. for Rapid detection values ​​of key quality attributes online over time. The online key quality attribute rapid detection time is 1 minute.

[0059] The controller parameters are set as follows: In the formula, These are key process parameter values; These are the initial settings for key process parameters; This is a proportional parameter, determined by the influence weights of different key quality attributes.

[0060] The process flow of endpoint control strategy in the production of traditional Chinese medicine is as follows: Figure 11 As shown below: 1. Maximum extraction time: Set according to the production process time in the Pharmacopoeia of the People's Republic of China (2020 edition).

[0061] 2. Minimum extraction time: Set according to the minimum value of the key quality attributes of the specified Chinese medicine variety, based on the Pharmacopoeia of the People's Republic of China (2020 edition).

[0062] Key process parameter control procedures during production, such as Figure 10 As shown below: 1. Set the range of key quality attribute indicators according to the process requirements of designated varieties of traditional Chinese medicine; 2. Utilize the key quality attributes output by the control model based on the various process parameter data measured by sensors. Using an online NIR detection system, rapid online detection values ​​of key quality attributes are output. Set key process parameter values ; 3. Utilize endpoint determination strategies in traditional Chinese medicine production to set key process parameters. ; 4. Combine historical process control parameters of the specified Chinese herbal medicine varieties to ensure stable production process.

[0063] The scope of protection claimed by this invention is not limited to the specific embodiments described above. Moreover, for those skilled in the art, this invention can have various modifications and alterations. Any modifications, improvements, and equivalent substitutions made within the concept and principles of this invention should be included within the scope of protection of this invention.

Claims

1. An online quality control system for traditional Chinese medicine production, characterized in that, include: A six-way valve assembly (5) is used to switch different fluid paths under the action of a control signal; The sampling unit includes a production container (1), the outlet and the return inlet of the production container (1) are respectively connected to the fifth port (E) and the sixth port (F) of the six-way valve group (5) through a sampling pipeline and a circulation pipeline; The constant temperature quantitative unit is used to perform constant temperature quantitative processing of the liquid medicine. It includes a constant temperature quantitative box (8) with a fixed volume inner cavity. The inlet and outlet of the constant temperature quantitative box (8) are respectively connected to the first port (A) and the fourth port (D) of the six-way valve group (5). The inlet of the constant temperature quantitative box (8) is equipped with a flow meter, and the constant temperature quantitative box (8) is equipped with a constant temperature controller (9). A drive and cleaning unit for providing driving force and system cleaning includes an elution solvent bottle (11), the outlet of which is connected to the third port (C) of a six-way valve assembly (5) via a distilled water pipe, and a detection metering pump (10) is installed on the distilled water pipe. The detection circulation unit is used to draw out the liquid medicine and collect the near-infrared spectral data of the liquid medicine. It includes a flow cell (12), the inlet (1201) of the flow cell (12) is connected to the second port (B) of the six-way valve group (5), the outlet of the flow cell (12) is connected to the waste liquid pool (13), the fiber optic probe (1401) of the near-infrared spectrometer (14) is provided in the flow cell (12), the fiber optic probe (1401) is immersed in the liquid medicine, and a temperature sensor (1202) is provided on the upper part of the flow cell (12). The control and data analysis unit is used for system control, receiving and processing near-infrared spectral data, and outputting real-time data of key quality attributes. The control and data analysis unit is electrically connected to the six-way valve group (5), sampling unit, constant temperature quantitative unit, drive and cleaning unit, and detection cycle unit, respectively. It includes an industrial control computer (15), which integrates a quality analysis module and a control strategy module. The quality analysis module is used to calculate the real-time value of key quality attributes based on the near-infrared spectral data collected by the near-infrared spectrometer (14). The control strategy module is used to output control signals based on the real-time value of key quality attributes to control the adjustment mechanism of the Chinese medicine production process parameters. The control and data analysis unit is configured to control the switching of the six-way valve group (5) to different path states to form sampling cycle, constant temperature quantitative cycle and detection cycle respectively.

2. The online quality control system for traditional Chinese medicine production according to claim 1, characterized in that, The sampling cycle is achieved by connecting the fifth port (E) and the sixth port (F) of the six-way valve assembly (5); The constant temperature quantitative circulation is achieved by connecting the sixth port (F) and the first port (A) of the six-way valve group (5), and connecting the fourth port (D) and the fifth port (E); The detection cycle is such that the third port (C) and the fourth port (D) of the six-way valve assembly (5) are connected, and the first port (A) and the second port (B) are connected.

3. The online quality control system for traditional Chinese medicine production according to claim 1, characterized in that, The six-way valve assembly (5) includes a six-way valve housing (506), and a port valve seat (505) is installed at the front end inside the six-way valve housing (506). The port valve seat (505) has six ports in sequence along the circumference, namely the first port (A), the second port (B), the third port (C), the fourth port (D), the fifth port (E), and the sixth port (F). The main shaft (507) is rotatably mounted inside the housing (506) of the six-way valve via a bearing (508). The front end of the main shaft (507) has three flow grooves (509). Each flow groove (509) corresponds to two adjacent ports, and each flow groove (509) is configured to connect the two adjacent ports when the main shaft (507) rotates to a preset angle, so that the six ports form three sets of connecting channels through the three flow grooves (509). The middle part of the main shaft (507) is located in front of the bearing (508) and is fitted with a sealing ring (510). The sealing ring (510) is tightly fitted between the main shaft (507) and the inner wall of the six-way valve housing (506) to achieve dynamic sealing when the main shaft (507) rotates. The six-way valve housing (506) is also equipped with a servo motor (501) and a reducer (502). The servo motor (501) is connected to the tail end of the main shaft (507) through the reducer (502) to drive the main shaft (507) to rotate in order to switch the connection state between the ports. A six-way valve controller (503) is mounted on the outside of the six-way valve housing (506) via a six-way valve bracket (504). The six-way valve controller (503) is electrically connected to the servo motor (501) and is used to receive control signals and drive the servo motor (501) to rotate to a preset angle.

4. The online quality control system for traditional Chinese medicine production according to claim 1, characterized in that, The sampling pipeline is sequentially equipped with a cylindrical filter (2), an inlet solenoid valve (3), and an inlet metering pump (4). The cylindrical filter (2) contains two layers of filter screens, which are 100 mesh and 200 mesh respectively. The circulation pipeline is provided with a branch pipe for installing the sampling solenoid valve (6), and the outlet of the branch pipe is connected to a sampling beaker (7).

5. The online quality control system for traditional Chinese medicine production according to claim 1, characterized in that, The industrial control computer (15) also integrates a database module for storing near-infrared spectral data, key quality attribute data, process parameter data, and online detection and control data.

6. A method for online detection in traditional Chinese medicine production using the online quality control system for traditional Chinese medicine production as described in claim 5, characterized in that, Includes the following steps: S1, inject the drug solution into the constant temperature quantitative box (8), open the sampling solenoid valve (6), after the constant temperature quantitative box (8) is filled, the drug solution flows into the sampling beaker (7) to complete the offline drug solution sampling, obtain the offline sample, and simultaneously collect the near-infrared spectrum and high performance liquid chromatography data of the offline sample, and establish a corresponding relationship model; S2, close the inlet metering pump (4) and the inlet solenoid valve (3), and monitor and regulate the temperature of the liquid in the thermostat (8) through the thermostat controller (9). Once the set temperature is reached, the metering thermostat process is completed. S3, start the detection quantitative pump (10), inject the distilled water in the elution solvent bottle (11) into the constant temperature quantitative chamber (8), push the drug solution in the constant temperature quantitative chamber (8) into the flow cell (12), start the near-infrared spectrometer (14), collect online near-infrared spectral data. The setting parameters of the online near-infrared spectral data acquisition process are exactly the same as those when collecting near-infrared spectra of offline samples, and complete the online drug solution detection. S4, the quality analysis module in the industrial computer (15) receives online near-infrared spectral data, processes it and outputs the real-time values ​​of key quality attributes; S5, the control strategy module in the industrial control computer (15) generates control signals based on the real-time values ​​of key quality attributes, referencing the data in the database module, and controls the adjustment mechanism of the process parameters of traditional Chinese medicine production to dynamically adjust the process parameters. S6. After data acquisition, distilled water from the elution solvent bottle (11) is injected into the constant temperature quantitative chamber (8). The constant temperature quantitative chamber (8) and flow cell (12) are rinsed with distilled water from the elution solvent bottle (11). The waste liquid is pushed into the waste liquid pool (13) to ensure the accuracy of the next test.

7. The online detection method for traditional Chinese medicine production according to claim 6, characterized in that, In step S1, near-infrared spectroscopy and high-performance liquid chromatography data of offline samples are collected, and a corresponding relationship model is established. This specifically includes the following steps: The offline samples were filtered and divided into two portions, each sealed. The two portions of offline samples were used to collect near-infrared spectral data and high-performance liquid chromatography data, respectively. Prepare a standard solution as a standard, set a concentration gradient, and collect high-performance liquid chromatography (HPLC) data at different concentration gradients. Record chromatograms according to the chromatographic conditions. Plot a standard curve with the peak area of ​​the standard solution as the ordinate and the concentration of the standard solution as the abscissa. Determine the correlation coefficient, measure the key quality attributes, and correlate them with near-infrared spectral data. Input the data into the database module for use in the control strategy module.

8. The online detection method for traditional Chinese medicine production according to claim 7, characterized in that, The concentration gradient of the standard solution is 0.0025 mg / mL, 0.005 mg / mL, 0.0125 mg / mL, 0.025 mg / mL, 0.05 mg / mL, 0.125 mg / mL, 0.25 mg / mL, and 0.375 mg / mL.

9. The online detection method for traditional Chinese medicine production according to claim 7, characterized in that, In step S4, the processing of near-infrared spectral data includes the following steps: S41, Perform three Hermite spline interpolation preprocessing on the online near-infrared spectral data, and use the preprocessed online sample spectral data as the training input sample for VAE; S42, take the near-infrared spectral data of the offline samples corresponding to the online near-infrared spectral data, and input them together with the online sample spectral data preprocessed in step S41 and the preset loss function into the VAE for training to obtain the trained VAE generation model. S43. Input the online near-infrared spectral data from the test dataset into the trained VAE generative model to obtain generated near-infrared spectral data. Input the generated near-infrared spectral data into the PLS regression layer for predicting key quality attributes to obtain the predicted values ​​of key quality attributes. S44. The offline near-infrared spectral data in the test dataset is preprocessed by ridge regression, and then input into the PLS regression layer. The optimal model parameters are determined by the results to obtain the prediction results of key quality attributes. S45. Store the key quality attribute prediction results obtained in step S44 into the database module for the control strategy module to call to adjust the parameters of traditional Chinese medicine production process.