Method and system for evaluating quality of traditional chinese medicinal materials based on data analysis
Patent Information
- Application Number
- CN202610884716.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-18
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2046-06-18
AI Technical Summary
1.通过对中药材特征数据进行多级递进式筛选与优化,有效提升了品质评价模型的判别可靠性与结果泛化能力,在模型构建前引入了基于数据内在结构的特征预筛选机制,通过无监督聚类分析区分稳定特征与波动特征,从源头分离了表征道地性的关键信息与产区内的随机变异干扰,克服了现有技术中各类信息混杂输入导致模型过拟合的固有问题,进一步通过分析稳定特征与波动特征之间的相关性,对稳定特征子集进行去耦合优化,主动剔除了那些虽表现稳定但与干扰信号高度关联的特征维度,从而确保输入后续模型的特征集合具有更高的纯净度和抗干扰性,使得最终用于构建评价模型的特征基础更为坚实和可靠。
Smart Images

Figure CN122412927B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing and pattern recognition technology, and more specifically, to a method and system for evaluating the quality of Chinese medicinal materials based on data analysis. Background Technology
[0002] Using fingerprinting and other analytical techniques to obtain characteristic data of Chinese medicinal materials and building algorithm models based on the characteristic data is an effective way to automatically evaluate their quality attributes such as authenticity and origin. Existing methods usually input the multidimensional characteristic data of medicinal materials into the classification model for training in order to establish a mapping relationship from data characteristics to origin labels.
[0003] However, the characteristic data of Chinese medicinal materials originates from the actual planting, processing, and testing processes, and its data composition is inherently complex. On the one hand, key characteristic signals that determine its core quality, such as the key feature signals of its origin, and specific component ratios are contained within it. On the other hand, non-discriminatory variations caused by individual differences, non-standard processing, or fluctuations in testing conditions within the same production area also exist in the data. In existing methods, these two types of information are in an undifferentiated mixed state when input into the model. Since the training goal of the classification model is to achieve correct classification of samples, it will equally utilize all available data features to fit the discrimination boundary. This makes it impossible for the model to fundamentally distinguish and discard those non-essential features that, while helping to fit the training set, are actually unrelated to stable quality. Therefore, when faced with new batches or slightly different samples that are not fully covered by the training data, the discrimination based on these unstable features is prone to inaccuracy, making it difficult to guarantee the generalization ability of the quality evaluation results of Chinese medicinal materials and their reliability in actual traceability scenarios. Summary of the Invention
[0004] In order to overcome the above-mentioned defects of the prior art, the present invention provides a method and system for evaluating the quality of Chinese medicinal materials based on data analysis to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: Data-driven methods for evaluating the quality of Chinese medicinal herbs include: S1. Obtain the original multidimensional feature data of the Chinese medicinal materials sample to be evaluated; S2. Preprocess the original multidimensional feature data to obtain standardized multidimensional feature data; S3. Based on standardized multidimensional feature data, stable feature subsets and fluctuating feature subsets are selected from all dimensions by analyzing the intra-class variance and inter-class separation of each dimension feature in the cluster structure through unsupervised clustering analysis. S4. Analyze the correlation between the features in the fluctuation feature subset and the features in the stable feature subset, and optimize the stable feature subset based on the correlation to obtain a decoupled stable feature subset. S5. Analyze the consistency of the relative size order of each dimension of features in the decoupled stable feature subset among different known origin reference samples, and identify the core feature subset with origin differentiation ability from the decoupled stable feature subset; S6. Construct an evaluation model based on the core feature subset, and input the corresponding core feature subset from the standardized multidimensional feature data of the Chinese medicinal material sample to be evaluated into the evaluation model, and output the quality evaluation results.
[0006] Furthermore, S1 includes: Acquire data from chromatographic analysis and spectral analysis of the Chinese medicinal materials samples to be evaluated; Extract chromatographic feature data from data obtained from chromatographic analysis, and extract spectral feature data from data obtained from spectral analysis; The chromatographic feature data and the spectral feature data are merged to obtain the original multidimensional feature data.
[0007] Furthermore, S2 includes: For missing feature values in the original multidimensional feature data, fill them with the mean of all reference sample feature values in the same feature dimension. For each feature dimension in the original multidimensional feature data after filling, calculate its mean and standard deviation respectively; Based on the mean and standard deviation of each feature dimension, Z-Score standardization is performed on the filled original multidimensional feature data to obtain standardized multidimensional feature data.
[0008] Furthermore, S3 includes: Unsupervised clustering was performed on reference samples from multiple known production areas using standardized multidimensional feature data to obtain the cluster structure; For each dimension feature in the standardized multidimensional feature data, the variance of the sample values of the corresponding dimension feature within the same cluster is calculated as the intra-class variance, and the mean difference of the sample values of the corresponding dimension feature between different clusters is calculated as the inter-class separation. Based on the intra-class variance and inter-class separation of each dimension feature, a stable feature subset is selected from the dimension features whose intra-class variance is less than a first preset threshold and whose inter-class separation is greater than a second preset threshold, and a fluctuating feature subset is selected from the dimension features whose intra-class variance is greater than or equal to the first preset threshold or whose inter-class separation is less than or equal to the second preset threshold.
[0009] Furthermore, unsupervised clustering is performed on reference samples from multiple known production areas using standardized multidimensional feature data to obtain the clustering structure. Specifically, the K-means clustering algorithm is used to cluster the reference samples from multiple known production areas corresponding to the standardized multidimensional feature data to obtain the clustering structure.
[0010] Furthermore, S4 includes: For each dimension feature in the stable feature subset, calculate its correlation coefficient with all dimensions features in the fluctuating feature subset; For each dimension feature in the stable feature subset, count the number of times the absolute value of its correlation coefficient with the dimension features in the fluctuating feature subset exceeds a preset correlation threshold. Remove dimensional features from the stable feature subset whose number of statistical counts exceeds a preset threshold, and retain the remaining dimensional features to form a decoupled stable feature subset.
[0011] Furthermore, S5 includes: For each dimension feature in the decoupled stable feature subset, based on the value of the corresponding dimension feature in all reference samples of each known origin, determine the representative feature value of the corresponding origin on the corresponding dimension feature; For any two different known production sites, compare their representative feature values in the corresponding dimension to obtain the relative size order of the corresponding dimension features in all pairwise comparisons of all known production sites; Calculate the consistency measure between the relative size order of the corresponding dimension features in pairwise comparisons of all known origins and the preset actual order of origins; Dimensional features whose consistency metric values exceed a preset consistency threshold within the decoupled stable feature subset are identified as core feature subsets with production area differentiation capabilities.
[0012] Furthermore, S6 includes: Standardized multidimensional feature data of known origin reference samples corresponding to the core feature subset are used as training data to train a support vector machine classifier as an evaluation model. The dimensional feature values corresponding to the core feature subset in the standardized multidimensional feature data of the Chinese medicinal material sample to be evaluated are input into the support vector machine classifier; Obtain the class labels and probabilities output by the support vector machine classifier, and use the corresponding class labels and probabilities as the quality evaluation results.
[0013] Furthermore, the trained support vector machine classifier is used as the evaluation model. Specifically, based on the standardized multidimensional feature data corresponding to the core feature subset, grid search and cross-validation are used to determine the optimal kernel function and penalty parameters of the support vector machine classifier, and the optimal kernel function and penalty parameters are used to train and obtain the support vector machine classifier.
[0014] On the other hand, the present invention provides a data analysis-based quality evaluation system for traditional Chinese medicinal materials, comprising: The data acquisition module is used to acquire the original multidimensional feature data of the Chinese medicinal materials samples to be evaluated; The data processing module is used to preprocess the raw multidimensional feature data to obtain standardized multidimensional feature data. The feature selection module is used to select stable feature subsets and fluctuating feature subsets from all dimensions based on standardized multidimensional feature data and through unsupervised clustering analysis of the intra-class variance and inter-class separation of each feature in the cluster structure. The feature optimization module is used to analyze the correlation between features in the fluctuating feature subset and features in the stable feature subset, and optimize the stable feature subset based on the correlation to obtain a decoupled stable feature subset. The feature recognition module is used to analyze the consistency of the relative size order of each dimension of features in the decoupled stable feature subset among different known origin reference samples, and to identify the core feature subset with origin differentiation capability from the decoupled stable feature subset; The evaluation execution module is used to construct an evaluation model based on a subset of core features, and input the corresponding subset of core features from the standardized multidimensional feature data of the Chinese medicinal materials sample to be evaluated into the evaluation model, and output the quality evaluation results.
[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. By conducting multi-level progressive screening and optimization of the characteristic data of Chinese medicinal materials, the discriminative reliability and result generalization ability of the quality evaluation model are effectively improved. Before model construction, a feature pre-screening mechanism based on the inherent structure of the data is introduced. Unsupervised clustering analysis is used to distinguish between stable features and fluctuating features, separating the key information representing authenticity from the random variation interference within the production area from the source. This overcomes the inherent problem of model overfitting caused by mixed input of various types of information in existing technologies. Furthermore, by analyzing the correlation between stable features and fluctuating features, the stable feature subset is decoupled and optimized, actively eliminating feature dimensions that, although stable, are highly correlated with interference signals. This ensures that the feature set input into the subsequent model has higher purity and anti-interference ability, making the feature foundation used to build the evaluation model more solid and reliable.
[0016] 2. By analyzing the consistency between the relative size order of optimized features in known production areas and the preset theoretical order, a core feature subset with a clear logic of production area differentiation was finally identified. This not only ensured the statistical stability of the selected features but also endowed them with discriminative semantics consistent with the theory of authenticity. This enabled the constructed evaluation model to have the dual advantages of data-driven and knowledge-guided approaches. Using only this rigorously selected and verified core feature subset to build the model significantly reduced the model's dependence on random noise and improved the accuracy and stability of identification when facing medicinal material samples from different batches and sources. This provides a more reliable and robust automated evaluation result for the identification of the authenticity and traceability of Chinese medicinal materials. The beneficial effects are fully reflected in the improvement of the data processing flow and feature selection logic, effectively enhancing the reliability of data analysis methods in practical applications. Attached Figure Description
[0017] Figure 1 This is a flowchart of the data analysis-based method for evaluating the quality of Chinese medicinal materials according to the present invention. Figure 2 This is a schematic diagram of the structure of the data analysis-based quality evaluation system for Chinese medicinal materials of the present invention. Detailed Implementation
[0018] 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.
[0019] Example 1: Figure 1 This invention presents a data analysis-based method for evaluating the quality of traditional Chinese medicinal materials, including: S1. Obtain the original multidimensional feature data of the Chinese medicinal materials sample to be evaluated; S2. Preprocess the original multidimensional feature data to obtain standardized multidimensional feature data; S3. Based on standardized multidimensional feature data, stable feature subsets and fluctuating feature subsets are selected from all dimensions by analyzing the intra-class variance and inter-class separation of each dimension feature in the cluster structure through unsupervised clustering analysis. S4. Analyze the correlation between the features in the fluctuation feature subset and the features in the stable feature subset, and optimize the stable feature subset based on the correlation to obtain a decoupled stable feature subset. S5. Analyze the consistency of the relative size order of each dimension of features in the decoupled stable feature subset among different known origin reference samples, and identify the core feature subset with origin differentiation ability from the decoupled stable feature subset; S6. Construct an evaluation model based on the core feature subset, and input the corresponding core feature subset from the standardized multidimensional feature data of the Chinese medicinal material sample to be evaluated into the evaluation model, and output the quality evaluation results.
[0020] For step S1, the original multidimensional feature data of the Chinese medicinal material sample to be evaluated is obtained, and an example is as follows: The medicinal herb samples to be evaluated are prepared to obtain test samples that meet the instrument's injection requirements. Preparation includes pulverizing and sieving the medicinal herb samples to obtain a uniform powder. An appropriate amount of powder is then taken and processed according to the standard pretreatment method for the selected analytical technique. In the example, for high-performance liquid chromatography (HPLC), ultrasonic extraction with methanol-water solution is used, and the extract is filtered through a membrane to obtain the test solution. For near-infrared spectroscopy (NIRS), the powdered sample is directly loaded into a sample cup and compacted to ensure a smooth surface.
[0021] After sample preparation, chromatographic and spectroscopic analyses were performed. Chromatographic analysis was performed using either high-performance liquid chromatography (HPLC) or gas chromatography (GC). HPLC instrument parameters included a C18 reversed-phase column, a mobile phase of methanol and water in a specific ratio, a gradient elution program, a column temperature of 30°C, a UV detector at 254 nm, and a flow rate of 1 mL / min. The analyte was injected into the syringe, and the instrument recorded and output chromatographic data including retention time and corresponding peak area. GC instrument parameters included a DB-5 capillary column, nitrogen as the carrier gas, a programmed temperature ramp, an injection port temperature of 250°C, and a flame ionization detector. The analyte was injected into the syringe, and the instrument recorded and output chromatographic data including retention time and corresponding peak area.
[0022] Spectroscopic analysis was performed using a near-infrared spectrometer or a UV-Vis spectrometer. The instrument parameters for near-infrared spectroscopy included a scan wavenumber range of 10,000 to 4,000, a resolution of 8 wavenumbers, and 64 scans. A sample cup containing the sample was placed in the sample chamber, and the instrument recorded and output the absorbance data at different wavenumbers, i.e., the spectral data. The instrument parameters for UV-Vis spectroscopy included a scan wavelength range of 200 nm to 800 nm and a bandwidth of 2 nm. A cuvette containing the test solution was placed in the optical path, and the instrument recorded and output the absorbance data at different wavelengths, i.e., the spectral data. This completed the acquisition of data from both chromatographic and spectral analysis of the medicinal herb samples to be evaluated.
[0023] Chromatographic feature data is extracted from the data obtained from chromatographic analysis. This process is based on the obtained chromatogram data. Chromatographic feature data mainly includes the retention time and peak area of each chromatographic peak. During the extraction of chromatographic feature data, baseline correction and peak identification are performed on the chromatogram. Baseline correction uses linear fitting or polynomial fitting methods to subtract background signals. Peak identification determines the start and end points and peak apex of the chromatographic peak based on the first or second derivative of the signal, identifying all chromatographic peaks with a signal-to-noise ratio greater than 3:1. For each identified chromatographic peak, the retention time value corresponding to the peak apex is recorded, in minutes. Simultaneously, the peak area is calculated by integrating the area enclosed by the chromatographic response signal curve between the start and end points of the chromatographic peak and the baseline. The integration method used is the trapezoidal integration method, and the peak area unit is typically microvolts multiplied by seconds or milliabsorbance multiplied by minutes. The retention times and peak areas of all identified chromatographic peaks are combined into an ordered dataset, which is the chromatographic feature data extracted from this chromatographic analysis. In this example, a single high-performance liquid chromatography (HPLC) analysis may identify 15 characteristic chromatographic peaks, and the extracted chromatographic feature data will include 15 retention time values and 15 peak area values.
[0024] Spectral feature data is extracted from the data obtained from spectral analysis. This process is based on the acquired spectral data. Spectral feature data primarily focuses on characteristic absorption peak information in the spectrum, including the position and intensity of the absorption peaks. Preprocessing is performed on the spectral data during extraction. Preprocessing includes smoothing and denoising the spectral curve using the Savitzky-Golay convolution smoothing method, and baseline correction using multivariate scattering correction or standard normal variable transformation. Next, absorption peaks on the spectral curve are identified, i.e., by finding the zero point of the first derivative and the extreme points of the second derivative of the spectral curve to determine local minima or inflection points; the corresponding wavelength or wavenumber is the absorption peak position. For each identified absorption peak, the peak position value is recorded in nanometers or wavenumbers. Simultaneously, the intensity of the absorption peak is determined, characterized by calculating the peak-valley depth, i.e., the difference between the absorbance value at the peak-valley and the average absorbance value of the baselines on both sides. In this example, in the ultraviolet-visible spectrum, the absorbance value at a specific wavelength is used as the peak intensity of the absorption peak; in the near-infrared spectrum, the absorbance value at a specific wavenumber is used as the peak intensity of the absorption peak. The position and intensity information of all identified absorption peaks are compiled into an ordered dataset, which is the spectral feature data extracted from this spectral analysis. In this example, a single near-infrared spectral analysis may extract the positions and intensities of 20 characteristic absorption peaks, forming 20 feature data pairs.
[0025] The chromatographic and spectral feature data are merged to obtain the original multidimensional feature data. The merging operation involves concatenating two sets of feature data extracted from the chromatographic and spectral analyses of the same sample into a longer one-dimensional feature vector in a predetermined order. The merging method uses sequential concatenation, where all values from the chromatographic feature data are arranged in their original order first, followed by all values from the spectral feature data in their original order, forming a combined vector. In an example, assuming the extracted chromatographic feature data contains 30 values (15 retention times and 15 peak areas) and the extracted spectral feature data contains 40 values (20 absorption peak positions and 20 absorption peak intensities), the resulting original multidimensional feature data is a one-dimensional vector containing 70 values, where each value represents a feature dimension. This original multidimensional feature data provides the foundation for subsequent standardization and feature selection steps. The entire acquisition and merging process ensures the diversity of data sources and the richness of feature dimensions.
[0026] For step S2, the original multidimensional feature data is preprocessed to obtain standardized multidimensional feature data, as illustrated in the following example: The missing feature values in the original multidimensional feature data are processed. The original multidimensional feature data is a matrix. The rows of the matrix correspond to different Chinese medicinal material samples. The columns of the matrix correspond to different feature dimensions. A missing feature value refers to a sample in the original multidimensional feature data matrix that has no numerical record or whose numerical record is an invalid identifier in a certain feature dimension. Invalid identifiers include null values or specific characters. All missing feature values in the original multidimensional feature data are identified. For each identified missing feature value, the specific sample to which the missing feature value belongs and the specific feature dimension to which the missing feature value belongs are determined. For the specific feature dimension to which the missing feature value belongs, the feature values of all reference samples in the specific feature dimension are collected. Reference samples refer to Chinese medicinal material samples from known origins. The original multidimensional feature data of the reference samples has been obtained through step S1. The arithmetic mean of all valid feature values of all reference samples in the specific feature dimension is calculated. The arithmetic mean is calculated by summing the values and dividing by the number of valid feature values. The calculated arithmetic mean is used to replace the missing feature values of the sample in the original multidimensional feature data in that feature dimension. Perform the imputation operation described above on each identified missing feature value in the original multidimensional feature data. After imputing all missing feature values, the imputed original multidimensional feature data is obtained. For example, if a feature dimension has 50 reference samples, of which 49 reference samples have valid feature values and 1 reference sample has a missing feature value, then calculate the arithmetic mean of the 49 valid feature values and use this arithmetic mean to impute the 1 missing feature value.
[0027] For each feature dimension in the padded original multidimensional feature data, calculate its mean and standard deviation. Perform independent calculations for each feature dimension in the padded original multidimensional feature data. For a feature dimension, obtain the feature values of all reference samples for that feature dimension. The feature values of all reference samples constitute a numerical set. Calculate the mean of this numerical set. The mean is the sum of all values in the numerical set divided by the number of values. Calculate the standard deviation of this numerical set. The standard deviation is the positive square root of the variance. The variance is the average of the sum of squares of the differences between each value and the mean. The input parameters for calculating the mean and standard deviation are the feature values of all reference samples corresponding to that feature dimension in the padded original multidimensional feature data. All reference sample feature values are real numbers. The output is two real numbers. These two real numbers represent the mean and standard deviation of that feature dimension, respectively. This calculation process provides a measure of the centrality and dispersion of each feature dimension for subsequent standardization steps. For example, for a feature dimension containing 50 reference samples, the mean is calculated as the sum of the 50 feature values divided by 50, the standard deviation is calculated as the square of the difference between each feature value and the mean, the average of the 50 squared values is then calculated to obtain the variance, and finally the positive square root of the variance is taken.
[0028] Based on the mean and standard deviation of each feature dimension, Z-Score standardization is performed on the padded original multidimensional feature data to obtain standardized multidimensional feature data. Z-Score standardization is performed on each feature value in the padded original multidimensional feature data. For any feature value in the padded original multidimensional feature data, the sample to which the feature value belongs and the feature dimension to which the feature value belongs are determined. Based on the feature dimension to which the feature value belongs, the mean and standard deviation of that feature dimension are obtained. Subtraction is performed. Subtraction subtracts the mean of the feature dimension from the feature value to obtain the first difference. Division is performed. Division divides the first difference by the standard deviation of the feature dimension to obtain the standardized feature value. The above subtraction and division operations are repeated for all feature values of all samples and all feature dimensions in the padded original multidimensional feature data. After Z-Score standardization, the numerical distribution of each feature dimension is transformed into a distribution with a mean of 0 and a standard deviation of 1. All the calculated standardized feature values are reorganized into a matrix according to the correspondence between the original samples and feature dimensions. This matrix represents the standardized multidimensional feature data. For example, if the mean of a certain feature dimension is 100, the standard deviation of that feature dimension is 15, and the original feature value of a sample under that feature dimension is 130, then the subtraction operation (130-100) yields the first difference of 30, and the division operation (30 / 15) yields the standardized feature value 2. Through this process, the standardized multidimensional feature data is obtained. The preprocessing process is complete.
[0029] For step S3, based on standardized multidimensional feature data, unsupervised clustering analysis is used to select stable and fluctuating feature subsets from all dimensions by analyzing the intra-class variance and inter-class separation of each feature in the cluster structure. An example is as follows: Unsupervised clustering is performed on reference samples from multiple known production areas using standardized multidimensional feature data to obtain the cluster structure. The clustering operation targets the reference samples from multiple known production areas corresponding to the standardized multidimensional feature data. The clustering operation is performed using the K-means clustering algorithm. The number of clusters K is determined based on the actual number of production area categories. For example, if the number of known production area categories is 3, then the number of clusters K is set to 3. K cluster centers are initialized. The initialization method is to randomly select K sample points from all reference samples as initial cluster centers. Iterative computation begins. The Euclidean distance from each reference sample to the K cluster centers is calculated. The Euclidean distance is calculated based on all feature dimension values of the sample in the standardized multidimensional feature data. Each reference sample is assigned to the cluster to which the nearest cluster center belongs. After assignment, the mean vector of all sample points in each cluster is recalculated. The mean vector of each cluster is updated with the new cluster center for that cluster. The iteration is then stopped. The decision is based on whether the change in the cluster center's position is less than a preset convergence threshold of 0.001, or whether the number of iterations has reached the preset maximum number of iterations of 100. If the change in the cluster center's position is greater than or equal to the preset convergence threshold of 0.001 and the number of iterations is less than the preset maximum number of iterations of 100, the steps of calculating distance, assigning samples, and updating centers are repeated. If the change in the cluster center's position is less than the preset convergence threshold of 0.001 or the number of iterations has reached the preset maximum number of iterations of 100, the iteration stops. After the iteration stops, each reference sample belongs to a specific cluster. The cluster assignments of all reference samples together constitute the cluster structure.
[0030] For each feature dimension in the standardized multidimensional feature data, the variance of the corresponding feature's sample values within the same cluster is calculated as the within-class variance, and the difference in the mean of the corresponding feature's sample values across different clusters is calculated as the between-class separation. This calculation is performed independently for each feature dimension of the standardized multidimensional feature data. For a specific feature dimension, processing is performed based on the clustering structure. The clustering structure contains K clusters. For a specific cluster, the values of all reference samples belonging to this cluster for this specific feature dimension are collected. These values form a subset. The variance of this subset is calculated. The variance is calculated by dividing the sum of the squares of the differences between each value in the subset and the subset mean by the number of values in the subset. This variance value is the within-class variance of this specific feature dimension within this specific cluster. Iterating through all K clusters, K within-class variance values of this specific feature dimension within the K clusters are obtained. The arithmetic mean of these K within-class variance values is calculated. This arithmetic mean is the final within-class variance of this specific feature dimension. Next, the inter-class separation for this specific feature dimension is calculated. The arithmetic mean of the values taken by all reference samples in each cluster for this specific feature dimension is calculated to obtain the cluster mean for each cluster. K cluster means are obtained. The absolute value of the difference between the cluster means for all possible pairwise clusters is calculated. For example, the absolute value of the difference between cluster means M1 and M2, |M1-M2|, the absolute value of the difference between cluster means M1 and M3, |M1-M3|, and the absolute value of the difference between cluster means M2 and M3, |M2-M3|, is calculated. The arithmetic mean of all these absolute values is then calculated. This arithmetic mean is used as the inter-class separation for this specific feature dimension. Through the above process, for each feature dimension in the standardized multidimensional feature data, a within-class variance value and a between-class separation value are calculated.
[0031] Based on the intra-class variance and inter-class separation of each feature dimension, a stable feature subset is formed by selecting features with intra-class variance less than a first preset threshold and inter-class separation greater than a second preset threshold, and a fluctuating feature subset is formed by selecting features with intra-class variance greater than or equal to the first preset threshold or inter-class separation less than or equal to the second preset threshold. The first preset threshold is a judgment threshold set for intra-class variance. The method for obtaining the first preset threshold is to analyze the distribution of intra-class variance values for all feature dimensions. For example, the median of the intra-class variance values for all feature dimensions is calculated, and the first preset threshold is set to this median value. The second preset threshold is a judgment threshold set for inter-class separation. The method for obtaining the second preset threshold is to analyze the distribution of inter-class separation values for all feature dimensions. For example, the median of the inter-class separation values for all feature dimensions is calculated, and the second preset threshold is set to this median value. The selection process iterates through all feature dimensions. For a feature dimension, it is determined whether the intra-class variance of this feature dimension is less than the first preset threshold. Simultaneously, it is determined whether the inter-class separation of this feature dimension is greater than the second preset threshold. If the intra-class variance of a feature dimension is less than a first preset threshold and the inter-class separation of that feature dimension is greater than a second preset threshold, then that feature dimension is classified into the stable feature subset. If the intra-class variance of a feature dimension is greater than or equal to the first preset threshold or the inter-class separation of that feature dimension is less than or equal to the second preset threshold, then that feature dimension is classified into the fluctuating feature subset. After traversing and judging all feature dimensions, the final stable and fluctuating feature subsets are formed. For example, if the first preset threshold is 0.5, the second preset threshold is 1.0, and the intra-class variance of a certain feature dimension is 0.3 and the inter-class separation is 1.5, since 0.3 < 0.5 and 1.5 > 1.0, this feature dimension is classified into the stable feature subset. The filtering process is complete.
[0032] For step S4, the correlation between features in the fluctuating feature subset and features in the stable feature subset is analyzed, and the stable feature subset is optimized based on the correlation to obtain a decoupled stable feature subset. An example of this is as follows: For each dimension feature in the stable feature subset, calculate its correlation coefficient with all dimensions features in the fluctuating feature subset. The stable and fluctuating feature subsets are two feature sets obtained by filtering from all feature dimensions in step S3. The stable feature subset contains multiple dimensions, and the fluctuating feature subset also contains multiple dimensions. Calculating the correlation coefficient requires standardized multidimensional feature data based on reference samples from multiple known origins. For a specific dimension feature in the stable feature subset, obtain the value sequence of all reference samples for that specific dimension feature. This value sequence is a vector, where each element corresponds to a standardized feature value of a reference sample for that specific dimension feature. Similarly, for a specific dimension feature in the fluctuating feature subset, obtain the value sequence of all reference samples for that specific dimension feature. Calculate the Pearson correlation coefficient between the value sequences of the specific dimension features in the stable and fluctuating feature subsets. The Pearson correlation coefficient is calculated by first calculating the arithmetic mean of the value sequences of the specific dimension features in the stable feature subset, and then calculating the arithmetic mean of the value sequences of the specific dimension features in the fluctuating feature subset. Then, calculate the difference between each element in the value sequence of the specific dimensional feature in the stable feature subset and its arithmetic mean, and calculate the difference between each element in the value sequence of the specific dimensional feature in the fluctuating feature subset and its arithmetic mean. Next, calculate the product of each pair of corresponding differences and sum all products. Then, calculate the sum of squares of all differences in the value sequences of the specific dimensional features in the stable feature subset, and calculate the sum of squares of all differences in the value sequences of the specific dimensional features in the fluctuating feature subset. Finally, divide the sum of all products by the square root of the product of the sum of squares of the differences in the value sequences of the specific dimensional features in the stable feature subset and the sum of squares of the differences in the value sequences of the specific dimensional features in the fluctuating feature subset. The calculated Pearson correlation coefficient is a value between -1 and +1. For each dimensional feature in the stable feature subset, perform the operation of calculating its Pearson correlation coefficient with each dimensional feature in the fluctuating feature subset. For example, if the stable feature subset has 20 dimensions and the fluctuating feature subset has 30 dimensions, then 20 × 30 = 600 Pearson correlation coefficients can be calculated.
[0033] For each dimension feature in the stable feature subset, count the number of times its absolute correlation coefficient with the dimension features in the fluctuating feature subset exceeds a preset correlation threshold. The preset correlation threshold is a boundary value used to judge the strength of linear correlation. The preset correlation threshold is set based on statistical experience regarding the degree of correlation. In statistical analysis, a Pearson correlation coefficient absolute value > 0.7 is generally considered a strong correlation, a Pearson correlation coefficient absolute value between 0.3 and 0.7 is considered a moderate correlation, and a Pearson correlation coefficient absolute value < 0.3 is considered a weak correlation. Based on this experience, the preset correlation threshold can be set to 0.6. For example, the preset correlation threshold can be set to 0.6. The statistical operation is performed independently for each dimension feature in the stable feature subset. For a specific dimension feature in the stable feature subset, check the absolute value of the Pearson correlation coefficient calculated between that specific dimension feature and all dimension features in the fluctuating feature subset. For each Pearson correlation coefficient, determine whether its absolute value is greater than the preset correlation threshold of 0.6. Count the number of Pearson correlation coefficients that satisfy the condition of an absolute value greater than 0.6. This number reflects the number of stable feature dimensional features that have a strong linear correlation with the overall subset of fluctuation features. By iterating through all dimensional features in the stable feature subset, a count is obtained for each dimensional feature.
[0034] Dimensional features whose statistical counts exceed a preset threshold are removed from the stable feature subset, leaving the remaining dimensional features to form a decoupled stable feature subset. The preset threshold is a critical number used to determine whether to remove a stable feature dimension. The setting of the preset threshold needs to consider the size of the fluctuating feature subset. One method is to set it as a proportion of the total number of dimensional features in the fluctuating feature subset. For example, the preset threshold can be set to 10% of the total number of dimensional features in the fluctuating feature subset. If the fluctuating feature subset has 30 dimensional features, the preset threshold is set to 3. Another method is to set it based on the distribution of the statistical counts of all stable feature dimensions. For example, calculate the median of the statistical counts of all stable feature dimensions and set the preset threshold to that median value. The filtering and removal operation is performed on each dimensional feature in the stable feature subset. For a specific stable feature dimension, the statistical count of that dimension is compared with the preset threshold. If the count is greater than the preset threshold, the dimensional feature is removed from the stable feature subset. If the count is less than or equal to the preset threshold, the dimensional feature is retained. This comparison and removal decision is performed on all dimensional features in the stable feature subset. All retained dimensional features form a new set, which is the decoupled stable feature subset. There is no widespread strong linear correlation between the features in the decoupled stable feature subset and the features in the fluctuating feature subset, indicating that its stability is less affected by random fluctuations or disturbances. For example, with a preset quantity threshold of 3, if the quantity of a certain stable feature dimension is 5, this feature is removed because 5 > 3; if the quantity of another stable feature dimension is 2, this feature is retained because 2 ≤ 3. The optimization process is complete, resulting in the decoupled stable feature subset.
[0035] For step S5, the consistency of the relative size order of each dimension of features in the decoupled stable feature subset among different known origin reference samples is analyzed. A core feature subset with origin differentiation capability is identified from the decoupled stable feature subset. An example of this is as follows: For each dimension feature in the decoupled stable feature subset, based on the value of the corresponding dimension feature in all reference samples for each known origin, a representative feature value for the corresponding origin in the corresponding dimension feature is determined. The decoupled stable feature subset is the feature set obtained after optimization in step S4. The decoupled stable feature subset contains multiple dimension features. Known origins are multiple geographical origin categories. Known origins include, for example, origin A, origin B, and origin C. For a specific dimension feature in the decoupled stable feature subset, a representative feature value is calculated for each known origin. Standardized multidimensional feature data based on reference samples from multiple known origins is calculated. For a specific known origin, the standardized feature values of all reference samples belonging to that specific known origin in the specific dimension feature are collected. These standardized feature values constitute a numerical set. The representative feature value is determined using the median of this numerical set. The median is calculated by arranging all values in the numerical set in ascending order. If the number of values in the numerical set is odd, the middle value after arranging is taken as the median. If the number of values in the set is even, the median is the arithmetic mean of the two middle values after sorting. This process of collecting values and calculating the median is repeated for each known origin. For example, for a specific dimensional feature, origin A has 15 reference samples, resulting in 15 standardized feature values. These 15 values are sorted, and the 8th value is taken as the median, yielding the representative feature value for origin A in that specific dimensional feature. Through this process, the set of representative feature values for that specific dimensional feature across all known origins is obtained.
[0036] For any two different known producing areas, their representative feature values on the corresponding dimensional feature are compared to obtain the relative size order of the corresponding dimensional feature in the pairwise comparison of all known producing areas. The number of known producing areas is recorded as P. For any two different known producing areas, for example, producing area A and producing area B, obtain the representative feature value RA of producing area A on the specific dimensional feature, and obtain the representative feature value RB of producing area B on the specific dimensional feature. Compare the sizes of RA and RB. If RA>RB, record that the representative feature value of producing area A is greater than the representative feature value of producing area B. If RA<RB, record that the representative feature value of producing area A is less than the representative feature value of producing area B. If RA=RB, record that the representative feature value of producing area A is equal to the representative feature value of producing area B. Traverse all possible pairwise producing area combinations. The number of all possible pairwise producing area combinations is P×(P-1) / 2. For example, if there are 3 known producing areas, namely producing area A, producing area B and producing area C, the combinations to be compared are producing area A and producing area B, producing area A and producing area C, and producing area B and producing area C. Perform the above comparison operation on each combination. Summarize all comparison results to form an order relation list. This order relation list describes the relative size order between the representative feature values of different producing areas on the specific dimensional feature. For example, the comparison result may be that the representative feature value of producing area A is greater than that of producing area B, the representative feature value of producing area A is less than that of producing area C, and the representative feature value of producing area B is less than that of producing area C.
[0037] Calculate the consistency metric between the relative size order obtained from pairwise comparison of all known producing areas for the corresponding dimensional feature and the preset real order of producing areas. The preset real order of producing areas is a predefined sequence. The preset real order of producing areas reflects the expected order of different known producing areas in a specific dimension. The preset real order of producing areas can be obtained based on external objective data. For example, based on the geographic latitude data of each known producing area, sort the known producing areas according to the latitude value from low to high to form the preset real order of producing areas. The Spearman rank correlation coefficient is used to calculate the consistency metric. In the calculation process, an observation rank is first assigned to each known producing area according to the relative size order obtained in the previous step. The method of assigning observation ranks is to sort the representative feature values of all known producing areas from large to small. If equal representative feature values occur in the sorting, these producing areas are assigned the same rank, which is the arithmetic mean of their occupied position serial numbers. Meanwhile, a real rank is assigned to each known producing area according to the preset real order of producing areas. The producing area ranked first in the preset real order of producing areas has a real rank of 1, the producing area ranked second has a real rank of 2, and so on. Calculate the difference between the observation rank and the real rank for each known producing area. Calculate the sum of squared differences of all known producing areas. The Spearman rank correlation coefficient is calculated by subtracting 6 times the sum of squared differences from 1, then dividing by P×(P2 -1). The calculated Spearman rank correlation coefficient is a value between -1 and +1. This calculation is performed on each dimension feature in the decoupled stable feature subset to obtain a consistency measure. For example, for a certain dimension feature, the calculated Spearman rank correlation coefficient is 0.8.
[0038] Dimensional features whose consistency metric values exceed a preset consistency threshold within the decoupled stable feature subset are identified as core feature subsets with production differentiation capabilities. The preset consistency threshold is a boundary value used to determine whether consistency is sufficiently strong. The preset consistency threshold is set based on the understanding of the statistical significance of the Spearman rank correlation coefficient. In statistics, a Spearman rank correlation coefficient > 0.7 is generally considered to indicate a strong correlation. Based on this, the preset consistency threshold can be set to 0.7. For example, setting the preset consistency threshold to 0.7. Another method is based on the distribution of consistency metrics calculated from all decoupled stable feature dimensional features. For example, calculating the median of the consistency metrics for all dimensional features and setting the preset consistency threshold to the value of that median. The screening and identification operation is performed on each dimensional feature within the decoupled stable feature subset. For a specific dimensional feature, its consistency metric value is compared with the preset consistency threshold. If the consistency metric value > the preset consistency threshold, the dimensional feature is considered to have production differentiation capabilities and is included in the core feature subset. If the consistency metric value ≤ the preset consistency threshold, it is not included in the core feature subset. Iterate through all dimensional features in the decoupled stable feature subset, performing the comparison and identification decisions described above. All identified dimensional features constitute the core feature subset. For example, if a certain dimensional feature has a consistency metric of 0.85 and a preset consistency threshold of 0.7, since 0.85 > 0.7, this feature is identified as a core feature. The identification process is complete, and the core feature subset is obtained.
[0039] For step S6, an evaluation model is constructed based on a subset of core features. The corresponding subset of core features from the standardized multidimensional feature data of the medicinal material sample to be evaluated is input into the evaluation model, and the quality evaluation result is output. An example of this is as follows: A support vector machine (SVM) classifier is trained using standardized multidimensional feature data of known origin reference samples corresponding to the core feature subset as training data, serving as the evaluation model. The core feature subset is the set of dimensional features with origin-distinguishing capabilities identified in step S5. The standardized multidimensional feature data of the known origin reference samples comes from the processing results of step S2. Training data is constructed by extracting feature values corresponding to all dimensional features in the core feature subset for each known origin reference sample from the standardized multidimensional feature data. The extracted feature values constitute a feature vector. The dimension of the feature vector is equal to the number of dimensional features in the core feature subset. This feature vector and its corresponding known origin label together constitute a training sample. The feature vectors corresponding to all known origin reference samples and their origin labels constitute a complete training dataset. The SVM classifier is trained based on this training dataset.
[0040] The specific process of training a Support Vector Machine (SVM) classifier as an evaluation model involves using standardized multidimensional feature data corresponding to a subset of core features, grid search and cross-validation to determine the optimal kernel function and penalty parameters for the SVM classifier, and then training the SVM classifier using the optimal kernel function and penalty parameters. A parameter grid is defined. The parameter grid includes a candidate list of kernel function types to be searched and a candidate list of penalty parameter C values. The candidate list of kernel function types includes linear kernel functions and radial basis function (RBF) kernel functions. The candidate list of penalty parameter C values is a sequence of multiple values, for example, [0.1, 1, 10, 100]. If the candidate list of kernel function types includes RBF kernel functions, the parameter grid also needs to include a candidate list of RBF kernel width parameters γ, for example, [0.001, 0.01, 0.1, 1].
[0041] Perform grid search and cross-validation. Cross-validation uses the K-fold cross-validation method, for example, setting the number of folds K to 5. Specifically, the training dataset is randomly divided into 5 approximately equal subsets. In each round of evaluation, one subset is selected as the validation set, and the remaining 4 subsets are used as the training set. A support vector machine (SVM) classifier model is trained on the training set using the current kernel function type, penalty parameter C, and width parameter γ. The classification accuracy of this SVM classifier model is calculated on the validation set. Classification accuracy is the number of correctly predicted samples divided by the total number of samples in the validation set. The arithmetic mean of the classification accuracies obtained from 5 rounds of evaluation is calculated to obtain the average classification accuracy of the current parameter combination. All parameter combinations in the parameter grid are traversed, and the above cross-validation process is performed for each parameter combination, recording its average classification accuracy. The parameter combination with the highest average classification accuracy is selected as the optimal parameter combination. The optimal parameter combination includes the optimal kernel function, the optimal penalty parameter C, and, if the optimal kernel function is a radial basis function kernel function, the optimal width parameter γ.
[0042] The final Support Vector Machine (SVM) classifier is obtained by training the entire training dataset using the optimal kernel function, optimal penalty parameter C, and optimal width parameter γ. Using the entire training dataset means using the feature vectors and origin labels of all known origin reference samples. The training process involves solving a convex quadratic programming problem. The goal of the convex quadratic programming problem is to find an optimal classifying hyperplane that maximizes the margin between the two classes while allowing a certain degree of classification error, controlled by the optimal penalty parameter C. The convex quadratic programming problem can be solved using a sequential minimum optimization algorithm. The final SVM classifier model is the evaluation model. The evaluation model includes the support vectors learned from the training data, the corresponding Lagrange multipliers of the support vectors, and the bias term parameters.
[0043] The dimensional feature values corresponding to the core feature subset from the standardized multidimensional feature data of the medicinal herb samples to be evaluated are input into the support vector machine classifier. The standardized multidimensional feature data of the medicinal herb samples to be evaluated is obtained through preprocessing in step S2. The dimensional feature values corresponding to the core feature subset are extracted. This extraction operation involves locating the positions of these dimensional features in the standardized multidimensional feature data of the medicinal herb samples to be evaluated based on the list of dimensional features contained in the core feature subset, and reading their standardized feature values. These read standardized feature values are arranged in the order of the dimensional features in the core feature subset to form an input feature vector. The dimension of the input feature vector is the same as the dimension of the feature vector constructed during the training phase. The constructed input feature vector is then input into the trained support vector machine classifier model.
[0044] Obtain the class labels and probabilities output by the Support Vector Machine (SVM) classifier, and use the corresponding class labels and probabilities as the quality evaluation results. The SVM classifier performs a classification decision on the input feature vector. The classification decision is based on the calculation of a decision function. The calculation of the decision function involves calculating the kernel function of the input feature vector and all support vectors, as well as a linear combination of Lagrange multipliers and bias terms. A decision value is calculated. The class label is determined based on the sign of the decision value. For example, if the decision value is greater than 0, the output class label is Class I; if the decision value is less than 0, the output class label is Class II. For multi-class classification, a one-to-many strategy is used to train multiple binary SVMs, and the final class label is determined by comparing the decision values of each binary SVM.
[0045] The Support Vector Machine (SVM) classifier provides a probability estimate of belonging to each category. This probability estimate is obtained using the Platt scaling method. Platt scaling trains a logistic regression model on the SVM classifier's decision values, mapping the decision values to probabilities between 0 and 1. For the sample to be evaluated, the SVM classifier calculates the probability of it belonging to each known origin category. The SVM classifier outputs two pieces of information: a predicted category label indicating the most likely known origin of the medicinal herb sample; and the probability value of the sample belonging to that predicted category. The combination of the category label and the probability constitutes the quality evaluation result. For example, the output might be: Category label: Origin A, Probability: 0.92. The quality evaluation result is then complete.
[0046] Example 2: Figure 2 A schematic diagram of the data analysis-based quality evaluation system for traditional Chinese medicinal materials of the present invention is provided. The data analysis-based quality evaluation system for traditional Chinese medicinal materials includes: The data acquisition module is used to acquire the original multidimensional feature data of the Chinese medicinal materials samples to be evaluated; The data processing module is used to preprocess the raw multidimensional feature data to obtain standardized multidimensional feature data. The feature selection module is used to select stable feature subsets and fluctuating feature subsets from all dimensions based on standardized multidimensional feature data and through unsupervised clustering analysis of the intra-class variance and inter-class separation of each feature in the cluster structure. The feature optimization module is used to analyze the correlation between features in the fluctuating feature subset and features in the stable feature subset, and optimize the stable feature subset based on the correlation to obtain a decoupled stable feature subset. The feature recognition module is used to analyze the consistency of the relative size order of each dimension of features in the decoupled stable feature subset among different known origin reference samples, and to identify the core feature subset with origin differentiation capability from the decoupled stable feature subset; The evaluation execution module is used to construct an evaluation model based on a subset of core features, and input the corresponding subset of core features from the standardized multidimensional feature data of the Chinese medicinal materials sample to be evaluated into the evaluation model, and output the quality evaluation results.
[0047] All calculations involved in the embodiments are dimensionless numerical calculations, and the preset parameters and thresholds in the calculations are set by those skilled in the art according to the actual situation.
[0048] It should be noted that this invention can be deployed on the device itself to realize embedded applications, or it can run on a PC or other terminal with a user interface, thereby meeting various hardware environments and usage requirements.
[0049] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions according to the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wireless or wired transmission; wired transmission methods include optical fiber, twisted pair, coaxial cable, etc.; wireless transmission includes infrared, microwave, etc. Computer-readable storage media can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.
[0050] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0051] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0052] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0053] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0054] If a function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0055] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations 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. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0056] In conclusion, the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A data-based method for evaluating the quality of Chinese medicinal herbs, characterized in that: include: S1. Obtain the original multidimensional feature data of the Chinese medicinal materials sample to be evaluated; S2. Preprocess the original multidimensional feature data to obtain standardized multidimensional feature data; S3. Based on standardized multidimensional feature data, stable feature subsets and fluctuating feature subsets are selected from all dimensions by analyzing the intra-class variance and inter-class separation of each dimension feature in the cluster structure through unsupervised clustering analysis. S4. Analyze the correlation between the features in the fluctuation feature subset and the features in the stable feature subset, and optimize the stable feature subset based on the correlation to obtain a decoupled stable feature subset. S5. Analyze the consistency of the relative size order of each dimension of features in the decoupled stable feature subset among different known origin reference samples, and identify the core feature subset with origin differentiation capability from the decoupled stable feature subset, including: For each dimension feature in the decoupled stable feature subset, based on the value of the corresponding dimension feature in all reference samples of each known origin, determine the representative feature value of the corresponding origin on the corresponding dimension feature; For any two different known production areas, compare their representative feature values in the corresponding dimension to obtain the relative size order of the corresponding dimension features in all pairwise comparisons of known production areas; Calculate the consistency measure between the relative size order of the corresponding dimension features in pairwise comparisons of all known origins and the preset actual order of origins; Dimensional features whose consistency metric values exceed a preset consistency threshold in the decoupled stable feature subset are identified as core feature subsets with production area differentiation capabilities. S6. Construct an evaluation model based on the core feature subset, and input the corresponding core feature subset from the standardized multidimensional feature data of the Chinese medicinal material sample to be evaluated into the evaluation model, and output the quality evaluation results.
2. The method for evaluating the quality of Chinese medicinal materials based on data analysis according to claim 1, characterized in that, S1 includes: Acquire data from chromatographic analysis and spectral analysis of the Chinese medicinal materials samples to be evaluated; Extract chromatographic feature data from data obtained from chromatographic analysis, and extract spectral feature data from data obtained from spectral analysis; The chromatographic feature data and the spectral feature data are merged to obtain the original multidimensional feature data.
3. The method for evaluating the quality of Chinese medicinal materials based on data analysis according to claim 1, characterized in that, S2 include: For missing feature values in the original multidimensional feature data, fill them with the mean of all reference sample feature values in the same feature dimension. For each feature dimension in the original multidimensional feature data after filling, calculate its mean and standard deviation respectively; Based on the mean and standard deviation of each feature dimension, Z-Score standardization is performed on the filled original multidimensional feature data to obtain standardized multidimensional feature data.
4. The method for evaluating the quality of Chinese medicinal materials based on data analysis according to claim 1, characterized in that, S3 includes: Unsupervised clustering was performed on reference samples from multiple known production areas using standardized multidimensional feature data to obtain the cluster structure; For each dimension feature in the standardized multidimensional feature data, the variance of the sample values of the corresponding dimension feature within the same cluster is calculated as the intra-class variance, and the mean difference of the sample values of the corresponding dimension feature between different clusters is calculated as the inter-class separation. Based on the intra-class variance and inter-class separation of each dimension feature, a stable feature subset is selected from the dimension features whose intra-class variance is less than a first preset threshold and whose inter-class separation is greater than a second preset threshold, and a fluctuating feature subset is selected from the dimension features whose intra-class variance is greater than or equal to the first preset threshold or whose inter-class separation is less than or equal to the second preset threshold.
5. The method for evaluating the quality of Chinese medicinal materials based on data analysis according to claim 4, characterized in that, Unsupervised clustering of reference samples from multiple known production areas is performed using standardized multidimensional feature data to obtain the clustering structure. Specifically, the K-means clustering algorithm is used to cluster the reference samples from multiple known production areas corresponding to the standardized multidimensional feature data to obtain the clustering structure.
6. The method for evaluating the quality of Chinese medicinal materials based on data analysis according to claim 1, characterized in that, S4 include: For each dimension feature in the stable feature subset, calculate its correlation coefficient with all dimensions features in the fluctuating feature subset; For each dimension feature in the stable feature subset, count the number of times the absolute value of its correlation coefficient with the dimension features in the fluctuating feature subset exceeds a preset correlation threshold. Remove dimensional features from the stable feature subset whose number of statistical counts exceeds a preset threshold, and retain the remaining dimensional features to form a decoupled stable feature subset.
7. The method for evaluating the quality of Chinese medicinal materials based on data analysis according to claim 1, characterized in that, S6 include: Standardized multidimensional feature data of known origin reference samples corresponding to the core feature subset are used as training data to train a support vector machine classifier as an evaluation model. The dimensional feature values corresponding to the core feature subset in the standardized multidimensional feature data of the Chinese medicinal material sample to be evaluated are input into the support vector machine classifier; Obtain the class labels and probabilities output by the support vector machine classifier, and use the corresponding class labels and probabilities as the quality evaluation results.
8. The method for evaluating the quality of Chinese medicinal materials based on data analysis according to claim 7, characterized in that, The trained support vector machine classifier is used as the evaluation model. Specifically, based on the standardized multidimensional feature data corresponding to the core feature subset, grid search and cross-validation are used to determine the optimal kernel function and penalty parameters of the support vector machine classifier, and the support vector machine classifier is trained using the optimal kernel function and penalty parameters.
9. A data analysis-based quality evaluation system for traditional Chinese medicinal materials, used to implement the data analysis-based quality evaluation method for traditional Chinese medicinal materials as described in any one of claims 1-8, characterized in that, include: The data acquisition module is used to acquire the original multidimensional feature data of the Chinese medicinal materials samples to be evaluated; The data processing module is used to preprocess the raw multidimensional feature data to obtain standardized multidimensional feature data. The feature selection module is used to select stable feature subsets and fluctuating feature subsets from all dimensions based on standardized multidimensional feature data and through unsupervised clustering analysis of the intra-class variance and inter-class separation of each feature in the cluster structure. The feature optimization module is used to analyze the correlation between features in the fluctuating feature subset and features in the stable feature subset, and optimize the stable feature subset based on the correlation to obtain a decoupled stable feature subset. The feature recognition module is used to analyze the consistency of the relative size order of each dimension of features in the decoupled stable feature subset among different known origin reference samples, and to identify the core feature subset with origin differentiation capability from the decoupled stable feature subset; The evaluation execution module is used to construct an evaluation model based on a subset of core features, and input the corresponding subset of core features from the standardized multidimensional feature data of the Chinese medicinal materials sample to be evaluated into the evaluation model, and output the quality evaluation results.
Citation Information
Patent Citations
Traditional Chinese medicinal material qualitative analysis method and system based on spectral data processing
CN121740837A
Tianyuantong particle multi-component characteristic spectrum construction and quality control method
CN122109372A