Knowledge graph and large language model-based nephropathy diet recommendation method and system

By developing a kidney disease diet recommendation system based on knowledge graphs and large language models, we have solved the problem of low personalization in existing kidney disease diet apps. This system achieves personalized and accurate diet recommendations, ensuring that the recommendations conform to authoritative guidelines. It also supports dynamic adjustments and multi-turn dialogues, thereby improving user satisfaction.

CN121439100APending Publication Date: 2026-01-30SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511533894.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-25
Publication Date
2026-01-30

AI Technical Summary

Technical Problem

Existing kidney disease diet apps lack personalization, fail to fully utilize patients' clinical data, have limited data access and interoperability, and exhibit inconsistent content accuracy and update frequency, posing a risk of misleading patients. They also cannot provide personalized adjustments based on CKD stages and biochemical indicators.

Method used

A kidney disease diet recommendation system based on knowledge graph and big language model is adopted. The system identifies disease status and dietary preferences through voice or text input, generates nutritional restrictions by combining health records and test indicators, retrieves ingredients and recipes from the knowledge graph, generates a preliminary recommendation plan using the big language model, verifies the plan through the knowledge graph sub-engine, deletes non-compliant ingredients or recipes, and finally refines the plan with the big language model to generate the final recommendation plan.

Benefits of technology

It enables the generation of differentiated dietary plans based on the patient's specific situation, ensuring that the recommended content conforms to authoritative clinical guidelines, reducing the risk of misleading information, providing interpretable recommendation results, supporting dynamic adjustments through multi-round dialogues, and improving user satisfaction and plan adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121439100A_ABST
    Figure CN121439100A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of nephropathy rehabilitation, in particular to a nephropathy diet recommendation method and system based on a knowledge graph and a big language model, and the method comprises the steps: a user inputs a diet demand through voice or text, and the system calls the big language model to carry out semantic understanding on the diet demand to recognize a disease state, diet preference and symptom characteristics; based on a big language model identification result, combining user historical data and inspection indexes in a health record module to generate a disease type and a nutrition limitation condition of the user; retrieving a food material and menu candidate set from the knowledge graph according to the disease type and the nutrition limiting condition; the big language model generates a preliminary recommendation scheme according to the food material and menu candidate set, the knowledge graph sub-engine verifies a first draft according to a rule chain, deletes illegal food materials or menus in the preliminary recommendation scheme and replaces the illegal food materials or menus with safety options; and returning the replaced result to the large language model to carry out natural language retouching and explainable supplementation to generate a final recommendation scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of kidney disease rehabilitation technology, and more particularly to a method and system for recommending kidney disease diets based on knowledge graphs and large language models. Background Technology

[0002] The patient population with chronic kidney disease (CKD) is large, and dietary management plays a crucial role in slowing disease progression, controlling complications (such as edema, hyperkalemia, and hyperphosphatemia), and maintaining quality of life. Authoritative guidelines indicate that patients with kidney disease require individualized control of key nutrients such as sodium, potassium, phosphorus, and protein, and dietary recommendations should be adjusted according to the course of the disease and laboratory test results.

[0003] Multiple systematic reviews have found that much of the information in many kidney / gastrointestinal diet apps on the market is not based entirely on authoritative guidelines or clinical evidence. The accuracy and update frequency of the content vary widely, posing a risk of misleading information. Reasons for this include insufficient professional involvement from developers, a lack of physician / dietologist review mechanisms, and apps prioritizing user experience over clinical validation.

[0004] Furthermore, the level of personalization is low, failing to fully utilize patients' clinical data (such as laboratory tests, disease stages, and complications). Although clinical guidelines emphasize the need to adjust sodium, potassium, phosphorus, and protein intake based on CKD stages and specific biochemical indicators, most existing products only provide static or rule-based recommendations, lacking the ability to deeply link real-time test values ​​with individualized rules. This is due to limitations in data acquisition and interoperability (electronic medical records / laboratory data are difficult to securely access), and the need for extensive medical knowledge engineering work to encode fine-grained rules. Summary of the Invention

[0005] To address the aforementioned issues, this invention provides a method and system for recommending diets for kidney disease based on knowledge graphs and large language models.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] A dietary recommendation method for kidney disease based on knowledge graphs and large language models includes:

[0008] Users input their dietary needs via voice or text, and the system calls a large language model to perform semantic understanding of the dietary needs in order to identify disease states, dietary preferences and symptom characteristics.

