A rapid detection system and method for harmful components in traditional Chinese medicine.

By combining a high-frame-rate micro-spectral probe array with 5G-MEC edge computing, a rapid detection system for harmful components in Chinese medicinal materials was constructed, solving the problems of full-process monitoring and detection accuracy in the detection of Chinese medicinal materials, and realizing efficient and real-time quality control.

CN120831333BActive Publication Date: 2025-12-02SANYUE MEDICAL HEALTH PRODS NANTONG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511317072.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-12-02
Estimated Expiration
2045-09-16

AI Technical Summary

Technical Problem

Harmful components remain in Chinese medicinal materials during planting, processing and storage. Traditional detection methods are complicated to operate, have long detection cycles and are difficult to monitor the entire process. Component detection is disconnected from the production process and complex processing technology interferes with the accuracy of detection.

Method used

Non-contact scanning is achieved by using a high frame rate micro-spectral probe array combined with 5G-MEC edge computing. Through multi-source data fusion, process interference compensation and real-time feedback modules, a dynamic sample library and coupling matrix are constructed. Data purification and early warning are performed using an improved ant colony algorithm and deep adversarial generative network. A three-dimensional component distribution map is generated in real time and the detection model is optimized.

Benefits of technology

It has achieved continuous monitoring of harmful components in Chinese medicinal materials throughout the entire process, improved detection coverage, achieved detection accuracy of over 95%, and the process adjustment parameter set can be fed back within 10 seconds, forming a closed-loop quality control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120831333B_ABST
    Figure CN120831333B_ABST
Patent Text Reader

Abstract

This invention discloses a rapid detection system and method for harmful components in traditional Chinese medicine, relating to the field of medicinal material analysis technology. It achieves continuous monitoring throughout the entire process through a high-frame-rate miniature spectral probe array, and generates a three-dimensional component distribution map in real time using 5G-MEC edge computing. An improved ant colony algorithm is employed to construct a spectral-process coupling matrix, and millisecond-level evaluation is achieved through the component migration index Qm. The OPC-UA protocol ensures the process adjustment parameter set ΔT is adjusted and fed back. A noise feature library is established using a deep adversarial generative network, wavelet packet decomposition extracts purified spectral data, and an interference compensation factor Rb combined with a Bayesian probability model dynamically corrects detection bias. A stochastic gradient descent algorithm continuously optimizes model parameters, achieving a detection accuracy of over 95% at different process stages, forming a closed-loop quality control system for the entire process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medicinal material analysis technology, specifically to a rapid detection system and method for harmful components in traditional Chinese medicinal materials. Background Technology

[0002] Traditional Chinese medicinal herbs are widely used in the field of traditional Chinese medicine due to their unique therapeutic effects. However, due to factors such as planting, processing, and storage, they often contain harmful residues such as pesticide residues, heavy metals, and sulfur fumigation products, threatening drug safety and consumer health. Traditional detection methods, such as gas chromatography and mass spectrometry, while highly sensitive, are complex to operate, have long detection cycles, and require demanding experimental environments. To improve detection efficiency and accuracy, there is an urgent need to construct an integrated and intelligent detection system for harmful components in traditional Chinese medicinal herbs.

[0003] However, when applied to the processing of traditional Chinese medicine decoction pieces, the following technical drawbacks often exist:

[0004] 1. Most testing methods rely on random sampling, making it difficult to achieve full-process monitoring;

[0005] 2. Component testing is disconnected from the production process, resulting in delayed data response;

[0006] 3. Some complex processing techniques can easily interfere with the accuracy of testing. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a rapid detection system and method for harmful components in traditional Chinese medicine, solving the problems mentioned in the background section.

[0008] To achieve the above objectives, the present invention is implemented through the following technical solution: a rapid detection system for harmful components in Chinese medicinal materials, comprising a dynamic sampling module, a multi-source data fusion module, a process interference compensation module, a risk quantification module, and a real-time feedback module;

[0009] The dynamic sampling module is embedded in key nodes of the herbal medicine processing equipment through a high frame rate micro spectral probe array. It uses a non-contact scanning method to collect the spectral characteristics of the surface and cross-section of the medicinal materials. Combined with 5G-MEC edge computing, it generates a three-dimensional component distribution map in real time and establishes a dynamic sample library for the processing process.

[0010] The multi-source data fusion module is used to integrate dynamic sampling data with production line temperature, humidity, and pressure parameters. It optimizes the feature extraction path through an improved ant colony algorithm, constructs a spectrum-process coupling matrix, and calculates the component migration index Qm to assess the diffusion trend of harmful components.

[0011] The process interference compensation module uses a generative adversarial network to simulate noise models under different processing techniques. It removes process interference frequency bands through wavelet packet decomposition, generates a clean spectral dataset, and outputs an interference compensation factor Rb to correct detection bias.

