Traditional Chinese medicine decoction piece detection system based on near-infrared spectrometer
By constructing a population quality benchmark vector and similarity index control threshold for the traditional Chinese medicine decoction pieces detection system, and combining iterative purification and graded disposal, the problems of batch fluctuation and misjudgment of abnormal samples in the traditional Chinese medicine decoction pieces detection system were solved, realizing full-process automated management and improving the accuracy and efficiency of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-03-13
AI Technical Summary
Existing quality testing systems for Chinese herbal medicine pieces rely on static quality benchmark models, which are difficult to cope with sample fluctuations and abnormal samples within a batch, leading to misjudgments. They also have low automation levels, affecting the accuracy of testing and the efficiency and reliability of quality control in the distribution process.
A purified population quality benchmark vector and similarity index control threshold are constructed. Abnormal samples are identified and removed through iterative purification algorithms. Combined with a graded disposal mechanism based on individual quality risk index, the entire process of automated decision-making is achieved.
It significantly improved the representativeness and anti-interference ability of the quality benchmark, reduced the human error rate, and improved the quality control accuracy and reliability of the circulation process of Chinese herbal medicine pieces.
Smart Images

Figure CN121658823A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traditional Chinese medicine quality analysis technology, specifically a detection system for traditional Chinese medicine decoction pieces based on a near-infrared spectrometer. Background Technology
[0002] As a primary form of clinical application of traditional Chinese medicine (TCM), the quality similarity and safety of prepared TCM slices directly affect efficacy and patient health. Due to the influence of factors such as origin, harvesting season, and processing techniques on raw TCM materials, the final prepared TCM slices exhibit inherent batch-to-batch and batch-to-batch variations in chemical composition. Near-infrared spectroscopy, with its advantages of speed and non-destructive testing, has become an important tool in the field of TCM quality analysis. By collecting spectral information, it indirectly reflects the chemical composition characteristics of substances and is suitable for online or rapid screening of prepared TCM slices.
[0003] In the prior art, CN110632016B discloses a traditional Chinese medicine decoction piece detection system based on a near-infrared spectrometer. This technology includes: a near-infrared spectrometer component, an intelligent identification component, a central control component, a robotic arm component, and a differentiated reflux drying component. The near-infrared spectrometer component detects the moisture concentration in the traditional Chinese medicine decoction pieces in real time and transmits the detected spectral information to the intelligent identification component. The intelligent identification component models and analyzes the spectral information to obtain the moisture concentration in real time and transmits the moisture concentration information to the central control component. The central control component generates different response commands based on different concentration information and assigns the commands to the robotic arm component. The robotic arm component sorts the traditional Chinese medicine decoction pieces in real time according to the specific commands. The differentiated reflux drying component performs secondary reflux drying on traditional Chinese medicine decoction pieces with different moisture concentrations.
[0004] However, in the aforementioned existing technologies, the quality testing of traditional Chinese medicine decoction pieces largely relies on static and fixed quality benchmark models, lacking effective mechanisms to address normal fluctuations and interference from abnormal samples within a batch, which can easily lead to misjudgments. Traditional methods struggle to dynamically identify and remove abnormal samples, resulting in insufficient representativeness of the quality benchmark and affecting the overall accuracy of the assessment. Furthermore, the lack of quantitative risk grading for each independent unit, coupled with simplistic handling methods and low automation, makes it difficult to guarantee the efficiency and reliability of quality control in the distribution process, relying heavily on human experience.
[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this invention is to provide a detection system for traditional Chinese medicine (TCM) decoction pieces based on a near-infrared spectrometer to address the problems mentioned in the background section. This invention overcomes the misjudgment problems caused by sample anomalies or batch fluctuations in traditional static quality models by constructing a purified population quality benchmark vector and a similarity index control threshold. It automatically identifies and removes abnormal samples using an iterative purification algorithm, significantly improving the representativeness and anti-interference capability of the quality benchmark. Based on a graded handling mechanism using an individual quality risk index, it achieves fully automated decision-making from qualified release to risk interception, greatly reducing reliance on manual labor and the risk of subjective misjudgment. While ensuring detection efficiency, it effectively improves the accuracy and reliability of quality control in the circulation of TCM decoction pieces.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] A detection system for traditional Chinese medicine decoction pieces based on near-infrared spectroscopy includes the following functional modules:
[0009] The sampling and benchmark construction module sets up detection points at the circulation nodes of Chinese herbal medicine pieces, uses a simple random sampling method to select a preset number of independent units in the current batch as sampling units, and performs near-infrared spectral acquisition on the sampling units. The acquired near-infrared spectral data is preprocessed and features are extracted to construct a corresponding spectral feature vector for each sampling unit. Based on the spectral feature vector, an initial population quality benchmark vector is calculated and generated.
[0010] The similarity analysis and purification module calculates the similarity index of each sampling unit, calculates the initial similarity index control threshold based on the statistical distribution of the similarity index of each sampling unit, compares the similarity index of each sampling unit with the initial similarity index control threshold, and performs a sample purification process based on the comparison results to obtain the purified population quality benchmark vector and the similarity index control threshold.
[0011] The risk assessment module collects the near-infrared spectrum of each independent packaging unit in the current batch, and constructs the corresponding spectral feature vector after preprocessing and feature extraction. Based on the purified group quality benchmark vector and the similarity index control threshold, the individual quality risk index is calculated.
[0012] The graded disposal module determines the risk level of each independent packaging unit based on its individual quality risk index and generates corresponding graded disposal instructions.
[0013] Furthermore, the method for preprocessing and feature extraction of the acquired near-infrared spectral data is as follows:
[0014] The standard normal variable transformation algorithm is used to correct the spectral data of near-infrared spectral data to eliminate the spectral baseline and amplitude variation caused by sample particle scattering. Based on the preprocessed spectral data, absorbance data under the characteristic wavelength subset determined in advance by the partial least squares regression coefficient is extracted and arranged in wavelength order to form the spectral feature vector of the sampling unit.
[0015] Furthermore, the process of using the standard normal variable transformation algorithm to perform spectral data correction on near-infrared spectral data is as follows:
[0016] For the near-infrared spectra collected by each sampling unit, the arithmetic mean of the absorbance at all wavelengths of the near-infrared spectrum of each sampling unit is calculated. The original absorbance value at each wavelength is then subtracted from the arithmetic mean to obtain the centered absorbance value at each wavelength. The standard deviation of the absorbance at all wavelengths is then calculated. The centered absorbance value at each wavelength is then divided by the standard deviation to complete the standardization process, thereby outputting the corrected spectral data. Finally, the spectral baseline and amplitude variations caused by sample particle scattering and optical path changes are eliminated.
[0017] Furthermore, the formula used to calculate and generate the initial population quality benchmark vector is as follows:
[0018]
[0019] in, This is the initial population quality baseline vector;
[0020] For the first The spectral feature vector of each sampling unit;
[0021] This represents the total number of sampling units.
[0022] Furthermore, the method for calculating the initial similarity index control threshold based on the statistical distribution of the similarity index of each sampling unit is as follows:
[0023] The arithmetic mean and standard deviation of the similarity index of all sampling units are calculated to quantify the quality fluctuation range of the sampling units; the initial similarity index control threshold is calculated based on the arithmetic mean and standard deviation, combined with a preset control coefficient, thereby establishing a statistical criterion for identifying samples with abnormal spectral characteristics.
[0024] Furthermore, the formula used to calculate the similarity index for each sampling unit is as follows:
[0025]
[0026] in, For the first The similarity index of the sampling unit is used to quantify the similarity index of the sampling unit. The degree of similarity between each sampling unit and the initial population quality benchmark vector;
[0027] For the first The spectral feature vector of each sampling unit;
[0028] It is a preset positive constant.
[0029] Furthermore, the initial similarity index control threshold is calculated using the following formula:
[0030]
[0031] in, The initial similarity index control threshold;
[0032] The arithmetic mean of the similarity indices of all sampled units;
[0033] The standard deviation of the similarity index for all sampled units;
[0034] These are the preset control coefficients.
[0035] Furthermore, the execution logic of the sample purification process is as follows:
[0036] When the similarity index of all sampling units is not lower than the initial similarity control threshold If the current batch of sampling units is determined to meet the quality similarity requirements, the current initial population quality benchmark vector is set. and the initial similarity index control threshold These serve as the baseline vectors for the purified population quality. Similarity index control threshold ;
[0037] When there are sampling units with similarity indices lower than the initial similarity control threshold In cases where the similarity index falls below the initial similarity control threshold, The sampling units are removed. Based on the remaining sampling units, a new population quality baseline vector is recalculated. Based on the new population quality baseline vector, a new similarity index for all remaining sampling units is recalculated. Based on the new similarity index, a new similarity index control threshold is calculated. This comparison and removal process is repeated using the new population quality baseline vector and the new similarity index control threshold as the current standard.
[0038] This iterative process continues until the similarity index of all retained sampling units is not lower than the new similarity index control threshold under the current iteration. At this point, the new population quality benchmark vector and the new similarity index control threshold obtained from the final iteration are used as the purified population quality benchmark vector, respectively. Similarity index control threshold .
[0039] Furthermore, the formula used to calculate the individual quality risk index is as follows:
[0040]
[0041] in, For the first The individual quality risk index of each independent packaging unit is used to quantify the risk level of the first unit. Quality risk level of each individual packaging unit;
[0042] The similarity index control threshold after purification;
[0043] For the first Similarity index of individual packaging units.
[0044] Furthermore, the execution logic for determining the risk level based on the individual quality risk index of each independent packaging unit and generating corresponding graded disposal instructions is as follows:
[0045] when When the risk level of the independent packaging unit is determined to be qualified, a release instruction is generated;
[0046] when When the risk level of the independent packaging unit is determined to be low, an early warning and enhanced monitoring instructions are generated.
[0047] when When the risk level of the independent packaging unit is determined to be medium risk, a sampling re-inspection instruction is generated.
[0048] when When the risk level of an independent packaging unit is determined to be high, an interception and non-conforming product disposal instruction is generated;
[0049] in, and All are preset risk level thresholds, and meet the following requirements. .
[0050] Compared with the prior art, the beneficial effects of the present invention are:
[0051] This invention establishes an initial quality benchmark through a sampling and benchmark construction module, and iteratively eliminates abnormal samples using a similarity analysis and purification module, ensuring the reliability and representativeness of the benchmark vector. The risk assessment module calculates the individual quality risk index based on the purified benchmark, accurately quantifying the risk level of each unit. The graded disposal module automatically generates corresponding instructions based on the risk index, realizing intelligent graded management from qualified release to high-risk interception, thereby significantly reducing the human error rate, improving detection efficiency, and ensuring the quality, safety, and similarity of Chinese herbal medicine slices in the circulation process. Attached Figure Description
[0052] Figure 1 This is a block diagram of a traditional Chinese medicine decoction piece detection system based on a near-infrared spectrometer;
[0053] Figure 2 This is a schematic diagram of the operation process of a traditional Chinese medicine decoction piece detection system based on a near-infrared spectrometer. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.
[0055] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0056] Example:
[0057] Please see Figures 1-2 The present invention provides a technical solution:
[0058] A detection system for traditional Chinese medicine decoction pieces based on near-infrared spectroscopy includes the following functional modules:
[0059] Sampling and Benchmark Construction Module: Testing points are established at key nodes in the circulation of traditional Chinese medicine decoction pieces to ensure timely monitoring and evaluation of batch quality. A simple random sampling method is used to select a predetermined number of independent units from the current batch as sampling units to ensure the randomness and representativeness of sample selection, reduce human bias, and acquire near-infrared spectra of the sampling units. The acquired near-infrared spectral data is preprocessed, including data correction and noise reduction, to improve data reliability and similarity. Based on this, feature extraction is performed, and key feature indicators are screened from the preprocessed data and organized in a specific order to construct a corresponding spectral feature vector for each sampling unit, thereby accurately reflecting its intrinsic quality characteristics. Based on the spectral feature vectors of all sampling units, an initial population quality benchmark vector is calculated and generated. This initial population quality benchmark vector serves as a similarity reference benchmark for batch quality, providing a basis for subsequent quality analysis and risk assessment.
[0060] The method for preprocessing and feature extraction of the acquired near-infrared spectral data is as follows:
[0061] A standard normal variable transformation algorithm was employed to correct the raw near-infrared spectral data, effectively eliminating spectral baseline drift and amplitude variations caused by sample particle scattering, surface inhomogeneity, and optical path changes, thus improving data comparability and stability. Based on the preprocessed spectral data, feature extraction was performed, specifically selecting a subset of characteristic wavelengths from the entire wavelength range using partial least squares regression coefficients. These subsets represent the wavelength regions most relevant to the key chemical components of traditional Chinese medicine decoction pieces. Extracting absorbance data at these specific wavelengths condenses spectral information, reduces redundancy, and enhances the representativeness of the features. Finally, the extracted absorbance data were arranged in wavelength order to form a structured numerical sequence, thus constituting the spectral feature vector of this unit. This vector not only preserves the physical meaning of the spectrum but also provides a standardized and computable data foundation for subsequent quality assessment.
[0062] The process of using the standard normal variable transformation algorithm to correct the spectral data of the original near-infrared spectral data is as follows:
[0063] For the near-infrared spectra collected in each sampling unit, the arithmetic mean of the absorbance at all wavelengths was calculated. This mean was then subtracted from the original absorbance values at each wavelength to perform centering. This process aims to eliminate the overall offset of the spectral data, center the baseline, and reduce the impact of background interference or baseline drift. Subsequently, the standard deviation of the absorbance at all wavelengths was calculated, and each centered value was divided by this standard deviation to perform standardization. This unifies the scale and variation range of the data, effectively suppressing spectral baseline and amplitude variations caused by sample particle scattering and optical path changes. Finally, calibrated spectral data is output, improving its stability and comparability, and providing a reliable basis for subsequent analysis.
[0064] The simple sampling method is implemented as follows:
[0065] Each individual package unit in the batch must be selected with a known and equal probability, ensuring that all individual package units have an equal chance of becoming a sampling unit, thereby avoiding the introduction of human selection bias during the sampling stage. This randomization mechanism guarantees that the selected sample population can unbiasedly represent the quality distribution of the entire batch, laying a statistical foundation for subsequently constructing a representative initial population quality benchmark vector.
[0066] The formula used to calculate and generate the initial population quality benchmark vector is as follows:
[0067]
[0068] in, The initial population quality baseline vector is composed of the average of the spectral eigenvectors of all sampling units;
[0069] For the first The spectral feature vector of each sampling unit;
[0070] The total number of sampling units is a positive integer that determines the representativeness of the average.
[0071] The larger, The better it represents the overall characteristics of the batch, the less the impact of random fluctuations. The smaller, The greater the impact of individual outliers.
[0072] Similarity Analysis and Cleanup Module: Calculates the similarity index of each sampling unit, calculates the initial similarity index control threshold based on the statistical distribution of the similarity index of each sampling unit, and uses the initial similarity index control threshold as the statistical boundary to distinguish between normal fluctuations and abnormal samples. The similarity index of each sampling unit is compared with the initial similarity index control threshold one by one to identify those units whose indices are lower than the threshold. These units are regarded as potential abnormal samples, and the sample cleanup process is performed based on the comparison results to obtain the cleaned population quality benchmark vector and similarity index control threshold.
[0073] The method for calculating the initial similarity index control threshold based on the statistical distribution of the similarity index of each sampling unit is as follows:
[0074] By calculating the arithmetic mean and standard deviation of the similarity index of all sampling units, the overall fluctuation of the sampling units in terms of quality characteristics is quantified. The arithmetic mean reflects the central tendency of the similarity index, i.e., the typical quality level of most samples; while the standard deviation measures the dispersion of these indices around the mean, thus intuitively revealing the uniformity or range of variation in sample quality within a batch. Based on these two statistics, combined with preset control coefficients, an initial similarity index control threshold can be calculated. Finally, a statistical criterion is established through this threshold, which can scientifically distinguish between normal fluctuations and abnormal deviations, providing an objective and quantitative basis for identifying samples with abnormal spectral characteristics.
[0075] The formula used to calculate the similarity index for each sampling unit is as follows:
[0076]
[0077] in, For the first The similarity index of the sampling unit is used to quantify the similarity index of the sampling unit. The similarity index between each sampling unit and the initial population quality benchmark vector is used to measure the degree of similarity between the sampling unit and the benchmark. The closer the similarity index is to 1, the more consistent the unit is with the benchmark; the smaller the similarity index is, the greater the difference is.
[0078] For the first The spectral feature vector of each sampling unit;
[0079] It is a preset, extremely small positive constant used to prevent the denominator from being zero and to ensure numerical stability;
[0080] and The closer they are, the smaller the molecules. The closer the value is to 1, the higher the quality similarity.
[0081] and The greater the difference, the larger the molecule. The smaller the value, the more likely it is to be a potential anomaly.
[0082] The formula used to calculate the initial similarity index control threshold is as follows:
[0083]
[0084] in, The initial similarity index control threshold;
[0085] The arithmetic mean of the similarity indices of all sampled units represents the central tendency of the similarity indices;
[0086] The standard deviation of the similarity index for all sampled units represents the degree of dispersion of the similarity index.
[0087] The preset control coefficients are the control coefficients. The offset used to adjust the threshold is determined by fitting historical spectral data. The larger the value, the lower the initial similarity index control threshold, and the stricter the standard for identifying abnormal samples.
[0088] The execution logic of the sample purification process is as follows:
[0089] When the similarity index of all sampling units is not lower than the initial similarity control threshold If the current batch of sampling units is determined to meet the quality similarity requirements, the current initial population quality benchmark vector is set. and the initial similarity index control threshold These serve as the baseline vectors for the purified population quality. Similarity index control threshold ;
[0090] When there are sampling units with similarity indices lower than the initial similarity control threshold In cases where the similarity index falls below the initial similarity control threshold, The sampling units are removed. Based on the remaining sampling units, a new population quality benchmark vector is recalculated. Based on the new population quality benchmark vector, a new similarity index for all remaining sampling units is recalculated. Based on the new similarity index, a new similarity index control threshold is calculated. This comparison and removal process is repeated using the new population quality benchmark vector and the new similarity index control threshold as the current standard.
[0091] This iterative process continues until the similarity index of all retained sampling units is not lower than the new similarity index control threshold under the current iteration. At this point, the new population quality benchmark vector and the new similarity index control threshold obtained from the final iteration are used as the purified population quality benchmark vector, respectively. Similarity index control threshold .
[0092] Risk assessment module: Near-infrared spectra of each individual packaging unit in the current batch are collected to ensure that the obtained spectra accurately reflect the intrinsic chemical composition and physical properties of the unit. After preprocessing and feature extraction, corresponding spectral feature vectors are constructed to form a standardized and structured numerical expression, providing reliable input for subsequent risk assessment. Based on the purified group quality benchmark vector and similarity index control threshold, the individual quality risk index is calculated. This index objectively reflects the degree of quality deviation of the unit relative to the batch benchmark, thereby achieving accurate quantitative assessment of the risk level of each unit.
[0093] The formula used to calculate the individual quality risk index is as follows:
[0094]
[0095] in, For the first The individual quality risk index of each independent packaging unit is used to quantify the risk level of the first unit. Quality risk level of each individual packaging unit;
[0096] The similarity index control threshold after purification is the final threshold obtained through iterative sample purification processes.
[0097] For the first The similarity index of each individual packaging unit is based on the purified group quality benchmark vector. Calculate the similarity index of this individual packaging unit. :
[0098] and and The difference is directly proportional, when hour, It is a positive value. And The larger the value, the higher the risk index; when hour, =0, The function ensures that the risk index is non-negative.
[0099] Tiered Disposal Module: Based on the individual quality risk index of each independent packaging unit, its risk level is determined and corresponding tiered disposal instructions are generated to ensure that each independent packaging unit receives disposal measures that match its risk level. Through this matching method, the system can optimize resource allocation, improve management efficiency, and ensure that each independent packaging unit receives disposal commensurate with its risk level while ensuring overall quality and safety, thereby enhancing the adaptability and accuracy of quality control.
[0100] The execution logic for determining the risk level of each independent packaging unit based on its individual quality risk index and generating corresponding graded disposal instructions is as follows:
[0101] when When the independent packaging unit is in complete agreement with the quality standard and there is no deviation, the risk level of the independent packaging unit is determined to be qualified, a release instruction is generated, and the unit is allowed to enter the subsequent circulation process normally without any additional intervention.
[0102] when This indicates that although the individual packaging unit has not reached an abnormal level, there is potential fluctuation. It needs to be marked during the circulation process and more frequently tracked and observed in order to identify possible quality changes at an early stage, determine the risk level of the unit as mild risk, generate early warning and strengthen monitoring instructions.
[0103] when When the risk level of the independent packaging unit is determined to be medium risk, the system triggers a sampling re-inspection instruction, requiring representative sampling and further inspection of the unit. The quality status is confirmed by reviewing the data, thereby avoiding misjudgment and balancing testing efficiency and accuracy.
[0104] when When the risk level of the independent packaging unit is determined to be high, the system immediately generates an interception and non-conforming product disposal instruction to ensure that the unit is quickly isolated to prevent it from affecting the overall batch quality.
[0105] in, and All risk level thresholds are preset, defining the boundaries of the risk range. This allows the system to implement a progressive response from low to high based on the actual risk level, improving the adaptability and accuracy of quality control, and meeting [the requirements]. .
[0106] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0107] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.
[0108] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0109] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A system for detecting traditional Chinese medicine decoction pieces based on a near-infrared spectrometer, characterized in that, Includes the following functional modules: The sampling and benchmark construction module sets up detection points at the circulation nodes of Chinese herbal medicine pieces, uses a simple random sampling method to select a preset number of independent units in the current batch as sampling units, and performs near-infrared spectral acquisition on the sampling units. The acquired near-infrared spectral data is preprocessed and features are extracted to construct a corresponding spectral feature vector for each sampling unit. Based on the spectral feature vector, an initial population quality benchmark vector is calculated and generated. The similarity analysis and purification module calculates the similarity index of each sampling unit, calculates the initial similarity index control threshold based on the statistical distribution of the similarity index of each sampling unit, compares the similarity index of each sampling unit with the initial similarity index control threshold, and performs a sample purification process based on the comparison results to obtain the purified population quality benchmark vector and the similarity index control threshold. The risk assessment module collects the near-infrared spectrum of each independent packaging unit in the current batch, and constructs the corresponding spectral feature vector after preprocessing and feature extraction. Based on the purified group quality benchmark vector and the similarity index control threshold, the individual quality risk index is calculated. The graded disposal module determines the risk level of each independent packaging unit based on its individual quality risk index and generates corresponding graded disposal instructions.
2. The system for detecting traditional Chinese medicine decoction pieces based on a near-infrared spectrometer according to claim 1, characterized in that: The method for preprocessing and feature extraction of the acquired near-infrared spectral data is as follows: The standard normal variable transformation algorithm is used to correct the spectral data of near-infrared spectral data to eliminate the spectral baseline and amplitude variation caused by sample particle scattering. Based on the preprocessed spectral data, absorbance data under the characteristic wavelength subset determined in advance by the partial least squares regression coefficient is extracted and arranged in wavelength order to form the spectral feature vector of the sampling unit.
3. The system for detecting traditional Chinese medicine decoction pieces based on a near-infrared spectrometer according to claim 2, characterized in that: The process of using the standard normal variable transformation algorithm to correct near-infrared spectral data is as follows: For the near-infrared spectra collected by each sampling unit, the arithmetic mean of the absorbance at all wavelengths of the near-infrared spectrum of each sampling unit is calculated. The original absorbance value at each wavelength is then subtracted from the arithmetic mean to obtain the centered absorbance value at each wavelength. The standard deviation of the absorbance at all wavelengths is then calculated. The centered absorbance value at each wavelength is then divided by the standard deviation to complete the standardization process, thereby outputting the corrected spectral data. Finally, the spectral baseline and amplitude variations caused by sample particle scattering and optical path changes are eliminated.
4. The system for detecting traditional Chinese medicine decoction pieces based on a near-infrared spectrometer according to claim 3, characterized in that: The formula used to calculate and generate the initial population quality benchmark vector is as follows: in, This is the initial population quality baseline vector; For the first The spectral feature vector of each sampling unit; This represents the total number of sampling units.
5. The system for detecting traditional Chinese medicine decoction pieces based on a near-infrared spectrometer according to claim 1, characterized in that: The method for calculating the initial similarity index control threshold based on the statistical distribution of the similarity index of each sampling unit is as follows: The arithmetic mean and standard deviation of the similarity index of all sampling units are calculated to quantify the quality fluctuation range of the sampling units; the initial similarity index control threshold is calculated based on the arithmetic mean and standard deviation, combined with a preset control coefficient, thereby establishing a statistical criterion for identifying samples with abnormal spectral characteristics.
6. The system for detecting traditional Chinese medicine decoction pieces based on a near-infrared spectrometer according to claim 5, characterized in that: The formula used to calculate the similarity index for each sampling unit is as follows: in, For the first The similarity index of the sampling unit is used to quantify the similarity index of the sampling unit. The degree of similarity between each sampling unit and the initial population quality benchmark vector; For the first The spectral feature vector of each sampling unit; It is a preset positive constant.
7. The system for detecting traditional Chinese medicine decoction pieces based on a near-infrared spectrometer according to claim 6, characterized in that: The formula used to calculate the initial similarity index control threshold is as follows: in, The initial similarity index control threshold; The arithmetic mean of the similarity indices of all sampled units; The standard deviation of the similarity index for all sampled units; These are the preset control coefficients.
8. The system for detecting traditional Chinese medicine decoction pieces based on a near-infrared spectrometer according to claim 7, characterized in that: The execution logic of the sample purification process is as follows: When the similarity index of all sampling units is not lower than the initial similarity control threshold If the current batch of sampling units is determined to meet the quality similarity requirements, the current initial population quality benchmark vector is set. and the initial similarity index control threshold These serve as the baseline vectors for the purified population quality. Similarity index control threshold ; When there are sampling units with similarity indices lower than the initial similarity control threshold In cases where the similarity index falls below the initial similarity control threshold, The sampling units are removed. Based on the remaining sampling units, a new group quality benchmark vector is recalculated. Based on the new group quality benchmark vector, a new similarity index for all remaining sampling units is recalculated. Based on the new similarity index, a new similarity index control threshold is calculated. The comparison and removal process is repeated using the new group quality benchmark vector and the new similarity index control threshold as the current standard. The iterative process continues until the similarity index of all retained sampling units is no lower than the new similarity index control threshold under the current iteration. At this point, the new population quality benchmark vector obtained from the final iteration and the new similarity index control threshold are used as the purified population quality benchmark vector, respectively. Similarity index control threshold .
9. The system for detecting traditional Chinese medicine decoction pieces based on a near-infrared spectrometer according to claim 1, characterized in that: The formula used to calculate the individual quality risk index is as follows: in, For the first The individual quality risk index of each independent packaging unit is used to quantify the risk level of the first unit. Quality risk level of each individual packaging unit; The similarity index control threshold after purification; For the first Similarity index of individual packaging units.
10. The system for detecting traditional Chinese medicine decoction pieces based on a near-infrared spectrometer according to claim 1, characterized in that: The execution logic for determining the risk level of each independent packaging unit based on its individual quality risk index and generating corresponding graded disposal instructions is as follows: when When the risk level of the independent packaging unit is determined to be qualified, a release instruction is generated; when When the risk level of the independent packaging unit is determined to be low, an early warning and enhanced monitoring instructions are generated. when When the risk level of the independent packaging unit is determined to be medium risk, a sampling re-inspection instruction is generated. when When the risk level of an independent packaging unit is determined to be high, an interception and non-conforming product disposal instruction is generated; in, and All are preset risk level thresholds, and meet the following requirements. .
Citation Information
Patent Citations
Detection System for Traditional Chinese Medicine Decoction Pieces Based on Near-Infrared Spectrometer
CN110632016B