Traditional Chinese medicine property feature coding and retrieval system based on machine learning

The machine learning-based Chinese medicinal herb attribute feature coding and retrieval system solves the problem of the reliance on experience in Chinese medicine compatibility methods, realizes multi-dimensional quantification and intelligent retrieval of Chinese medicinal herb attributes, improves coding accuracy and retrieval precision, and adapts to the attribute characterization and retrieval needs of different categories of Chinese medicinal herbs.

CN121725997BActive Publication Date: 2026-05-12THE THIRD PEOPLES HOSPITAL OF CHENGDU
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
THE THIRD PEOPLES HOSPITAL OF CHENGDU
Filing Date
2026-02-12
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, the methods of combining Chinese medicines rely on the personal experience of physicians and lack a systematic integration of the multi-dimensional attributes of Chinese medicinal materials and Chinese medicine theories. This results in simple search or recommendation methods that fail to delve into complex compatibility relationships, and thus lack practicality and safety.

Method used

A machine learning-based Chinese medicinal herb attribute feature encoding and retrieval system is adopted, including a medicinal property spectrum acquisition module, a meridian tropism topology embedding module, a harmonization module, and a principle-based retrieval network module. By quantifying the medicinal property spectrum and generating meridian tropism topology vectors through graph neural networks, and combining them with traditional Chinese medicine theory to perform multi-scale feature harmonization and compatibility rule matching, intelligent and accurate retrieval is achieved.

Benefits of technology

It has achieved multi-dimensional quantification and structured coding of Chinese medicinal material attributes, improving coding accuracy and retrieval precision. It can efficiently retrieve analogous medicinal materials that have both attribute similarity and compatibility. The system performance continues to improve with the accumulation of application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121725997B_ABST
    Figure CN121725997B_ABST
Patent Text Reader

Abstract

The application discloses a traditional Chinese medicinal material attribute feature coding and retrieval system based on machine learning, belongs to the technical field of traditional Chinese medicinal material information processing, and comprises a medicinal property spectrum acquisition module, a meridian tropism topology embedding module, a harmonizing module and a principle-based retrieval network module; the medicinal property spectrum acquisition module performs three-level quantitative processing on traditional Chinese medicinal materials to generate quantitative medicinal property spectra; the meridian tropism topology embedding module constructs a medicinal material-meridian correlation graph according to the theory of meridian tropism of viscera and generates meridian tropism topology vectors through a graph neural network; the harmonizing module performs multi-scale feature extraction and adaptive weighted fusion on the meridian tropism topology vectors to output neutral feature codes; and the principle-based retrieval network module maps the neutral feature codes to medicinal property latent space, calculates a similarity and filters out an analogous medicinal material set meeting the rules of mutual promotion and mutual restriction according to compatibility rules; the application realizes end-to-end intelligent mapping from multi-source information of medicinal materials to compatibility knowledge, and improves coding accuracy and retrieval precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information processing technology for Chinese medicinal materials, specifically a system for encoding and retrieving the attribute features of Chinese medicinal materials based on machine learning. Background Technology

[0002] The compatibility of Chinese herbal medicines is the core of clinical medication in TCM, following complex rules such as the roles of principal, assistant, adjuvant, and guide herbs, as well as mutual reinforcement, mutual assistance, mutual restraint, mutual antagonism, mutual incompatibility, and mutual opposition. Traditional knowledge of TCM compatibility relies heavily on the personal experience of physicians and ancient texts, exhibiting limitations such as strong subjectivity, a large amount of tacit knowledge, difficulty in quantification, and large-scale dissemination. With the development of artificial intelligence technology, how to combine traditional TCM theory with modern data science to achieve standardized characterization of medicinal material attributes and intelligent mining of compatibility rules has become a key bottleneck in promoting the modernization and precision development of TCM. Existing technologies include some methods for analyzing the similarity of medicinal materials using chemical fingerprinting or single attributes, but most suffer from the following shortcomings: failure to systematically integrate the multi-dimensional attributes of medicinal materials, resulting in a one-sided characterization; lack of computable modeling of core TCM theories, leading to a disconnect between the models and TCM theory; and simplistic retrieval or recommendation methods, typically based on shallow similarity calculations, failing to delve into complex compatibility relationships and easily overlooking contraindications, resulting in insufficient practicality and safety. Therefore, there is an urgent need for a Chinese medicinal herb attribute processing and retrieval system that can deeply integrate multi-source data, embed the logic of traditional Chinese medicine theory, achieve intelligent and accurate retrieval, and be self-evolving. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention proposes a machine learning-based system for encoding and retrieving the attribute features of traditional Chinese medicine (TCM) materials. This system includes a medicinal property spectrum acquisition module, a meridian tropism topology embedding module, a harmonization module, and a principle-based retrieval network module. The medicinal property spectrum acquisition module performs three-level quantification on TCM materials to generate a quantified medicinal property spectrum. The meridian tropism topology embedding module constructs a TCM-meridian correlation diagram based on the theory of Zang-Fu meridian tropism and generates meridian tropism topology vectors through a graph neural network. The harmonization module performs multi-scale feature extraction and adaptive weighted fusion on the meridian tropism topology vectors to output a neutralization feature code. The principle-based retrieval network module maps the neutralization feature code to the medicinal property latent space, calculates similarity, and selects a set of analogous medicinal materials that conform to the principle of mutual reinforcement and synergy based on compatibility rules. This invention achieves end-to-end intelligent mapping from multi-source information on medicinal materials to compatibility knowledge, improving encoding accuracy and retrieval precision.

[0004] To achieve the above objectives, the present invention provides the following technical solution:

[0005] A machine learning-based system for encoding and retrieving the attribute features of Chinese medicinal materials includes: a medicinal property spectrum acquisition module, a meridian tropism topology embedding module, a harmonization module, and a principle-based retrieval network module.

[0006] The meridian tropism topology embedding module receives the quantitative medicinal property spectrum of Chinese medicinal materials collected by the medicinal property spectrum acquisition module, constructs a medicinal material-meridian association diagram based on the theory of visceral meridian tropism, and generates meridian tropism topology vectors through graph neural networks; the quantitative medicinal property spectrum includes the intensity vectors of the four qi and five flavors, the efficacy domain matrix, and the chemical component fingerprint.

[0007] The harmonization module performs multi-scale feature harmonization on the meridian topology vector and outputs a neutralization feature code.

[0008] The rationale-based retrieval network module calculates the distance between the neutralization feature codes in the pre-constructed medicinal property latent space, retrieves the set of analogous medicinal materials that conform to the principle of mutual reinforcement and compatibility, and feeds back the retrieved set of analogous medicinal materials to the medicinal property spectrum acquisition module.

[0009] Specifically, the quantitative pharmacological spectrum is achieved through three-level quantitative processing of the Chinese medicinal materials by the pharmacological spectrum acquisition module, specifically including:

[0010] The first level of quantification involves collecting physicochemical signals from medicinal materials using a sensor array and mapping them to standardized intensity values ​​across fourteen dimensions: the five qi (cold, hot, warm, cool, neutral) and the five flavors (sour, bitter, sweet, pungent, salty), generating intensity vectors for the four qi and five flavors. The second level of quantification uses natural language processing to analyze the textual records of medicinal material efficacy, generating an efficacy domain matrix. This matrix is ​​a two-dimensional weighted matrix, where rows represent core efficacy categories and columns represent specific target points. The third level of quantification extracts characteristic ion peak sequences from the medicinal materials using mass spectrometry, reduces their dimensionality to form fixed-length chemical feature codes, and generates chemical component fingerprints. Finally, the efficacy domain matrix is ​​flattened column-wise and concatenated end-to-end with the intensity vectors for the four qi and five flavors and the chemical component fingerprints along the feature dimensions to form a quantified medicinal property spectrum.

[0011] Specifically, the meridian topology embedding module includes an association graph construction unit;

[0012] After receiving the quantified medicinal property spectrum, the association graph construction unit establishes a standard meridian node set containing 20 basic nodes of the twelve regular meridians and eight extraordinary meridians according to traditional Chinese medicine theory. Each medicinal material is treated as a dynamic node, and the affinity weight between the medicinal material node and each standard meridian node is calculated based on the intensity vector of the four qi and five flavors in its quantified medicinal property spectrum. A heterogeneous network graph is constructed in which the medicinal material node and the standard meridian node are interconnected and have edge affinity weights, which is the medicinal material-meridian association graph.

