A traditional Chinese medicine tea drinking intelligent compounding generation method based on a knowledge graph

By using a knowledge graph-based approach, we can generate herbal tea formulation schemes, which solves the problem of the lack of personalization and intelligence in herbal tea formulation. This enables safe and reliable personalized formulation, reduces the risk of adverse reactions, and improves the credibility and intelligence level of the formulation schemes.

CN121034563BActive Publication Date: 2026-03-31JIANGXI UNIVERSITY OF TRADITIONAL CHINESE MEDICINE
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing methods for combining Chinese herbal teas lack personalization, safety, and intelligence, making it difficult to form a traceable, calculable, and verifiable combination mechanism. They also suffer from compatibility bias and potential contraindications, and traditional combination knowledge is difficult for computers to understand and utilize.

Method used

Using a knowledge graph-based approach, we acquire information on physical condition, symptoms, seasonal climate, and personal preferences to generate user status. We then compile security boundaries into enforceable interception rules, construct a set of shielded risk nodes and relationships, and build a set of alternative paths that maintain the efficacy link structure. By evaluating the contribution of alternative paths through constraint propagation, we determine the compatibility search order and solve process parameters in conjunction with the process, outputting compatibility solutions and contraindication warnings.

Benefits of technology

It enables personalized and safe formulation of Chinese herbal teas, reduces the risk of adverse reactions, improves the credibility and intelligence of formulation schemes, and ensures the traceability and version management of the formulation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121034563B_ABST
    Figure CN121034563B_ABST
Patent Text Reader

Abstract

The application discloses a traditional Chinese medicine tea drink intelligent compatibility generation method based on a knowledge graph, relates to the technical field of traditional Chinese medicine tea drink intelligent compatibility, and is used for solving the problem of poor individualized safe compatibility generation; the application realizes a risk preposition pruning mechanism starting from user physique, symptoms and climate adaptation by systematically structuring taboo items, drug property meridian, crowd restrictions and other factors, and embedding the compatibility knowledge graph to form a shielding set and a parameter allowable range table, effectively avoids adverse reactions and adaptive bias that may be generated in traditional experience compatibility, improves individual adaptability of the compatibility scheme, introduces a compatibility causal diagram and a heuristic search strategy in a path generation stage, solves by dictionary sequence sorting and parameter linkage, combines an evidence chain version and a feedback mechanism to form a closed-loop control process from demand, rules, paths, parameters and feedback, realizes structured generation of a traditional Chinese medicine tea drink compatibility scheme, and improves the intelligent degree and practical application value of tea drink compatibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent formulation technology for traditional Chinese medicine teas, and more specifically, to a method for generating intelligent formulations of traditional Chinese medicine teas based on knowledge graphs. Background Technology

[0002] In the application of traditional Chinese medicine and food homology, the compatibility methods of Chinese herbal teas based on human experience or fixed templates are still widely used. Such methods are usually made by practitioners who refer to traditional herbal literature or experience formulas, combine individual constitution and symptom information to make subjective judgments, select a number of medicinal materials to combine, and supplement them with basic dosage and process suggestions. Most existing technologies focus on the static matching of the properties, flavors, meridians and functional categories of medicinal materials, lacking a systematic consideration of individual adaptability, safety boundaries and medication compliance, and making it difficult to form a traceable, calculable and verifiable compatibility mechanism.

[0003] However, existing technologies still have significant shortcomings in terms of intelligent and structured expression: on the one hand, traditional compatibility knowledge exists in unstructured text, which is difficult for computers to understand and call; on the other hand, there is a lack of systematic mapping and reasoning paths between individualized information such as constitution type, symptom manifestation, and seasonal climate and the properties of medicinal materials. The compatibility process relies on human screening and subjective preferences, which may lead to compatibility bias and potential contraindications. Often, a complete evidence chain mechanism and usage feedback loop are not established, making it difficult to achieve version management and risk verification of compatibility schemes, thus reducing their credibility and intelligence level in modern health management. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art, the following solution is proposed to solve the problem of poor generation of personalized security matching in the above-mentioned background art.

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

[0006] A knowledge graph-based intelligent method for generating traditional Chinese medicine tea recipes includes the following steps:

[0007] Acquire physical constitution, symptoms, seasonal climate, and personal preferences to form user status and invoke compatibility knowledge graph;

[0008] The security boundary is compiled into an execution-oriented interception rule, generating a set of shielded risk nodes and relationships, and performing pre-checking and pruning on the compatibility search space;

[0009] When a security conflict occurs, an alternative path set is constructed to maintain the effectiveness of the link structure. The contribution of the alternative paths to conflict resolution is evaluated based on constraint propagation, and the compatibility search order is determined.

[0010] In the compatibility cause-effect graph, path search is performed according to a preset priority order to determine the target path from the user state to the medicinal material set, and the compatibility parameters are obtained by linking with the process parameters.

[0011] Output compatibility schemes, contraindications warnings, and dietary recommendations; record the evidence chain and judgment criteria; and update the compatibility knowledge graph and safety boundaries based on user feedback.

[0012] Furthermore, the security boundary is compiled into enforceable interception rules, generating a masked set of risk nodes and relationships, and performing pre-checking and pruning on the compatibility search space. Specific steps include:

[0013] By aggregating contraindications, population restrictions, drug interactions, upper dose limits, and process parameter boundaries, a rule dictionary and parameter threshold set are formed.