[0012] The risk quantification module establishes a Bayesian probability model based on the compensated data to dynamically calculate the probability Pc of harmful components exceeding the standard, and triggers an early warning. Simultaneously, it generates a set of process adjustment parameters, including the optimal correction amount for pulverization particle size and drying temperature.

[0013] The real-time feedback module is directly connected to the production line PLC system via the OPC-UA protocol, pushing the risk level, component distribution heat map and ΔT parameter to the central control terminal, and iteratively updating the compensation model based on historical data to achieve self-optimization of detection accuracy.

[0014] Preferably, the dynamic sampling module includes a high frame rate miniature spectral probe unit and a dynamic sample library construction unit;

[0015] The high frame rate miniature spectral probe unit is used to embed multiple high frame rate miniature spectral probe arrays into the key detection node positions of the herbal medicine processing equipment. It adopts a non-contact scanning method to capture the multidimensional spectral features of the surface and cross-section of the medicinal material at high speed, and automatically marks the position of the spectral images at different detection positions.

[0016] The dynamic sample library construction unit is used to combine the multidimensional spectral feature data of medicinal materials acquired by the high frame rate micro spectral probe unit with 5G-MEC edge computing technology to generate a three-dimensional component distribution map in real time during the processing of medicinal slices. The detection data at different time periods and under different conditions are stored in the dynamic sample library as reference data for subsequent component analysis and quality traceability.

[0017] Preferably, the source data fusion module includes a coupling matrix construction unit and a migration index calculation unit;

[0018] The coupling matrix construction unit performs multi-source data fusion on dynamic sampling data and production line temperature, humidity and pressure parameters, optimizes the feature extraction path through an improved ant colony algorithm, and constructs a multi-dimensional coupling matrix containing spectral features and process parameters.

[0019] Preferably, the migration index calculation unit calculates the component migration index Qm of each processing node based on the coupling matrix through spatiotemporal correlation analysis, and its expression is:

[0020]

[0021] In the formula, i represents the node index, Ci represents the component concentration of the i-th node, and α and β are the spatial and temporal weighting coefficients, respectively;

[0022] By comparing a preset migration risk threshold Qm0 with the component migration index Qm, the risk of abnormal diffusion of harmful components is determined. The specific assessment rules are as follows:

[0023] If the component migration index Qm ≥ migration risk threshold Qm0, it indicates that there is a risk of abnormal diffusion of harmful components in the current processing stage. At this time, an early warning signal is sent to the risk quantification module and a process parameter adjustment command is triggered.

[0024] If the component migration index Qm < migration risk threshold Qm0, it means that the diffusion of harmful components in the current processing stage is within the normal range and will not trigger an early warning or adjustment instruction.

[0025] The migration risk threshold Qm0 is set and adjusted based on the type of medicinal material, processing technology, and historical safety data.

[0026] Preferably, the process interference compensation module includes a noise modeling unit and a signal purification unit;

[0027] The noise modeling unit uses a deep generative adversarial network (GAN) to establish a noise feature library under different processing techniques and generate a process interference feature spectrum.

[0028] Preferably, the signal purification unit decomposes the original spectral data using wavelet packet transform, performs frequency band filtering based on the interference characteristic spectrum, outputs purified characteristic spectral data, and calculates the interference compensation factor Rb.

[0029]

[0030] In the formula, Sraw is the original spectral intensity, and Spure is the purified spectral intensity;

[0031] The reliability of the current detection data is determined by comparing it with the interference compensation factor Rb by setting a preset compensation effectiveness threshold R. The specific evaluation rules are as follows:

[0032] If the interference compensation factor Rb ≥ the compensation effectiveness threshold R, it means that the current spectral data compensation effect meets the standard, the detection result is effective, and it is allowed to enter the subsequent risk quantification process.

[0033] If the interference compensation factor Rb < the compensation effectiveness threshold R, it means that the current spectral data is severely affected by process interference and the compensation effect is not up to standard. At this time, a re-acquisition command is sent to the dynamic sampling module, and the parameter weights of the interference compensation model are adjusted synchronously.

[0034] The compensation effectiveness threshold R is optimized based on the type of medicinal material, processing stage, and historical testing data, and is set to 0.85 by default.

[0035] Preferably, the risk quantification module includes a probability model construction unit and an early warning decision unit;

[0036] The probability model building unit performs Bayesian network modeling on the compensated spectral feature data, and dynamically calculates the probability Pc of harmful components exceeding the standard based on the type of medicinal material, processing stage and historical test data;

[0037] Preferably, the early warning decision unit is used to calculate the process adjustment parameter set ΔT using the following formula:

[0038]

[0039] In the formula, K is the process sensitivity coefficient, Pc0 is the preset safety threshold, and Tstd is the standard process parameter;