[0013] Specifically, the meridian tropism topology embedding module further includes a feature initialization unit, used to generate initial feature representations for various nodes in the medicinal material-meridian association diagram;

[0014] The quantified medicinal property spectrum is input into a feature encoding network, which maps the high-dimensional and heterogeneous quantified medicinal property spectrum into a low-dimensional and dense continuous vector as the initial feature vector of the medicinal material node. At the same time, a learnable embedding vector is assigned to each standard meridian node as the initial feature vector of the standard meridian node.

[0015] Specifically, the meridian tropism topology embedding module further includes a graph neural network processing unit; the graph neural network processing unit adopts an encoder architecture including a node feature initialization layer, a meridian feature enhancement layer, and a medicinal material feature readout layer, to aggregate information from the medicinal material-meridian association graph in a hierarchical manner and generate a meridian tropism topology vector, specifically including:

[0016] The node feature initialization layer is based on the initial feature vectors of medicinal herb nodes and standard meridian nodes. It calculates the attention weight of each medicinal herb node to each standard meridian node it is associated with through a multi-head attention mechanism. The standard meridian nodes aggregate their first-layer intermediate feature vector by weighted summation of the features of all associated medicinal herb nodes. The first-layer intermediate feature vector incorporates the meridian tropism information of the associated medicinal herbs.

[0017] The meridian feature enhancement layer takes the first layer intermediate feature vector as input, and performs message passing between standard meridian nodes according to the predefined Qi and blood flow relationship. Each standard meridian node aggregates the features of its neighboring nodes in the Qi and blood flow relationship, and introduces a gating mechanism to represent the flow direction and timing, encodes the theoretical constraints of the Qi and blood flow in traditional Chinese medicine into the node features, and generates the second layer intermediate feature vector of the standard meridian node.

[0018] The medicinal material feature reading layer takes the second-layer intermediate feature vector and the initial feature vector of the medicinal material node as input. It calculates the weight of each medicinal material node in extracting information from its standard meridian nodes through an attention mechanism. The medicinal material node generates its high-order fusion feature vector by weighted summing of the second-layer intermediate feature vectors of all associated standard meridian nodes. The high-order fusion feature vector is then subjected to nonlinear transformation and dimensionality reduction to obtain the meridian topology vector of the medicinal material node.

[0019] Specifically, the harmonization module includes a multi-scale analysis unit and a feature fusion unit;

[0020] After receiving the meridian topology vector, the multi-scale analysis unit performs feature extraction at three scales in parallel to obtain multi-scale features, including micro-scale extraction that captures structural features through a one-dimensional convolution kernel, meso-scale extraction that reshapes the meridian topology vector into a two-dimensional matrix and uses a two-dimensional convolution kernel to identify pattern combination features, and macro-scale extraction that analyzes overall trend features through a fully connected network.

[0021] After receiving the multi-scale features output by the multi-scale analysis unit, the feature fusion unit assigns adaptive weights dynamically generated by a small neural network to each scale feature, and concatenates the weighted multi-scale features to form a hybrid feature representation. The hybrid feature representation is then processed by dimensionality reduction to form a neutral feature code.

[0022] Specifically, the system also includes a drug potential space construction module;

[0023] The medicinal property latent space construction module adopts a Siamese network architecture, in which the two sub-networks share weight parameters, and each sub-network contains three fully connected transformation layers. During training, medicinal material pairs with known compatibility relationships are used as positive samples, and randomly paired medicinal materials are used as negative samples. The network parameters are optimized through a distance loss function. After training, the medicinal property latent space construction module maps the neutralization feature codes of any medicinal material to a unified medicinal property latent space, and medicinal materials with similar medicinal properties and meridian tropism are close in distance in the medicinal property latent space.

[0024] Specifically, the drug potential space construction module is trained using a hierarchical contrastive learning strategy;

[0025] The first layer of contrastive learning uses the intensity vectors of the four qi and five flavors as the supervision signal to focus on the similarity of the four qi and five flavors of medicinal materials; the second layer of contrastive learning uses the efficacy domain matrix as the supervision signal to focus on the similarity of the efficacy of medicinal materials; the third layer of contrastive learning uses the chemical component fingerprint as the supervision signal to focus on the similarity of the chemical composition of medicinal materials; the results of the three layers of contrastive learning are combined to form the final latent space structure of medicinal properties.

[0026] Specifically, the reasoning retrieval network module includes a similarity calculation unit and a matching rule matching unit:

[0027] After receiving the neutralization feature code of the medicinal material, the similarity calculation unit maps it to the medicinal property latent space through a sub-network of the twin network to obtain the query positioning vector. At the same time, it calculates the multi-dimensional similarity score between the query positioning vector and the reference positioning vectors of all medicinal materials in the pre-stored medicinal material database to form a similarity ranking list. The multi-dimensional similarity score is the weighted sum of the Euclidean distance and cosine similarity between the query positioning vector and the reference positioning vector.

[0028] After receiving the similarity ranking list, the compatibility matching unit applies a compatibility rule filter to exclude incompatible combinations in traditional Chinese medicine, and selects candidate medicinal materials with synergistic enhancement effects with the query medicinal material from the remaining medicinal materials according to the principle of mutual reinforcement and mutual enhancement, forming a set of analogous medicinal materials; each medicinal material in the set of analogous medicinal materials is marked with the specific compatibility relationship type with the query medicinal material.

[0029] Specifically, the compatibility rule filter is embedded with a knowledge base of traditional Chinese medicine contraindications rules, namely the Eighteen Incompatibilities and Nineteen Antagonisms.

[0030] The compatibility matching unit matches the medicinal materials in the similarity ranking list with the contraindication rule knowledge base, and automatically filters out medicinal materials that have a contraindication relationship with the queried medicinal materials.

[0031] Compared with the prior art, the beneficial effects of the present invention are:

[0032] 1. This invention proposes a machine learning-based system for encoding and retrieving the attribute features of traditional Chinese medicine (TCM) materials. It generates a quantitative medicinal property spectrum containing intensity vectors of the four qi and five flavors, an efficacy domain matrix, and chemical component fingerprints through a medicinal property spectrum acquisition module. Combining the theory of visceral meridian tropism with graph neural networks, it constructs a correlation graph and generates meridian tropism topology vectors. This achieves multi-dimensional quantification and structured encoding of medicinal property attributes, reduces subjective experience errors, makes attribute representation more closely aligned with the essential characteristics of medicinal materials, and improves the accuracy and comprehensiveness of TCM attribute encoding.

[0033] 2. This invention proposes a machine learning-based system for encoding and retrieving the attribute features of Chinese medicinal materials. By using a harmonization module to harmonize the meridian tropism topology vectors at multiple scales and optimize the quality of feature expression, and then using the similarity comparison learning model of the properties and meridian tropism of the rational retrieval network module, the feature distance is accurately calculated in the latent space of medicinal properties. At the same time, the system anchors the rules of mutual reinforcement and compatibility, which solves the problems of poor generalization and low compatibility of traditional retrieval. It can efficiently retrieve analogous medicinal materials that have both attribute similarity and reasonable compatibility.

[0034] 3. This invention proposes a machine learning-based system for encoding and retrieving the attribute features of Chinese medicinal materials. The system feeds back the retrieval results to the medicinal property spectrum acquisition module through a logical retrieval network module. It can continuously correct the parameter logic of quantitative acquisition and encoding based on the actual retrieval effect, so that the system can continuously improve its performance and stability as the application scenarios accumulate, and adapt to the attribute characterization and retrieval needs of different types of Chinese medicinal materials. Attached Figure Description

[0035] Figure 1 This is an architecture diagram of the machine learning-based Chinese medicinal herb attribute feature encoding and retrieval system of the present invention;

[0036] Figure 2 This is a flowchart illustrating the principle of the machine learning-based Chinese medicinal herb attribute feature encoding and retrieval system of the present invention. Detailed Implementation

[0037] Example 1:

[0038] Please see Figures 1-2 The present invention provides an embodiment of a machine learning-based system for encoding and retrieving the attribute features of Chinese medicinal materials, comprising: a medicinal property spectrum acquisition module, a meridian tropism topology embedding module, a harmonization module, and a principle retrieval network module;