[0014] Map the rule dictionary to the nodes and relationships of the matching knowledge graph to generate a risk node masking set, a risk relationship masking set, and a parameter allowable range table;

[0015] Prune the starting point and intermediate relationships related to the user state based on the masked set, and output a list of non-compliance and alternative trigger flags;

[0016] Based on the pruning results, a verified candidate search space is formed and then used for matching calculations.

[0017] Furthermore, when security conflicts arise, a set of alternative paths that maintain the effectiveness of the link structure is constructed. The contribution of these alternative paths to conflict resolution is evaluated based on constraint propagation, and the compatibility search order is determined. Specific steps include:

[0018] Equivalent efficacy paths or meridian-complementary paths are generated in the neighborhood of the graph around the target efficacy, and the conditions for constitution and season are marked.

[0019] The structure is set to maintain constraints, including the coverage of efficacy pathways, synergy of meridian tropism, and criteria for seasonal suitability for body constitution.

[0020] Constraint propagation is used to perform conflict reduction, structure preservation and suitability determination on each candidate path, and the contribution ranking of alternative paths to conflict resolution is calculated.

[0021] The matching search order is generated according to the contribution ranking, and a preset backoff strategy is applied to determine the priority when the rankings are the same.

[0022] Furthermore, the matching search order is generated according to the contribution ranking, and the specific steps include:

[0023] Risk verification is performed based on the shielded set to obtain the conflict reduction amount, which is defined as the risk node hit count being zero and the risk relationship hit count being zero.

[0024] Perform a structure preservation check to confirm that the target functional node coverage is valid and the functional connection chain is continuous, and obtain the structure preservation result;

[0025] Perform adaptation verification to confirm that the physical condition match and the season match are both successful, and obtain the adaptation result;

[0026] Perform parameter verification to confirm that the dosage, brewing temperature, brewing time, and drinking time are all within the parameter allowable range table, and obtain the parameter allowable result;

[0027] The contribution ranking of alternative paths is generated by comparing the results in the order of conflict reduction, structure preservation, adaptation, and parameter allowance.

[0028] The matching search order is generated based on the contribution ranking.

[0029] Furthermore, a path search is performed in the compatibility causal graph according to a preset priority order to determine the target path from the user's state to the medicinal material set, and the compatibility parameters are obtained by linking the path search with the process parameters. The specific steps include:

[0030] Construct a set of nodes and directed edges for a compatibility causal graph. Nodes include symptoms, functions, medicinal properties, meridian tropism, medicinal materials, and processing parameters. Edges represent efficacy associations, compatibility relationships, and constraint relationships.

[0031] Set preset priority order and termination conditions. The preset priority order is as follows: safety compliance, efficacy chain integrity, physical condition and seasonal adaptability, process execution and compliance.

[0032] In the matching cause-effect graph, a heuristic search is used to generate a set of candidate paths, and the target path is selected by lexicographical comparison with a preset priority order.

[0033] Based on the parameter allowable range table, the dosage, brewing temperature, brewing time, and drinking period are solved in a coordinated manner to form a set of compatibility parameters.

[0034] Furthermore, a heuristic search is used to generate a set of candidate paths in the matching causal graph, and the target path is selected by lexicographical comparison according to a preset priority order. The specific steps include:

[0035] Starting from the user's state and ending at the collection of medicinal herbs, a path search queue is established by setting the starting set, termination conditions, and expansion step size.

[0036] Path expansion is restricted based on the shielding set and the parameter allowable range table, prohibiting expansion to risk nodes and risk relationships;

[0037] The evaluation sequence is calculated for the paths to be expanded in the queue. The evaluation sequence includes safety compliance judgment, efficacy link integrity judgment, physical condition and seasonal adaptability judgment, and process execution and compliance judgment in sequence.

[0038] Based on a preset priority order, the evaluation sequence is compared lexicographically to determine the expansion order and generate a candidate path set.

[0039] Select the path that meets the termination condition and is lexicographically first from the candidate path set as the target path;

[0040] When there are ties, the ties are resolved based on the evidence chain fields. If the completeness of the evidence chain is the same, the later version time takes priority.

[0041] Furthermore, based on the parameter allowable range table, the dosage, brewing temperature, brewing time, and drinking time are solved in conjunction to form a set of compatibility parameters. Specific steps include:

[0042] Establish a set of medicinal herb nodes corresponding to the target path;

[0043] Read the parameter allowable range table, extract the dosage range, brewing temperature range, brewing time range and drinking time set for each medicinal material, and perform interval or set intersection for each item to obtain the combination-level dosage range, combination-level brewing temperature range, combination-level brewing time range and combination-level drinking time set.

[0044] When any intersection result is empty, the alternative path reselection process is initiated and the process returns to the target path determination stage.

[0045] Within the combined-level interval and set, single-point parameters are selected in a fixed order: safety boundary satisfaction first, user preference consistency second, and process constraint consistency last; when parameters are listed in parallel, the later version time takes precedence.

[0046] Complete the consistency check between the parameters and the target path, and output the matching parameters.

[0047] Furthermore, the system outputs compatibility schemes, contraindications warnings, and dietary recommendations, records the chain of evidence and judgment criteria, and updates the compatibility knowledge graph and safety boundaries based on user feedback. Specific steps include:

[0048] Output compatibility schemes, contraindication warnings, and dietary recommendations, and provide applicable boundary prompts corresponding to the user's status;