[0009] Based on the recognition results of the large language model, combined with the user's historical data and test indicators in the health record module, the user's disease type and nutritional restriction conditions are generated.

[0010] Based on disease type and nutritional restrictions, retrieve candidate sets of ingredients and recipes from the knowledge graph;

[0011] The large language model generates an initial recommendation scheme based on the candidate set of ingredients and recipes. The knowledge graph sub-engine verifies the initial draft based on the rule chain, deletes illegal ingredients or recipes in the initial recommendation scheme and replaces them with safe options.

[0012] The replaced results are returned to the large language model for natural language polishing and interpretable additions to generate the final recommendation.

[0013] Preferably, after the system calls a large language model to perform semantic understanding of dietary needs to identify disease states, dietary preferences, and symptom characteristics, it further includes:

[0014] When information is incomplete, an active inquiry mechanism is triggered to gradually collect the required parameters.

[0015] Preferably, the generation of the nutritional limiting conditions includes:

[0016] Generate patient feature vectors based on the patient's disease type, complication information in historical data, and dietary preferences;

[0017] Patient feature vectors are mapped to a knowledge graph to generate nutritional constraints.

[0018] Preferably, the nutritional limiting conditions include:

[0019] An absolute contraindication list, used to generate rules based on drug-food interactions;

[0020] Quantitative control indicators are used to control daily phosphorus / potassium / protein intake thresholds;

[0021] And preference optimization space, for allowing adjustments to the range of food categories.

[0022] Preferably, after returning the replaced result to the large language model for natural language polishing and interpretable supplementation to generate the final recommendation scheme, the method further includes:

[0023] Receive user feedback on the recommended diet;

[0024] Based on the feedback information, the recommendation strategy of the large language model is updated using a reinforcement learning algorithm to optimize subsequent recommendation results.

[0025] As a preferred option, the final recommended plan includes meal arrangements, nutrient analysis, food substitution suggestions, and medical evidence.

[0026] A diet recommendation system for kidney disease based on knowledge graphs and large language models includes:

[0027] The user interaction module includes a voice and text input interface, a dialogue interface, a recipe and ingredient recommendation display interface, and a health record management interface.

[0028] The data analysis module performs semantic parsing of user input based on a large language model to identify disease status, dietary preferences, and symptom characteristics;

[0029] The collaborative reasoning module includes a large language model and a knowledge graph. The large language model understands natural language needs based on training corpus and generates preliminary recommendation schemes. The knowledge graph sub-engine verifies the preliminary recommendation schemes using medical rules, filters out ingredients or recipes that do not conform to the patient's current condition, and returns a candidate set that meets the criteria to the large language model.

[0030] The data management module stores users' basic information, disease stage, laboratory test results, allergy history, complication information, and taste preferences;

[0031] The solution output module is used to display the final recommended solution to the user, along with nutrient content, risk assessment, replacement suggestions, and medical evidence.

[0032] Preferably, the large language model and the knowledge graph interact through an intermediate layer API, with the large language model calling the knowledge graph to correct its own output, thus achieving closed-loop verification.

[0033] The beneficial effects of this invention are as follows:

[0034] Based on health records and disease segmentation rule chains, this application can generate differentiated dietary plans for different types of patients, such as those with chronic nephritis, uremia, and those before and after dialysis, avoiding one-size-fits-all recommendations.

[0035] The recommendations are validated in real time through the medical rule chain of the knowledge graph, ensuring that the recommended content complies with authoritative clinical guidelines and nutritional standards, effectively reducing the risks caused by model illusions or inaccurate information. The recommendations are accompanied by nutrient analysis, risk assessment and alternative evidence, which can provide doctors and patients with a clear decision-making process and meet the traceability and auditing requirements of the medical field.

[0036] It supports multi-turn dialogues based on proactive questioning, which can gradually clarify the user's ambiguous intentions and dynamically adjust the recommendation scheme according to new needs, thereby improving user satisfaction and scheme adaptability. Attached Figure Description

[0037] Figure 1 This is a flowchart of a kidney disease diet recommendation method based on knowledge graphs and large language models in a specific embodiment of the present invention;

[0038] Figure 2 This is a schematic diagram illustrating the collaborative operation of the diet recommendation method and the recommendation system in a specific embodiment of the present invention;

[0039] Figure 3 A diagram illustrating the page functions in a specific embodiment of the present invention. Detailed Implementation