[0039] The meridian tropism topology embedding module receives the quantitative medicinal property spectrum of Chinese medicinal materials collected by the medicinal property spectrum acquisition module, constructs a medicinal material-meridian association diagram based on the theory of visceral meridian tropism, and generates meridian tropism topology vectors through graph neural networks; the quantitative medicinal property spectrum includes the intensity vectors of the four qi and five flavors, the efficacy domain matrix, and the chemical component fingerprint.

[0040] The harmonization module performs multi-scale feature harmonization on the meridian topology vector and outputs a neutralization feature code.

[0041] The rationale-based retrieval network module calculates the distance between the neutralization feature codes in the pre-constructed medicinal property latent space, retrieves the set of analogous medicinal materials that conform to the principle of mutual reinforcement and compatibility, and feeds back the retrieved set of analogous medicinal materials to the medicinal property spectrum acquisition module.

[0042] Furthermore, the system also includes a user interface for receiving user-inputted Chinese medicinal herb query requests and visually displaying the set of analogous medicinal herbs and their labeled compatibility relationships fed back by the rationale retrieval network module.

[0043] Furthermore, the system also includes a feedback learning module, which records the user's selection of the search results and evaluation of the usage effect, and feeds the selection and usage effect evaluation information as new training samples to the medicinal property latent space construction module for incremental training of the Siamese network to optimize the structure of the medicinal property latent space; the search results refer to the set of analogous medicinal materials.

[0044] In summary, this application employs multi-source sensors and natural language processing technology to perform three-level quantification of Chinese medicinal materials, generating a quantitative pharmacological spectrum that includes the four natures and five flavors, efficacy effects, and chemical components. Then, based on the theory of meridian tropism in Traditional Chinese Medicine (TCM), a medicinal material-meridian association graph is constructed. Utilizing the three-layer aggregation structure of a graph neural network—namely, attention convergence between medicinal materials and meridians, the flow of Qi and blood between meridians, and feature readout between meridians and medicinal materials—the topological vectors of the medicinal materials' meridian tropism are extracted. Next, a neutralizing feature code is generated through multi-scale feature fusion and mapped to a pre-trained pharmacological latent space. Finally, combining similarity calculation and TCM compatibility rules, analogous medicinal materials that conform to the mutually reinforcing and synergistic relationship are retrieved from the latent space, forming a closed-loop intelligent retrieval system. For example, taking the query for Astragalus membranaceus as an example, the system first quantifies its medicinal properties spectrum, such as sweetness intensity of 0.9 and warmth intensity of 0.8, and constructs a high-weight association graph between Astragalus membranaceus and the spleen and lung meridians; it aggregates and generates meridian-tropy topology vectors through graph neural networks, such as a 128-dimensional vector representing the characteristics of tonifying qi and raising yang; after multi-scale harmonization, it maps to the medicinal property latent space and calculates the mixing similarity with the medicinal materials in the database; after excluding incompatible combinations, it retrieves Codonopsis pilosula, whose complementary properties are synergistic tonification of qi and saposhnikovia divaricata, and its complementary properties are astragalus membranaceus tonifying qi and saposhnikovia divaricata strengthening the exterior, etc., and marks the specific compatibility type. The whole process realizes end-to-end automated reasoning from data quantification to intelligent compatibility.

[0045] Example 2:

[0046] In this embodiment, the quantitative pharmacological spectrum is achieved by performing three-level quantitative processing on the Chinese medicinal materials through the pharmacological spectrum acquisition module, specifically including:

[0047] The first-level quantization process involves collecting physicochemical signals from medicinal materials using a sensor array and mapping them to standardized intensity values ​​across fourteen dimensions: the five qi (cold, hot, warm, cool, neutral) and the five flavors (sour, bitter, sweet, pungent, salty), generating intensity vectors for the four qi and five flavors. The second-level quantization process uses natural language processing (NLP) to analyze the textual records of medicinal material efficacy, generating an efficacy domain matrix. This matrix is ​​a two-dimensional weighted matrix, where rows represent core efficacy categories and columns represent specific target points. The third-level quantization process extracts characteristic ion peak sequences from the medicinal materials using mass spectrometry, reduces their dimensionality to form fixed-length chemical feature codes, and generates chemical component fingerprints. Finally, the efficacy domain matrix is ​​flattened column-wise and concatenated end-to-end with the intensity vectors for the four qi and five flavors and the chemical component fingerprints along the feature dimensions to form a quantified medicinal property spectrum. Natural language processing is a conventional method that can be understood and implemented by those skilled in the art, and this application is not limited to specific partitioning methods.

[0048] Further, the first-level quantization process involves collecting the physicochemical signals of the medicinal materials through a sensor array and mapping them to standardized intensity values ​​across fourteen dimensions: the five qi (cold, hot, warm, cool, neutral) and the five flavors (sour, bitter, sweet, pungent, salty). This generates intensity vectors for the four qi and five flavors, including:

[0049] (1) Construct a standard sample library for medicinal properties labeling, use a sensor array to scan the standard sample library for medicinal properties labeling, collect its multimodal physicochemical signals, and preprocess the collected physicochemical signals, including signal denoising, baseline correction and feature extraction, to obtain standard sample feature signals, and then use the standard sample feature signals as input, use the pre-labeled intensity level as the training target, and use machine learning algorithms to train a mapping model between signals and medicinal properties, and complete the construction of the medicinal property quantification model; the standard sample library for medicinal properties labeling consists of a variety of standard medicinal material samples with four qi and five flavor attributes and intensity levels that have been authoritatively labeled by TCM experts; the sensor array includes at least a hyperspectral imaging unit for acquiring component spectral information, a gas phase molecular sensing unit for detecting volatile molecules and a physical property sensing unit for measuring surface thermodynamic properties; the physicochemical signals include at least acidity, alkalinity, conductivity, infrared spectral response, etc., wherein the machine learning algorithm is a conventional means that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method;

[0050] (2) For any Chinese medicinal material to be tested, the sensor array is used to scan it, collect its multimodal physicochemical signals, and preprocess them to obtain the characteristic signals of the medicinal material to be tested. Then, the characteristic signals of the medicinal material to be tested are input into the mapping model constructed in (1). The mapping model outputs the initial intensity prediction values ​​corresponding to the fourteen dimensions of the four qi and five flavors.

[0051] (3) The initial intensity prediction value is standardized according to the overall distribution of the drug property labeling standard sample library. The intensity values ​​of all dimensions are uniformly scaled to the range of zero to one to generate comparable standardized intensity values. Then, the standardized intensity values ​​of the fourteen dimensions are arranged in order to generate the four qi and five flavor intensity vectors.

[0052] Furthermore, the third-level quantization process involves extracting the characteristic ion peak sequences of the medicinal materials through mass spectrometry analysis, which are then dimensionality-reduced to form fixed-length chemical feature codes, generating chemical component fingerprints, including:

[0053] (1) Perform standardized sample pretreatment on all Chinese medicinal materials to be analyzed, including drying and pulverizing the medicinal materials into powder, extracting them with solvent of uniform specification to obtain standardized sample solutions, injecting the standardized sample solutions into the mass spectrometer, ionizing the standardized sample solutions in the ion source, and then separating them in the mass analyzer according to their mass-to-charge ratio. Finally, the detector records the ion signal intensity across the entire mass range to generate the original mass spectrometry data corresponding to each sample.

[0054] (2) The obtained raw mass spectrometry data is preprocessed, including baseline correction to eliminate background signals and smoothing filtering to reduce random noise, to obtain clean mass spectrometry data. Peak detection is performed on the clean mass spectrometry data to identify ion peaks with signal intensity significantly higher than the local background. At the same time, the mass-to-charge ratio and peak intensity of each ion peak are recorded to generate the characteristic ion peak sequence corresponding to each Chinese medicinal material sample.

[0055] (3) Match and calibrate the characteristic ion peak sequence corresponding to each Chinese medicinal material sample with the preset reference mass spectrometry peak list so that the ion peaks originating from the same chemical component in different Chinese medicinal material samples have consistent mass-to-charge ratio coordinates and generate aligned mass spectrometry peak intensity vectors.

[0056] (4) The aligned mass spectrum peak intensity vector is processed by the principal component analysis algorithm, which maps it from a high-dimensional space to a low-dimensional feature space to obtain a low-dimensional feature vector. The low-dimensional feature vector is then standardized to scale the values ​​of each dimension to a uniform range to obtain a low-dimensional feature vector, which is defined as a chemical component index. The principal component analysis algorithm is a conventional method that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method.

