Diabetes personalized health management algorithm and system based on retrieval enhanced generation (RAG)

By employing a retrieval-enhanced generation (RAG) approach, the shortcomings in accuracy and personalization of existing diabetes health management systems are addressed. A closed-loop learning framework is established, achieving accuracy and reliability in personalized health management and providing transparency and continuous optimization capabilities.

CN121885220APending Publication Date: 2026-04-17SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SICHUAN UNIV
Filing Date
2026-01-21
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing diabetes health management systems based on large language models (LLM) suffer from problems such as difficulty in ensuring the accuracy and reliability of generated content, insufficient personalization capabilities, and a lack of effective quality monitoring and continuous optimization mechanisms.

Method used

We employ a Retrieval Augmentation (RAG)-based approach, which uses multi-source heterogeneous data collection and standardization to construct a user profile-driven U-Retrieval graph retrieval mechanism. This mechanism generates refined answers, integrates a precise source tracing mechanism, and establishes a closed-loop learning framework for continuous optimization.

Benefits of technology

It achieves accuracy, individualized suitability, and reliability in health management recommendations, provides transparency and credibility, and ensures the long-term effectiveness of the system and the timeliness of knowledge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121885220A_ABST
    Figure CN121885220A_ABST
Patent Text Reader

Abstract

The invention discloses a personalized health management method and system for diabetes mellitus based on retrieval enhancement generation (RAG). The method comprises the following steps: collecting multi-source heterogeneous diabetes health management data and carrying out standardization processing; designing a context-aware retrieval enhancement engine driven by a user portrait, and realizing a U-Retrival map retrieval mechanism; personalized health question and answer content is generated based on a retrieval result, and an accurate traceability mechanism is integrated; and driving continuous optimization of the system through feedback data to form a closed-loop learning framework. According to the method, the defects of illusion, knowledge lag, insufficient individuation and the like of a large language model in the medical field are effectively solved, the accuracy, safety and user experience of health management are improved, and the method is suitable for individualized health management scenes of diabetes and other chronic diseases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and medical health information technology, and in particular to a method and system for personalized health management of diabetes based on retrieval-enhanced generation (RAG). Background Technology

[0002] Diabetes mellitus, a chronic metabolic disease requiring long-term management, has become a major global public health challenge. Effective diabetes health management involves the synergy of multiple dimensions, including diet control, exercise therapy, drug treatment, blood glucose monitoring, and health education, placing extremely high demands on the continuity, individualization, and reliability of management.

[0003] Traditional diabetes health management mainly relies on a combination of regular follow-ups provided by medical institutions and patient self-management. This model has the following limitations: First, uneven distribution of medical resources makes it difficult for patients at the grassroots level to obtain professional guidance; second, the transmission of health information is mostly one-way, lacking personalized adaptation; third, the management effect heavily depends on patient compliance and self-management ability, while lacking effective continuous monitoring and incentive mechanisms.

[0004] In recent years, diabetes health management systems based on artificial intelligence technology have gradually developed. In particular, large language models (LLMs), with their powerful natural language understanding and generation capabilities, have shown potential in providing health consultations and generating personalized recommendations. However, existing LLM-based diabetes health management solutions face three core technical challenges in practical applications.

[0005] First, the accuracy and reliability of the content generated by the model are difficult to guarantee. The inherent "illusion" problem of LLM may lead to the generation of incorrect medical advice, posing serious safety risks. At the same time, the model's knowledge updates are lagging behind, failing to integrate the latest clinical guidelines and medical research findings in a timely manner, affecting the scientific validity of the recommendations.

[0006] Second, the personalized adaptation capabilities of search-enhanced generation (RAG) systems are insufficient. Existing systems mostly rely on static knowledge bases, with imperfect update mechanisms, making it difficult to adapt to the rapid evolution of medical knowledge. During the search process, there is a lack of in-depth consideration of individual user characteristics, such as disease stage, complications, and lifestyle habits, resulting in a lack of targeted suggestions.

[0007] Third, the system lacks effective quality monitoring and continuous optimization mechanisms. Existing solutions typically lack a complete feedback loop, making it impossible to self-optimize based on actual user feedback. Furthermore, the recommendation generation process lacks transparency and traceability, making it difficult for medical professionals to verify its scientific validity, thus reducing the system's credibility and clinical acceptance. Summary of the Invention

[0008] The purpose of this invention is to propose a personalized health management method and system for diabetes based on retrieval-enhanced generation (RAG), aiming to solve the problems of model illusion, knowledge lag, insufficient personalization and lack of systematic quality control mechanism in the prior art, and improve the accuracy, individual adaptability and reliability of health management recommendations.

