A method and system for analyzing and identifying traditional Chinese medicine based on cluster analysis
Patent Information
- Application Number
- CN202510873723.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-06-27
AI Technical Summary
The existing traditional Chinese medicine drug analysis methods based on cluster analysis cannot effectively deal with the dynamic correlation and coordinated characterization of multi-source heterogeneous data, resulting in fuzzy cluster boundaries and high misjudgment rates in traditional Chinese medicine identification. It is difficult to adaptively adjust the modal weights when related species and noise interference are cured, and it is impossible to accurately model the nonlinear coupling relationship between chemical components and microstructure.
A cross-modal attention matrix is generated by a dual-stream deep convolution network and a bidirectional long and short-term memory network. The modal weight is adjusted through a dynamic gating mechanism, combined with high-order tensor fusion space and adversarial generative training, nonlinear mapping functions are learned, category labels are generated using an adaptive kernel spectral clustering algorithm and filtering out exception samples, and dual-channel verification is implemented to ensure the robustness of the model.
It significantly improves the accuracy and robustness of Chinese medicine identification, reduces the misjudgment rate, and realizes the leap from experience dependence to intelligent analysis of Chinese medicine identification, supports standardization and rapid screening of Chinese medicine quality, and promotes the digitalization and intelligence of the Chinese medicine industry.
Smart Images