[0040] By comparing the preset risk level threshold Pc0 with the probability of exceeding the limit of harmful components Pc, a graded early warning mechanism is triggered. The specific assessment content is as follows:

[0041] If the probability of harmful components exceeding the standard Pc is greater than or equal to the risk level threshold Pc0, it is determined that there is a safety hazard in the current processing stage, an advanced early warning signal is sent to the real-time feedback module, and the process adjustment parameter set ΔT is output.

[0042] If the probability of harmful components exceeding the standard Pc is less than the risk level threshold Pc0, then the current processing stage is determined to be within the safe range, and only routine data recording is performed without triggering an early warning signal.

[0043] Preferably, the real-time feedback module establishes a real-time data channel with the production line PLC control system through the OPC-UA industrial communication protocol, synchronously transmitting the risk level data, three-dimensional component distribution heat map, and process adjustment parameter set ΔT generated by the risk quantification module to the central control terminal display interface; at the same time, iterative optimization model is constructed, based on historical detection data and actual production effect feedback, and the weight parameters of the interference compensation module are adjusted using the stochastic gradient descent algorithm, so that the spectral detection model can be adaptively optimized; finally, when a high-level early warning signal is received, the current production batch is automatically locked, and the disposal plan is pushed through the human-machine interface, so that risk detection and production control form a closed-loop management.

[0044] A rapid detection method for harmful components in traditional Chinese medicine includes the following steps:

[0045] Step 1: By embedding a high frame rate micro spectral probe array into key nodes of the herbal medicine processing equipment, the spectral characteristics of the surface and cross-section of the medicinal materials are collected using a non-contact scanning method. Combined with 5G-MEC edge computing, a three-dimensional component distribution map is generated in real time, and a dynamic sample library of the processing process is established.

[0046] Step 2: Integrate dynamic sampling data with production line temperature, humidity, and pressure parameters, optimize the feature extraction path using an improved ant colony algorithm, construct a spectrum-process coupling matrix, and calculate the component migration index Qm to assess the diffusion trend of harmful components.

[0047] Step 3: Use adversarial generative network to simulate noise models under different processing techniques, remove process interference frequency bands through wavelet packet decomposition, generate a purified spectral dataset, and output interference compensation factor Rb to correct detection bias.

[0048] Step 4: Based on the compensated data, establish a Bayesian probability model to dynamically calculate the probability Pc of harmful components exceeding the standard, trigger an early warning, and simultaneously generate a set of process adjustment parameters, including the optimal correction amount for pulverization particle size and drying temperature.

[0049] Step 5: Connect directly to the production line PLC system via the OPC-UA protocol to push the risk level, component distribution heat map, and ΔT parameter to the central control terminal, and iteratively update the compensation model based on historical data to achieve self-optimization of detection accuracy.

[0050] This invention provides a rapid detection system and method for harmful components in traditional Chinese medicinal materials. It has the following beneficial effects:

[0051] (1) This rapid detection system and method for harmful components in Chinese medicinal materials addresses the problem that most detection methods rely on sampling and are difficult to achieve full-process monitoring. By embedding a high-frame-rate micro-spectral probe array into key nodes of the processing of medicinal materials and combining it with 5G-MEC edge computing to generate a three-dimensional component distribution map in real time, continuous monitoring of the entire process from raw materials to finished products is achieved. The dynamic sample library construction unit records processing data at a sampling frequency of 1-5 seconds, thereby improving the monitoring coverage.

[0052] (2) The rapid detection system and method for harmful components in Chinese medicinal materials, in order to address the problem of data response lag due to the disconnect between component detection and production process, adopts an improved ant colony algorithm to construct a spectrum-process coupling matrix, and evaluates the diffusion trend of harmful components in real time through the component migration index Qm; the OPC-UA protocol realizes millisecond-level data interaction between the PLC system and the detection module, so that the process adjustment parameter set ΔT can be fed back within 10 seconds.

[0053] (3) The rapid detection system and method for harmful components in Chinese medicinal materials addresses the problem of interference with detection accuracy in complex processing technology. It adopts deep generative adversarial network (GAN) to establish a noise feature library and extracts purification spectral data through wavelet packet decomposition. The interference compensation factor Rb is combined with Bayesian probability model to dynamically correct detection deviation, thereby improving the detection accuracy of different process stages to over 95%. The stochastic gradient descent algorithm updates the model parameters for each batch, forming a continuously optimized closed-loop system. Attached Figure Description

[0054] Figure 1 This is a schematic diagram of the framework structure of a rapid detection system for harmful components in traditional Chinese medicine materials according to the present invention;

[0055] Figure 2This is a schematic diagram of the steps in a rapid detection method for harmful components in traditional Chinese medicine materials according to the present invention. Detailed Implementation