[0049] Generate evidence chain cards with fields including source, version, scope of application, risk level and judgment threshold, and attach scheme fingerprints for traceability;

[0050] The recording plan and judgment basis are the audit files, and the adverse reaction and compliance reporting channels are opened. The feedback is structured into events related to medicinal materials, efficacy, population and process.

[0051] Based on feedback, the boundaries of the shielding set and parameter thresholds are tightened or loosened, and the version update of the compatibility knowledge graph and security boundary is completed while retaining the rollback path.

[0052] The technical effects and advantages of the present invention, a knowledge graph-based intelligent method for generating traditional Chinese medicine tea blends, are as follows:

[0053] This invention compiles security boundaries into execution-type interception rules and generates a shield set, performs verification and pruning before inference, constructs an alternative path set that maintains the efficacy link structure when conflicts occur, and uses constraint propagation to output the compatibility search order. This process cuts off contraindications, population restrictions, interactions, and dosage out-of-bounds paths, avoids results that do not match physical condition and season, and outputs a chain of evidence and version fingerprint. The conclusions are stable and auditable.

[0054] Based on the compatibility causal graph and preset priority order, a heuristic search is performed. The dictionary order is compared according to safety, efficacy chain completeness, physical condition and seasonal suitability, process execution and compliance to determine the target path from user status to the set of medicinal materials. Then, according to the parameter allowable range table, the intersection of dosage, brewing temperature, brewing time and drinking time is performed, and the solution is combined with the process method label to form a practical compatibility parameter set and dietary guidelines, reducing the risk of adverse reactions and improving compliance and reproducibility. Attached Figure Description

[0055] Figure 1 This is a flowchart illustrating the intelligent formulation generation method for traditional Chinese medicine tea drinks based on knowledge graphs, according to the present invention. Detailed Implementation

[0056] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0057] In order to achieve the above objectives, Figure 1 A schematic diagram of the structure of a knowledge graph-based intelligent formulation generation method for traditional Chinese medicine tea is given, which specifically includes the following steps;

[0058] Acquire physical constitution, symptoms, seasonal climate, and personal preferences to form user status and invoke compatibility knowledge graph;

[0059] The security boundary is compiled into an execution-oriented interception rule, generating a set of shielded risk nodes and relationships, and performing pre-checking and pruning on the compatibility search space;

[0060] When a security conflict occurs, an alternative path set is constructed to maintain the effectiveness of the link structure. The contribution of the alternative paths to conflict resolution is evaluated based on constraint propagation, and the compatibility search order is determined.

[0061] In the compatibility cause-effect graph, path search is performed according to a preset priority order to determine the target path from the user state to the medicinal material set, and the compatibility parameters are obtained by linking with the process parameters.

[0062] Output compatibility schemes, contraindications warnings, and dietary recommendations; record the evidence chain and judgment criteria; and update the compatibility knowledge graph and safety boundaries based on user feedback.

[0063] Step 1: Obtain information on physical constitution, symptoms, seasonal climate, and personal preferences to form a user status and invoke the compatibility knowledge graph. The specific implementation is as follows:

[0064] The mobile interface includes four required fields: Body Constitution Type, Symptom List, Seasonal Climate, and Personal Preference. The Body Constitution Type ranges from Balanced, Qi Deficiency, Yang Deficiency, Yin Deficiency, Phlegm-Dampness, Damp-Heat, Blood Stasis, Qi Stagnation, and Special Constitution. The Symptom List uses a standard symptom glossary; users select each symptom and fill in the time of occurrence and self-assessment of severity. The Seasonal Climate section consists of seasonal, climate, and regional tags. Seasonal tags include spring, summer, autumn, and winter; climate tags include cold, mild, hot, humid, and dry; and regional tags correspond to administrative divisions. Personal Preference includes taste preference, preparation preference, and drinking time preference. Taste preference is rated as refreshing, sweet, and slightly bitter; preparation preference is rated as quick brewing and regular steeping; and drinking time preference is rated as morning, noon, and evening. Example input: Body type is Yin deficiency, symptom list includes dry throat and bitter taste in mouth, season and climate are marked as autumn, dry and East China, personal preference is refreshing and quick soak and morning plus evening.

[0065] After performing field integrity and consistency checks, the process proceeds to terminology standardization and synonym mapping, mapping colloquial expressions to standard entries; for example, "dry throat" is mapped to "dry pharynx." Once mapping is complete, a user status is generated, consisting of four parts: constitution type, symptom list, seasonal climate, and personal preferences, along with a timestamp and version identifier.

[0066] Load the compatibility knowledge graph and record the version and source identifiers. Establish a binding index between user status and the compatibility knowledge graph. The binding process includes:

[0067] The system links constitution types to constitution nodes in the graph, symptom lists to symptom nodes, seasonal, climate, and regional tags to seasonal and climate nodes, and taste, preparation, and drinking time preferences to process and compliance-related nodes. Based on this, a set of starting nodes is generated, containing constitution, symptom, and seasonal / climate nodes. Simultaneously, a set of target functional categories is generated based on the functional category relationships in the compatibility knowledge graph to limit the efficacy range of subsequent path searches. Version information of the evidence chain is recorded, and version information of the parameter allowable range table is prepared for reading.

[0068] Step 2 involves compiling the security boundary into enforceable interception rules, generating a masked set for risk nodes and relationships, and performing pre-checking and pruning on the compatibility search space. The specific implementation is as follows:

[0069] After the user state is generated, the security boundary compilation process is started. First, contraindications, population restrictions, drug interactions, dosage limits and process parameter boundaries are gathered from the evidence chain of the compatibility knowledge graph to form a rule dictionary and parameter threshold set.

[0070] The rule dictionary records the triggering conditions and interception conclusions for each rule. Triggering conditions include matching constitution type, contraindication association between symptoms and medicinal materials, incompatibility association between seasonal climate and medicinal materials, and interaction association between combined medication and medicinal materials. The interception conclusion is to prohibit entry into the path search or require substitution. The parameter threshold set records the upper limit of dosage, the lower and upper limits of brewing temperature, the lower and upper limits of brewing time, and the drinking time limit for each medicinal material in a unified unit. When there are conflicting versions of the evidence chain, the effective threshold is determined according to the order of the later version of the evidence chain. The source identifier and version identifier are registered in the parameter allowable range table. Subsequently, the rule dictionary is mapped to the nodes and relationships of the compatibility knowledge graph: medicinal material nodes that are directly constrained by constitution contraindication, population restrictions, and seasonal incompatibility are marked as risk nodes. Medicinal material and functional relationships and medicinal material and process parameter relationships that are directly constrained by drug interactions, dosage exceeding limits, and process exceeding limits are marked as risk relationships. After the mapping is completed, a risk node shielding set and a risk relationship shielding set are generated.

[0071] Based on the shielded set, pruning is performed on the starting point and intermediate relationship related to the user's state. The pruning order is: constitution contraindication check, seasonal climate adaptation check, drug interaction check, and dosage and process boundary check. In the constitution contraindication check, the reachable set from the symptom node to the functional category node and then to the medicinal material node is checked one by one. If any medicinal material node is registered in the rule dictionary as having a contraindication with the constitution type, it is directly added to the non-compliance list and written with the contraindication hit mark.

[0072] In the seasonal and climate adaptation verification, the situational adaptation relationship between seasonal tags, climate tags, regional tags and medicinal material nodes is compared. When mismatch is found, the corresponding relationship is added to the non-compliance list and marked with a mismatch hit.

[0073] During drug interaction verification, the combined medication list in the user's status is read and compared with the drug interaction entries in the rule dictionary item by item. When there is an interaction and the severity level reaches the interception threshold, the corresponding drug node or relationship is added to the non-compliant list and an interaction hit identifier is written.

[0074] During dosage and process boundary verification, the system uses the parameter allowable range table as a reference to conduct boundary checks on the dosage, brewing temperature, brewing time, and drinking time of each candidate medicinal material. When user preferences in preparation or drinking time cause any parameter to exceed the parameter allowable range table, the corresponding relationship is added to the non-compliance list and marked with a parameter out of bounds flag. For medicinal materials added to the non-compliance list that play a role in the target functional node, a substitution trigger flag is also marked for subsequent generation of the substitution path set.

[0075] After verification, the system removes risk nodes and risk relationships from the original reachable set to form a verified candidate search space; the candidate search space, parameter allowable range table, and non-compliance list, along with alternative trigger flags, are written into the audit file.

[0076] It should be noted that the parameter allowable range table includes a process method label field, with values ​​of combined brewing, added later, or added after separate decoction. When the process method label of the medicinal material is added later or added after separate decoction, the brewing time of the medicinal material is not included in the intersection of the combined brewing time interval, and the execution step and time range are indicated separately by the process method label.

[0077] For example, the user's status is: constitution type is Yin deficiency; symptom list is dry throat and bitter taste in mouth; season and climate are autumn, dry, East China; personal preference is refreshing, quick brew, morning and evening; combined medication list includes aspirin. The system loads the rule dictionary and parameter threshold set from the evidence chain and generates entries in the parameter allowable range table: Chrysanthemum dosage range is 3 to 8 grams, brewing temperature range is 85 to 95 degrees Celsius, brewing time range is 5 to 8 minutes, and the drinking time set is morning and evening; Honeysuckle dosage range is 6 to 10 grams, brewing temperature range is 90 to 95 degrees Celsius, brewing time range is 8 to 10 minutes, and the drinking time set is morning and evening; Ophiopogon japonicus dosage range is 6 to 9 grams, brewing temperature range is 95 to 98 degrees Celsius, brewing time range is 10 to 15 minutes, and the drinking time set is evening; Peppermint dosage range is 2 to 3 grams, brewing temperature range is 85 to 90 degrees Celsius, brewing time range is 3 to 5 minutes, and the drinking time set is morning; Salvia miltiorrhiza is marked as interacting with aspirin and reaching the interception threshold.

[0078] The interaction between aspirin and danshen was mapped to a risk relationship, and danshen was added to the risk node masking set. Based on the incompatibility rule between yin deficiency and autumn dryness, nodes and relationships of the warm and heat-dispersing type that were incompatible with this context were added to the risk set. The pruning order was: constitution contraindication check, seasonal climate compatibility check, drug interaction check, and dosage and process boundary check. Danshen was found to have an interaction and was added to the non-compliance list with a substitution trigger mark. Some warm and heat-dispersing items were added to the non-compliance list due to seasonal incompatibility. The remaining items were retained in the candidate search space.

[0079] Step 3: When a security conflict occurs, construct a set of alternative paths that maintain the effectiveness of the link structure. Evaluate the contribution of these alternative paths to conflict resolution based on constraint propagation, and determine the compatibility search order. Specifically, this is implemented as follows:

[0080] After generating the candidate search space, the masking set, the parameter allowable range table, and the alternative trigger markers, the system enters the security conflict handling phase. For the target functional node marked as an alternative trigger, the system generates a set of alternative paths within the graph neighborhood of the compatibility knowledge graph. The scope of the graph neighborhood is jointly limited by the upper limit of the path length and the set of relationship types. The upper limit of the path length is a fixed number of steps from the symptom node to the medicinal material node, and the set of relationship types includes efficacy association, meridian association, and contextual adaptation. Alternative paths are divided into two categories: equivalent efficacy paths and complementary meridian association paths. Equivalent efficacy paths require that the target functional node remains unchanged, while complementary meridian association paths require that the target functional node remains unchanged and that the union of the meridian association set and the original path covers the meridian association requirement set corresponding to the target functional node.

[0081] During generation, each alternative path is labeled with the constitution suitability condition and the season suitability condition, and the source identifier and version identifier of the evidence chain are recorded. Then, structural preservation constraints are set, including efficacy link coverage, meridian synergy, and constitution-season suitability criteria: efficacy link coverage is determined by the target functional node coverage being valid and the functional connection chain being continuous; meridian synergy is determined by the complete inclusion relationship between the meridian set pointed to by the medicinal herb nodes in the alternative path and the meridian set required by the target functional node; and constitution-season suitability criteria are determined by the validity of both constitution matching and season matching.

[0082] Constraint propagation is performed on the set of alternative paths. The constraint propagation uses the mask set and the parameter allowable range table as initial constraints. For each alternative path, conflict reduction, structure preservation, and adaptability are determined sequentially. The calculation process for conflict reduction is as follows:

[0083] After introducing an alternative path, a risk check is performed on the medicinal herb nodes and relationships involved in the path. If the risk node hit count is zero and the risk relationship hit count is zero, it is recorded as a successful conflict reduction; otherwise, it is recorded as a failed conflict reduction. The structure preservation judgment is checked according to the aforementioned efficacy link coverage and meridian synergy. If all are true, the structure preservation result is recorded as successful. The suitability judgment is that the constitution matching is successful and the season matching is successful. At the same time, the parameter allowable range table is read to check the dosage, brewing temperature, brewing time and drinking period. If all are within the corresponding allowable range, the parameter allowable result is recorded as successful.

[0084] The results are compared in the following order: conflict reduction, structure preservation, adaptation, and parameter allowance. First, the conflict reduction is compared, with the one that is true first. If both are true, the structure preservation results are compared, with the one that is true first. If they are still tied, the adaptation results are compared, with the one that is true first. If they are still tied, the parameter allowance results are compared, with the one that is true first.

[0085] For alternative paths that are still in parallel, they are eliminated based on the completeness of the evidence chain. The completeness of the evidence chain is determined by the presence of all fields: source identifier, version identifier, scope of application, risk level, and judgment threshold. If the completeness of the evidence chain is the same, the later version time takes priority. If they are still the same, the smaller string of the medicinal material name concatenated in a fixed lexicographical order takes priority.

[0086] After the above-mentioned order comparison and parallel elimination, the contribution order of the alternative paths is obtained, and the matching search order is generated accordingly. The matching search order, along with the candidate search space and parameter allowable range table, is written into the audit file and passed as input to the stage that performs path search in the matching cause-effect graph according to the preset priority order, so that the selection of subsequent target paths and the linkage solution of process parameters are consistent with the parameter names, judgment criteria and recording methods before and after this embodiment.

[0087] Step 4: Perform path search in the compatibility cause-effect graph according to a preset priority order to determine the target path from the user's state to the medicinal material set, and solve for the compatibility parameters in conjunction with the process parameters. The specific implementation is as follows:

[0088] After generating the candidate search space, the mask set, the parameter allowable range table, and the compatibility search order, a compatibility causal graph is constructed. The node set of the compatibility causal graph includes symptom nodes, function nodes, medicinal property nodes, meridian tropism nodes, medicinal material nodes, and process parameter nodes; directed edges represent efficacy associations, adaptation relationships, and constraint relationships.

[0089] The starting point set is formed by combining the symptom nodes corresponding to user status, the constitution adaptation entry point corresponding to constitution type, and the context entry point corresponding to season and climate. The termination condition is to reach the medicinal material node set and cover the target functional category set. The expansion step size is defined as advancing one relationship step size from the current node along the compliance relationship. The compliance relationship refers to the relationship that is not in the risk node shield set and the risk relationship shield set and meets the parameter allowable range table. A path search queue is established and the path seeds in the starting point set are loaded. The source identifier and version identifier of the evidence chain are recorded to support subsequent parallel resolution and auditing.

[0090] A heuristic search is performed in the matching causal graph to generate a set of candidate paths. An evaluation sequence is calculated for the paths to be expanded in the queue. The evaluation sequence contains four decisions in sequence:

[0091] The first item is the safety compliance judgment, and the judgment criteria are that the taboo hit count is zero, the interaction hit count is zero, and all parameters are within the parameter allowable range table;

[0092] The second item is the determination of the completeness of the function link. The determination criteria are that the target function node coverage is established and the function connection chain is continuous.

[0093] The third item is the assessment of physical condition and seasonal compatibility. The criteria for assessment are that both physical condition and seasonal compatibility are met.