[0057] It is important to emphasize that the traditional judgment of the four natures and five flavors relies on the subjective experience of physicians. The same medicinal material may have different descriptions due to different regions and processing methods, and it is impossible to compare the intensity. This application uses a sensor array to accurately collect the physicochemical signals of medicinal materials, including multi-dimensional indicators such as pH, conductivity, and infrared spectral response. The physicochemical signals are precisely mapped to the five natures (cold, hot, warm, cool, neutral) and the five flavors (sour, bitter, sweet, pungent, salty), and converted into standardized intensity values ​​in fourteen dimensions. Finally, a one-dimensional intensity vector of the four natures and five flavors is generated. This quantification method based on physicochemical signals completely eliminates the interference of subjective experience, and provides a quantifiable and comparable objective basis for the intensity of the properties and flavors of each medicinal material. For example, the intensity of coldness can be accurately quantified as 0.72, and the intensity of pungent flavor as 0.65. The differences in properties and flavors between different medicinal materials can be intuitively reflected through vector differences. This standardized quantification function of properties and flavors is something that traditional qualitative descriptions cannot achieve.

[0058] It is also important to emphasize that the efficacy of traditional Chinese medicine is often recorded in natural language text, such as clearing heat and drying dampness, purging fire and detoxifying. This results in inconsistent descriptions, vague connotations, and difficulties in machine processing. This application uses natural language processing technology to deeply analyze these efficacy texts. First, based on the *Pharmacopoeia of the People's Republic of China* and authoritative TCM classics, a standardized core efficacy category system is constructed, such as relieving exterior syndromes, clearing heat, warming the interior, regulating qi, and promoting blood circulation. Then, the specific target points corresponding to each efficacy are extracted, such as the internal organs, meridians, and symptoms. Finally, an efficacy domain matrix is ​​generated. This efficacy domain matrix is ​​a two-dimensional weighted matrix, where rows represent core efficacy categories, columns represent specific target points, and matrix elements represent the intensity of the medicinal material's effect on the efficacy-target combination. For example, in the efficacy domain matrix of Coptis chinensis, the weight value of the heat-clearing category corresponding to the Heart Meridian target is 0.89, and the weight value of the dampness-drying category corresponding to the Spleen and Stomach Meridian target is 0.78. This structured representation method transforms the vague efficacy description into calculable weight data, allowing the efficacy characteristics of medicinal materials to be directly processed by machine learning models. It solves the unstructured problem of traditional efficacy description, and its accurate efficacy structure quantification function cannot be replaced by single text parsing technology.

[0059] It is also important to emphasize that the efficacy and medicinal properties of Chinese medicinal herbs are essentially determined by their chemical composition. Traditional methods struggle to fully capture the chemical basis of these herbs, resulting in a lack of material-level support for property judgment. This application utilizes mass spectrometry to detect the components of medicinal herbs, extracting characteristic ion peak sequences. These ion peak sequences directly correspond to the active ingredients in the herbs, such as alkaloids, flavonoids, and terpenes. Principal component analysis and other dimensionality reduction algorithms are then used to convert the high-dimensional ion peak data into fixed-length chemical feature codes, generating a chemical component fingerprint. This chemical component fingerprint can uniquely characterize the chemical composition of a medicinal herb. Even if different herbs have similar properties and efficacy, differences in their chemical composition can lead to accurate identification through differences in fingerprint vectors. For example, honeysuckle and forsythia both have heat-clearing effects, but their chemical component fingerprints differ significantly, avoiding misjudgments caused by relying solely on properties or efficacy.

[0060] The meridian topology embedding module includes an association graph construction unit;

[0061] After receiving the quantified medicinal property spectrum, the association graph construction unit establishes a standard meridian node set containing 20 basic nodes of the twelve regular meridians and eight extraordinary meridians according to traditional Chinese medicine theory. Each medicinal material is treated as a dynamic node, and the affinity weight between the medicinal material node and each standard meridian node is calculated based on the four qi and five flavor intensity vectors in its quantified medicinal property spectrum. A heterogeneous network graph is constructed in which the medicinal material node and the standard meridian node are interconnected and the edges have affinity weights, which is the medicinal material-meridian association graph. The process of constructing the network graph based on nodes, edges and edge weights is a conventional means that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method.

[0062] Furthermore, based on Traditional Chinese Medicine theory, a standard set of meridian nodes was established, comprising 20 basic nodes from the twelve regular meridians and the eight extraordinary meridians, including:

[0063] (1) Based on the theory of traditional Chinese medicine, twenty core meridians are selected from the twelve regular meridians and the eight extraordinary meridians to form a basic meridian list. Then, each meridian in the basic meridian list is defined as a basic node, and a set of structured attributes are assigned to each basic node. The structured attributes include at least the meridian name, yin-yang attribute, five-element attribute, the name of the organ to which it is connected, and its position in the order of flow of the twelve regular meridians. The theory of traditional Chinese medicine is a conventional means that can be understood and implemented by those skilled in the art. This application is not limited to a specific partitioning method.

[0064] (2) Based on the generated basic nodes and their structured attributes, the topological relationship between nodes is established according to the theory of traditional Chinese medicine. Specifically, according to the order of the twelve regular meridians, directional qi and blood flow relationship edges are established between the corresponding meridian nodes. For example, a directed edge is drawn from the Lung Meridian of Hand-Taiyin to the Large Intestine Meridian of Hand-Yangming, indicating that qi and blood flow from the Lung Meridian to the Large Intestine Meridian. At the same time, according to the exterior-interior relationship of the twelve meridians, undirected exterior-interior relationship edges are established between paired meridian nodes. For example, the Spleen Meridian of Foot-Taiyin and the Stomach Meridian of Foot-Yangming are marked as exterior-interior relationship. Then, the communication and regulation relationship edges between the nodes of the eight extraordinary meridians and the nodes of the twelve regular meridians are defined. For example, the connection between the Governing Vessel and the Yang Meridians, and the connection between the Conception Vessel and the Yin Meridians.

[0065] (3) All the defined basic nodes and their structured attributes, together with all the established topological relationships, are digitally encoded. Each basic node is assigned a unique digital identifier, and all node attributes and relation edges are stored in a computer-readable data structure to generate a digital standard meridian node set instance. The generated standard meridian node set instance is stored in the system's preset knowledge base. At the same time, a data access interface is configured for the standard meridian node set so that the attributes and related relationships of any meridian node can be queried and read through the interface.

[0066] Furthermore, the specific steps for calculating the affinity weights between the medicinal herb node and each standard meridian node include:

[0067] (1) Read the intensity vectors of the four qi and five flavors in the quantitative medicinal properties spectrum of the medicinal material to be calculated, and read the yin-yang attributes and five-element attributes of the target meridian node from the established standard meridian node set;

[0068] (2) Based on the correspondence between the five flavors and the five elements, analyze the intensity values ​​of the five flavors in the intensity vector of the four qi and five flavors to obtain the intensity distribution of the five elements attributes of the medicinal materials in the wood, fire, earth, metal and water elements. Then, compare and calculate the intensity distribution of the five elements attributes of the medicinal materials with the five elements attributes of the target meridian nodes according to the system's preset five elements generation and restraint relationship mapping table. For the attribute intensity of each element of the medicinal materials, calculate the contribution of the element based on its generation, restraint or same relationship with the five elements of the meridian, combined with the corresponding influence coefficient defined in the five elements generation and restraint relationship mapping table. Sum the fractional components of all elements to obtain the primary affinity score based on the five elements generation and restraint rules. The five elements generation and restraint relationship mapping table defines the five elements generation and restraint relationships and the corresponding influence coefficients.

[0069] (3) Analyze the intensity values ​​of the four qi in the intensity vector of the four qi and five flavors to obtain the intensity of each qi of the medicinal material, namely cold, hot, warm, cool and neutral. Then, match and calculate the intensity values ​​of the four qi of the medicinal material with the yin and yang attributes of the target meridian nodes according to the yin-yang cold and hot relationship mapping table preset by the system. For the intensity of each qi of the medicinal material, according to its matching relationship with the yin and yang attributes of the meridian, such as the synergy of cold on yin and heat on yang, or the constraint of cold on yang and heat on yin, calculate the fractional component contributed by the qi in combination with the corresponding influence coefficient defined in the yin-yang cold and hot relationship mapping table. Then, sum the fractional components of all qi to obtain the secondary affinity score based on the yin-yang cold and hot rule. The yin-yang cold and hot relationship mapping table defines the yin-yang cold and hot matching relationship and the corresponding influence coefficient.