[0009] To achieve the above objectives, this invention discloses a personalized diabetes health management method based on Retrieval Enhancement Generation (RAG), characterized by the following steps: Step 1: Collect multi-source heterogeneous diabetes health management data, clean and structure it, and construct a knowledge base document by segmentation and structural indexing; Step 2: Drive a context-aware retrieval enhancement engine based on user profiles, execute a U-Retrieval graph retrieval mechanism, and obtain refined answers; Step 3: Generate personalized health Q&A content based on the retrieval results, integrate a precise source tracing mechanism, and output credible responses with accompanying evidence sources; Step 4: Drive continuous system optimization by collecting multi-dimensional feedback data to form a closed-loop learning framework.

[0010] Preferably, in Step 1, the block processing includes: assigning a globally unique identifier and sorting number to each text block, and establishing associations between text blocks to preserve the original document structure. The structure index includes a vector index and a fast query index.

[0011] Preferably, Step 2 includes a query intent identification and semantic expansion sub-step: using natural language processing technology to identify the user's query intent and key semantic entities, and based on the query intent, retrieving relevant concepts or synonyms from the knowledge base to semantically expand the original query, so as to improve the relevance of the retrieval.

[0012] Preferably, in Step 2, the U-Retrieval graph retrieval mechanism includes a top-down retrieval stage and a bottom-up refinement stage. The top-down retrieval stage starts from high-level abstract concept nodes in the knowledge graph, combines user query intent and personalized profiles, and traverses the graph hierarchy level by level to locate the specific knowledge subgraph and associated underlying evidence set most relevant to the user's current context. The bottom-up refinement stage involves contextually associating and integrating the preliminary answer generated based on the underlying evidence set with higher-level abstract medical concepts and general treatment principles in the knowledge graph, logically refining and contextualizing the answer to form the refined answer.

[0013] More preferably, the top-down retrieval stage uses a cosine similarity calculation method that integrates hierarchical weights for node localization, and the similarity calculation formula is as follows: ,in, Represents the user query vector. Represents the first in a knowledge graph Vector representation of layer nodes, Hierarchical weight coefficient.

[0014] More preferably, the bottom-up refining stage assesses the value of information integration through information entropy and guides the refining process based on the assessment results. The information entropy formula is: ,in This represents specific medical concepts, terms, or clinical decision rules derived from knowledge graph nodes. This indicates its relevance weight in the current context.

[0015] Preferably, in Step 3, the precise tracing mechanism includes: an evidence identification step: assigning a unique evidence identifier to the text evidence block retrieved from the knowledge base and associating it with its source metadata; an assertion-evidence mapping step: when generating an answer, establishing a mapping relationship between each medical assertion in the answer and one or more of the evidence identifiers supporting it, and calculating a confidence score; and an interactive display step: providing an interactive tracing information display function based on the mapping relationship in the user interface.

[0016] Preferably, in Step 4, the closed-loop learning framework models and optimizes system parameters by constructing and minimizing a loss function containing a regularization term, and dynamically drives the optimization process based on multi-dimensional feedback data such as user interaction behavior, changes in health management, and explicit satisfaction. The regularization term can employ L2 regularization, and the regularization coefficient is dynamically adjusted through a strategy combining cross-validation and Bayesian optimization.

[0017] The present invention has the following beneficial effects.

[0018] First, this invention achieves a two-way closed loop from personalized guided retrieval to medical logic refinement through the U-Retrieval graph retrieval mechanism, fundamentally curbing the "illusion" problem of large language models and generating health recommendations that are both accurate and logical.

[0019] Second, this invention establishes a complete and precise traceability chain, from evidence identification and claim binding to interactive presentation, making every suggestion verifiable and traceable, greatly enhancing the system's transparency and clinical credibility.

[0020] Third, this invention designs a closed-loop learning framework based on multi-dimensional feedback and adaptive optimization algorithms, enabling the system to continuously perceive performance gaps and optimize retrieval and generation strategies, thus ensuring the long-term effectiveness of management and the timeliness of knowledge.

[0021] Fourth, this invention deeply integrates user profiles and dynamic knowledge graphs, and through query understanding and semantic expansion, it achieves truly personalized information matching, providing precise and dynamic management solutions for diabetic patients with different characteristics. Attached Figure Description

[0022] Figure 1 This is a flowchart of the multi-source heterogeneous diabetes health management data collection and standardization processing in an embodiment of the present invention.

[0023] Figure 2 This is a flowchart of the user profile-driven context-aware retrieval enhancement engine (U-Retrieval graph retrieval mechanism) in an embodiment of the present invention.