[0040] Please see Figures 1-3 As shown, this invention relates to a method for recommending dietary recommendations for kidney disease based on knowledge graphs and large language models, specifically including:

[0041] Users input their dietary needs via voice or text, and the system calls a large language model to perform semantic understanding of the dietary needs in order to identify disease states, dietary preferences and symptom characteristics.

[0042] Furthermore, when information is incomplete, an active inquiry mechanism is triggered to gradually collect the required parameters.

[0043] Based on the recognition results of the large language model, combined with the user's historical data and test indicators in the health record module, the user's disease type and nutritional restriction conditions are generated.

[0044] Based on disease type and nutritional restrictions, retrieve candidate sets of ingredients and recipes from the knowledge graph;

[0045] The large language model generates an initial recommendation scheme based on the candidate set of ingredients and recipes. The knowledge graph sub-engine verifies the initial draft based on the rule chain, deletes illegal ingredients or recipes in the initial recommendation scheme and replaces them with safe options.

[0046] The replaced results are returned to the large language model for natural language polishing and interpretable additions to generate the final recommendation.

[0047] Furthermore, after generating the final recommendation scheme, the system receives user feedback on the dietary recommendation scheme and updates the recommendation strategy of the large language model based on the feedback information using a reinforcement learning algorithm to optimize subsequent recommendation results.

[0048] The generation of the nutritional restriction conditions includes:

[0049] Generate patient feature vectors based on the patient's disease type, complication information in historical data, and dietary preferences;

[0050] Patient feature vectors are mapped to a knowledge graph to generate nutritional constraints.

[0051] Specifically, nutritional restrictions include:

[0052] An absolute contraindication list, used to generate rules based on drug-food interactions;

[0053] Quantitative control indicators are used to control daily phosphorus / potassium / protein intake thresholds;

[0054] And preference optimization space, for allowing adjustments to the range of food categories.

[0055] Specifically, the knowledge graph construction in this application includes:

[0056] Entities and relationships are extracted from authoritative medical literature, clinical guidelines, and nutrition databases;

[0057] The entities include at least: food entities, nutritional component entities, kidney disease staging entities, and clinical symptom entities;

[0058] The relationships mentioned at least include: food-rich-nutrients, food-contraindications-nephropathy staging, food-use with caution-clinical symptoms, and nutrient-effects-biochemical indicators;

[0059] The extracted entities and relations are stored in the form of triples to form a structured knowledge network.

[0060] Furthermore, during the recommendation process, the latest medical literature abstracts are analyzed using the large language model; potential knowledge associations that differ from or are newly added to the existing knowledge graph are identified; these potential knowledge associations are submitted to experts for review, and updated to the knowledge graph after the review is approved.

[0061] Example 2

[0062] Based on the above embodiment 1, in a second aspect of this application, a kidney disease diet recommendation system based on knowledge graphs and large language models is also proposed, specifically including:

[0063] refer to Figure 3 As shown, the user interaction module (UI layer) includes a voice and text input interface, a dialogue interface, a recipe and ingredient recommendation display interface, and a health record management interface. It receives natural language input from patients (such as "What should I eat if I have edema recently?") and transmits it to the data analysis module.

[0064] The data analysis module performs semantic parsing of user input based on a large language model to identify disease status, dietary preferences, and symptom characteristics. When the information is incomplete, it triggers an active inquiry mechanism to gradually collect the required parameters.

[0065] The collaborative reasoning module includes a large language model and a knowledge graph. The large language model understands natural language needs based on training corpus and generates preliminary recommendation schemes. The knowledge graph sub-engine verifies the preliminary recommendation schemes using medical rules, filters out ingredients or recipes that do not conform to the patient's current condition, and returns a candidate set that meets the criteria to the large language model.

[0066] The knowledge graph storage module is used to store multi-dimensional knowledge in the field of kidney disease diet: food node (including nutrient content, risk factor tags, and cultural attributes); recipe node (including food combinations and cooking methods); disease node (sub-types such as chronic nephritis, uremia, and pre- and post-dialysis); and rule chain node (nutritional restrictions and prohibited food combinations).

[0067] Specifically, the knowledge graph storage module supports SPARQL / graph database queries and provides verifiable data for the inference module;

[0068] The data management module stores users' basic information (age, gender, height, weight), disease stage, laboratory test results, allergy history, complication information, and taste preferences;