[0094] The fourth item is process execution and compliance determination. The determination criteria are that the dosage, brewing temperature, brewing time, and drinking time corresponding to the current path are consistent with user preferences and consistent with the process parameter boundaries. The system performs a lexicographical comparison of the above four determinations according to a preset priority order:

[0095] First, compare the safety compliance criteria, with the one that is correct listed first. If both are correct, then compare the efficacy chain integrity criteria, with the one that is correct listed first. If they are still tied, then compare the physical condition and seasonal suitability criteria, with the one that is correct listed first. If they are still tied, then compare the process execution and compliance criteria, with the one that is correct listed first.

[0096] The expansion order is determined based on the lexicographical order, and a candidate path set is generated. When multiple paths meet the termination condition and have the same lexicographical order, they are resolved in parallel according to the chain of evidence. The completeness of the chain of evidence is determined by the presence of all fields: source identifier, version identifier, scope of application, risk level, and judgment threshold. If the completeness is the same, the later version time takes precedence. Through the above process, the target path from the user status to the medicinal material set is selected, and the target path, evaluation sequence, basis for parallel resolution, and version time are recorded in the audit file.

[0097] Based on the parameter allowable range table, the process parameters are solved in a linked manner for the target path. The specific steps are as follows:

[0098] Locate the set of medicinal herb nodes in the target path, and read the dosage range, brewing temperature range, brewing time range and drinking time set of each medicinal herb in the parameter allowable range table;

[0099] Perform interval intersection or set intersection on each of the four types of parameters to obtain the combined-level dosage interval, combined-level brewing temperature interval, combined-level brewing time interval and combined-level drinking time set;

[0100] When any intersection result is empty, the alternative path reselection process is initiated and the process returns to the target path determination stage.

[0101] Within the combined-level interval and set, single-point parameters are selected in a fixed order. The fixed order is: safety boundary satisfaction first, user preference consistency second, and process parameter boundary consistency third. When parameters are listed in parallel, the later version time takes precedence.

[0102] The selected dosage, brewing temperature, brewing time, and drinking time are checked for consistency with the target path. If all are consistent, the compatibility parameter set is output.

[0103] Finally, the target path and the set of compatibility parameters are used together as the subsequent output compatibility scheme, contraindication warnings and dietary recommendations. The evidence chain and judgment basis are recorded, and the input of the compatibility knowledge graph and safety boundary are updated based on the user feedback.

[0104] For example, a compatibility causal graph is constructed based on the candidate search space. The node set includes symptom nodes such as dry throat and bitter taste in the mouth, functional nodes such as clearing heat and dispelling wind and nourishing yin and moistening dryness, medicinal properties nodes and meridian tropism nodes, medicinal material nodes such as chrysanthemum, honeysuckle, ophiopogon japonicus, and mint, and process parameter nodes; directed edges represent efficacy associations, adaptation relationships, and constraint relationships.

[0105] The starting set consists of symptom nodes corresponding to the user's status and seasonal climate entry points. The termination condition is the set of medicinal herb nodes that cover the functional nodes of clearing heat and dispelling wind, nourishing yin and moistening dryness. The preset priority order is: safety compliance first, efficacy link completeness second, constitution and seasonal adaptability third, and process execution and compliance last. Heuristic search calculates and evaluates the sequence of paths to be expanded and compares them in lexicographical order. Danshen is prohibited from expansion because it is in the shielded set, and nodes of the warm and hot type are prohibited from expansion because they are not seasonally suitable. After obtaining candidate paths that meet the termination condition, the target path is selected from the symptom node blade functional node clearing heat and dispelling wind and nourishing yin and moistening dryness to the synergistic effect of medicinal properties and meridian tropism, and finally to the medicinal herb nodes chrysanthemum, honeysuckle, ophiopogon japonicus, and mint.

[0106] Perform parameter linkage solution on the target path. Step 1: Read the dosage range, brewing temperature range, brewing time range and drinking time set of the four medicinal materials in the parameter allowable range table.

[0107] Step 2: Find the intersection of the brewing temperature ranges: the intersection of 85–95, 90–95, 95–98, and 85–90 is 90 degrees Celsius (by comparing the maximum value of the lower bound of all ranges with the minimum value of the upper bound of all ranges, the intersection is a single point when the two are equal).

[0108] Step 3: Perform intersection calculations for the brewing time intervals: the intersections of 5-8 minutes, 8-10 minutes, 10-15 minutes, and 3-5 minutes are empty. The system triggers the alternative path reselection process and returns to the search stage. Adjust the process parameter nodes, setting mint to be added later, and adjusting the mint brewing time from 3-5 minutes to 1-2 minutes. Mint no longer participates in the intersection calculation of combined brewing times. At the same time, set Ophiopogon japonicus to be decocted separately and added later, keeping the Ophiopogon japonicus brewing time at 10-15 minutes, but not participating in the intersection calculation of combined brewing times. Step 4: Perform intersection calculations for the combined brewing time intervals again, only for chrysanthemum and honeysuckle: the intersection of 5-8 minutes and 8-10 minutes is 8 minutes; the intersection of the drinking time set is morning and evening.

[0109] Step 5: Output the compatibility scheme, contraindications warnings, and dietary recommendations; record the evidence chain and judgment criteria; and update the compatibility knowledge graph and safety boundaries based on user feedback. The specific implementation is as follows:

[0110] After the target path is determined, the parameter allowable range table is read, and the dosage range, brewing temperature range, brewing time range and drinking time period set are extracted item by item from the set of medicinal herb nodes in the target path. The interval intersection or set intersection is performed respectively to form the combined dosage range, combined brewing temperature range, combined brewing time range and combined drinking time period set.