[0024] Figure 3 This is a flowchart of the personalized health Q&A and push content generation (integrated with a precise traceability mechanism) in an embodiment of the present invention.

[0025] Figure 4 This is a flowchart of the feedback data-driven continuous optimization (closed-loop learning framework) process of the retrieval system in this embodiment of the invention.

[0026] Figure 5 This is a flowchart of the personalized health management algorithm for diabetes based on retrieval-enhanced generation (RAG) in this embodiment of the invention. Detailed Implementation

[0027] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0028] Example

[0029] This example will use a retrieval-enhanced generation (RAG)-based personalized health management method for diabetes as an example to specifically describe the technical implementation process of the present invention.

[0030] The method and process are as follows Figure 1 As shown, it includes the following steps:

[0031] Step 1: Collect and standardize multi-source heterogeneous diabetes health management data as input data.

[0032] Multi-source heterogeneous diabetes health management data includes clinical guidelines, medical literature, health education resources, dietary, exercise, and drug knowledge bases, as well as users' personal dynamic health data. Other similar health data resources with standardized formats, such as electronic health records, wearable device health monitoring data, and health questionnaires, all have similar structured characteristics and application scenarios and can be processed using the same methods.

[0033] Standardized processing methods, such as Figure 2 As shown, it specifically includes...

[0034] (1) Data cleaning and structured storage: Construct a unified data representation format. Data standardization processing must have the following characteristics: use a hierarchical storage structure for storage, including a four-level nested structure of document layer, topic layer, semantic block layer and evidence layer. Its specific requirements include globally unique document identifiers, standardized semantic block coding system, unified missing value marking specifications and a complete metadata recording system.

[0035] (2) Document segmentation and semantic boundary recognition: The knowledge base documents are segmented and natural language processing technology is used to identify the semantic boundaries in the documents (such as paragraph boundaries, topic boundaries and concept boundaries). Based on the principle of semantic integrity, strongly related content is retained as a whole text block. A globally unique identifier and sorting number are assigned to each text block, and the relationship between text blocks is established to save the document structure.

[0036] (3) Structure Index Construction: The structure index of the document is constructed based on text blocks and their relationships, including vector index and fast query index, which supports adjacent block queries. The index construction adopts a hierarchical index strategy: the first layer is the document-level index, the second layer is the topic-level index, the third layer is the semantic block-level index, and the fourth layer is the evidence-level index.

[0037] (4) Dynamic update mechanism: Establish an automated update mechanism for the knowledge base, continuously acquire the latest clinical guidelines and medical research results through web crawling technology, and dynamically update the knowledge base. The update frequency is set according to the timeliness requirements of the knowledge, with the update cycle for key guidelines not exceeding 3 months and the update cycle for general medical literature not exceeding 6 months.

[0038] Step 2: Design a user profile-driven context-aware retrieval enhancement engine to implement the U-Retrieval graph retrieval mechanism.

[0039] In this example, the core of the user profile-driven context-aware retrieval enhancement engine is the U-Retrieval graph retrieval mechanism, and its execution flow is as follows.

[0040] (1) Top-down retrieval stage: Starting from high-level abstract concept nodes in the knowledge graph (such as "principles of type 2 diabetes management" and "drug therapy"), and combining the user's query intent with personalized profiles (such as disease stage and complication status), the graph hierarchy is traversed level by level downwards to locate the specific knowledge subgraph most relevant to the user's current context. Similarity calculation uses the cosine similarity formula that incorporates hierarchical weights: ,in, Represents the user query vector. Let $h$ be the vector representation of a node at level $h$ in the knowledge graph. This refers to the hierarchical weight, used to adjust the importance of nodes at different abstract levels in the retrieval process.

[0041] (2) Collection of underlying evidence: Based on the specific knowledge subgraphs located, the system collects the underlying evidence fragments directly related to them, which come from authoritative guideline texts, medical literature and structured knowledge bases, to form an initial evidence set.

[0042] (3) Preliminary answer generation: The Large Language Model (LLM) is strictly limited to generating preliminary answers based only on the aforementioned collection of underlying evidence, effectively avoiding model illusion and ensuring the accuracy and traceability of the answers.

[0043] (4) Bottom-up Refinement Stage: The system then integrates from the bottom up along the hierarchical structure of the knowledge graph. The initial answer is contextually linked to higher-level abstract medical concepts and general treatment principles, supplementing necessary medical background information. The answer is logically refined and its contextual meaning improved to ensure the final response is both detailed and logically complete. The information integration value during the refinement process is evaluated using information entropy. ,in This represents specific medical concepts, terms, or clinical decision rules involved in information integration, and these elements originate from nodes in the knowledge graph. It indicates the relative importance or relevance weight of a concept or term in a specific context.