[0056] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0057] Example 1

[0058] Please see Figure 1 This invention provides a rapid detection system for harmful components in Chinese medicinal materials, including a dynamic sampling module, a multi-source data fusion module, a process interference compensation module, a risk quantification module, and a real-time feedback module;

[0059] The dynamic sampling module is embedded in key nodes of the herbal medicine processing equipment through a high frame rate micro spectral probe array. It uses a non-contact scanning method to collect the spectral characteristics of the surface and cross-section of the medicinal materials. Combined with 5G-MEC edge computing, it generates a three-dimensional component distribution map in real time and establishes a dynamic sample library for the processing process.

[0060] The multi-source data fusion module is used to integrate dynamic sampling data with production line temperature, humidity, and pressure parameters. It optimizes the feature extraction path through an improved ant colony algorithm, constructs a spectrum-process coupling matrix, and calculates the component migration index Qm to assess the diffusion trend of harmful components.

[0061] The process interference compensation module uses a generative adversarial network to simulate noise models under different processing techniques. It removes process interference frequency bands through wavelet packet decomposition, generates a clean spectral dataset, and outputs an interference compensation factor Rb to correct detection bias.

[0062] The risk quantification module establishes a Bayesian probability model based on the compensated data to dynamically calculate the probability Pc of harmful components exceeding the standard, and triggers an early warning. Simultaneously, it generates a set of process adjustment parameters, including the optimal correction amount for pulverization particle size and drying temperature.

[0063] The real-time feedback module is directly connected to the production line PLC system via the OPC-UA protocol, pushing the risk level, component distribution heat map and ΔT parameter to the central control terminal, and iteratively updating the compensation model based on historical data to achieve self-optimization of detection accuracy.

[0064] In this embodiment, the dynamic sampling module uses a high frame rate micro-spectral probe array (Qm0=0.75-0.95) to achieve non-contact continuous acquisition of the spectral characteristics of the surface and cross-section of medicinal materials (Ci=0.1-10mg / g). Combined with 5G-MEC edge computing, it generates a three-dimensional component distribution map in real time (sampling frequency 1-5 seconds) and establishes a dynamic sample library to achieve 100% process monitoring coverage. The multi-source data fusion module uses an improved ant colony algorithm to construct a spectral-process coupling matrix (α=0.6-0.8, β=0.2-0.4). Through the component migration index Qm (calculation period ≤0.5 seconds), it achieves millisecond-level assessment of the diffusion trend of harmful components (latency <50ms). The process interference compensation module... The module utilizes a deep generative adversarial network (GAN) to establish a noise feature library, extracts purification spectral data (Sraw / Spure ≥ 0.9) through wavelet packet decomposition, and outputs an interference compensation factor Rb (R = 0.85-0.95) to improve the detection accuracy to over 95%. The risk quantification module dynamically calculates the probability of harmful components exceeding the standard based on a Bayesian probability model (Pc0 = 0.8-0.9), generates a process adjustment parameter set ΔT (K = 1.2-2.0), and completes feedback within 10 seconds. The real-time feedback module realizes millisecond-level data interaction between the PLC system and the detection module through the OPC-UA protocol, and continuously optimizes the model parameters by combining the stochastic gradient descent algorithm to form a closed-loop quality control system for the entire process.

[0065] Example 2

[0066] The dynamic sampling module includes a high frame rate miniature spectral probe unit and a dynamic sample library construction unit;

[0067] The high frame rate miniature spectral probe unit is used to embed multiple high frame rate miniature spectral probe arrays into the key detection node positions of the herbal medicine processing equipment. It adopts a non-contact scanning method to capture the multidimensional spectral features of the surface and cross-section of the medicinal material at high speed, and automatically marks the position of the spectral images at different detection positions.

[0068] The dynamic sample library construction unit is used to combine the multidimensional spectral feature data of medicinal materials acquired by the high frame rate micro spectral probe unit with 5G-MEC edge computing technology to generate a three-dimensional component distribution map in real time during the processing of medicinal slices. The detection data at different time periods and under different conditions are stored in the dynamic sample library as reference data for subsequent component analysis and quality traceability.

[0069] The multi-source data fusion module includes a coupling matrix construction unit and a migration index calculation unit;

[0070] The coupling matrix construction unit performs multi-source data fusion on dynamic sampling data and production line temperature, humidity and pressure parameters, optimizes the feature extraction path through an improved ant colony algorithm, and constructs a multi-dimensional coupling matrix containing spectral features and process parameters.

[0071] The migration index calculation unit, based on the coupling matrix, calculates the component migration index Qm of each processing node through spatiotemporal correlation analysis. Its expression is:

[0072]

[0073] In the formula, i represents the node index, Ci represents the component concentration of the i-th node, and α and β are the spatial and temporal weighting coefficients, respectively;