[0111] If any intersection result is empty, the alternative path reselection process is initiated and the process returns to the target path determination stage. If all intersections are not empty, single-point parameters are selected in a fixed order within the combination-level interval and set. The fixed order is: safety boundary satisfaction first, user preference consistency second, and process parameter boundary consistency third. When parameters are in parallel, the later version time takes priority. After the single-point parameter selection is completed, the selected dosage, brewing temperature, brewing time, and drinking period are checked for consistency with the target path. If consistency is found, the matching parameter set is output. If consistency is not found, the process reverts to the alternative path reselection process until consistency is found.

[0112] Based on the target path and compatibility parameter set, a compatibility scheme is generated. This scheme includes a list of medicinal materials, dosage, brewing temperature, brewing time, and drinking time, and simultaneously generates contraindication warnings and dietary recommendations. Contraindication warnings are based on the blocked set and the list of non-compliant items, indicating the source of risk and triggering conditions. Dietary recommendations are generated based on the correspondence between the target functional nodes and body constitution and season compatibility, providing dietary pairing suggestions and drinking tips. Applicable boundary prompts corresponding to the user's status are also provided, including body constitution type range, seasonal climate range, and restrictions on combined medication. The prompt text corresponds one-to-one with the evidence chain for easy verification. The generated compatibility schemes, contraindication warnings, dietary recommendations, and applicable boundary prompts are written into the audit file and archived along with the compatibility search order, target path, and compatibility parameter set to ensure traceability of the entire process.

[0113] For each generated compatibility scheme, an evidence chain card and a scheme fingerprint are generated. The evidence chain card fields include source, version, scope of application, risk level, and judgment threshold, and establish references with nodes and relationships involved in the target path to ensure that each judgment has a corresponding source and version. The scheme fingerprint is generated as follows: the herb name, dosage, brewing temperature, brewing time, and drinking period are standardized in a fixed order and uniform format, and then connected with the source and version identifiers of the evidence chain in a fixed order to form a text segment. A deterministic digest method is used to generate a fixed-length fingerprint value. This fingerprint value and the evidence chain card are stored in the audit file for subsequent backtracking and version comparison. When multiple candidate schemes exist, if the evidence chain completeness is the same, the display order is determined according to the principle of later version time, and the evidence chain cards and scheme fingerprints of the unused schemes are archived simultaneously.

[0114] An open adverse reaction and compliance reporting channel is established. Feedback events are recorded in a structured manner using six fields: herbal material set, population marker, process parameter, result label, anomaly label, and compliance label. The result label records subjective experience and objective improvement, the anomaly label records the type of adverse reaction and the time of occurrence, and the compliance label records the deviation between the actual number of times and the time of consumption. The system performs aggregate analysis on feedback events of the same population marker and the same herbal material set: when anomaly labels appear consecutively within a preset frequency threshold and point to the same herbal material or the same process parameter, a boundary tightening strategy is triggered, modifying the upper limit of the dosage of the corresponding herbal material and the upper or lower limit of the corresponding process parameter to stricter values, and updating the parameter allowable range table and the mask set; when the result label continuously points to stable improvement within a preset evaluation period and the number of anomaly labels is zero, a boundary loosening strategy is triggered, adjusting the corresponding dosage range or process range to a wider range, provided that the evidence chain and audit file are recorded simultaneously.

[0115] It should be noted that the threshold information in this embodiment was set in advance by professionals and will not be explained in detail here. Some parameters in the embodiment may have the same English letters, but they are explained with different meanings when used, and will not be explained one by one here.

[0116] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.

[0117] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0118] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0119] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0120] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A knowledge graph-based intelligent compatibility generation method for traditional Chinese medicine tea drinking, characterized by: The specific steps include: Obtain constitution, symptoms, seasonal climate and personal preferences, form user state and call compatibility knowledge graph; Compile the security boundary into an execution type interception rule, generate a shielding set for risk nodes and relationships, and perform pre-check and pruning on the compatibility search space; When a security conflict occurs, build a set of alternative paths that maintain the efficacy link structure, evaluate the contribution of alternative paths to conflict resolution based on constraint propagation, and determine the compatibility search order; Perform path search in the compatibility causal graph according to the preset priority order, determine the target path from the user state to the medicinal material set, and solve the compatibility parameters in conjunction with the process parameters; Output the compatibility scheme, taboo warning and dieting suggestions, record the evidence chain and judgment basis, and update the compatibility knowledge graph and security boundary based on usage feedback; Compile the security boundary into an execution type interception rule, generate a shielding set for risk nodes and relationships, and perform pre-check and pruning on the compatibility search space, the specific steps include: Gather taboo items, population restrictions, drug interactions, dose upper limits and process parameter boundaries to form a rule dictionary and parameter threshold set; Map the rule dictionary to the nodes and relationships of the compatibility knowledge graph to generate a risk node shielding set, a risk relationship shielding set, and a parameter allowed range table; Perform pruning on the starting point and intermediate relationships related to the user state based on the shielding set, output the non-compliance list and alternative trigger markers; Form a checked candidate search space based on the pruning results and enter the compatibility calculation; When a security conflict occurs, build a set of alternative paths that maintain the efficacy link structure, evaluate the contribution of alternative paths to conflict resolution based on constraint propagation, and determine the compatibility search order, the specific steps include: Generate equivalent efficacy paths or meridian complementarity paths around the target efficacy in the graph neighborhood, and mark the constitution adaptation and seasonal adaptation conditions; Set structure preservation constraints, including efficacy link coverage, meridian synergy, and constitution and seasonal adaptation criteria; Use constraint propagation to reduce conflicts, determine structure preservation, and determine adaptability for each candidate path, and calculate the contribution degree sequence of alternative paths to conflict resolution; Generate the compatibility search order according to the contribution degree sequence, and apply the preset rollback strategy to determine the priority when the sequence is the same.