[0069] The solution output module is used to display the final recommended solution to the user, along with nutrient content, risk assessment, replacement suggestions and medical evidence. It supports exporting PDF / images for doctor review or long-term patient records.

[0070] Example 3

[0071] Based on the above embodiment 1, the training of the large language model includes:

[0072] Step 1: Knowledge Graph-Guided Data Preprocessing

[0073] Entity relation triples were extracted from the kidney disease nutrition knowledge graph to generate a structured training corpus;

[0074] Convert clinical guideline provisions into instruction pairs in the format of <condition, recommendation>, and annotate the corresponding atlas node paths;

[0075] Construct a weighted food database, labeling the phosphorus / potassium / protein content of each food and its applicability to different stages of kidney disease.

[0076] Step 2: Multi-stage comparative training

[0077] Phase 1 (Rules Internalization Training): Supervised fine-tuning (SFT) using the constraint rule set generated by the knowledge graph;

[0078] Phase Two (Safety Boundary Training):

[0079] A dynamic negative sampling strategy is adopted to automatically generate the following negative samples for each batch of positive samples (compliant recommendation):

[0080] Type A: Violating absolute contraindications (e.g., using high-phosphorus foods for CKD stage 4 patients).

[0081] Type B: Quantitative exceedance (protein levels exceed daily limit)

[0082] Type C: Drug conflicts (such as warfarin and vitamin K taken together with food) increase the distance between positive and negative samples in the latent space through Triplet Loss;

[0083] Phase Three (Personalized Adaptation Training):

[0084] Incorporating real patient interaction data and employing a reinforcement learning framework:

[0085] Step 3: Dynamic Verification Mechanism

[0086] Deploy a real-time validator module to perform knowledge graph reasoning verification every N steps during training and calculate the pass rate of the recommended solution; when the pass rate is lower than the threshold, automatically increase the proportion of training samples internalized by the rules.

[0087] Furthermore, a continuous learning mechanism is provided based on step 3.

[0088] Verify the absolute taboo list by matching subgraphs of the knowledge graph;

[0089] The compliance rate of quantitative indicators is verified through a nutrient calculation engine.

[0090] The rationale for the initial recommended treatment plan was assessed by medical experts.

[0091] Example 4

[0092] In this implementation, in addition to knowledge graphs, ontology or relational databases can be used in conjunction with a rule engine to realize the storage and reasoning of medical knowledge;

[0093] In addition to the collaboration between large language models and knowledge graphs, traditional NLP models (BERT, GPT-fine-tuning models) can also be combined with rule engines to reduce the computational cost of large models.

[0094] In addition to text / voice dialogues, graphical questionnaires, button-based interactions, and other methods can be used to obtain user needs, but the flexibility of multi-round dynamic clarification may be reduced.

[0095] In addition to rule chain filtering and candidate set generation, traditional recommendation algorithms such as collaborative filtering and content-based recommendation can be introduced to achieve personalized solutions by combining medical constraints.

[0096] The system can be deployed on local servers, hospital internal cloud platforms, or use a federated learning architecture to achieve cross-institutional data collaboration, replacing centralized cloud deployment and meeting the privacy and compliance requirements of different institutions.

[0097] In summary, this application has the following advantages over the prior art:

[0098] 1. Fine-grained personalized recommendations

[0099] Based on health records (including disease stage, test values, allergy history, etc.) and disease subdivision rule chains, it can generate differentiated dietary plans for different types of patients such as chronic nephritis, uremia, and before and after dialysis, avoiding "one-size-fits-all" recommendations.

[0100] 2. Accuracy and Evidence-Based Guarantee

[0101] The recommendations are validated in real time using a medical rule chain based on a knowledge graph, ensuring that the recommended content complies with authoritative clinical guidelines and nutritional standards, effectively reducing the risks caused by model illusions or inaccurate information.

[0102] 3. Multi-turn interaction and dynamic optimization

[0103] It supports multi-turn dialogues based on proactive questioning, which can gradually clarify the user's ambiguous intentions and dynamically adjust the recommendation scheme according to new needs, thereby improving user satisfaction and scheme adaptability.

[0104] 4. Highly interpretable

[0105] The recommendations include nutrient analysis, risk assessment, and alternative evidence, providing doctors and patients with a clear decision-making process and meeting the traceability and auditing requirements of the medical field.

[0106] 5. Multi-source knowledge integration