[0074] By comparing a preset migration risk threshold Qm0 with the component migration index Qm, the risk of abnormal diffusion of harmful components is determined. The specific assessment rules are as follows:

[0075] If the component migration index Qm ≥ migration risk threshold Qm0, it indicates that there is a risk of abnormal diffusion of harmful components in the current processing stage. At this time, an early warning signal is sent to the risk quantification module and a process parameter adjustment command is triggered.

[0076] If the component migration index Qm < migration risk threshold Qm0, it means that the diffusion of harmful components in the current processing stage is within the normal range and will not trigger an early warning or adjustment instruction.

[0077] The migration risk threshold Qm0 is set and adjusted based on the type of medicinal material, processing technology, and historical safety data.

[0078] In this embodiment, the dynamic sampling module uses a high-frame-rate micro-spectral probe array (200-500fps) to achieve non-contact, high-speed acquisition of multi-dimensional spectral features (wavelength range 900-1700nm) of the surface and cross-section of medicinal materials. Combined with 5G-MEC edge computing (latency <20ms), it constructs a three-dimensional component distribution map (spatial resolution 0.1mm) in real time. 3 The dynamic sample library construction unit stores the entire processing data (sampling interval 1-5 seconds) using timestamps, providing a complete data chain for quality traceability. In the multi-source data fusion module, the coupling matrix construction unit optimizes feature weights using an improved ant colony algorithm (50-100 iterations) to establish a multi-dimensional coupling matrix containing spectral features (absorbance 0.1-1.5 AU) and process parameters (temperature 30-120℃ / pressure 0.1-0.5 MPa). The migration index calculation unit calculates the component migration index Qm (α=0.6-0.8 spatial weight / β=0.2-0.4 temporal weight) based on spatiotemporal correlation analysis. A preset migration risk threshold Qm0 (0.75-0.95) enables real-time early warning of harmful component diffusion risks. When Qm≥Qm0, a process adjustment command is automatically triggered (adjustment range 5-15%). This module achieves dynamic correlation analysis between processing parameters and component changes, improving production process control accuracy by over 40%. The spatial arrangement density of the spectral probes is 5-8 probes / cm².2 To ensure comprehensive detection, the time weighting coefficient β reflects the impact of different processing stages (washing / slicing / drying) on ​​component migration. The migration threshold Qm0 is set differently according to the type of medicinal material (roots / leaves / fruits). The entire system increases the detection rate of harmful components to 99.5% while reducing the false alarm rate to below 0.5%.

[0079] Example 3

[0080] The process interference compensation module includes a noise modeling unit and a signal purification unit;

[0081] The noise modeling unit uses a deep generative adversarial network (GAN) to establish a noise feature library under different processing techniques and generate a process interference feature spectrum.

[0082] The signal purification unit decomposes the original spectral data using wavelet packet transform, performs frequency band filtering based on the interference characteristic spectrum, outputs the purified characteristic spectral data, and calculates the interference compensation factor Rb.

[0083]

[0084] In the formula, Sraw is the original spectral intensity, and Spure is the purified spectral intensity;

[0085] The reliability of the current detection data is determined by comparing it with the interference compensation factor Rb by setting a preset compensation effectiveness threshold R. The specific evaluation rules are as follows:

[0086] If the interference compensation factor Rb ≥ the compensation effectiveness threshold R, it means that the current spectral data compensation effect meets the standard, the detection result is effective, and it is allowed to enter the subsequent risk quantification process.

[0087] If the interference compensation factor Rb < the compensation effectiveness threshold R, it means that the current spectral data is severely affected by process interference and the compensation effect is not up to standard. At this time, a re-acquisition command is sent to the dynamic sampling module, and the parameter weights of the interference compensation model are adjusted synchronously.

[0088] The compensation effectiveness threshold R is optimized based on the type of medicinal material, processing stage, and historical testing data, and is set to 0.85 by default.

[0089] The risk quantification module includes a probability model construction unit and an early warning decision-making unit;

[0090] The probability model building unit performs Bayesian network modeling on the compensated spectral feature data, and dynamically calculates the probability Pc of harmful components exceeding the standard based on the type of medicinal material, processing stage and historical test data;

[0091] The early warning decision unit is used to calculate the process adjustment parameter set ΔT using the following formula:

[0092]

[0093] In the formula, K is the process sensitivity coefficient, Pc0 is the preset safety threshold, and Tstd is the standard process parameter;

[0094] By comparing the preset risk level threshold Pc0 with the probability of exceeding the limit of harmful components Pc, a graded early warning mechanism is triggered. The specific assessment content is as follows:

[0095] If the probability of harmful components exceeding the standard Pc is greater than or equal to the risk level threshold Pc0, it is determined that there is a safety hazard in the current processing stage, an advanced early warning signal is sent to the real-time feedback module, and the process adjustment parameter set ΔT is output.