2. The knowledge graph-based traditional Chinese medicine tea drinking intelligent compounding generation method according to claim 1, characterized in that: Generate the compatibility search order according to the contribution degree sequence, the specific steps include: Based on the shielding set, perform risk check to get the conflict reduction amount, defined as the risk node hit count and risk relationship hit count being zero; Perform structure preservation verification to confirm that the target function node coverage is established and the function connection chain is continuous, and get the structure preservation result; Perform adaptation verification to confirm that the constitution matching is established and the seasonal matching is established, and get the adaptation result; Perform parameter verification to confirm that the dose, brewing temperature, brewing time and drinking time are all within the parameter allowed range table, and get the parameter allowed result; Compare the sequence according to the conflict reduction amount, structure preservation result, adaptation result and parameter allowed result to generate the contribution degree sequence of alternative paths; Generate the compatibility search order according to the contribution degree sequence. 3.The method of claim 1, wherein the method is characterized by: In the compatibility causal graph, the path search is performed in the preset priority order, the target path from the user state to the medicinal material set is determined, and the compatibility parameters are solved in combination with the process parameters. The specific steps include: The node set and directed edge of the compatibility causal graph are constructed, the nodes include symptoms, functions, medicinal properties, meridians, medicinal materials, and process parameters, and the edges represent efficacy correlation, adaptation relationship, and constraint relationship; The preset priority order and termination condition are set, and the preset priority order is safety compliance, efficacy link integrity, constitution and seasonal adaptation, process execution and compliance in turn; In the compatibility causal graph, a candidate path set is generated by using heuristic search, and the target path is selected by performing lexicographic comparison in the preset priority order; The dosage, brewing temperature, brewing time, and drinking time period are solved in combination with the parameter allowable range table to form the compatibility parameter set.

4. The knowledge graph-based traditional Chinese medicine tea drinking intelligent compounding generation method according to claim 3, characterized in that: In the compatibility causal graph, a candidate path set is generated by using heuristic search, and the target path is selected by performing lexicographic comparison in the preset priority order, and the specific steps include: The user state is taken as the starting point, and the medicinal material set is taken as the end point, the starting point set, termination condition, and expansion step are set, and a path search queue is established; The path expansion is limited according to the shielding set and the parameter allowable range table, and expansion to the risk nodes and risk relationships is prohibited; The evaluation sequence of the path to be expanded in the queue is calculated, and the evaluation sequence includes safety compliance judgment, efficacy link integrity judgment, constitution and seasonal adaptation judgment, process execution and compliance judgment in turn; The evaluation sequence is compared in lexicographic order according to the preset priority order, the expansion order is determined, and a candidate path set is generated; The path that meets the termination condition and has the earliest lexicographic order in the candidate path set is selected as the target path; When there is a tie, the tie is resolved according to the evidence chain field, and in the case of the same evidence chain integrity, the version with the later time is preferred.

5. The knowledge graph-based traditional Chinese medicine tea drinking intelligent compounding generation method according to claim 4, characterized in that: The dosage, brewing temperature, brewing time, and drinking time period are solved in combination with the parameter allowable range table to form the compatibility parameter set, and the specific steps include: The medicinal material node set corresponding to the target path is established; The parameter allowable range table is read, the dosage interval, brewing temperature interval, brewing time interval, and drinking time period set of each medicinal material are extracted, and interval or set intersection is performed item by item to obtain the combined level dosage interval, combined level brewing temperature interval, combined level brewing time interval, and combined level drinking time period set; When any intersection result is empty, the alternative path reselection process is started and the target path determination link is returned; Single-point parameters are selected in the combined level interval and set in a fixed order, and the fixed order is safety boundary satisfaction first, user preference consistency second, and process constraint consistency third; in the case of a tie, the version with the later time is preferred; The consistency of the parameters and the target path is checked, and the compatibility parameters are output. 6.The method of claim 1, wherein the method is characterized by: The compatibility scheme, contraindication warning, and diet and health care suggestions are output, the evidence chain and judgment basis are recorded, and the compatibility knowledge graph and safety boundary are updated based on the use feedback. The specific steps include: The compatibility scheme, contraindication warning, and diet and health care suggestions are output, and the applicable boundary prompt corresponding to the user state is given; An evidence chain card is generated, the fields include source, version, applicable range, risk level, and judgment threshold, and a scheme fingerprint is attached for tracing. The recording scheme is based on audit files, and the open adverse reaction and compliance reporting channel is structured as an event associated with medicinal materials, efficacy, population, and process. Based on the feedback, the boundary tightening or boundary relaxation is performed on the shielding set and parameter threshold, the version update of the compatibility knowledge graph and the safety boundary is completed, and the rollback path is reserved.

Citation Information

Patent Citations

  • AI-based traditional Chinese medicine dialectical auxiliary diagnosis method and system and medium thereof

    CN120613098A