[0107] By integrating food nutrition databases, recipe libraries, food culture information, and medical literature, a multi-dimensional knowledge graph is constructed to achieve information interconnection and avoid knowledge silos.

[0108] 6. Dual-module collaborative reasoning

[0109] The large language model is responsible for generating the initial recommendation scheme, while the knowledge graph is responsible for rule verification and fact retrieval, forming a closed-loop verification mechanism that improves the accuracy and reliability of the results while ensuring a natural interactive experience.

[0110] 7. Scalability and Modularity

[0111] The system architecture supports the expansion and rule updates of the knowledge graph, enabling it to be quickly adapted to other chronic disease diet management scenarios, facilitating secondary development and commercial promotion.

[0112] The above embodiments are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A kidney disease diet recommendation method based on a knowledge graph and a large language model, characterized by, The system comprises: The user inputs dietary requirements through voice or text, and the system calls a large language model to understand the semantics of the dietary requirements to identify disease status, dietary preferences, and symptom characteristics; Based on the identification results of the large language model, combined with the user's historical data and test indicators in the health record module, the disease type and nutritional restriction conditions of the user are generated; According to the disease type and nutritional restriction conditions, the candidate set of food materials and recipes is retrieved from the knowledge graph; The large language model generates a preliminary recommendation scheme based on the candidate set of food materials and recipes, and the knowledge graph sub-engine verifies the preliminary draft according to the rule chain, deletes the food materials or recipes that violate the rules in the preliminary recommendation scheme and replaces them with safe options; The replaced results are returned to the large language model for natural language polishing and interpretable supplementation to generate the final recommendation scheme. 2.The kidney disease diet recommendation method based on a knowledge graph and a large language model according to claim 1, characterized in that, After the system calls a large language model to understand the semantics of the dietary requirements to identify disease status, dietary preferences, and symptom characteristics, it also includes: When the information is incomplete, trigger the active questioning mechanism to gradually collect the required parameters. 3.The kidney disease diet recommendation method based on a knowledge graph and a large language model according to claim 1, characterized in that, The generation of the nutritional restriction conditions includes: Generate a patient feature vector according to the patient's disease type, concurrent information in the historical data, and dietary preferences; Map the patient feature vector to the knowledge graph to generate the nutritional restriction conditions.

4. The kidney disease diet recommendation method based on a knowledge graph and a large language model according to claim 3, characterized in that, The nutritional restriction conditions include: Absolute contraindication list, used to generate rules based on drug-food interactions; Quantitative control indicators for controlling daily phosphorus / potassium / protein intake thresholds; And preference optimization space for allowing adjusted food material category range. 5.The kidney disease diet recommendation method based on a knowledge graph and a large language model according to claim 1, characterized in that, After returning the replaced results to the large language model for natural language polishing and interpretable supplementation to generate the final recommendation scheme, it also includes: Receive feedback information from the user on the dietary recommendation scheme; Based on the feedback information, update the recommendation strategy of the large language model using reinforcement learning algorithm to optimize subsequent recommendation results. 6.The kidney disease diet recommendation method based on a knowledge graph and a large language model according to claim 1, characterized in that, The final recommendation scheme includes meal arrangement, nutrient analysis, food material substitution suggestion, and medical basis.

7. A kidney disease diet recommendation system based on a knowledge graph and a large language model, characterized in that, It includes: User interaction module, including voice and text input interface, dialogue interface, recipe and food material recommendation display interface, and health record management interface; Data analysis module, based on a large language model, performs semantic analysis on user input to identify disease status, dietary preferences, and symptom characteristics; Collaborative reasoning module, including a large language model and a knowledge graph, the large language model understands natural language requirements based on training corpus and generates a preliminary recommendation scheme, the knowledge graph sub-engine verifies the preliminary recommendation scheme according to medical rules, filters out food materials or recipes that do not meet the patient's current condition, and returns the candidate set that meets the standard to the large language model; Knowledge graph storage module for storing food material nodes, recipe nodes, disease nodes, and rule chain nodes; Data management module, storing user's basic information, disease stage, laboratory test results, allergy history, concurrent information, and taste preferences; Scheme output module for displaying the final recommendation scheme to the user, with nutrient content, risk assessment, substitution suggestion, and medical basis.

8. The kidney disease diet recommendation system based on a knowledge graph and a large language model according to claim 7, characterized in that, The large language model and the knowledge graph interact through an intermediate layer API, and the large language model calls the knowledge graph to correct its own output, realizing closed-loop verification.