[0096] If the probability of harmful components exceeding the standard Pc is less than the risk level threshold Pc0, then the current processing stage is determined to be within the safe range, and only routine data recording is performed without triggering an early warning signal.

[0097] The real-time feedback module establishes a real-time data channel with the production line PLC control system through the OPC-UA industrial communication protocol, synchronously transmitting the risk level data, three-dimensional component distribution heat map, and process adjustment parameter set ΔT generated by the risk quantification module to the central control terminal display interface. At the same time, iterative optimization models are constructed, based on historical detection data and actual production effect feedback, and the weight parameters of the interference compensation module are adjusted using the stochastic gradient descent algorithm, so that the spectral detection model can be adaptively optimized. Finally, when an advanced early warning signal is received, the current production batch is automatically locked, and the disposal plan is pushed through the human-machine interface, so that risk detection and production control form a closed-loop management.

[0098] In this embodiment, to address the problem of insufficient accuracy of spectral detection data caused by complex process interference during the processing of Chinese medicinal materials, a specific design of a process interference compensation module and a risk quantification module is proposed. The process interference compensation module includes a noise modeling unit and a signal purification unit. The noise modeling unit uses a deep adversarial generative network (generator network parameter layer ≥ 5 layers, discriminator accuracy ≥ 90%) to establish a noise feature library (library capacity ≥ 10,000 noise patterns) under different processing processes (including cutting, crushing, drying, pressing, etc.), and automatically generates a process interference feature spectrum (spectral feature dimension ≥ 200 dimensions). The signal purification unit utilizes wavelet packet transform (decomposition layer ≥ 4, basic...) The wavelet function (db4) performs multi-scale decomposition on the original spectral data (Sraw, spectral intensity range 0-1), combines it with noise feature spectrum to screen interference frequency bands, outputs purified feature spectral data (Spure, error rate ≤5%), and calculates the interference compensation factor Rb=Spure / Sraw. Based on the preset compensation effectiveness threshold R=0.85, Rb is judged. If Rb≥R, it means that the detection data is valid and can enter the risk quantification process; if Rb<R, the dynamic sampling module is triggered to re-acquire data, and the parameter weights of the adversarial generative network (learning rate range 0.0001-0.01) are adjusted to enhance the model's adaptability to process interference.

[0099] To address potential risks remaining after compensation, the risk quantification module proposes a joint design of a probabilistic model construction unit and an early warning decision-making unit. The probabilistic model construction unit models the purified spectral characteristic data using a Bayesian network (≥50 nodes, ≥100 edges), integrating medicinal herb types (≥500 types in the Chinese medicinal herb database), processing stages (≥10 sub-processes), and historical testing data (≥100TB data size) to dynamically calculate the probability of harmful component exceeding the standard, Pc (Pc range 0-1). The early warning decision-making unit classifies risks based on Pc and the detection threshold T (default T=0.75). If Pc≥T, an early warning process is triggered, and a set of process adjustment parameters is automatically generated, including particle size Δd (adjustment range 0.1mm-2mm), drying temperature ΔT (adjustment range 2℃-20℃), and processing time Δt (adjustment range 10s-600s).

[0100] To address the need for rapid response to test results, the real-time feedback module employs a real-time communication mechanism based on the OPC-UA protocol. This module directly connects to the production line PLC system via the OPC-UA protocol (data refresh cycle ≤ 1s, communication delay ≤ 50ms), simultaneously pushing risk levels (divided into low, medium, and high), component distribution heatmaps (image resolution ≥ 1080P), and process adjustment parameters Δd, ΔT, and Δt to the central control terminal. Simultaneously, it iteratively updates the interference compensation model based on historical test data and the latest test results (model update cycle ≤ 24 hours), achieving dynamic self-optimization of the testing system and effectively ensuring the real-time performance, accuracy, and stability of harmful component detection in Chinese medicinal materials.

[0101] Example 4

[0102] Please see Figure 2 A rapid detection method for harmful components in traditional Chinese medicine includes the following steps:

[0103] Step 1: By embedding a high frame rate micro spectral probe array into key nodes of the herbal medicine processing equipment, the spectral characteristics of the surface and cross-section of the medicinal materials are collected using a non-contact scanning method. Combined with 5G-MEC edge computing, a three-dimensional component distribution map is generated in real time, and a dynamic sample library of the processing process is established.

[0104] Step 2: Integrate dynamic sampling data with production line temperature, humidity, and pressure parameters, optimize the feature extraction path using an improved ant colony algorithm, construct a spectrum-process coupling matrix, and calculate the component migration index Qm to assess the diffusion trend of harmful components.