[0044] Step 3: Generate personalized health Q&A and push content based on the search results, and integrate a precise traceability mechanism.

[0045] In the "low-level evidence collection" phase of the U-Retrieval process, the system assigns a globally unique evidence identifier to each text evidence block retrieved and input into the Large Language Model (LLM), and associates it with detailed metadata. This metadata includes: knowledge source type, source name, version number, publication date, publisher information, and specific location information.

[0046] When generating preliminary and refined answers, LLM is configured to simultaneously output a structured claim-evidence mapping table. This mapping table contains the following fields: (1) Claim Identifier: A unique identifier for each independent medical claim in the corresponding answer text. (2) List of Supporting Evidence Identifiers: An ordered set of one or more evidence identifiers that support the claim. (3) Confidence Score: A quantitative confidence value calculated based on the authority, timeliness, and relevance of the evidence source to the claim.

[0047] Step 4: Drive continuous optimization of the retrieval system through feedback data to form a closed-loop learning framework.

[0048] The closed-loop learning framework continuously records user interaction behavior, changes in health management, and satisfaction feedback to construct optimization signals. When the system identifies a retrieval gap or insufficient answers, it automatically triggers knowledge base updates and retrieval model retraining. The optimization objective is formalized as minimizing the retrieval error function. ,in, For the desired output, For model prediction, For regularization terms, This is a regularization coefficient used to improve generalization ability and ensure continuous improvement of the system in real-world scenarios. The regularization coefficient... It is a positive real number greater than or equal to 0, and its specific value is determined by the balance between the required model generalization ability and the training set fit. Generally speaking, The larger the value, the stronger the penalty for model complexity, which helps to prevent overfitting; The smaller the value, the more the model tends to fit the training data.

[0049] This framework is also applicable to optimizing the path selection strategy of the U-Retrieval mechanism in knowledge graphs. The regularization term of the closed-loop learning framework adopts a ridge regression strategy, specifically in the form of: ,in, To retrieve the model and generate the set of trainable parameters for the model. It is a single parameter.

[0050] The optimization of L2 regularization parameters and the tuning of hyperparameter $\lambda$ follow the process below.

[0051] (1) Formalization of the optimization objective: The problem of minimizing the retrieval error function is formalized as follows: ,in, The value of is a hyperparameter for regularization strength, and its value determines the severity of the penalty for model complexity.

[0052] (2) Parameter optimization solution: The objective function is minimized using an iterative algorithm based on gradient descent. Specifically, in each iteration, the loss function is calculated. Regarding parameters gradient: Then update the parameters in the opposite direction of the gradient: ,in, The learning rate controls the step size for parameter updates. This process is repeated iteratively until the model converges or a predetermined number of iterations is reached, thereby obtaining the optimal comprehensive loss. Minimize model parameters .

[0053] (3) Hyperparameters The optimization mechanism employs a strategy combining cross-validation and Bayesian optimization to dynamically determine the optimal solution. Values. This includes: Cross-validation: Dividing historical interaction data into training, validation, and test sets. Solving the minimization problem on the training set, and evaluating different values ​​on the validation set. The model's performance is assessed by comprehensively considering retrieval accuracy, user satisfaction, and clinical rationality scores. Bayesian optimization: [The text abruptly ends here, likely due to an incomplete sentence or missing information.] The optimization process is modeled as a black-box function optimization problem. A Gaussian process surrogate model is used to efficiently explore the parameter space, finding the optimal solution that minimizes the loss on the validation set with fewer iterations. value.

[0054] Online learning and adaptive adjustment: Regularization strength after system deployment It is not static. The closed-loop learning framework continuously monitors the model's generalization performance metrics. When signs of model performance degradation are detected, the system automatically triggers a retraining process and readjusts the model based on the latest data distribution. This value ensures that the model always maintains an optimal generalization state.

[0055] Through the above implementation steps, the personalized health management method for diabetes in this example achieves accurate retrieval and generation based on user profiles, effectively solving core problems such as model "illusion", knowledge lag, insufficient personalization and lack of systematic quality control mechanisms, and providing diabetic patients with a safe and personalized health management plan.

[0056] In some embodiments, the present invention provides a personalized diabetes health management system based on retrieval enhancement, the system comprising a data acquisition and standardization module, a context-aware retrieval enhancement engine module, a personalized content generation and tracing module, and a closed-loop learning optimization module. These modules work collaboratively to achieve a complete processing flow from multi-source heterogeneous data to personalized health recommendations.