[0070] (4) The obtained primary affinity score and secondary affinity score are weighted and summed according to the preset weight ratio to obtain a comprehensive original affinity score;

[0071] (5) For the target meridian node, normalize the original affinity scores of all medicinal materials in the medicinal material library, linearly scale all the original affinity scores to the range of zero to one, and obtain the normalized affinity score. Then, use the obtained normalized affinity score as the final affinity weight between the medicinal material node and the current target meridian node.

[0072] (6) Traverse all medicinal material nodes in the medicinal material library and all meridian nodes in the standard meridian node set. Calculate and assign an affinity weight to each pair of medicinal material nodes and standard meridian nodes, thereby establishing weighted connection edges between all medicinal material nodes and meridian nodes.

[0073] It should be noted that the core function of the association graph construction unit is to realize the structured association modeling between medicinal materials and meridians. Traditional meridian tropism research can only clarify the qualitative relationship of a medicinal material belonging to a certain meridian, but it cannot quantify the association strength or form a structured data form. After receiving the quantified medicinal property spectrum, the association graph construction unit of this application first establishes a standard meridian node set containing 20 basic nodes including the twelve regular meridians and the eight extraordinary meridians based on traditional Chinese medicine theory to ensure the integrity and standardization of the meridian system. Then, each medicinal material is treated as a dynamic node. Based on the intensity vector of the four qi and five flavors in the quantified medicinal property spectrum, the matching degree between the medicinal material's flavor and the meridian attributes is calculated. For example, the matching degree between cold medicinal materials and the lung and liver meridians is obtained to obtain the affinity weight between the medicinal material node and each standard meridian node. Finally, a heterogeneous network graph with interconnected medicinal material nodes and standard meridian nodes and edge affinity weights is constructed, namely, the medicinal material-meridian association graph. This structured graph model not only transforms discrete meridian relationships into computable weighted edges, but also achieves global correlation modeling between medicinal materials and meridians. For example, the affinity weight between Astragalus membranaceus and the Spleen Meridian is 0.85, and the affinity weight between Astragalus membranaceus and the Lung Meridian is 0.72. This quantitative correlation allows the model to accurately capture the differences in the intensity of the effects of medicinal materials on different meridians. Its structured and quantitative meridian correlation modeling function is something that traditional meridian research cannot achieve.

[0074] The meridian tropism topology embedding module also includes a feature initialization unit, which is used to generate initial feature representations for various nodes in the medicinal material-meridian association diagram;

[0075] The quantified pharmacological spectrum is input into a feature encoding network, which maps the high-dimensional and heterogeneous quantified pharmacological spectrum into a low-dimensional and dense continuous vector as the initial feature vector of the medicinal material node. At the same time, a learnable embedding vector is assigned to each standard meridian node as the initial feature vector of the standard meridian node. The feature encoding network is a conventional means that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method.

[0076] It should also be noted that the core function of the feature initialization unit is to solve the adaptation problem of high-dimensional heterogeneous data. The quantified medicinal property spectrum includes the intensity vectors of the four qi and five flavors, the efficacy domain matrix, and the chemical component fingerprint, which are high-dimensional and heterogeneous composite data that cannot be directly input into a graph neural network for processing. At the same time, standard meridian nodes lack natural feature representations and are difficult to participate in information aggregation. The feature initialization unit of this application maps the high-dimensional heterogeneous quantified medicinal property spectrum into a low-dimensional dense continuous vector through a feature encoding network, which serves as the initial feature vector for the medicinal material nodes. This mapping process not only achieves dimensionality reduction of the data dimension, but also integrates the deep correlation information of properties, efficacy, and chemical components through the nonlinear transformation of the neural network. At the same time, a learnable embedding vector is assigned to each standard meridian node as an initial feature vector. This vector can be continuously optimized during model training, gradually conforming to the essential attributes of the meridians, such as the dispersing and draining characteristics of the liver meridian and the transporting and transforming characteristics of the spleen meridian. This targeted feature initialization design not only solves the problem of processing high-dimensional heterogeneous data, but also endows the meridian nodes with optimizable feature representations, ensuring that the graph neural network can effectively aggregate information. Its functional advantages are far superior to fixed-dimensional feature mapping methods.

[0077] The meridian tropism topology embedding module further includes a graph neural network processing unit; the graph neural network processing unit adopts an encoder architecture including a node feature initialization layer, a meridian feature enhancement layer, and a medicinal material feature readout layer, to aggregate information from the medicinal material-meridian association graph in a hierarchical manner and generate a meridian tropism topology vector, specifically including:

[0078] The node feature initialization layer is based on the initial feature vectors of medicinal herb nodes and standard meridian nodes. It calculates the attention weight of each medicinal herb node to each standard meridian node it is associated with through a multi-head attention mechanism. The standard meridian nodes aggregate their first-layer intermediate feature vector by weighted summation of the features of all associated medicinal herb nodes. The first-layer intermediate feature vector incorporates the meridian tropism information of the associated medicinal herbs.

[0079] Furthermore, the generation process of the first-layer intermediate feature vector includes:

[0080] (1) The initial feature vector of each standard meridian node is linearly transformed through a learnable query weight matrix to generate the query vector of the meridian node. At the same time, the initial feature vector of each medicinal herb node associated with the standard meridian node is linearly transformed through a shared key weight matrix and a shared value weight matrix to generate the key vector and value vector of each medicinal herb node.

[0081] (2) For a standard meridian node, calculate the dot product between its query vector and the key vector of each associated medicinal herb node to obtain a set of original attention scores. Then, scale the original attention scores and normalize them using the Softmax function to obtain a set of attention weights with a sum of one. Each weight represents the importance of an associated medicinal herb node to the standard meridian node.

[0082] (3) Use attention weights to perform a weighted summation of the value vectors of the medicinal herb nodes to generate a temporary aggregated feature vector;

[0083] (4) Perform iterative repetition, using different query weight matrix, key weight matrix and value weight matrix each time to form a multi-head attention mechanism, and concatenate the temporary aggregated feature vectors obtained each time in the feature dimension to form a comprehensive feature vector;

[0084] (5) The comprehensive feature vector is linearly transformed through a learnable fully connected layer, and the output is the first layer intermediate feature vector of the standard meridian node;

[0085] (6) Perform loop iterations to generate the corresponding first-layer intermediate feature vectors for all standard meridian nodes, and complete the calculation of the first aggregation layer of the graph neural network.

[0086] The meridian feature enhancement layer takes the first layer intermediate feature vector as input, and performs message passing between standard meridian nodes according to the predefined Qi and blood flow relationship. Each standard meridian node aggregates the features of its neighboring nodes in the Qi and blood flow relationship, and introduces a gating mechanism to represent the flow direction and timing, encodes the theoretical constraints of the Qi and blood flow in traditional Chinese medicine into the node features, and generates the second layer intermediate feature vector of the standard meridian node.

[0087] Furthermore, the generation process of the second-layer intermediate feature vector includes:

[0088] (1) Determine the upstream and downstream neighbor nodes of each standard meridian node according to the predefined Qi and blood flow relationship, and form the directed flow relationship neighborhood of the node;

[0089] Specifically, for any standard meridian node, such as the Lung Meridian of Hand-Taiyin, the previous node where Qi and blood flow into and the next node where Qi and blood flow out are determined according to the order of the twelve regular meridians. For example, the Liver Meridian of Foot-Jueyin and the Large Intestine Meridian of Hand-Yangming. These two nodes constitute the direct neighbors of the central node in terms of the relationship of Qi and blood flow. At the same time, for the nodes of the eight extraordinary meridians, the neighboring nodes related to their flow are determined according to their communication relationship with the twelve regular meridians, such as the Governing Vessel governing all Yang meridians. That is, each node is given a directional set of neighbors that follows the physiological flow direction.

[0090] It needs to be explained that the relationship between Qi and blood flow is a precise map and timetable that specifies when, along which path, and in which direction Qi and blood flow.

[0091] (2) For each determined neighbor node, take the first layer intermediate feature vector of the neighbor node, and perform a linear transformation through a learnable weight matrix with a specified direction to generate a message vector pointing to the center node. The messages from the upstream neighbor and the messages from the downstream neighbor use different weight matrices. For example, the transformation matrix of the message from the previous station node and the message from the next station node are different. This enables the model to distinguish between source information and destination information, thereby perceiving the directionality of blood flow.