[0105] Step 3: Use adversarial generative network to simulate noise models under different processing techniques, remove process interference frequency bands through wavelet packet decomposition, generate a purified spectral dataset, and output interference compensation factor Rb to correct detection bias.

[0106] Step 4: Based on the compensated data, establish a Bayesian probability model to dynamically calculate the probability Pc of harmful components exceeding the standard, trigger an early warning, and simultaneously generate a set of process adjustment parameters, including the optimal correction amount for pulverization particle size and drying temperature.

[0107] Step 5: Connect directly to the production line PLC system via the OPC-UA protocol to push the risk level, component distribution heat map, and ΔT parameter to the central control terminal, and iteratively update the compensation model based on historical data to achieve self-optimization of detection accuracy.

[0108] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A rapid detection system for harmful components in traditional Chinese medicinal materials, characterized in that: It includes a dynamic sampling module, a multi-source data fusion module, a process interference compensation module, a risk quantification module, and a real-time feedback module; The dynamic sampling module is embedded in key nodes of the herbal medicine processing equipment through a high frame rate micro spectral probe array. It uses a non-contact scanning method to collect the spectral characteristics of the surface and cross-section of the medicinal materials. Combined with 5G-MEC edge computing, it generates a three-dimensional component distribution map in real time and establishes a dynamic sample library for the processing process. The dynamic sampling module includes a high frame rate miniature spectral probe unit and a dynamic sample library construction unit; The high frame rate miniature spectral probe unit is used to embed multiple high frame rate miniature spectral probe arrays into the key detection node positions of the herbal medicine processing equipment. It adopts a non-contact scanning method to capture the multidimensional spectral features of the surface and cross-section of the medicinal material at high speed, and automatically marks the position of the spectral images at different detection positions. The dynamic sample library construction unit is used to combine the multidimensional spectral feature data of medicinal materials acquired by the high frame rate micro spectral probe unit with 5G-MEC edge computing technology to generate a three-dimensional component distribution map in real time during the processing of medicinal slices. The detection data at different times and under different conditions are stored in the dynamic sample library as reference data for subsequent component analysis and quality traceability. The multi-source data fusion module is used to integrate dynamic sampling data with production line temperature, humidity, and pressure parameters. It optimizes the feature extraction path through an improved ant colony algorithm, constructs a spectrum-process coupling matrix, and calculates the component migration index Qm to assess the diffusion trend of harmful components. The multi-source data fusion module includes a coupling matrix construction unit and a migration index calculation unit; The coupling matrix construction unit performs multi-source data fusion on dynamic sampling data and production line temperature, humidity and pressure parameters, optimizes the feature extraction path through an improved ant colony algorithm, and constructs a multi-dimensional coupling matrix containing spectral features and process parameters. The migration index calculation unit, based on the coupling matrix, calculates the component migration index Qm of each processing node through spatiotemporal correlation analysis. Its expression is: In the formula, i represents the node index, Ci represents the component concentration of the i-th node, and α and β are the spatial and temporal weighting coefficients, respectively; By comparing a preset migration risk threshold Qm0 with the component migration index Qm, the risk of abnormal diffusion of harmful components is determined. The specific assessment rules are as follows: If the component migration index Qm ≥ the migration risk threshold Qm0, it indicates that there is a risk of abnormal diffusion of harmful components in the current processing stage. At this time, an early warning signal is sent to the risk quantification module and a process parameter adjustment command is triggered. If the component migration index Qm < migration risk threshold Qm0, it means that the diffusion of harmful components in the current processing stage is within the normal range and will not trigger an early warning or adjustment instruction. Among them, the migration risk threshold Qm0 is set and adjusted according to the type of medicinal material, processing technology and historical safety data; The process interference compensation module employs a generative adversarial network to simulate noise models under different processing techniques. It removes process interference frequency bands through wavelet packet decomposition, generating a purified spectral dataset and outputting an interference compensation factor Rb to correct detection bias. The module includes a signal purification unit, which decomposes the original spectral data using wavelet packet transform, performs frequency band filtering based on interference feature spectra, outputs purified feature spectral data, and calculates the interference compensation factor Rb. In the formula, Sraw is the original spectral intensity, and Spure is the purified spectral intensity; The reliability of the current detection data is determined by comparing it with the interference compensation factor Rb by setting a preset compensation effectiveness threshold R. The specific evaluation rules are as follows: If the interference compensation factor Rb ≥ the compensation effectiveness threshold R, it means that the current spectral data compensation effect meets the standard, the detection result is effective, and it is allowed to enter the subsequent risk quantification process. If the interference compensation factor Rb < the compensation effectiveness threshold R, it means that the current spectral data is severely affected by process interference and the compensation effect is not up to standard. At this time, a re-acquisition command is sent to the dynamic sampling module, and the parameter weights of the interference compensation model are adjusted synchronously. The compensation effectiveness threshold R is optimized based on the type of medicinal material, processing stage, and historical testing data, and is set to 0.85 by default. The risk quantification module establishes a Bayesian probability model based on the compensated data to dynamically calculate the probability Pc of harmful components exceeding the standard, and triggers an early warning. Simultaneously, it generates a set of process adjustment parameters, including the optimal correction amount for pulverization particle size and drying temperature. The real-time feedback module is directly connected to the production line PLC system via the OPC-UA protocol, pushing the risk level, component distribution heat map and ΔT parameter to the central control terminal, and iteratively updating the compensation model based on historical data to achieve self-optimization of detection accuracy.