[0057] The data acquisition and standardization module is configured as follows: a hierarchical storage architecture is constructed, including a four-level nested structure of document layer, topic layer, semantic block layer, and evidence layer; an automated crawler technology is used to regularly crawl authoritative medical guidelines and research results, with the update cycle dynamically adjusted according to the timeliness of the content, and the update interval of key clinical guidelines not exceeding 3 months; standardized preprocessing is performed on the ingested data, including missing value handling, outlier detection, and format unification, to ensure the data quality of subsequent processing.

[0058] The context-aware retrieval enhancement engine module is configured to: implement a U-Retrieval graph retrieval mechanism, integrating user profiles and knowledge graph structures; adopt a top-down and bottom-up bidirectional retrieval strategy, in which the top-down stage locates relevant knowledge subgraphs based on the similarity calculation formula of the fusion hierarchical weights, and in the bottom-up stage, refines the answers through an information entropy evaluation mechanism to ensure that the generated content meets individual needs while maintaining the integrity of medical logic; wherein, the hierarchical weight coefficient is dynamically adjusted according to the user's disease stage and the severity of complications, prioritizing the matching of knowledge content most relevant to the user's current health status.

[0059] The personalized content generation and tracing module is configured as follows: during the LLM generation process, a claim-evidence binding mechanism is enforced to associate each medical claim with the original evidence source; a fine-grained tracing presentation interface is constructed, adopting a non-invasive interactive design, allowing users to view the medical evidence behind the suggestions through simple operations; a confidence score is generated, comprehensively considering the authority, timeliness, and contextual relevance of the evidence source, to provide a credible reference for clinical decision-making.

[0060] The closed-loop learning optimization module is configured as follows: it collects multi-dimensional feedback data, including explicit user satisfaction scores, implicit interaction behavior data, and clinical indicator change trends; it establishes an automatic retrieval gap identification mechanism, which triggers knowledge base expansion and retrieval strategy optimization when users continuously ask follow-up questions or explicitly express dissatisfaction; and it adopts a parameter optimization framework based on L2 regularization, combined with cross-validation and Bayesian optimization techniques, to dynamically adjust the regularization strength parameter to ensure a balance between model generalization ability and fitting accuracy.

Claims

1. This invention discloses a personalized health management method for diabetes based on retrieval-enhanced generation (RAG), characterized in that, Includes the following steps: Step (1): Collect multi-source heterogeneous diabetes health management data, clean and structure it, and construct a knowledge base document by segmentation and structural indexing; Step (2): Drive the context-aware retrieval enhancement engine based on user profile, execute the U-Retrieval graph retrieval mechanism, and obtain refined answers; Step (3): Generate personalized health Q&A content based on the retrieval results, integrate the accurate source tracing mechanism, and output credible responses with accompanying evidence sources; Step (4): Drive the continuous optimization of the system by collecting multi-dimensional feedback data to form a closed-loop learning framework.

2. The method according to claim 1, characterized in that, In step (1), the block processing includes: assigning a unique identifier and sequence number to each text block, and establishing the association between text blocks to save the document structure.

3. The method according to claim 1, characterized in that, Step (2) includes a query intent identification and semantic expansion sub-step, which is used to retrieve relevant concepts or synonyms from the knowledge base based on the identified query intent to expand the user query.

4. The method according to claim 1, characterized in that, In step (2), the U-Retrieval graph retrieval mechanism includes a top-down retrieval stage and a bottom-up refinement stage; the top-down retrieval stage is used to locate relevant knowledge subgraphs and associated underlying evidence sets by starting from the high-level concept nodes of the knowledge graph and combining the user's query intent and profile. The bottom-up refinement stage is used to associate and integrate the preliminary answer generated based on the underlying evidence set with higher-level medical concepts in the knowledge graph to form the refined answer.

5. The method according to claim 4, characterized in that, The top-down retrieval stage uses a similarity calculation method that integrates hierarchical weights for node localization.

6. The method according to claim 4, characterized in that, The bottom-up refining stage assesses the value of information integration through information entropy and guides the refining process based on the assessment results.

7. The method according to claim 1, characterized in that, In step (3), the precise tracing mechanism includes: assigning evidence identifiers to text evidence blocks retrieved from the knowledge base; establishing a mapping relationship between medical claims in the generated answer and the evidence identifiers; and providing an interactive tracing information display based on the mapping relationship.

8. The method according to claim 1, characterized in that, In step (4), the closed-loop learning framework optimizes system parameters by minimizing the loss function containing regularization terms and dynamically adjusts the optimization process based on user feedback data.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.