Figure CN120387104B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traditional Chinese medicine analysis, and in particular to a method and system for analyzing and identifying traditional Chinese medicine based on cluster analysis. Background Art
[0002] Traditional methods for the analysis and identification of Traditional Chinese Medicine (TCM) have long faced the core challenge of ineffective fusion of heterogeneous multi-source data. As complex material systems, TCM identification requires the integration of multi-dimensional information such as chemical composition, microstructure, metabolic characteristics, and origin environment. However, existing technical frameworks based on cluster analysis are unable to effectively handle the dynamic association and collaborative representation of such cross-modal data. Traditional methods typically integrate data features from different sources using preset weights or simple superposition, ignoring the dynamic changes in the contribution of data modalities in TCM identification scenarios. For example, when identifying closely related species, the spatial topological features of microscopic images may be more discriminative than chemical fingerprints; in the analysis of differences in processing techniques, the dynamic changes in metabolomics become the key discriminant basis. Existing static fusion mechanisms make it difficult for models to adaptively adjust the weight ratios of different modalities when faced with uneven sample distribution, processing noise interference, or origin migration, resulting in blurred cluster boundaries and increased misjudgment rates. More seriously, the nonlinear coupling between chemical composition and morphological features cannot be accurately modeled using linear kernel functions or fixed similarity metrics. For example, the concentration gradient of a medicinal ingredient can exhibit high-order nonlinear correlations with the topological evolution of its microstructure, while existing clustering algorithms can only capture shallow linear features, causing identification results to deviate from the overall characteristics of the Chinese medicine's "ingredients, morphology, and efficacy." This rigidity of data fusion mechanisms has become a core bottleneck restricting the in-depth application of cluster analysis technology in the field of Chinese medicine identification. Summary of the Invention
[0003] (1) Technical problems solved
[0004] In response to the shortcomings of the existing technology, the present invention provides a method and system for analyzing and identifying traditional Chinese medicines based on cluster analysis, which solves the core technology problem of dynamic weight allocation of multimodal data and failure of nonlinear collaborative representation.
[0005] (2) Technical solution
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: a method for analyzing and identifying traditional Chinese medicines based on cluster analysis, comprising the following steps:
[0007] S1: Collect chemical fingerprints, microscopic images, metabolomics data, and geographical indication information of traditional Chinese medicine samples, perform wavelet packet transform on the chemical fingerprints to extract frequency domain features and eliminate baseline drift, perform superpixel segmentation on the microscopic images to construct cell wall topology maps, use a sliding window method to extract time series dynamic features from the metabolomics data, and perform spatial interpolation on the geographical indication information to generate an environmental factor distribution matrix;
[0008] S2: A two-stream deep convolutional network is used to extract the frequency domain features of chemical fingerprints and the topological features of microscopic images. A bidirectional long short-term memory network is used to analyze the implicit correlation between metabolomics data and geographical indication information, generating a cross-modal attention matrix.
[0009] S3: Based on the real-time calculated entropy fluctuations of each modality’s feature vectors and the sample distribution density, a dynamic gating mechanism is used to generate modality weight coefficients and dynamically adjust the fusion ratio of chemical fingerprint features, microscopic image features, and metabolomics features.
[0010] S4: Map the weighted multimodal features to a preset high-order tensor fusion space, construct pseudo samples through adversarial generative training, and learn the nonlinear mapping function between chemical component concentration and microstructural topology;
[0011] S5: Based on the local density distribution of samples in high-order tensor space, an adaptive kernel spectral clustering algorithm is used to generate TCM category labels. A variational autoencoder is then used to reversely decode and fuse features, screening out anomalous samples whose reconstruction error exceeds a preset threshold to trigger weight redistribution. It should be further explained that the TCM drug analysis and identification method based on clustering analysis includes dual-channel verification and model iteration: adversarial perturbations are applied to the input data to generate controllable noise, and the changes in the singular values of the Jacobian matrix of the clustering results are monitored to adjust the robustness threshold. The verification results are back-propagated to the dynamic weight allocation network and the high-order representation engine through a bidirectional feedback optimization loop to achieve iterative updates of the model parameters.
[0012] Preferably, the implementation of the dynamic gating mechanism in step S3 includes:
[0013] Real-time monitoring of the information entropy change rate of the chemical fingerprint frequency domain characteristics to generate a first weight correction factor;
[0014] Calculate the sample distribution density through the kernel density estimator to generate the second weight correction factor;
[0015] The first weight correction factor and the second weight correction factor are input into a multilayer perceptron, and a modal weight coefficient is output.
[0016] Preferably, the learning of the nonlinear mapping function in step S4 includes:
[0017] Build a deep metric learning network and generate pseudo samples with gradient changes in chemical component concentrations through a generative adversarial network;
[0018] In the high-order tensor fusion space, the physical correlation between cluster boundaries and microstructure topological evolution paths is enforced.
[0019] Preferably, the implementation of the adaptive kernel spectral clustering algorithm in step S5 includes:
[0020] Dynamically adjust the bandwidth parameter of the Gaussian kernel function according to the density gradient of the sample in the high-order tensor space;
[0021] The optimal number of clusters is determined by calculating the eigenvalue decay rate of the Laplace matrix.
[0022] Preferably, the step S5 further includes:
[0023] Apply adversarial perturbations to input data to generate controllable noise;
[0024] Monitor the changes in the singular values of the Jacobian matrix of the clustering results and dynamically adjust the robustness threshold of the model to noise.
[0025] A Chinese medicine analysis and identification system based on cluster analysis, comprising:
[0026] Multimodal data acquisition module, integrating spectrometer, microscopic imaging device and environmental sensor, used to obtain chemical fingerprint, microscopic image and geographical indication information;
[0027] Dynamic weight allocation module, with built-in two-stream deep convolutional network and bidirectional long short-term memory network, is used to generate cross-modal attention matrix and dynamic weight coefficients;
[0028] A high-level collaborative representation module, including a tensor fusion engine and a generative adversarial network, for constructing nonlinear mapping functions;
[0029] The clustering verification module deploys an adaptive kernel spectral clustering algorithm and a variational autoencoder to generate category labels and screen abnormal samples.
[0030] Preferably, the hardware collaboration relationship in the system includes: the entropy fluctuation monitor in the dynamic weight allocation module is connected to the output end of the dual-stream deep convolutional network to calculate the information entropy change rate of the chemical fingerprint frequency domain characteristics, and the kernel density estimator is connected to the output end of the bidirectional long short-term memory network to generate a sample distribution density correction factor; the topological constraint unit of the high-order collaborative characterization module is electrically connected to the tensor fusion engine to enforce the consistency of cluster boundaries.
[0031] Preferably, the verification mechanism is implemented as follows: the input end of the adversarial disturbance generator of the clustering verification module is connected to the multimodal data acquisition module to apply controllable noise, and the input end of the singular value monitoring unit is connected to the output end of the adaptive kernel spectrum clustering algorithm to adjust the robustness threshold to ensure the stability of the model under noise interference.
[0032] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the traditional Chinese medicine analysis and identification method based on cluster analysis.
[0033] (3) Beneficial effects
[0034] The present invention provides a method and system for analyzing and identifying traditional Chinese medicines based on cluster analysis. It has the following beneficial effects:
[0035] (I) This cluster analysis-based Chinese medicine drug analysis and identification method and system effectively solves the core problem of the failure of multimodal data fusion in traditional Chinese medicine identification through a dynamic weight allocation mechanism and high-order nonlinear collaborative representation technology. The dynamic weight allocation network adaptively adjusts the contribution of each modality based on real-time entropy fluctuations and sample density, significantly improving the identification accuracy in complex scenarios such as closely related species and differences in processed products; the high-order tensor fusion space combined with adversarial generative training breaks through the limitations of linear kernel functions in representing the nonlinear relationship between "ingredients-morphology-efficacy", making the cluster boundaries more consistent with the overall characteristics of Chinese medicine. The dual-channel verification mechanism ensures the robustness of the model under noise interference and data distribution offset through dual screening of feature reconstruction and adversarial stability, reducing the error rate compared to traditional methods and providing reliable technical support for the quality standardization of Chinese medicine.
[0036] (2) This cluster analysis-based Chinese medicine drug analysis and identification method and system, through the deep collaboration of hardware modular design and algorithm, has achieved a leap from experience-based to intelligent analysis in Chinese medicine identification. The system's built-in dynamic gating unit and topological constraint module transform traditional identification experience into quantifiable physical rules, which not only retains the holistic view of Chinese medicine but also gives the model interpretability; the adaptive kernel parameter optimization and two-way feedback mechanism greatly reduce the cost of manual parameter adjustment, making the method efficient and universal in scenarios such as grassroots medicinal material inspection and cross-border trade rapid screening. In addition, the multimodal data fusion framework provides a scalable technical platform for the traceability of Chinese medicine resources and the basic research of medicinal substances, promoting the deep integration of digitalization and intelligence in the Chinese medicine industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a schematic diagram of the overall framework of the present invention;
[0038] Figure 2 This is a control logic timing diagram of the present invention. DETAILED DESCRIPTION
[0039] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0040] See also Figure 1 and Figure 2 The present invention provides a technical solution: a method for analyzing and identifying traditional Chinese medicine based on cluster analysis, comprising the following steps:
[0041] S1: Collect chemical fingerprints, microscopic images, metabolomics data, and geographical indication information of traditional Chinese medicine samples. Perform wavelet packet transform on the chemical fingerprints to extract frequency domain features and eliminate baseline drift. Perform superpixel segmentation on the microscopic images to construct cell wall topology maps. Use the sliding window method to extract time series dynamic features from the metabolomics data. Perform spatial interpolation on the geographical indication information to generate an environmental factor distribution matrix.
[0042] S2: A two-stream deep convolutional network is used to extract the frequency domain features of chemical fingerprints and the topological features of microscopic images. A bidirectional long short-term memory network is used to analyze the implicit correlation between metabolomics data and geographical indication information, generating a cross-modal attention matrix.
[0043] S3: Based on the real-time calculated entropy fluctuations of each modality’s feature vectors and the sample distribution density, a dynamic gating mechanism is used to generate modality weight coefficients and dynamically adjust the fusion ratio of chemical fingerprint features, microscopic image features, and metabolomics features.
[0044] S4: Map the weighted multimodal features to a preset high-order tensor fusion space, construct pseudo samples through adversarial generative training, and learn the nonlinear mapping function between chemical component concentration and microstructure topology; it should be further explained that the construction of the high-order tensor fusion space includes: mapping chemical fingerprints, microscopic images and metabolomics features into third-order tensors respectively, and generating a joint representation matrix through tensor contraction operations, in which the chemical fingerprint tensor is expanded along the frequency dimension, the microtopology tensor is expanded along the spatial dimension, and the metabolomics tensor is expanded along the time dimension.
[0045] The tensor dimension definition and fusion operation rules in the high-order tensor fusion space include third-order tensor construction and tensor fusion operations, where:
[0046] The third-order tensor construction includes:
[0047] Chemical fingerprint tensor , expanded along the frequency dimension F, the number of channels C is the number of frequency bands after wavelet packet transform;
[0048] Microscopic image tensor , expanded along the spatial dimension S, the number of superpixels is P;
[0049] Metabolomics Tensor , expanded along the time dimension T, and the number of metabolites is M.
[0050] Tensor fusion operations:
[0051] Through tensor contraction (TensorContraction) T c ,T m ,T b Perform element-wise multiplication along a shared dimension (such as the channel dimension) to generate a joint representation matrix , the formula is:
[0052] .
[0053] It should be further explained that the implementation of adversarial generative training is as follows: the generator of the generative adversarial network receives a random noise vector and the chemical component concentration gradient of the real sample, and outputs a pseudo-microstructure topology map; the discriminator simultaneously receives the fusion features of the real sample and the generated sample, and forces the generator to learn the nonlinear mapping relationship between chemistry and morphology through the adversarial loss function.
[0054] S5: Based on the local density distribution of samples in high-order tensor space, an adaptive kernel spectral clustering algorithm is used to generate TCM category labels. A variational autoencoder is then used to reversely decode and fuse features, screening out anomalous samples whose reconstruction error exceeds a preset threshold to trigger weight redistribution. It should be further explained that the TCM drug analysis and identification method based on clustering analysis includes dual-channel verification and model iteration: adversarial perturbations are applied to the input data to generate controllable noise, and the changes in the singular values of the Jacobian matrix of the clustering results are monitored to adjust the robustness threshold. The verification results are back-propagated to the dynamic weight allocation network and the high-order representation engine through a bidirectional feedback optimization loop to achieve iterative updates of the model parameters.
[0055] It should be further explained that, in the specific implementation process, the parameter optimization of adaptive kernel spectral clustering includes: calculating the density gradient direction in each sample neighborhood based on the local density distribution of the sample in the high-order tensor space, and dynamically adjusting the Gaussian kernel bandwidth along the gradient direction; the eigenvalue decay rate of the Laplacian matrix is determined by calculating the cumulative energy ratio of the first k eigenvalues, and when the energy ratio exceeds the set threshold, the number of clusters is stopped from increasing.
[0056] In the dynamic adjustment of Gaussian kernel bandwidth according to density gradient, the density gradient is calculated as follows:
[0057] Local density calculation:
[0058] For the sample xi , whose local density ρ i Defined as:
[0059] ;
[0060] Where σ is the current Gaussian kernel bandwidth.
[0061] Density gradient direction:
[0062] Calculate sample x i The density gradient ▽ρ i :
[0063] ;
[0064] Bandwidth parameter update rules:
[0065] Adjust the bandwidth σ according to the gradient direction:
[0066] ;
[0067] Where η is the learning rate and ||▽ρ|| is the normalized value of the gradient norm.
[0068] It should be further explained that, in the specific implementation process, the specific implementation process of the dual-channel verification mechanism includes the following steps:
[0069] S21: Implementation of the feature reconstruction verification channel: The encoder of the variational autoencoder receives the fused features and generates a latent vector, and the decoder reconstructs the latent vector into the original multimodal data; the difference in mutual information entropy between the reconstructed data and the original data is calculated. If the difference exceeds the preset threshold, it is determined to be an abnormal sample and triggers retraining of the dynamic weight allocation module.
[0070] S22: Implementation of the adversarial stability verification channel: The adversarial perturbation generator adds a mixed perturbation of Gaussian noise and salt and pepper noise to the input data to generate adversarial samples; the adversarial samples are input into the clustering model, and the maximum singular value change rate of the Jacobian matrix of the clustering result is calculated. If the change rate exceeds the dynamic adjustment threshold, the model's noise sensitivity parameter is reduced.
[0071] S23: Iterative logic of the bidirectional feedback optimization loop: The feature reconstruction verification results update the decoder weights of the variational autoencoder through backpropagation, while freezing the convolutional network parameters of the dynamic weight allocation module; the adversarial stability verification results selectively update the discriminator parameters of the generative adversarial network through the gradient masking strategy to avoid overfitting the model to noisy data.
[0072] The implementation of the dynamic gating mechanism in step S3 includes:
[0073] Real-time monitoring of the information entropy change rate of the chemical fingerprint frequency domain characteristics to generate a first weight correction factor;
[0074] Calculate the sample distribution density through the kernel density estimator to generate the second weight correction factor;
[0075] The first weight correction factor and the second weight correction factor are input into the multilayer perceptron, and the modal weight coefficient is output.
[0076] It should be further explained that, in the specific implementation process, the learning of the nonlinear mapping function in step S4 includes:
[0077] Build a deep metric learning network and generate pseudo samples with gradient changes in chemical component concentrations through a generative adversarial network;
[0078] In the high-order tensor fusion space, the physical correlation between the clustering boundaries and the microstructural topological evolution path is enforced.
[0079] It should be further explained that, in the specific implementation process, the realization of the adaptive kernel spectral clustering algorithm in step S5 includes:
[0080] Dynamically adjust the bandwidth parameter of the Gaussian kernel function according to the density gradient of the sample in the high-order tensor space;
[0081] The optimal number of clusters is determined by calculating the eigenvalue decay rate of the Laplace matrix.
[0082] Step S5 further includes:
[0083] Apply adversarial perturbations to input data to generate controllable noise;
[0084] Monitor the changes in the singular values of the Jacobian matrix of the clustering results and dynamically adjust the robustness threshold of the model to noise.
[0085] A Chinese medicine analysis and identification system based on cluster analysis, comprising:
[0086] Multimodal data acquisition module, integrating spectrometer, microscopic imaging device and environmental sensor, used to obtain chemical fingerprint, microscopic image and geographical indication information;
[0087] Dynamic weight allocation module, with built-in two-stream deep convolutional network and bidirectional long short-term memory network, is used to generate cross-modal attention matrix and dynamic weight coefficients;
[0088] A high-level collaborative representation module, including a tensor fusion engine and a generative adversarial network, for constructing nonlinear mapping functions;
[0089] The clustering verification module deploys an adaptive kernel spectral clustering algorithm and a variational autoencoder to generate category labels and screen abnormal samples.
[0090] It should be further explained that in the specific implementation process, the loss function of the generative adversarial network GAN is designed as follows:
[0091] Generator loss function:
[0092] ;
[0093] Among them, c is the concentration gradient of the chemical component, Contour is the regularization term of the clustering silhouette coefficient, and λ is the balance factor.
[0094] Discriminator loss function:
[0095] .
[0096] It should be further explained that, in the specific implementation process, the hardware collaboration relationship in the system includes: the entropy fluctuation monitor in the dynamic weight allocation module is connected to the output end of the dual-stream deep convolutional network to calculate the information entropy change rate of the chemical fingerprint frequency domain characteristics, and the kernel density estimator is connected to the output end of the bidirectional long short-term memory network to generate the sample distribution density correction factor; the topological constraint unit of the high-order collaborative characterization module is electrically connected to the tensor fusion engine to enforce the consistency of cluster boundaries.
[0097] Verification mechanism implementation: The adversarial perturbation generator input of the clustering verification module is connected to the multimodal data acquisition module to apply controllable noise, and the singular value monitoring unit input is connected to the output of the adaptive kernel spectrum clustering algorithm to adjust the robustness threshold to ensure the stability of the model under noise interference.
[0098] It should be further explained that, in the specific implementation process, for reconstruction error exceeding the threshold and dynamic adjustment of robustness threshold, the threshold setting standards and feedback mechanism are clearly defined as follows:
[0099] Threshold setting for feature reconstruction verification channel:
[0100] The calculation formula of the mutual information entropy difference threshold e is:
[0101] ;
[0102] in, is the mean mutual information entropy of normal samples in the training set, is the standard deviation.
[0103] Dynamic adjustment rules for adversarial stability verification channels:
[0104] Assuming the maximum singular value change rate of the Jacobian matrix is △λ, the update formula of the robustness threshold θ is:
[0105] ;
[0106] Among them, γ is the adjustment step size, when △λ>θ old , increases the model's tolerance to noise.
[0107] Weight update strategy of the feedback optimization loop:
[0108] When feature reconstruction verification is triggered, only the parameters of the multi-layer perceptron in the dynamic weight allocation module are updated, and the convolutional network weights are frozen;
[0109] When the adversarial stability verification is triggered, the gradient masking strategy is adopted to update only the parameters of the last fully connected layer of the generative adversarial network discriminator.
[0110] It should be further explained that, in the specific implementation process, the detailed implementation of dynamic weight allocation and cross-modal association modeling includes:
[0111] S11: Feature extraction using a dual-stream deep convolutional network: In the frequency domain feature extraction of chemical fingerprints, the frequency domain signal after wavelet packet transformation is input into the first convolutional network, and the concentration gradient changes of components in different frequency bands are captured layer by layer through multi-layer convolution kernels; in the topological feature extraction of microscopic images, a graph convolution operation is performed on the cell wall structure map after superpixel segmentation, and the texture information of adjacent superpixels is aggregated to construct a global topological map.
[0112] S112: Association modeling of bidirectional long short-term memory network: The time series dynamic characteristics of metabolomics data and the spatial interpolation matrix of geographical indication information are spliced into a spatiotemporal joint vector and input into a bidirectional long short-term memory network. The cross-period association pattern between metabolite concentrations and origin environmental factors (such as temperature and humidity) is captured through forward and reverse time gating units.
[0113] S13: Implementation of dynamic gating mechanism: Perform sliding window statistics on the information entropy change rate of the frequency domain characteristics of the chemical fingerprint, and calculate its standard deviation as the first weight correction factor; use kernel density estimation for the sample distribution density to generate a second weight correction factor that reflects the sparsity of the data; input the two factors into the multi-layer perceptron, use the Sigmoid function as the activation function, and output a modal weight coefficient ranging from 0 to 1.
[0114] Among them, in the dynamic gating mechanism, the calculation formulas of the first weight correction factor W1 and the second weight correction factor W2 are as follows: Among them, the formula of the first weight correction factor is:
[0115] ;
[0116] Among them, E t is the information entropy of the frequency domain characteristics of the chemical fingerprint in the current time window, σ is the standard deviation function, and the denominator is the maximum standard deviation of the historical entropy value, which is used for normalization.
[0117] The second weight correction factor formula:
[0118] ;
[0119] Among them, K is the Gaussian kernel function, h is the bandwidth parameter, and N is the number of samples, which is used to quantify the sparsity of sample distribution.
[0120] The output of the multi-layer perceptron includes: concatenating W1 and W2 and inputting them into a three-layer fully connected network, with the activation function being Sigmoid, and outputting modal weight coefficients α, β, and γ, corresponding to chemical, microscopic, and metabolic modalities, satisfying α+β+γ=1.
[0121] It should be further explained that, in the specific implementation process, the hardware collaboration and data flow control of the system modules include the following:
[0122] Sa: Hardware linkage of the multimodal data acquisition module: The spectrometer and the microscopy imaging device achieve time alignment of data acquisition through synchronized trigger signals, and the spatial interpolation data of the environmental sensor is matched with the metabolomics data through timestamps to ensure the spatiotemporal consistency of the multimodal data.
[0123] Sb: Real-time calculation of the dynamic weight allocation module: The output end of the two-stream deep convolutional network is connected to the entropy fluctuation monitor to calculate the information entropy change rate of the chemical fingerprint frequency domain characteristics in real time; the hidden state output end of the bidirectional long short-term memory network is connected to the kernel density estimator to generate the sample distribution density correction factor.
[0124] Sc: Topological constraint implementation of the high-order collaborative characterization module: The output of the tensor fusion engine is connected to the topological constraint unit, which enforces the clustering boundaries through preset microstructure evolution rules (such as the negative correlation between cell wall thickness and component concentration). If the clustering result conflicts with the rule, it triggers the redistribution of the feature fusion ratio.
[0125] It should be further explained that, in the specific implementation process, the key control logic of the Chinese medicine analysis and identification system based on cluster analysis includes:
[0126] Priority control of dynamic weight allocation: When the sample distribution density is lower than the preset critical value, the weight coefficient of the microscopic image features is automatically increased to prioritize the ability to distinguish the morphology of easily confused medicinal materials; when drastic fluctuations in metabolomics data are detected, the correlation enhancement calculation of geographical indication information is triggered to suppress noise interference.
[0127] Synergistic mechanism of adversarial training and clustering optimization: The silhouette coefficient of the clustering result is introduced as a regularization term in the training loss function of the generative adversarial network, forcing the pseudo samples generated by the generator to conform to the distribution law of the current clustering structure; at the same time, the clustering module dynamically expands the cluster boundaries according to the density distribution of the generated samples to prevent the model from falling into local optimality.
[0128] Abnormal sample screening and model self-repair: After the feature reconstruction verification channel detects an abnormal sample, it automatically starts the local model retraining process: only normal samples are used to update the perceptron parameters of the dynamic weight distribution module, and the adversarial network parameters of the high-order representation module are frozen to ensure that the model maintains the stability of its core representation capabilities during the iteration process.
[0129] Through the dynamic weight allocation mechanism and high-order nonlinear collaborative representation technology, the core problem of the failure of multimodal data fusion in the identification of traditional Chinese medicine has been effectively solved. The dynamic weight allocation network adaptively adjusts the contribution of each modality based on real-time entropy fluctuations and sample density, significantly improving the identification accuracy in complex scenarios such as closely related species and differences in processed products; the high-order tensor fusion space combined with adversarial generative training breaks through the limitations of the linear kernel function in representing the nonlinear relationship between "ingredients-morphology-efficacy", making the cluster boundaries more consistent with the overall characteristics of traditional Chinese medicine. The dual-channel verification mechanism ensures the robustness of the model under noise interference and data distribution offset through dual screening of feature reconstruction and adversarial stability, reducing the error rate compared to traditional methods, and providing reliable technical support for the quality standardization of traditional Chinese medicine.
[0130] Through the deep collaboration of hardware modular design and algorithms, the identification of traditional Chinese medicine has achieved a leap from experience-based to intelligent analysis. The system's built-in dynamic gating unit and topological constraint module transform traditional identification experience into quantifiable physical rules, which not only retains the holistic view of traditional Chinese medicine but also gives the model interpretability; the adaptive kernel parameter optimization and two-way feedback mechanism greatly reduce the cost of manual parameter adjustment, making the method efficient and universal in scenarios such as grassroots medicinal material inspection and cross-border trade rapid screening. In addition, the multimodal data fusion framework provides a scalable technical platform for the traceability of traditional Chinese medicine resources and the basic research of medicinal substances, promoting the deep integration of digitalization and intelligence in the traditional Chinese medicine industry.
[0131] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0132] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A method for analyzing and identifying traditional Chinese medicines based on cluster analysis, characterized in that: The following steps are involved: S1: Collect chemical fingerprints, microscopic images, metabolomics data, and geographical indication information of traditional Chinese medicine samples, perform wavelet packet transform on the chemical fingerprints to extract frequency domain features and eliminate baseline drift, perform superpixel segmentation on the microscopic images to construct cell wall topology maps, use a sliding window method to extract time series dynamic features from the metabolomics data, and perform spatial interpolation on the geographical indication information to generate an environmental factor distribution matrix; S2: A two-stream deep convolutional network is used to extract the frequency domain features of chemical fingerprints and the topological features of microscopic images. A bidirectional long short-term memory network is used to analyze the implicit correlation between metabolomics data and geographical indication information, generating a cross-modal attention matrix. S3: Based on the real-time calculated entropy fluctuations of each modality’s feature vectors and the sample distribution density, a dynamic gating mechanism is used to generate modality weight coefficients and dynamically adjust the fusion ratio of chemical fingerprint features, microscopic image features, and metabolomics features. S4: Map the weighted multimodal features to a preset high-order tensor fusion space, construct pseudo samples through adversarial generative training, and learn the nonlinear mapping function between chemical component concentration and microstructural topology; S5: Based on the local density distribution of samples in the high-order tensor space, an adaptive kernel spectral clustering algorithm is used to generate TCM category labels. The fusion features are then inversely decoded through a variational autoencoder to screen out abnormal samples whose reconstruction error exceeds a preset threshold to trigger weight redistribution.
2. A method for analyzing and identifying Chinese medicines based on cluster analysis according to claim 1, characterized in that: The implementation of the dynamic gating mechanism in step S3 includes: Real-time monitoring of the information entropy change rate of the chemical fingerprint frequency domain characteristics to generate a first weight correction factor; Calculate the sample distribution density through the kernel density estimator to generate the second weight correction factor; The first weight correction factor and the second weight correction factor are input into a multilayer perceptron, and a modal weight coefficient is output.
3. A method for analyzing and identifying Chinese medicines based on cluster analysis according to claim 2, characterized in that: The learning of the nonlinear mapping function in step S4 includes: Build a deep metric learning network and generate pseudo samples with chemical component concentration gradient changes through generative adversarial networks; In the high-order tensor fusion space, the physical correlation between cluster boundaries and microstructure topological evolution paths is enforced.
4. A method for analyzing and identifying Chinese medicines based on cluster analysis according to claim 3, characterized in that: The implementation of the adaptive kernel spectral clustering algorithm in step S5 includes: Dynamically adjust the bandwidth parameter of the Gaussian kernel function according to the density gradient of the sample in the high-order tensor space; The optimal number of clusters is determined by calculating the eigenvalue decay rate of the Laplace matrix.
5. A method for analyzing and identifying Chinese medicines based on cluster analysis according to claim 4, characterized in that: The step S5 further includes: Apply adversarial perturbations to input data to generate controllable noise; Monitor the changes in the singular values of the Jacobian matrix of the clustering results and dynamically adjust the robustness threshold of the model to noise.
6. A Chinese medicine analysis and identification system based on cluster analysis, characterized in that: include: Multimodal data processing module: Integrates a spectrometer, a microscopic imaging device, and an environmental sensor to collect chemical fingerprints, microscopic images, metabolomics data, and geographical indication information of traditional Chinese medicine samples. Wavelet packet transform is performed on the chemical fingerprints to extract frequency domain features and eliminate baseline drift. Superpixel segmentation is performed on the microscopic images to construct a cell wall topology map. A sliding window method is used to extract time series dynamic features from the metabolomics data. Spatial interpolation of the geographical indication information is performed to generate an environmental factor distribution matrix. Cross-modal association analysis module: A two-stream deep convolutional network is used to extract the frequency domain features of chemical fingerprints and the topological features of microscopic images. A bidirectional long short-term memory network is used to analyze the implicit correlation between metabolomics data and geographical indication information, generating a cross-modal attention matrix. Dynamic weight allocation module: Based on the real-time calculated entropy fluctuations of each modal feature vector and sample distribution density, a dynamic gating mechanism is used to generate modal weight coefficients and dynamically adjust the fusion ratio of chemical fingerprint features, microscopic image features, and metabolomics features; High-order collaborative representation module: This module includes a tensor fusion engine and a generative adversarial network for constructing nonlinear mapping functions. It maps weighted multimodal features to a preset high-order tensor fusion space, constructs pseudo samples through adversarial generative training, and learns the nonlinear mapping function between chemical component concentration and microstructural topology. Clustering verification module: deploys an adaptive kernel spectral clustering algorithm and variational autoencoder to generate category labels and screen out abnormal samples; Based on the local density distribution of samples in the high-order tensor space, an adaptive kernel spectral clustering algorithm is used to generate Chinese medicine category labels. The fusion features are then inversely decoded through a variational autoencoder to screen out abnormal samples whose reconstruction error exceeds a preset threshold to trigger weight redistribution.
7. A Chinese medicine analysis and identification system based on cluster analysis according to claim 6, characterized in that: The dynamic weight allocation module also includes: An entropy fluctuation monitor, connected to the output end of the dual-stream deep convolutional network, for calculating the rate of change of information entropy of the frequency domain features of the chemical fingerprint in real time; A kernel density estimator is connected to the output end of the bidirectional long short-term memory network and is used to generate a sample distribution density correction factor.
8. A Chinese medicine analysis and identification system based on cluster analysis according to claim 7, characterized in that: The high-order collaborative characterization module further includes: A topology constraint unit is electrically connected to the tensor fusion engine and is used to enforce the consistency of cluster boundaries and the microstructure topology evolution path.
9. A Chinese medicine analysis and identification system based on cluster analysis according to claim 8, characterized in that: The cluster verification module also includes: an adversarial disturbance generator, whose input end is connected to the multimodal data processing module and whose output end is connected to the adaptive kernel spectral clustering algorithm, for applying controllable noise; The singular value monitoring unit has an input end connected to the output end of the adaptive kernel spectral clustering algorithm and is used to adjust the robustness threshold.
10. A computer-readable storage medium storing a computer program, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Health care data processing method and system based on intelligent perception
CN120032846A
Traditional Chinese medicine identification and analysis system based on clustering analysis
CN120067776A