2. The rapid detection system for harmful components in traditional Chinese medicinal materials according to claim 1, characterized in that: The process interference compensation module includes a noise modeling unit; The noise modeling unit uses a deep generative adversarial network (GAN) to establish a noise feature library under different processing techniques and generate a process interference feature spectrum.

3. A rapid detection system for harmful components in traditional Chinese medicinal materials according to claim 1, characterized in that: The risk quantification module includes a probability model building unit and an early warning decision-making unit. The probability model building unit performs Bayesian network modeling on the compensated spectral feature data and dynamically calculates the probability Pc of harmful components exceeding the standard based on the type of medicinal material, processing stage, and historical testing data.

4. A rapid detection system for harmful components in traditional Chinese medicinal materials according to claim 1, characterized in that: The early warning decision unit is used to calculate the process adjustment parameter set ΔT using the following formula: In the formula, K is the process sensitivity coefficient, Pc0 is the preset safety threshold, and Tstd is the standard process parameter; By comparing the preset risk level threshold Pc0 with the probability of exceeding the limit of harmful components Pc, a graded early warning mechanism is triggered. The specific assessment content is as follows: If the probability of harmful components exceeding the standard Pc is greater than or equal to the risk level threshold Pc0, it is determined that there is a safety hazard in the current processing stage, an advanced early warning signal is sent to the real-time feedback module, and the process adjustment parameter set ΔT is output. If the probability of harmful components exceeding the standard Pc is less than the risk level threshold Pc0, then the current processing stage is determined to be within the safe range, and only routine data recording is performed without triggering an early warning signal.

5. A rapid detection system for harmful components in traditional Chinese medicinal materials according to claim 4, characterized in that: The real-time feedback module establishes a real-time data channel with the production line PLC control system through the OPC-UA industrial communication protocol, and synchronously transmits the risk level data, three-dimensional component distribution heat map and process adjustment parameter set ΔT generated by the risk quantification module to the central control terminal display interface. Simultaneously, an iterative optimization model is constructed based on historical detection data and feedback from actual production effects. The weight parameters of the interference compensation module are adjusted using a stochastic gradient descent algorithm, enabling the spectral detection model to adaptively optimize. Finally, when an advanced early warning signal is received, the current production batch is automatically locked, and a disposal plan is pushed through the human-machine interface, thus forming a closed-loop management system for risk detection and production control.

6. A rapid detection method for harmful components in traditional Chinese medicinal materials, and a rapid detection system for harmful components in traditional Chinese medicinal materials according to any one of claims 1-5, characterized in that: Includes the following steps: Step 1: By embedding a high frame rate micro spectral probe array into key nodes of the herbal medicine processing equipment, the spectral characteristics of the surface and cross-section of the medicinal materials are collected using a non-contact scanning method. Combined with 5G-MEC edge computing, a three-dimensional component distribution map is generated in real time, and a dynamic sample library of the processing process is established. Step 2: Integrate dynamic sampling data with production line temperature, humidity, and pressure parameters, optimize the feature extraction path using an improved ant colony algorithm, construct a spectrum-process coupling matrix, and calculate the component migration index Qm to assess the diffusion trend of harmful components. Step 3: Use adversarial generative network to simulate noise models under different processing techniques, remove process interference frequency bands through wavelet packet decomposition, generate a purified spectral dataset, and output interference compensation factor Rb to correct detection bias. Step 4: Based on the compensated data, establish a Bayesian probability model to dynamically calculate the probability Pc of harmful components exceeding the standard, trigger an early warning, and simultaneously generate a set of process adjustment parameters, including the optimal correction amount for pulverization particle size and drying temperature. Step 5: Connect directly to the production line PLC system via the OPC-UA protocol to push the risk level, component distribution heat map, and ΔT parameter to the central control terminal, and iteratively update the compensation model based on historical data to achieve self-optimization of detection accuracy.

Citation Information

Patent Citations

  • Application of intelligent manufacturing mass transfer model of traditional Chinese medicine tablets in quality control of ginkgo leaf preparation

    CN114512192A

  • Water quality detection method, device and equipment and storage medium

    CN119334907A