Personalized prescription automatic preparation system based on traditional Chinese medicine syndrome differentiation
By constructing a high-dimensional feature space and a drug metabolism fingerprint database, and dynamically adjusting the connection strength of drug combinations, the problems of pathogenesis quantification and metabolic safety in TCM intelligent prescription systems are solved, realizing the automatic preparation and precise dosage allocation of personalized prescriptions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-03-13
AI Technical Summary
Existing intelligent prescription systems for traditional Chinese medicine are unable to accurately quantify the degree of cold/heat and deficiency/excess in the pathogenesis and the severity of the disease. Furthermore, they lack metabolic compatibility verification at the microscopic molecular level, resulting in a lack of logical support for the dosage allocation of prescriptions and potential safety risks.
The system employs a pathogenesis vectorization modeling module, a drug metabolism fingerprint database construction module, a principal drug screening module, a dynamic edge weight calculation module, and a topology network generation module. By constructing a high-dimensional feature space, it quantifies drug metabolism characteristics, dynamically adjusts the connection strength of drug combinations, and achieves a balance between the drug property vector and the pathogenesis deviation vector, thus ensuring the accurate allocation of drug dosage.
It achieves precise digital mapping between TCM syndrome differentiation and drug combination, improves the microscopic metabolic safety of prescription compatibility and the objective quantification of dosage, and ensures the safety and effectiveness of prescriptions in clinical application.
Smart Images