[0092] (3) All generated message vectors are aggregated, and a learnable temporal encoding vector is concatenated with the first-layer intermediate feature vector of the central node, wherein the temporal encoding vector uniquely corresponds to the position of the node in the order of Qi and Blood Flow.

[0093] (4) Input the converged message vector and the concatenated feature vector into a gating unit. The gating unit calculates an update threshold and a candidate state vector, and uses them to update the first layer intermediate feature vector of the central node to generate a preliminary enhanced feature vector.

[0094] (5) The generated preliminary enhanced feature vector is linearly transformed and nonlinearly activated through a learnable fully connected layer, and the output is used as the second intermediate feature vector of the standard meridian node;

[0095] (6) Perform loop iterations to generate the corresponding intermediate feature vectors of the second layer for all standard meridian nodes, and complete the calculation of the second aggregation layer of the graph neural network.

[0096] The medicinal herb feature readout layer takes the second-layer intermediate feature vector and the initial feature vector of the medicinal herb node as input. It calculates the weight of each medicinal herb node in extracting information from its standard meridian nodes through an attention mechanism. The medicinal herb node generates its high-order fusion feature vector by weighted summing of the second-layer intermediate feature vectors of all associated standard meridian nodes. The high-order fusion feature vector is then subjected to nonlinear transformation and dimensionality reduction to obtain the meridian topology vector of the medicinal herb node. The calculation process of the high-order fusion feature vector is the same as the generation process of the first-layer intermediate feature vector, which will not be described in detail here.

[0097] The harmonization module includes a multi-scale analysis unit and a feature fusion unit;

[0098] After receiving the meridian topology vector, the multi-scale analysis unit performs feature extraction at three scales in parallel to obtain multi-scale features, including micro-scale extraction that captures structural features through a one-dimensional convolution kernel, meso-scale extraction that reshapes the meridian topology vector into a two-dimensional matrix and uses a two-dimensional convolution kernel to identify pattern combination features, and macro-scale extraction that analyzes overall trend features through a fully connected network.

[0099] Furthermore, the multi-scale feature extraction process includes:

[0100] (1) After receiving the meridian topology vector, the multi-scale analysis unit generates three independent copies of the meridian topology vector and inputs them into the parallel micro-scale extraction path, meso-scale extraction path and macro-scale extraction path respectively.

[0101] (2) In the microscale extraction pathway, multiple one-dimensional convolution kernels of different widths are used to perform convolution operations on the input meridian topology vector, and then the nonlinear activation function is processed and pooling is performed. Finally, the obtained feature map is flattened to generate microscale feature vectors.

[0102] (3) In the mesoscale extraction pathway, the input meridian topology vector is first reshaped into a two-dimensional matrix with a preset structure. Then, multiple two-dimensional convolution kernels of different sizes are used to perform convolution operations on the two-dimensional matrix. After nonlinear activation function processing and pooling operations, the resulting feature map is flattened to generate mesoscale feature vectors.

[0103] (4) In the macro-scale extraction pathway, the input meridian topology vector is directly input into a multi-layer fully connected neural network. The multi-layer fully connected neural network consists of multiple sequentially connected fully connected layers. Each layer contains linear transformations and nonlinear activation functions. Finally, the macro-scale feature vector is output from the last fully connected layer.

[0104] (5) The generated microscale feature vector, mesoscale feature vector and macroscale feature vector are output as a multiscale feature set and transmitted to the feature fusion unit.

[0105] After receiving the multi-scale features output by the multi-scale analysis unit, the feature fusion unit assigns adaptive weights dynamically generated by a small neural network to each scale feature, and concatenates the weighted multi-scale features to form a hybrid feature representation. The hybrid feature representation is then processed by dimensionality reduction to form a neutral feature code.

[0106] Furthermore, the formation process of the neutralization signature includes:

[0107] (1) The microscale feature vector, mesoscale feature vector and macroscale feature vector contained in the multi-scale feature are concatenated to form an aggregated feature vector. Then, the aggregated feature vector is input into a weight generation neural network. The weight generation neural network outputs three unnormalized importance scores through multi-layer nonlinear transformation. Finally, the three importance scores are normalized by applying the Softmax function to obtain adaptive weights corresponding to microscale, mesoscale and macroscale features respectively.

[0108] (2) Perform scalar multiplication of the obtained microscale adaptive weights with the microscale feature vector to obtain a weighted microscale feature vector. Then perform scalar multiplication of the mesoscale adaptive weights with the mesoscale feature vector to obtain a weighted mesoscale feature vector. Finally, perform scalar multiplication of the macroscale adaptive weights with the macroscale feature vector to obtain a weighted macroscale feature vector.

[0109] (3) The weighted micro-feature vector, the weighted meso-feature vector and the weighted macro-feature vector are sequentially concatenated in the feature dimension to generate a hybrid feature representation, and the hybrid feature representation is processed by a dimensionality reduction module to compress the feature dimension; the dimensionality reduction module uses principal component analysis to extract core features from the hybrid feature representation, outputs a low-dimensional feature vector with a fixed dimension, and defines it as the neutral feature code.

[0110] The system also includes a drug potential space construction module;

[0111] The medicinal property latent space construction module adopts a Siamese network architecture, in which the two sub-networks share weight parameters, and each sub-network contains three fully connected transformation layers. During training, medicinal material pairs with known compatibility relationships are used as positive samples, and randomly paired medicinal materials are used as negative samples. The network parameters are optimized through a distance loss function. After training, the medicinal property latent space construction module maps the neutralization feature codes of any medicinal material to a unified medicinal property latent space. Medicinal materials with similar medicinal properties and meridian tropism are close in distance in the medicinal property latent space. The distance loss function adopts a contrastive loss function. The contrastive loss function and the Siamese network architecture are conventional means that can be understood and implemented by those skilled in the art. This application is not limited to a specific partitioning method.

[0112] It's important to explain that traditional latent space construction often uses a single encoder to map features to a high-dimensional space and then judges similarity through simple distance metrics. This approach struggles to ensure consistency between the distance in the latent space and actual compatibility requirements. For example, some medicinal materials may have similar features but no synergistic effect after combination, while others may have significantly different features but conform to the principle of mutual reinforcement and complementation. The medicinal property latent space construction module in this application employs a Siamese network architecture containing two sub-networks with shared weight parameters. Each sub-network contains three fully connected transformation layers, enabling deep nonlinear transformation of neutralized feature codes. During training, known compatibility relationships, such as mutually reinforcing or complementary medicinal material pairs, are used as positive samples, while randomly paired medicinal materials are used as negative samples. The network parameters are optimized using a distance loss function, such as Triplet Loss, to ensure that positive samples are as close as possible to each other in the latent space, and negative samples are as far apart as possible. This training method based on compatibility relationships directly links the distance metric in the latent space to actual compatibility requirements. Closeness in the latent space indicates high compatibility, rather than simply feature similarity, thus solving the problem of the disconnect between traditional latent spaces and practical applications. After training, the neutralization feature codes of any medicinal material can be mapped to a unified medicinal property latent space through this network. Medicinal materials with similar medicinal properties and meridian tropism, and suitable compatibility, will naturally cluster together. Its compatibility-oriented latent space construction function is something that traditional feature mapping methods cannot achieve.

[0113] The drug potential space construction module is trained using a hierarchical comparative learning strategy;

[0114] The first layer of contrastive learning uses the intensity vectors of the four qi and five flavors as the supervision signal to focus on the similarity of the four qi and five flavors of medicinal materials; the second layer of contrastive learning uses the efficacy domain matrix as the supervision signal to focus on the similarity of the efficacy of medicinal materials; the third layer of contrastive learning uses the chemical component fingerprint as the supervision signal to focus on the similarity of the chemical composition of medicinal materials; the results of the three layers of contrastive learning are combined to form the final latent space structure of medicinal properties.

[0115] Furthermore, the formation process of the potential space structure of the drug includes:

[0116] (1) Using the intensity vectors of the four qi and five flavors of the training medicinal material samples as supervision signals, positive and negative sample pairs are constructed. Among them, the positive sample pairs are medicinal material pairs with high similarity of the four qi and five flavors, and the negative sample pairs are medicinal material pairs with low similarity of the four qi and five flavors. Then, the constructed positive and negative sample pairs and the distance loss function are used to train the Siamese network for the first round. The goal of the training is to make the Siamese network map the neutralization feature code into a latent space. In this latent space, the distance between positive sample pairs is smaller than the distance between negative sample pairs, thus forming a spatial structure that initially reflects the similarity of the four qi and five flavors.

[0117] (2) Using the efficacy domain matrix of the training medicinal samples as the supervision signal, construct new positive and negative sample pairs, where positive sample pairs are medicinal pairs with high efficacy similarity and negative sample pairs are medicinal pairs with low efficacy similarity. Then, using the Siamese network parameters after training as the initial parameters, use the newly constructed positive and negative sample pairs and the distance loss function to perform a second round of training on the Siamese network. The goal of the training is to further adjust the network parameters on the basis of maintaining the similarity structure of the four qi and five flavors, so that the medicinal pairs with high efficacy similarity in the latent space are also closer, thereby integrating the efficacy similarity constraint.

[0118] (3) Using the chemical composition fingerprint of the training medicinal sample as the supervision signal, the final positive and negative sample pairs are constructed. The positive sample pairs are medicinal material pairs with high chemical composition similarity, and the negative sample pairs are medicinal material pairs with low chemical composition similarity. Then, the Siamese network parameters after training are used as the initial parameters. The final constructed positive and negative sample pairs and the distance loss function are used to train the Siamese network for the third round. The goal of training is to further fine-tune the network parameters on the basis of integrating the four qi and five flavors and efficacy information, so that in the latent space, the medicinal material pairs with similar chemical composition are also close to each other, thereby incorporating the chemical composition similarity constraint.

[0119] (4) After completing the three-layer training in steps (1)-(3), the parameters of the Siamese network are finally solidified. The solidified Siamese network maps the neutralization feature code of any medicinal material to a unified vector space, which is defined as the medicinal property latent space. The structure of the medicinal property latent space is jointly shaped by the constraints of the three-layer contrastive learning.

[0120] The reasoning-based retrieval network module includes a similarity calculation unit and a matching rule matching unit:

[0121] After receiving the neutralization feature code of the medicinal material, the similarity calculation unit maps it to the latent space of medicinal properties through a sub-network of the twin network to obtain the query positioning vector. At the same time, it calculates the multi-dimensional similarity score between the query positioning vector and the reference positioning vectors of all medicinal materials in the pre-stored medicinal material database to form a similarity ranking list. The multi-dimensional similarity score is the weighted sum of the Euclidean distance and cosine similarity between the query positioning vector and the reference positioning vector. The calculation formulas for Euclidean distance and cosine similarity are conventional methods that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method.

[0122] After receiving the similarity ranking list, the compatibility matching unit applies a compatibility rule filter to exclude incompatible combinations in traditional Chinese medicine, and selects candidate medicinal materials with synergistic enhancement effects with the query medicinal material from the remaining medicinal materials according to the principle of mutual reinforcement and mutual enhancement, forming a set of analogous medicinal materials; each medicinal material in the set of analogous medicinal materials is marked with the specific compatibility relationship type with the query medicinal material.

[0123] Furthermore, the formation process of the analogy medicinal material collection includes:

[0124] (1) Receive the similarity ranking list and form a medicinal material pair with each candidate medicinal material in the similarity ranking list and the queried medicinal material;

[0125] (2) Match each pair of medicinal materials with the pre-set incompatible combination rules knowledge base. If the match is successful, remove the candidate medicinal material from the list and generate a filtered list of candidate medicinal materials.

[0126] (3) For each candidate herb in the generated filtered list of candidate herbs, perform the following: extract the efficacy domain matrix of the candidate herb and the efficacy domain matrix of the query herb, and calculate the efficacy overlap and efficacy complementarity between the efficacy domain matrix of the candidate herb and the efficacy domain matrix of the query herb. At the same time, the efficacy overlap and efficacy complementarity are weighted and fused according to a preset weight ratio to obtain the synergistic potential score of the candidate herb relative to the query herb.

[0127] Furthermore, the efficacy scope matrix of the candidate medicinal material and the efficacy scope matrix of the query medicinal material are extracted, and the efficacy overlap and complementarity between the efficacy scope matrices of the candidate medicinal material and the query medicinal material are calculated, including:

[0128] 1) Confirm that the efficacy domain matrix of the queried medicinal materials and the efficacy domain matrix of the candidate medicinal materials have completely consistent row and column structures;

[0129] 2) Identify the core efficacy categories in the efficacy domain matrix of the queried medicinal materials whose weight values ​​are higher than a preset threshold, and determine the core efficacy categories as the core efficacy dimensions;

[0130] 3) For each determined core efficacy dimension, calculate the cosine similarity between the weight vectors of the query medicinal material and the candidate medicinal material on that efficacy dimension;

[0131] 4) Using the weight values ​​of the queried medicinal materials in each core efficacy dimension as weight coefficients, the cosine similarity calculated for all core efficacy dimensions is weighted and summed, and the result of the weighted sum is used as the efficacy overlap.

[0132] 5) Identify efficacy dimensions in the efficacy domain matrix of the queried medicinal materials whose weight values ​​are lower than a preset threshold, as missing efficacy dimensions, and calculate the sum of weight values ​​of candidate medicinal materials on these missing efficacy dimensions as the contribution to missing efficacy compensation; at the same time, for the determined core efficacy dimensions, identify target points that exist in the weight vector of candidate medicinal materials but do not exist in the weight vector of the queried medicinal materials, i.e., unique target points, and calculate the sum of weight values ​​of candidate medicinal materials on these unique target points as the contribution to synergistic enhancement.

[0133] 6) The contribution of missing compensation and the contribution of synergistic enhancement are weighted and summed, and the result of the weighted sum is used as the complementarity of efficacy;

[0134] 7) The calculated efficacy overlap and efficacy complement are weighted and fused according to the preset weight ratio to generate a comprehensive synergistic potential score.

[0135] (4) For each candidate medicinal material whose synergistic potential score has been calculated, a specific compatibility relationship type label is assigned to it according to the relative magnitude of its efficacy overlap and efficacy complementarity, based on the predefined compatibility relationship determination rules; the compatibility relationship type includes at least mutual reinforcement and mutual enhancement.

[0136] (5) The original similarity score of each candidate medicinal material in the similarity ranking list is weighted and fused with its calculated synergistic potential score to generate a comprehensive recommendation score;

[0137] (6) Sort the filtered candidate medicinal materials list in descending order according to the comprehensive recommendation score to generate the final sorted list;

[0138] (7) Associate and encapsulate the generated final sorted list with the compatibility relationship type label marked for each candidate medicinal material, and output the analog medicinal material set.

[0139] The compatibility rule filter is embedded with a knowledge base of traditional Chinese medicine contraindications rules, including the Eighteen Incompatibilities and Nineteen Antagonisms; the compatibility rule matching unit matches the medicinal materials in the similarity ranking list with the contraindication rule knowledge base, and automatically filters out medicinal materials that have contraindications with the queried medicinal materials.

[0140] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments under the guidance of the present invention without departing from the spirit and scope of the present invention. All of these variations are within the protection scope of the present invention.

Claims