Figure CN121662273A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of TCM information technology and intelligent assisted diagnosis and treatment technology, specifically to an automated prescription preparation system based on TCM syndrome differentiation. Background Technology
[0002] Traditional Chinese medicine (TCM) diagnosis and treatment is a highly complex and dynamic decision-making process. It requires physicians to comprehensively assess the etiology, location, and progression of the disease based on multimodal physical information such as the patient's chief complaint, pulse, and tongue appearance, and to construct a rigorous formula of principal, assistant, and adjuvant herbs in TCM prescriptions. With the development of modern computational medicine, how to utilize artificial intelligence technology to achieve objectivity and standardization in TCM diagnosis and treatment has become a hot topic in the industry. Currently, although various TCM-assisted prescription systems exist, technical bottlenecks remain in areas such as quantitative modeling of pathogenesis, microscopic metabolic safety control, and the mathematical logic of dosage calculation.
[0003] Most existing intelligent prescription-assisted systems for Traditional Chinese Medicine (TCM) rely on rule-based expert systems or end-to-end mapping models based on deep learning. These technologies typically use simple keyword matching or probabilistic statistical methods to directly map symptom sets to fixed prescription templates. However, the essence of TCM diagnosis is a vectorized assessment of the degree of deviation from the body's physiological and pathological state. Existing linear mapping methods struggle to accurately quantify the degree of cold / heat and deficiency / excess imbalances in the pathogenesis, as well as the severity of the disease. This results in prescriptions that often only qualitatively correspond to the symptoms, failing to achieve quantitative and precise alignment of the disease's progression. This lack of high-dimensional vector-guided prescription matching leads to prescriptions that are either insufficiently effective or overly corrective in correcting pathological deviations.
[0004] More importantly, traditional Chinese medicine (TCM) formulation theory primarily focuses on the synergistic effects of drugs at the macroscopic pharmacodynamic level (such as the compatibility of drugs based on the seven emotions), and existing auxiliary systems mostly directly digitize these macroscopic rules. However, from a modern pharmacological perspective, the chemical composition of TCM is extremely complex, and different drug components exhibit competitive inhibition in the metabolic processes of the human body. In particular, when multiple drugs compete for the same type of cytochrome P450 metabolic enzyme, metabolic congestion can occur, leading to the accumulation and toxicity of active ingredients or unexpected changes in efficacy. Existing automatic formulation algorithms lack a metabolic compatibility verification mechanism at the microscopic molecular level, and cannot detect and dynamically avoid such potential metabolic conflict risks in real time during the formulation process, resulting in prescriptions with significant safety risks in modern clinical applications.
[0005] Furthermore, in determining drug dosage, existing technologies typically rely on random or average values based on the static dosage ranges specified in pharmacopoeias. They lack a mathematical model capable of automatically calculating precise dosages based on the drug's position and role in a specific formulation. This results in machine-generated prescriptions often lacking logical support in dosage allocation, failing to reflect the structured characteristics of using a dominant drug and a less dominant adjuvant drug, thus limiting the effectiveness and reliability of automated prescription systems in clinical applications. Therefore, a novel automated prescription preparation system is needed that integrates macroscopic pathogenesis vector calculation with microscopic metabolic fingerprint verification. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides an automated prescription preparation system for personalized medicines based on traditional Chinese medicine syndrome differentiation. This system solves the problems of difficulty in quantifying the correspondence between pathogenesis and drug properties in existing Chinese medicine prescription processes, as well as the difficulty in automatically avoiding drug metabolism conflicts at the microscopic molecular level.
[0007] This invention provides an automated personalized prescription preparation system based on traditional Chinese medicine syndrome differentiation. The system proposed in this invention includes a pathogenesis vectorization modeling module, a drug metabolism fingerprint database construction module, a principal drug screening module, a dynamic edge weight calculation module, a topology network generation module, and a dose mapping module.
[0008] The pathogenesis vectorization modeling module is used to construct a digital pathogenesis model. This module establishes a multidimensional orthogonal feature space and maps the acquired multimodal diagnostic and treatment data (including textual data of chief complaints, frequency domain feature data of pulse images, and spectral feature data of tongue images) to patient state coordinate points in this high-dimensional feature space. By constructing a vector connecting the origin of the high-dimensional feature space and the patient state coordinate points, a pathogenesis deviation vector representing the nature and severity of the disease is generated.
[0009] The drug metabolism fingerprint database construction module is used to quantify the metabolic characteristics of drugs at the microscopic molecular level. This module acquires the molecular structure data of the active chemical components of candidate drugs, selects the human drug-metabolizing enzyme system as the target set, and generates a metabolic fingerprint vector for each candidate drug by calculating the binding strength between the active chemical component and each metabolic enzyme target in the target set. This metabolic fingerprint vector is used to subsequently calculate the metabolic competition risk between drugs.
[0010] The principal drug screening module is used to determine the starting point for the growth of the prescription topology network. This module maps the pharmacodynamic characteristic parameters of candidate drugs to pharmacodynamic action vectors of the same dimension as the high-dimensional feature space, and performs inverse maximum projection calculation. Specifically, it calculates the projection magnitude of the pharmacodynamic action vector in the opposite direction to the pathogenesis deviation vector, and selects the drug node with the largest projection magnitude as the initial root node of the prescription topology network to ensure that the therapeutic direction of the principal drug forms the greatest possible counterbalancing with the pathogenesis deviation direction.
[0011] The dynamic edge weight calculation module is the core computing unit of this invention, used to dynamically adjust the connection strength between drugs during network growth. For the selected first drug node and the second drug node to be connected in the prescription topology network, this module first obtains the basic synergy weight between them. This basic synergy weight reflects the co-occurrence frequency or pharmacodynamic synergy in traditional drug combinations. Subsequently, the module calculates the metabolic congestion coefficient based on the metabolic fingerprint vectors of the first and second drug nodes. This coefficient characterizes the degree of competition and overlap between the two drugs in their metabolic pathways. Finally, the basic synergy weight is attenuated and corrected using the metabolic congestion coefficient to generate the final topology connection weights. This mechanism reduces the weights of drug combinations with a high risk of metabolic conflict, thereby automatically suppressing them during network generation.
[0012] The topology network generation module performs network growth operations based on the calculated topology connection weights. This module employs a greedy strategy or a maximum weight spanning tree expansion strategy, prioritizing the addition of candidate drug nodes with the largest topology connection weights to the prescription topology network. After adding each new node, the module calculates the weighted sum of the drug effect vectors of all drug nodes in the current network and determines whether the magnitude of the vector sum of this weighted sum and the deviation vector from the pathogenesis is less than a preset balance residual threshold. When this threshold condition is met, network growth stops, indicating that the generated prescription combination can offset the deviation potential energy of the pathogenesis within a preset accuracy range.
[0013] The dosage mapping module is used to transform abstract topological structures into specific drug dosages. This module calculates the centrality index values of each drug node in the final generated prescription topology network, and uses a mapping function to convert the centrality index values into the corresponding drug dosage values, thus realizing the function of automatically allocating dosages based on the importance of drugs in the compatibility structure.
[0014] Furthermore, in terms of vectorized modeling of pathogenesis, the high-dimensional feature space includes a cold / heat dimension representing the level of energy metabolism, a virtual / real dimension representing the strength of the body's resistance, an exterior / interior dimension representing the depth of the disease location, and a qi / blood dimension representing the state of the circulatory system. The system converts symptom keywords into discrete coordinate components of corresponding dimensions, maps the pressure amplitude and main wave frequency of the pulse wave to the virtual / real and cold / heat dimensions respectively, and maps the chromaticity and brightness values of the tongue image spectral features to the qi / blood and exterior / interior dimensions respectively. Finally, a pathogenesis deviation vector is generated through vector concatenation.
[0015] Furthermore, in constructing the metabolic fingerprint database, a molecular docking algorithm is used to simulate the binding conformation of active chemical components with the active pockets of various metabolic enzymes in the target set, and the Gibbs free energy change value under the optimal conformation is calculated. By weighted summation and nonlinear normalization of the binding free energies of all active chemical components in candidate drugs for the same metabolic enzyme target, negative binding energies are converted into positive binding affinity values, which serve as the fingerprint components of the metabolic fingerprint vector in the corresponding metabolic enzyme dimension. For metabolic enzyme subtypes in the target set that lack high-resolution X-ray diffraction crystal structures, homology modeling algorithms or deep learning-based protein structure prediction models are used to predict and generate three-dimensional spatial folded structures based on the amino acid sequence of the metabolic enzyme, and the predicted structural data are incorporated into the target set.
[0016] Furthermore, in the calculation logic of the topology connection weights, for each metabolic enzyme dimension, the product of the fingerprint components of the first drug node and the second drug node is calculated, and then multiplied by the importance weight coefficient of that metabolic enzyme. The weighted products across all metabolic enzyme dimensions are accumulated to obtain the metabolic congestion coefficient. Subsequently, a decay coefficient is obtained by calculating the product of the metabolic congestion coefficient and a preset metabolic penalty sensitivity factor using a negative exponential function with the natural constant as the base. The basic collaborative weights are multiplied by this decay coefficient to obtain the final topology connection weights.
[0017] Furthermore, to optimize the system's safety control capabilities, the metabolic penalty sensitivity factor is obtained through backpropagation optimization based on historical adverse reaction data. This optimization process includes loading a training dataset containing known drug interaction contraindications, using the metabolic penalty sensitivity factor as the variable to be optimized, minimizing the topological connection weights of contraindications in the training dataset as the objective function, and iteratively solving the problem using a gradient descent algorithm until the topological connection weights of the contraindications decay below a preset cutoff threshold.
[0018] Furthermore, in dosage calculation, weighted degree centrality or PageRank value is used as the centrality index. The mapping function is a linear interpolation function, which maps the centrality index value to a preset dosage mapping interval to obtain the initial mass value. In addition, a total dose normalization check is performed, and the sum of the initial mass values of all drugs in the prescription topology network is calculated. If the sum exceeds the preset maximum single-dose load threshold, a scaling factor is calculated and the initial mass value of each drug is scaled proportionally.
[0019] This invention provides an automated prescription preparation system based on traditional Chinese medicine syndrome differentiation. It has the following beneficial effects: 1. This invention achieves precise digital mapping of TCM syndrome differentiation and drug selection by constructing a reverse projection screening mechanism of pathogenesis deviation vector and drug effect vector. The system quantifies and maps multimodal data such as chief complaint, pulse, and tongue appearance to a high-dimensional feature space, uses vector operations to accurately locate the nature and severity of the pathogenesis, and establishes the initial root node by calculating the projection modulus of the drug effect vector in the opposite direction of the pathogenesis. This overcomes the technical difficulties of vague qualitative description and difficulty in quantification in traditional TCM syndrome differentiation, ensuring that the core drug can accurately counteract the patient's pathological deviation with the highest mathematical probability.
[0020] 2. This invention introduces a dynamic edge-weight calculation mechanism based on metabolic fingerprints, improving the microscopic metabolic safety of drug formulations. The system constructs drug metabolic fingerprints using molecular docking technology, calculates the metabolic congestion coefficients between drugs at metabolic enzyme targets, and uses a negative exponential decay function to correct the basic synergistic weights in real time. This mechanism can identify and suppress drug combinations that, while conforming to traditional synergistic effects, pose a high risk of metabolic competition at the microscopic level during automated formulation, thus effectively avoiding potential drug interaction toxicity or antagonistic effects without human intervention.
[0021] 3. This invention utilizes a topological network growth strategy based on maximum weights and a centrality-dose mapping model to achieve fully automated generation and objective quantification of personalized prescriptions. The system dynamically expands the network structure based on metabolically corrected weights until the drug property vector and the pathogenesis deviation vector reach equilibrium, and directly converts the centrality index of nodes in the final topological structure into specific drug doses. Transforming complex prescription formulation thinking into a computable graph theory model not only ensures the potential energy balance of the overall prescription but also provides a quantitative basis for determining drug doses based on structural importance, improving the standardization and repeatability of prescription preparation. Attached Figure Description
[0022] Figure 1 This is a system structure block diagram of the present invention; Figure 2 The overall flowchart of the personalized prescription automatic preparation method provided in the embodiments of the present invention; Figure 3 A detailed logical diagram illustrating the topology network generation and dose mapping based on a metabolic competition penalty mechanism provided in this embodiment of the invention; Figure 4 This is a schematic diagram illustrating the system simulation operation principle based on the spleen deficiency and dampness syndrome provided in this embodiment of the invention.
[0023] Among them, 110 is the processor; 120 is the memory; 200 is the pathogenesis vectorization modeling module; 300 is the drug metabolism fingerprint database construction module; 400 is the principal drug screening module; 500 is the dynamic edge weight calculation module; and 600 is the topology network generation module. Detailed Implementation
[0024] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] See attached document Figure 1 This invention provides an automated prescription preparation system for personalized medicines based on traditional Chinese medicine syndrome differentiation. The system includes at least one processor 110, a memory 120, and a computer program stored in the memory 120 and executable on the processor 110. When the processor 110 executes the computer program, it implements the logic of the following functional modules.
[0026] The system includes a pathogenesis vectorization modeling module 200. This module is configured to acquire multimodal diagnostic and treatment data from patients. This multimodal data includes textual data of the patient's chief complaint, frequency domain feature data of the pulse, and spectral feature data of the tongue. The pathogenesis vectorization modeling module 200 has a pre-defined high-dimensional feature space. and this high-dimensional feature space The origin Defined as the coordinate point of physiological equilibrium state.
[0027] The pathogenesis vectorization modeling module 200 is further configured to map multimodal diagnostic and treatment data into a high-dimensional feature space using feature extraction algorithms. The patient's status coordinates are shown in the diagram. The pathogenesis vectorization modeling module 200 constructs the connection origin. The vector between the patient's state coordinates and the pathogenesis deviation vector is defined as the deviation vector. Pathogenesis deviation vector The directional parameter characterizes the nature of the pathogenesis, and the pathogenesis deviation vector The modulus parameter characterizes the severity of the disease.
[0028] The system includes a drug metabolism fingerprint database construction module 300. This module is configured to construct a metabolic fingerprint for each candidate drug in the drug database. The module acquires the molecular structure data of the active chemical components of the candidate drugs and selects the human drug-metabolizing enzyme system as the target set. Target set Include Metabolic enzyme targets .
[0029] The drug metabolism fingerprint database construction module 300 uses molecular docking algorithms to calculate the set of active chemical components and targets. The binding free energy data of various metabolic enzyme targets are used. The drug metabolism fingerprint database construction module 300 generates candidate drugs based on the binding free energy data. Metabolic fingerprint vector Metabolic fingerprint vector Represented as , of which components , Indicates drug For the The numerical value of the binding strength of each metabolic enzyme target.
[0030] The system includes a principal drug screening module 400. The principal drug screening module 400 is configured to screen drugs from a drug database. The pharmacological characteristic parameters are mapped to a high-dimensional feature space. Same-dimensional drug action vector The principal drug screening module 400 calculates the drug action vector. In the deviation vector of pathogenesis The projection modulus in the opposite direction. The principal drug screening module 400 selects the drug node with the largest projection modulus as the initial root node of the prescription topology network.
[0031] The system includes a dynamic edge weight calculation module 500. The dynamic edge weight calculation module 500 is configured to calculate the topological connection weights between any two connected nodes in the prescription topology network. For a selected first drug node... and the second drug node to be connected The dynamic edge weight calculation module 500 first obtains the basic collaborative weights between the two. Basic collaborative weights Determined based on pre-set drug pair co-occurrence data or pharmacological complementarity score data.
[0032] The dynamic edge weight calculation module 500 obtains the first drug node. Metabolic fingerprint vector Second drug node Metabolic fingerprint vector The dynamic edge weight calculation module 500 calculates the final topological connection weights according to the formula. The formula is expressed as: ; In the above formula, This represents the corrected topology connection weights; Indicates the basic collaborative weights; Represented by natural constant An exponential function with base 0; This represents the metabolic penalty sensitivity factor, which is a preset constant value; This indicates the total number of metabolic enzyme targets considered. Indicates the first The importance weight coefficients of various metabolic enzymes in the human metabolic network; Indicates the first drug node In the The fingerprint component values on a type of metabolic enzyme; Indicates the second drug node In the The fingerprint component values on a type of metabolic enzyme. The summation term in the formula. Defined as the metabolic congestion coefficient, used to characterize the first drug node. With the second drug node The degree of competition and overlap in metabolic pathways.
[0033] The system includes a topology network generation module 600. The topology network generation module 600 is configured to generate topology networks based on topology connection weights. Construct the prescription topology network. The topology network generation module 600 starts from the initial root node and executes a variant of the Prim algorithm based on maximum weight, prioritizing nodes connected to the current network. The candidate drug node with the largest value is added to the prescription topology network.
[0034] The topology network generation module 600 is further configured to calculate the pharmacodynamic vector of all drug nodes in the current prescription topology network after each new drug node is added. Weighted sum vector The topology network generation module 600 determines the weighted sum vector. Deviation vector from pathogenesis Is the magnitude of the vector sum less than the preset balance residual threshold? If it is less than the balance residual threshold The topology network generation module 600 stops network growth.
[0035] The topology network generation module 600 is further configured to calculate the centrality index value of each drug node in the final generated prescription topology network. The topology network generation module 600 uses a linear mapping function to convert the centrality index value into the corresponding drug dosage value, and outputs prescription information containing a list of drug names and corresponding dosage values.
[0036] See attached document Figure 2 The method in this embodiment first executes step S100, constructing a high-dimensional vector model of the patient's pathological deviation state. In this step, the processor first establishes a multi-dimensional orthogonal feature space in memory. High-dimensional feature space The dimensions are constructed based on pre-defined medical quantitative standards, including at least the cold / heat dimension representing energy metabolism levels, the deficiency / excess dimension representing the strength of the body's resistance, the exterior / interior dimension representing the depth of the disease location, and the qi and blood dimension representing the state of the circulatory system. Origin The coordinate values are set to the state values when all physiological and biochemical indicators are within the standard reference range.
[0037] After acquiring the patient's multimodal diagnostic and treatment data, the processor performs hierarchical feature extraction on the data from different modalities. For the chief complaint text data, the processor uses a pre-trained medical entity recognition algorithm to extract symptom keywords and, based on a pre-built symptom-dimensional mapping database, converts the keywords into a feature space. The processor calculates the discrete coordinate components corresponding to the corresponding dimensions. For pulse frequency domain feature data, the processor performs discrete wavelet transform on the acquired pulse wave sequence to extract the pulse wave pressure amplitude, diphthoplasty notch position, and dominant wave frequency. The pressure amplitude is mapped to real / virtual dimension coordinates, and the dominant wave frequency is mapped to hot / cold dimension coordinates. For tongue spectral feature data, the processor calculates the chromaticity values of the tongue body and tongue coating regions in the CIELAB uniform color space. and brightness value This data is then quantized and mapped into coordinate components of the Qi and Blood dimension and the Exterior-Interior dimension. The processor integrates these coordinate components into the patient's current state coordinates through vector concatenation operations. And calculate from the origin Point to coordinates The Euclidean vector is used to generate the pathogenesis deviation vector. .
[0038] Subsequently, the method executes step S200, establishing a drug metabolism fingerprint database based on molecular docking. This step is performed during the system initialization phase or the drug database update phase. The processor first traverses the pre-set drug database, for each candidate drug... Based on pharmacokinetic parameters, a set of active chemical components in the drug with oral bioavailability and drug-likeness greater than a preset threshold were selected. The processor then loads three-dimensional crystal structure data of key human metabolic enzyme systems as a target set. target set It covers the major subtypes in the CYP450 enzyme system. For some metabolic enzyme subtypes lacking high-resolution X-ray diffraction crystal structures, the processor is configured to invoke homology modeling algorithms or deep learning-based protein structure prediction models (such as the AlphaFold model) to predict and generate their three-dimensional spatial folding structures based on the amino acid sequence of the metabolic enzyme, and incorporate the predicted structural data into the target set. This serves as a supplement.
[0039] For candidate drugs For each active chemical component, the processor uses a molecular docking engine to simulate the interaction between the component molecule and the target site. The binding conformation of each metabolic enzyme activity pocket is determined. The molecular docking engine uses a Lamarck genetic algorithm or simulated annealing algorithm for conformation search, and uses a semi-empirical scoring function to calculate the Gibbs free energy change value under the optimal conformation. The processor will process the drug. All active chemical components target the same metabolic enzyme. The binding free energy is weighted, summed, and normalized nonlinearly to convert negative binding energy values into positive binding affinity values, thus obtaining the drug's binding affinity strength. In the Fingerprint components on a metabolic enzyme , The processor will process the drug. In all The fingerprint components of each metabolic enzyme target are arranged sequentially to generate the metabolic fingerprint vector of the drug. .
[0040] Next, the method executes step S300, establishing the principal drug node as the core of the prescription topology network based on vector hedging. The processor first retrieves the medicinal property data of each drug from the drug database, including the four natures (cold and hot attributes), five flavors (sour, bitter, sweet, pungent, and salty), and meridian tropism. The processor uses a pre-set medicinal property quantification mapping matrix to convert the aforementioned discrete attribute data into continuous values, generating a high-dimensional feature space. Same-dimensional drug action vector For example, the numerical value of a cold-natured medicine is mapped to a negative value in the cold / hot dimension, and the numerical value of a hot-natured medicine is mapped to a positive value in the cold / hot dimension.
[0041] Specifically, the drug property quantification mapping matrix employs normalized numerical encoding. The processor maps the five levels of drug property attributes—cold, cool, neutral, warm, and hot—to discrete values within the interval [−1, 1], for example, setting cold to -1.0, cool to -0.5, neutral to 0, warm to 0.5, and hot to 1.0. Similarly, for the meridian tropism attribute, the processor constructs a feature space... The Boolean vector or weighted vector corresponding to the dimension is assigned a preset affinity weight value if the drug belongs to a certain meridian; otherwise, it is assigned a value of 0.
[0042] To screen for drugs that can most effectively correct the patient's pathological deviations, the processor performs inverse maximum projection calculations. The processor first calculates the pathogenesis deviation vector. reverse vector Then, the processor iterates through all candidate drugs in the drug database, calculating the pharmacodynamic vector for each drug. In the opposite vector Projection Module on Projection modulus The calculation is performed based on the vector dot product formula, that is... ,in pharmacological action vector With the reverse vector The angle between them. The processor sets a valid angle threshold range and discards angles. Drugs outside this range are excluded to ensure that the drug's action direction is basically consistent with the treatment needs based on the pathogenesis. Among the remaining candidate drugs, the processor selects the projection module length. The drug with the highest value is designated as the principal drug, and the node representing this drug is marked as the starting point for the growth of the prescription topology network.
[0043] See attached document Figure 3 After establishing the principal drug node, the method in this embodiment executes step S400, which calculates the topological edge weights based on the metabolic competition penalty mechanism. The processor executes this step to determine the connection strength between nodes in the prescription topology network, thereby determining the network's growth path. For nodes already existing in the network... (Initially the principal drug node) and candidate drug nodes to be connected The processor first retrieves the basic synergistic weights from a pre-set drug pair compatibility database. The basic collaborative weight It is a normalized value that represents the co-occurrence frequency of two drugs in the traditional prescription compatibility rules or the intensity of synergistic effect determined based on pharmacodynamic experiments.
[0044] To avoid potential metabolic conflicts in real time during the matching process, the processor calls the metabolic fingerprint vector generated in step S200. The processor reads the nodes respectively. Metabolic fingerprint vector and nodes Metabolic fingerprint vector The processor uses a weighted dot product algorithm to calculate the metabolic congestion coefficient for both. Specifically, the processor calculates the coefficient for each metabolic enzyme dimension. Calculate fingerprint components and The product of these factors, multiplied by the importance weighting coefficient of the metabolic enzyme. Importance weighting coefficient Pre-stored in system configuration parameters, the value of which is positively correlated with the substrate breadth and catalytic efficiency of the enzyme in human drug metabolism. The processor will handle all... The weighted products of each dimension are summed to obtain the characterization of the drug. With drugs A scalar value representing the degree of competitive overlap in metabolic pathways.
[0045] Subsequently, the processor uses a nonlinear decay function to adjust the basic collaborative weights. Dynamic adjustments are made to generate the final topology connection weights. The processor uses a negative exponential function with the natural constant as the base as the penalty operator. The specific calculation logic is shown in the following equation: ; In this computational logic, Defined as a metabolic penalty sensitivity factor, it is a pre-defined positive real number. The numerical values were determined through backpropagation optimization based on historical adverse reaction data. The processor was pre-loaded with a training dataset containing known drug interaction incompatibilities (e.g., the Eighteen Incompatibilities and Nineteen Antagonisms). During the system calibration phase, the processor will... As a variable to be optimized, the goal is to minimize the final topological connectivity weights of taboo combinations in the training dataset. Let be the objective function, and solve for the optimal value using the gradient descent algorithm iteratively. The numerical value ensures that, when the metabolic congestion coefficient is high, the weight of the taboo combination can decay to below a preset cutoff threshold. The physical meaning of this factor lies in controlling the system's tolerance for safety risks. The larger the value is set, the faster the value of the exponent term decreases when there is metabolic congestion (i.e., the summation term is large), thus affecting the final weight. The weights are drastically reduced. Through this computational mechanism, the processor can forcibly reduce the connection weights at the macroscopic topology level when there is a high risk of metabolic competition at the microscopic molecular level, thus enabling the candidate drug node to... It is difficult to be selected to access the network, thereby achieving automatic multi-objective optimization of drug efficacy synergy and metabolic safety.
[0046] After obtaining the final weights of all candidate connections, the method executes step S500 to adaptively generate the prescription topology network. The processor employs an improved Prim algorithm or a greedy strategy to perform iterative network growth. In each iteration, the processor traverses all possible connection edges between all selected nodes and external candidate nodes in the current network, identifying the edge with the largest weight. The numerical connection edges are then used to add the corresponding candidate drug nodes to the prescription topology network. This process simulates the hierarchical structure of traditional Chinese medicine prescriptions, prioritizing the inclusion of drugs with good synergistic effects and low metabolic conflicts.
[0047] The processor immediately performs a potential field balance check after each new node is added. The processor then obtains the drug action vectors of all selected drug nodes in the current network. And calculate the geometric sum of these vectors, i.e., the resultant force vector. The processor will vectorize the resultant force. Deviation vector from pathogenesis generated in step S100 Perform vector superposition and calculate the residual vector. The processor determines the magnitude of this residual vector. Is it less than the preset balance residual threshold? If the residual modulus is greater than the threshold This indicates that the current prescription combination is not yet sufficient to completely offset the deviation potential energy of the pathogenesis, and the processor continues to execute the next round of node screening and addition operations; if the residual modulus is less than or equal to the threshold... If the number of network nodes reaches a preset limit, the processor terminates the network growth process and locks the current topology.
[0048] Finally, the method executes step S600, mapping the topology to specific drug dosages. The processor calculates the topological centrality index for each drug node in the final generated prescription topology network. In this embodiment, the processor uses weighted degree centrality or PageRank as the metric. For any drug node in the network... Its centrality value This reflects the importance and contribution of the drug to the overall formulation. The processor has a preset dose mapping range. This interval is set according to the commonly used dosage range specified in the pharmacopoeia. The processor uses a linear interpolation function to calculate the centrality value of each node. Mapping to this dosage range, the specific mass values of each drug are calculated. After completing the linear interpolation mapping, the processor further performs a total dose normalization check.
[0049] The processor calculates the total mass of all drugs in the generated prescription. .like If the maximum single-dose load exceeds the preset threshold, the processor calculates the scaling factor. And the mass value of each ingredient in the prescription. Multiply by a coefficient This ensures that the total dosage of the final prescription meets the preset safety range. Simultaneously, the processor sets upper and lower limits for the dosage of each individual herb; if the calculated dosage... If the value exceeds the constraint range, it will be forcibly truncated to the corresponding boundary value. The calculation logic follows the principle that the higher the centrality, the larger the dosage, thus ensuring that the principal drug in the topological core position receives the largest dosage allocation, while the adjuvant drugs in the peripheral position receive a smaller dosage allocation. The final output is personalized prescription data containing complete drug names and corresponding precise dosages.
[0050] See attached document Figure 4To more intuitively illustrate how this invention addresses the blind spots of traditional compatibility through a dynamic weighted metabolic fingerprint mechanism in actual compatibility testing, this embodiment constructs a simulation example for spleen deficiency with dampness retention syndrome. In this example, the processor receives the patient's diagnostic data input, which is processed by the pathogenesis vectorization modeling module to generate a high-dimensional feature space. Pathogenesis deviation vector of deficiency syndrome-dampness obstruction quadrant This vector is composed of a virtual and real dimension component (negative value) representing the spleen and stomach's digestive function and a dampness and stagnation dimension component (positive value) representing the state of body fluid metabolism.
[0051] The processor first executes the principal drug screening step. The system traverses the drug database and calculates the drug action vector of each drug. Projection in the opposite direction. In this example, the medicinal properties of Atractylodes macrocephala, due to its qi-tonifying and spleen-strengthening characteristics (targeting the deficiency syndrome dimension) and dampness-drying and diuretic properties (targeting the dampness stagnation dimension), have a vector of medicinal effects. The one with the largest modulus on the back projection is established by the processor as the root node (principal drug) of the prescription topology network.
[0052] Subsequently, the processor enters the network expansion phase, which requires matching auxiliary drugs (assistant drugs) for Atractylodes macrocephala. Two candidate drugs exist in the system's candidate list: Glycyrrhiza uralensis and Poria cocos. Based on the basic synergistic weights in the traditional drug pair database... The combination of Atractylodes macrocephala and Glycyrrhiza uralensis is extremely frequent. The values are typically higher than the combination of Atractylodes macrocephala and Poria cocos. At this point, the processor invokes the dynamic edge weight calculation module to perform a security check. The processor reads the metabolic fingerprint vectors of the three herbs mentioned above. In the preset database of this example, the main active ingredient of Atractylodes macrocephala has a high affinity for the CYP3A4 metabolic enzyme (i.e., fingerprint component). (The value is relatively high).
[0053] The processor first calculates the final weights of the Atractylodes macrocephala-Glycyrrhiza uralensis combination. This is because components in licorice, such as glycyrrhizic acid, also exhibit a very high affinity for CYP3A4 metabolic enzymes (i.e.,...). The high numerical value leads to an increased fingerprint product in the CYP3A4 dimension. Calculated using the metabolic congestion coefficient formula, the summation term exceeds a preset safety threshold. This necessitates the introduction of a penalty sensitivity factor. After performing exponential decay calculation, the final topological connection weight of Atractylodes macrocephala-Glycyrrhiza uralensis It experienced a sharp decline, with the value far below its basic co-weight.
[0054] The processor then calculates the final weights of the Atractylodes macrocephala-Poria cocos combination. In the database setup of this example, the main components of Poria cocos are primarily metabolized via the CYP2C9 enzyme system, or they have extremely low affinity for CYP3A4 (i.e., (The values are close to zero). Therefore, when calculating the metabolic congestion coefficient, the sum of the fingerprint products of Atractylodes macrocephala and Poria cocos on each key enzyme dimension is small. After exponential decay calculation, the final topological connection weight of Atractylodes macrocephala-Poria cocos is... Only a slight decrease occurred, remaining at a high level.
[0055] Based on the above calculation results, during the execution of the minimum spanning tree expansion algorithm, the processor compared the final weights of the two and found that the connection strength between Atractylodes macrocephala and Poria cocos was higher than that between Atractylodes macrocephala and Glycyrrhiza uralensis. Therefore, the system automatically avoided the Atractylodes macrocephala-Glycyrrhiza uralensis path, which has the potential risk of metabolic competition, and preferentially connected the Poria cocos node to the topology network as an adjuvant drug. This process demonstrates how the system can automatically correct the macroscopic compatibility structure without relying on human intervention, based solely on the calculation results of microscopic cheminformatics, to prevent the accumulation of active ingredients or toxic side effects caused by drugs competing for the same metabolic pathway.
[0056] With the addition of the Poria cocos node, the processor updates the weighted resultant force vector of the current network in real time. The system continues to search for the next level of adjuvant herbs (such as tangerine peel) until the network resultant force vector deviates from the patient's pathogenesis vector. The vector and magnitude are less than the preset equilibrium residual. After the network stops growing, the processor calculates the topological centrality. Atractylodes macrocephala, as the root node, has the highest degree centrality and is mapped to the maximum dose (e.g., 15g); Poria cocos, as a first-level connecting node, has the second highest centrality and is mapped to a medium dose (e.g., 12g); the doses of the adjuvant herbs at the edges decrease sequentially. Finally, the system outputs a personalized prescription list optimized for metabolic safety.
Claims
1. An automated prescription preparation system based on traditional Chinese medicine syndrome differentiation, characterized in that, include: The pathogenesis vectorization modeling module is configured to establish a multidimensional orthogonal feature space, map the acquired chief complaint symptom text data, pulse frequency domain feature data and tongue spectral feature data to patient state coordinate points in a high-dimensional feature space, and construct a vector connecting the origin of the high-dimensional feature space and the patient state coordinate points as the pathogenesis deviation vector. The drug metabolism fingerprint database construction module is configured to acquire molecular structure data of active chemical components of candidate drugs, select human drug metabolism enzyme system as target set, calculate the binding strength of the active chemical components to each metabolic enzyme target in the target set, and generate the metabolic fingerprint vector of the candidate drug. The principal drug screening module is configured to map the pharmacological characteristic parameters of the candidate drugs into a pharmacological action vector of the same dimension as the high-dimensional feature space, calculate the projection modulus of the pharmacological action vector in the opposite direction of the pathogenesis deviation vector, and select the drug node with the largest projection modulus as the initial root node of the prescription topology network. The dynamic edge weight calculation module is configured to obtain the basic collaborative weight between the selected first drug node and the second drug node to be connected in the prescription topology network, calculate the metabolic congestion coefficient based on the metabolic fingerprint vector of the first drug node and the metabolic fingerprint vector of the second drug node, and use the metabolic congestion coefficient to attenuate and correct the basic collaborative weight to generate topology connection weight. The topology network generation module is configured to perform network growth operation based on the topology connection weights, adding the candidate drug node with the largest topology connection weight value to the prescription topology network until the vector sum of the weighted sum of the drug effect vectors of all drug nodes in the prescription topology network and the vector sum of the pathogenesis deviation vectors is less than a preset balance residual threshold. The dosage mapping module is configured to calculate the centrality index value of each drug node in the prescription topology network, and use a mapping function to convert the centrality index value into the dosage value of the corresponding drug.
2. The automated prescription preparation system based on traditional Chinese medicine syndrome differentiation according to claim 1, characterized in that, The high-dimensional feature space established by the pathogenesis vectorization modeling module includes: The dimensions of cold and heat that characterize energy metabolism, the dimensions of deficiency and excess that characterize the strength of the body's resistance, the dimensions of exterior and interior that characterize the depth of the disease location, and the dimensions of qi and blood that characterize the state of the circulatory system. The pathogenesis vectorization modeling module converts symptom keywords into discrete coordinate components of corresponding dimensions, maps the pressure amplitude and main wave frequency of pulse waves to the virtual and real dimensions and the cold and heat dimensions respectively, maps the chromaticity value and brightness value of tongue image spectral features to the qi and blood dimension and the exterior and interior dimensions respectively, and generates the pathogenesis deviation vector through vector splicing.
3. The automated prescription preparation system based on traditional Chinese medicine syndrome differentiation according to claim 1, characterized in that, The drug metabolism fingerprint database construction module uses a molecular docking algorithm to simulate the binding conformation of the active chemical component with the active pockets of each metabolic enzyme in the target set, and calculates the Gibbs free energy change value under the optimal conformation. The drug metabolism fingerprint database construction module performs weighted summation and nonlinear normalization on the binding free energy of all active chemical components in the candidate drug for the same metabolic enzyme target, converting negative binding energy into positive binding affinity strength values, which are used as the fingerprint components of the metabolic fingerprint vector in the corresponding metabolic enzyme dimension.
4. The automated prescription preparation system based on traditional Chinese medicine syndrome differentiation according to claim 1, characterized in that, The principal drug screening module performs reverse maximum projection calculation, calculates the reverse vector of the pathogenesis deviation vector, and calculates the projection modulus of the drug effect vector of each candidate drug on the reverse vector; The value of the projection modulus is equal to the product of the modulus of the drug action vector and the cosine of the angle between the drug action vector and the reverse vector; The principal drug screening module removes drugs whose included angle exceeds a preset threshold range, and selects the drug with the largest projection modulus value from the remaining candidate drugs as the initial root node.
5. The automated prescription preparation system based on traditional Chinese medicine syndrome differentiation according to claim 1, characterized in that, The dynamic edge weight calculation module calculates the product of the fingerprint component of the first drug node and the fingerprint component of the second drug node for each metabolic enzyme dimension, and multiplies it by the importance weight coefficient of the metabolic enzyme. The weighted products of all metabolic enzyme dimensions are accumulated to obtain the metabolic congestion coefficient. The dynamic edge weight calculation module uses a negative exponential function with the natural constant as the base to calculate the product of the metabolic congestion coefficient and the preset metabolic penalty sensitivity factor to obtain the attenuation coefficient. The topology connection weight is obtained by multiplying the basic collaborative weight by the attenuation coefficient.
6. The automated prescription preparation system based on traditional Chinese medicine syndrome differentiation according to claim 5, characterized in that, The metabolic penalty sensitivity factor was obtained through backpropagation optimization based on historical adverse reaction data; The optimization process includes: loading a training dataset containing known drug interaction incompatibilities, using the metabolic penalty sensitivity factor as the variable to be optimized, using minimizing the topological connection weights of the incompatibilities in the training dataset as the objective function, and iteratively solving the problem using a gradient descent algorithm until the topological connection weights of the incompatibilities decay to below a preset cutoff threshold.
7. The automated prescription preparation system based on traditional Chinese medicine syndrome differentiation according to claim 1, characterized in that, The topology network generation module adopts a spanning tree expansion strategy based on the maximum weight; In each iteration, the topology network generation module traverses all possible connection edges between all selected nodes and external candidate nodes in the current network, identifies the connection edge with the largest topology connection weight value, and adds the corresponding candidate drug node to the prescription topology network. After each new node is added, the topology network generation module calculates the weighted sum vector and determines whether the residual vector magnitude of the weighted sum vector and the pathogenesis deviation vector satisfies the balance residual threshold condition.
8. The automated prescription preparation system based on traditional Chinese medicine syndrome differentiation according to claim 1, characterized in that, The dose mapping module uses weighted degree centrality or PageRank value as the centrality index value; The mapping function is a linear interpolation function, which maps the centrality index value to a preset dose mapping interval to obtain the initial quality value; The dose mapping module performs total dose normalization verification, calculates the sum of the initial mass values of all drugs in the prescription topology network, and if the sum of the initial mass values exceeds the preset maximum load threshold for a single dose, calculates the scaling factor and scales the initial mass value of each drug proportionally.
9. The automated prescription preparation system based on traditional Chinese medicine syndrome differentiation according to claim 3, characterized in that, For metabolic enzyme subtypes in the target set that lack high-resolution X-ray diffraction crystal structures, the drug metabolism fingerprint library construction module calls a homology modeling algorithm or a protein structure prediction model based on deep learning to predict and generate a three-dimensional spatial folding structure based on the amino acid sequence of the metabolic enzyme, and incorporates the predicted structural data into the target set.
10. The automated prescription preparation system based on traditional Chinese medicine syndrome differentiation according to claim 4, characterized in that, The principal drug screening module generates the drug action vector using a preset drug property quantification mapping matrix; The drug property quantification mapping matrix adopts normalized numerical encoding, mapping the five levels of drug property attributes of cold, cool, neutral, warm and hot to discrete values in the interval [-1,1] respectively; The principal drug screening module constructs a vector corresponding to the high-dimensional feature space dimension based on the meridian tropism attribute. If a drug belongs to a certain meridian, the component of the corresponding dimension is assigned a preset affinity weight value.