1. A machine learning-based system for encoding and retrieving the attribute features of traditional Chinese medicinal materials, characterized in that, include: The module includes a medicinal property spectrum acquisition module, a meridian tropism topology embedding module, a harmonization module, and a principle retrieval network module. The meridian tropism topology embedding module receives the quantitative medicinal property spectrum of Chinese medicinal materials collected by the medicinal property spectrum acquisition module, constructs a medicinal material-meridian association diagram based on the theory of visceral meridian tropism, and generates meridian tropism topology vectors through graph neural networks; the quantitative medicinal property spectrum includes the intensity vectors of the four qi and five flavors, the efficacy domain matrix, and the chemical component fingerprint. The harmonization module performs multi-scale feature harmonization on the meridian topology vector and outputs a neutralization feature code. The reasoning retrieval network module retrieves a set of analogous medicinal materials that conform to the principle of mutual reinforcement and compatibility by calculating the distance of the neutralization feature code in the pre-constructed medicinal property latent space, and feeds back the retrieved set of analogous medicinal materials to the medicinal property spectrum acquisition module. The reasoning-based retrieval network module calculates the distance of the neutralization feature code in the pre-constructed medicinal property latent space, including: mapping the neutralization feature code to the medicinal property latent space through a sub-network of the Siamese network architecture to obtain a query positioning vector; calculating the multi-dimensional similarity score between the query positioning vector and the reference positioning vectors of all medicinal materials in the pre-stored medicinal material database, which is the distance of the neutralization feature code in the medicinal property latent space; the multi-dimensional similarity score is the weighted sum of the Euclidean distance and cosine similarity between the query positioning vector and the reference positioning vector; The quantitative pharmacological spectrum is achieved through three-level quantitative processing of Chinese medicinal materials by the pharmacological spectrum acquisition module, specifically including: The first level of quantification involves collecting physicochemical signals from medicinal materials using a sensor array and mapping them to standardized intensity values ​​across fourteen dimensions: the five qi (cold, hot, warm, cool, neutral) and the five flavors (sour, bitter, sweet, pungent, salty), generating intensity vectors for the four qi and five flavors. The second level of quantification uses natural language processing to analyze the textual records of medicinal material efficacy, generating an efficacy domain matrix. This matrix is ​​a two-dimensional weighted matrix, where rows represent core efficacy categories and columns represent specific target points. The third level of quantification extracts characteristic ion peak sequences from the medicinal materials using mass spectrometry, reduces their dimensionality to form fixed-length chemical feature codes, and generates chemical component fingerprints. Finally, the efficacy domain matrix is ​​flattened column-wise and concatenated end-to-end with the intensity vectors for the four qi and five flavors and the chemical component fingerprints along the feature dimensions to form a quantified medicinal property spectrum. The meridian topology embedding module includes an association graph construction unit; After receiving the quantified medicinal property spectrum, the association graph construction unit establishes a standard meridian node set containing 20 basic nodes of the twelve regular meridians and eight extraordinary meridians according to traditional Chinese medicine theory. Each medicinal material is treated as a dynamic node, and the affinity weight between the medicinal material node and each standard meridian node is calculated based on the intensity vector of the four qi and five flavors in its quantified medicinal property spectrum. A heterogeneous network graph is constructed in which the medicinal material node and the standard meridian node are interconnected and have edge affinity weights, which is the medicinal material-meridian association graph.

2. The machine learning-based system for encoding and retrieving the attribute features of Chinese medicinal materials as described in claim 1, characterized in that, The meridian tropism topology embedding module also includes a feature initialization unit, which is used to generate initial feature representations for various nodes in the medicinal material-meridian association diagram; The quantified medicinal property spectrum is input into a feature encoding network, which maps the high-dimensional and heterogeneous quantified medicinal property spectrum into a low-dimensional and dense continuous vector as the initial feature vector of the medicinal material node. At the same time, a learnable embedding vector is assigned to each standard meridian node as the initial feature vector of the standard meridian node.

3. The machine learning-based system for encoding and retrieving the attribute features of Chinese medicinal materials as described in claim 2, characterized in that, The meridian tropism topology embedding module further includes a graph neural network processing unit; the graph neural network processing unit adopts an encoder architecture including a node feature initialization layer, a meridian feature enhancement layer, and a medicinal material feature readout layer, to aggregate information from the medicinal material-meridian association graph in a hierarchical manner and generate a meridian tropism topology vector, specifically including: The node feature initialization layer is based on the initial feature vectors of medicinal herb nodes and standard meridian nodes. It calculates the attention weight of each medicinal herb node to each standard meridian node it is associated with through a multi-head attention mechanism. The standard meridian nodes aggregate their first-layer intermediate feature vector by weighted summation of the features of all associated medicinal herb nodes. The first-layer intermediate feature vector incorporates the meridian tropism information of the associated medicinal herbs. The meridian feature enhancement layer takes the first layer intermediate feature vector as input, and performs message passing between standard meridian nodes according to the predefined Qi and blood flow relationship. Each standard meridian node aggregates the features of its neighboring nodes in the Qi and blood flow relationship, and introduces a gating mechanism to represent the flow direction and timing, encodes the theoretical constraints of the Qi and blood flow in traditional Chinese medicine into the node features, and generates the second layer intermediate feature vector of the standard meridian node. The medicinal material feature reading layer takes the second-layer intermediate feature vector and the initial feature vector of the medicinal material node as input. It calculates the weight of each medicinal material node in extracting information from its standard meridian nodes through an attention mechanism. The medicinal material node generates its high-order fusion feature vector by weighted summing of the second-layer intermediate feature vectors of all associated standard meridian nodes. The high-order fusion feature vector is then subjected to nonlinear transformation and dimensionality reduction to obtain the meridian topology vector of the medicinal material node.

4. The machine learning-based system for encoding and retrieving the attribute features of Chinese medicinal materials as described in claim 1, characterized in that, The harmonization module includes a multi-scale analysis unit and a feature fusion unit; After receiving the meridian topology vector, the multi-scale analysis unit performs feature extraction at three scales in parallel to obtain multi-scale features, including micro-scale extraction that captures structural features through a one-dimensional convolution kernel, meso-scale extraction that reshapes the meridian topology vector into a two-dimensional matrix and uses a two-dimensional convolution kernel to identify pattern combination features, and macro-scale extraction that analyzes overall trend features through a fully connected network. After receiving the multi-scale features output by the multi-scale analysis unit, the feature fusion unit assigns adaptive weights dynamically generated by a small neural network to each scale feature, and concatenates the weighted multi-scale features to form a hybrid feature representation. The hybrid feature representation is then processed by dimensionality reduction to form a neutral feature code.

5. The machine learning-based system for encoding and retrieving the attribute features of Chinese medicinal materials as described in claim 1, characterized in that, The system also includes a drug potential space construction module; The drug potential space construction module adopts a Siamese network architecture, in which the two sub-networks share weight parameters and each sub-network contains three fully connected transformation layers. During training, drug pairs with known compatibility are used as positive samples and randomly paired drugs are used as negative samples. The network parameters are optimized through a distance loss function. After training, the medicinal property latent space construction module maps the neutralization feature code of any medicinal material to a unified medicinal property latent space, and medicinal materials with similar medicinal properties and meridian tropism are close to each other in the medicinal property latent space.

6. The machine learning-based system for encoding and retrieving the attribute features of Chinese medicinal materials as described in claim 5, characterized in that, The drug potential space construction module is trained using a hierarchical comparative learning strategy; The first layer of contrastive learning uses the intensity vectors of the four qi and five flavors as supervision signals to focus on the similarity of the four qi and five flavors of medicinal materials. The second layer of contrastive learning uses the efficacy domain matrix as a supervision signal to focus on the similarity of efficacy effects of medicinal materials; The third layer of contrastive learning uses the chemical component fingerprint as a supervisory signal to focus on the similarity of the chemical composition of medicinal materials; The results of the three-layer comparative learning are combined to form the final pharmacological latent space structure.

7. The machine learning-based system for encoding and retrieving the attribute features of Chinese medicinal materials as described in claim 1, characterized in that, The reasoning-based retrieval network module includes a similarity calculation unit and a matching rule matching unit: After receiving the neutralization feature code of the medicinal material, the similarity calculation unit maps it to the latent space of medicinal properties through a sub-network of the Siamese network architecture to obtain the query positioning vector. At the same time, it calculates the multi-dimensional similarity score between the query positioning vector and the reference positioning vector of all medicinal materials in the pre-stored medicinal material database to form a similarity ranking list. The multi-dimensional similarity score is the weighted sum of the Euclidean distance and cosine similarity between the query positioning vector and the reference positioning vector. After receiving the similarity ranking list, the compatibility matching unit applies a compatibility rule filter to exclude incompatible combinations in traditional Chinese medicine, and selects candidate medicinal materials with synergistic enhancement effects with the query medicinal material from the remaining medicinal materials according to the principle of mutual reinforcement and mutual enhancement, forming a set of analogous medicinal materials; each medicinal material in the set of analogous medicinal materials is marked with the specific compatibility relationship type with the query medicinal material.

8. The machine learning-based system for encoding and retrieving the attribute features of Chinese medicinal materials as described in claim 7, characterized in that, The compatibility rule filter contains a knowledge base of traditional Chinese medicine contraindications rules, including the Eighteen Incompatibilities and Nineteen Antagonisms. The compatibility matching unit matches the medicinal materials in the similarity ranking list with the contraindication rule knowledge base, and automatically filters out medicinal materials that have a contraindication relationship with the queried medicinal materials.