Health guidance suggestion generation method and system integrating risk prediction and evidence-based retrieval

By constructing a cross-domain integrated health data platform and adopting a hybrid model of XGBoost and Transformer and retrieval enhancement generation technology, the problems of multi-source data fusion and interpretability in chronic disease risk prediction and health guidance suggestion generation are solved, realizing personalized and reliable health guidance suggestion generation and real-time closed-loop optimization.

CN120895174APending Publication Date: 2025-11-04ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511033310.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

Existing technologies face challenges in fusion of multi-source heterogeneous data for chronic disease risk prediction, lack interpretability of prediction models, fluctuate credibility of health guidance recommendations, suffer from insufficient contextual consistency in systematic service frameworks, lack of real-time closed-loop, and have high security and auditing requirements.

Method used

A cross-domain health data integration platform is constructed, which adopts a hybrid model of XGBoost and Transformer for risk prediction. Combined with retrieval enhancement generation technology and a four-dimensional quality assessment system, an event-driven adaptive learning closed loop is established to achieve multi-dimensional assessment and optimization.

Benefits of technology

It improves the accuracy and interpretability of chronic disease risk prediction, and the generated recommendations are evidence-based, reliable, personalized, and seamless, forming a real-time closed loop that meets medical compliance and quality management requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120895174A_ABST
    Figure CN120895174A_ABST
Patent Text Reader

Abstract

The invention discloses a health guidance suggestion generation method and system fusing risk prediction and evidence-based retrieval, and the method comprises the steps: carrying out the access of original multi-source health data through a data access layer, and carrying out the grading processing of the access data through a data processing layer through a feature project, performing time alignment on the multi-source health data after feature engineering processing through a data fusion layer to obtain fused health data, and performing hash encryption storage on the fused health data; on the basis of the fused health data, performing chronic disease mixed risk prediction by constructing a mixed risk prediction model to obtain a chronic disease illness probability; the big language model carries out dynamic evidence-based retrieval on the retrieval enhancement generation database based on prompt words, and personalized and evidence-based health guidance suggestions are generated for the patient; and performing multi-dimensional evaluation on the health guidance suggestions generated by the large language model, and realizing automatic re-optimization. According to the method, a personalized, highly reliable and traceable intelligent health guidance scheme can be generated by constructing a prediction-intervention closed loop.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart healthcare and health management technology, specifically relating to a method and system for generating health guidance suggestions that integrates risk prediction and evidence-based retrieval. Background Technology

[0002] Chronic disease prevention and control has become a major challenge in the global public health field. Its long-term nature and complexity require health management technologies to achieve a closed-loop combination of accurate prediction and personalized intervention. Current technological systems face significant bottlenecks in three areas: chronic disease risk prediction, generation of health guidance recommendations, and a systematic service framework, which restricts the effectiveness of large-scale application.

[0003] Currently, chronic disease prediction technologies mainly include statistical models, machine learning models, and deep time series models. Traditional statistical models such as logistic regression and Cox regression rely on a small number of static features and are suitable for small-scale data, but they struggle to capture nonlinearity and cross-time-domain changes, failing to meet the needs of complex chronic disease prediction. Machine learning models such as gradient boosting trees and random forests can automatically uncover feature interactions and improve prediction accuracy, but their interpretability and cross-institutional generalization capabilities are limited, hindering their widespread clinical application. Deep time series models such as convolutional-temporal networks and Transformers can directly process high-frequency monitoring signals and long-term medical records, possessing end-to-end learning capabilities, but their training and inference costs are high, and they have stringent requirements for data integrity. Furthermore, inconsistent encoding of data from physical examinations, outpatient and emergency departments, and wearable devices, coupled with difficulties in cross-center sharing, leads to high manual costs for feature engineering, further hindering the development of chronic disease prediction technologies. Therefore, the main pain points in current chronic disease prediction lie in the difficulty of fusing multi-source heterogeneous data, significant differences in sampling frequencies and encoding systems, and complex data integration; simultaneously, the decision-making mechanisms of deep models are opaque, lacking interpretability, which affects clinical acceptance.

[0004] In terms of health guidance and suggestion generation technology, existing rule / template-based systems hardcode clinical guidelines into if-then rules, resulting in traceable output but limited coverage and high maintenance costs. Knowledge graph question answering, on the other hand, uses graph databases to retrieve medical knowledge and then combines answers, ensuring consistency, but its natural language expression is limited. Large Language Models (LLMs) possess powerful language understanding and generation capabilities, capable of outputting complete diet, exercise, and medication plans in one go, but they are prone to creating the "illusion" of not conforming to evidence-based medicine. Retrieval-enhanced generation (RAG) dynamically retrieves literature or guidelines during the reasoning stage, concatenating evidence with user context before feeding it to LLM for generation, significantly reducing errors, but lacking a unified quality control and feedback mechanism. Therefore, the main pain points of current health guidance and suggestion generation include: fluctuating professional credibility; pure LLM output lacks evidence binding, and even RAG requires evidence quality screening; insufficient personalized coverage, with generated text potentially omitting key features such as patient complications and allergy history; and a lack of an evaluation system, with the industry lacking a common indicator for quickly and objectively measuring the quality of health suggestions, making automatic iteration difficult.

[0005] Furthermore, in integrated agent framework technologies, prediction and generation are typically independent services, linked by scheduled tasks or manual triggers, failing to meet real-time and traceability requirements. While microservices or REST architectures decompose functions, the lack of unified semantic caching and event orchestration leads to context mismatch. Follow-up feedback is often written to offline repositories, making it difficult to drive synchronous iteration of models and recommendations in a closed loop. Therefore, the pain points of current systematic service frameworks lie in insufficient context consistency, with prediction results, explanatory information, and retrieval evidence easily distorted during transmission between services; the lack of real-time closed loops, preventing health indicator updates from immediately triggering risk reassessment and recommendation updates; and high security and auditing requirements, as patient privacy data flows across services, necessitating least privilege and full traceability.

[0006] Therefore, in order to improve the overall level of chronic disease health management, further research is needed to achieve a closed-loop combination of accurate prediction of chronic disease risks, scientific generation of personalized health guidance and recommendations, and efficient collaborative operation of a systematic service framework. Summary of the Invention

[0007] In view of the above, the purpose of this invention is to provide a method and system for generating health guidance recommendations that integrates risk prediction and evidence-based retrieval. It constructs a cross-domain integrated health data platform through a data access layer, a data processing layer, and a data fusion layer, achieving standardized governance and real-time updates of heterogeneous structured, semi-structured, and time-series data. It integrates XGBoost and Transformer to develop a chronic disease risk prediction model that balances performance and interpretability, revealing key risk factors through attention visualization, SHAP values, and other technologies. It combines integrated health data and chronic disease prevalence probabilities to guide recommendation generation, simulating the preventative thinking of medical personnel, and integrating the model... The predicted potential risks are automatically transformed into forward-looking, personalized prevention and control recommendations, moving the automated intervention point forward, opening up the "prediction-recommendation" pathway, and empowering proactive health management. By integrating RAG technology with a four-dimensional quality assessment system, the generated recommendations are ensured to have reliable medical evidence and meet high standards in terms of professionalism, personalization, and fluency, creating an evidence-based, reliable, and multi-dimensional personalized recommendation generation process. Finally, a full-link event-driven adaptive learning closed loop from "data update" to "feedback learning" is established, which automatically re-optimizes based on multi-dimensional assessment results, drives continuous system optimization, and ensures that the entire process is auditable and traceable.

[0008] To achieve the above-mentioned objectives, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for generating health guidance suggestions that integrates risk prediction and evidence-based retrieval, comprising the following steps: The data access layer receives raw multi-source health data, the data processing layer performs hierarchical processing on the received data using feature engineering, and the data fusion layer performs time alignment on the feature-engineered multi-source health data to obtain fused health data, which is then stored using hash encryption. Based on integrated health data, a hybrid risk prediction model including XGBoost and Transformer is constructed to predict the probability of chronic disease prevalence. Based on integrated health data and the probability of chronic disease prevalence, a prompt word and a search enhancement generation database are constructed respectively. The large language model performs dynamic evidence-based retrieval of the search enhancement generation database based on the prompt words to generate personalized and evidence-based health guidance suggestions for patients. The health guidance suggestions generated by the large language model are evaluated from multiple dimensions, including professionalism, personalization, fluency, and appropriate tone, and are automatically revised and optimized based on the results of the multi-dimensional evaluation.

[0009] Preferably, the step of accessing the raw multi-source health data through the data access layer includes: The data access layer enables unified access and integration of multi-source heterogeneous health data, including patients' outpatient and emergency records and physical examination data, through APIs and databases.

[0010] Preferably, the step of performing hierarchical processing of the access data using feature engineering through the data processing layer includes: The K-nearest neighbor algorithm was used for multivariate imputation of missing values ​​in laboratory test items; For missing vital signs values, the median quantile was used as a substitute. Outliers in continuous variables were detected using the isolated forest algorithm, and then further verified by a whitelist marked by medical experts. For continuous features, standard deviation is performed; for data with dispersion exceeding the threshold, Windsor truncation is performed at the 1% quantile. For discrete variables with multiple values, a hybrid strategy of one-hot encoding and target encoding is adopted to simultaneously preserve feature independence and predictive correlation.

[0011] Preferably, the step of obtaining the probability of chronic disease prevalence by constructing a hybrid risk prediction model including XGBoost and Transformer based on fused health data includes: The XGBoost model is used as the static feature processing branch and outputs the first chronic disease prevalence probability prediction result based on the fused health data. The Transformer model is used as the temporal feature processing branch and outputs the second chronic disease prevalence probability prediction result based on the fused health data. The first and second chronic disease prevalence probability prediction results are weighted and averaged to obtain the final chronic disease prevalence probability.

[0012] Preferably, after obtaining the probability of chronic disease, the risk classification result of the probability of disease is further output. When the probability of a certain chronic disease is >80%, it is marked as high risk; when the probability of disease is ≥50% and ≤80%, it is marked as medium risk; and when the probability of disease is <50%, it is marked as low risk. Finally, a structured risk label including the probability of chronic disease and risk classification is generated for subsequent prompt word construction and large language model generation.

[0013] Preferably, a hierarchical training and validation mechanism is adopted for XGBoost and Transformer. The dataset is randomly divided into training set, validation set and test set according to patient ID. A differential scheme is configured to use the logistic regression loss function for the XGBoost branch and the BCEWithLogits loss function for the Transformer branch. An early stop mechanism is introduced for iterative training. Meanwhile, the Tree-SHAP algorithm is used to generate key feature contribution values ​​for the XGBoost branch, and the Integrated Gradients and Attention Roll-out fusion technology is used to generate heatmaps to locate key abnormal waveforms for the Transformer branch, so as to achieve clinically interpretable analysis of the prediction results.

[0014] Preferably, the construction of the retrieval enhancement generation database includes: Regular incremental collection of core knowledge sources, including PubMed academic abstracts, WHO and National Health Commission treatment guidelines, and drug regulatory instructions, is conducted and converted into unstructured documents. The collected unstructured documents are then segmented and vectorized to establish two retrieval systems: one is dense retrieval, which uses FAISS's HNSW algorithm for efficient similarity retrieval of vectors; the other is sparse retrieval, which uses the BM25 algorithm to build a keyword inverted index to retrieve medical professional terms.

[0015] Preferably, the large language model performs dynamic evidence-based retrieval of the database based on prompt words to enhance retrieval, including: For each patient, personalized query vectors are automatically generated based on their health records and major risk factors, using prompts. Dense and sparse searches are then performed sequentially to obtain selected literature fragments. The selected literature fragments, sources, relevant risk factors, and search time information are then uniformly packaged into a structured data package for direct access and tracing by the large language model.

[0016] Preferably, the health guidance suggestions generated by the large language model undergo a multi-dimensional evaluation, including professionalism, personalization, fluency, and appropriate tone, and are automatically revised and optimized based on the multi-dimensional evaluation results, including: A four-dimensional scoring system, including professionalism, personalization, fluency, and appropriate tone, is constructed to automatically evaluate the health guidance suggestions generated by the large language model. If the total score is lower than the first threshold or the score of any dimension is lower than the second threshold, the automatic rewriting process is initiated. Suggestions for any dimension whose scores are below the second threshold are stored in the model performance review pool as adversarial examples for subsequent training. A multi-expert panel was formed to independently score each generated suggestion. The Pearson correlation coefficient was used to calculate the correlation between the system's automatic score and the expert average score. The correlation was verified on the total score and each dimension. If the correlation between all dimensions and the total score was greater than or equal to the first correlation threshold, the verification was passed. If the correlation of any dimension was less than the second correlation threshold, it was marked as a dimension that needed to be optimized first.

[0017] Secondly, embodiments of the present invention also provide a health guidance suggestion generation system that integrates risk prediction and evidence-based retrieval, implemented using the above-mentioned health guidance suggestion generation method that integrates risk prediction and evidence-based retrieval, including: a multi-source data integration module, a hybrid risk prediction module, a retrieval enhancement generation module, and a quality assessment and optimization module; The multi-source data integration module is used to access the original multi-source health data through the data access layer, perform hierarchical processing of the accessed data using feature engineering through the data processing layer, and perform time alignment on the multi-source health data after feature engineering processing through the data fusion layer to obtain fused health data and store it with hash encryption. The hybrid risk prediction module is used to predict the probability of chronic diseases by constructing a hybrid risk prediction model including XGBoost and Transformer based on fused health data. The search enhancement generation module is used to construct prompt words and search enhancement generation database based on integrated health data and the probability of chronic disease prevalence, respectively. The large language model performs dynamic evidence-based retrieval of the search enhancement generation database based on prompt words to generate personalized and evidence-based health guidance suggestions for patients. The quality assessment and optimization module is used to evaluate the health guidance suggestions generated by the large language model from multiple dimensions, including professionalism, personalization, fluency, and appropriate tone, and to automatically re-evaluate and optimize them based on the results of the multi-dimensional assessment.

[0018] Compared with the prior art, the beneficial effects of the present invention include at least the following: (1) Eliminate data silos and improve integration efficiency: Based on the design of data access layer + data processing layer + data fusion layer, the system can quickly complete standardized processing and release unified features after data is generated. It no longer relies on a large number of offline scripts, nor does it require in-depth transformation of various business systems, thereby significantly reducing the access and maintenance costs of heterogeneous medical systems.

[0019] (2) Improve the accuracy of risk prediction and maintain interpretability: The design of the XGBoost and Transformer dual-branch hybrid model utilizes the non-linear expression ability of gradient boosting tree for static indicators and the ability of Transformer to capture long time series data. While improving the overall performance, the model outputs a clear risk factor ranking by means of Tree-SHAP, Integrated Gradients and AttentionRoll-out, enabling medical staff to quickly verify the basis of the model and deepen their trust.

[0020] (3) Achieving the leap from “risk prediction” to “proactive intervention”: The system can simulate the diagnosis and treatment logic of medical staff, analyze the health data of those who have not yet been diagnosed in depth to identify potential problems in the risk prediction model, explore potential disease risks, and transform them into specific and feasible early prevention and control suggestions.

[0021] (4) The generated suggestions are evidence-based, reliable, personalized and fluent: The RAG enhanced generation process first introduces evidence-based literature and clinical guidelines, and then uses four-dimensional quality assessment (professionalism, personalization, fluency and appropriate tone) to check, which can effectively reduce the "illusion" phenomenon of large language models, ensure that the generated content matches the patient characteristics and is expressed naturally, and reduce the burden of manual review.

[0022] (5) Real-time closed-loop and continuous evolution capability: The event-driven architecture links "data update - risk assessment - suggestion generation - quality assessment - feedback learning" into a closed loop. If the total score of health guidance suggestions is low, it will trigger the regeneration of suggestions and provide low-quality suggestions to the feedback module for further optimization. Subsequent follow-up results will be automatically fed back into the model training queue to achieve online adaptive optimization. In addition, the end-to-end audit and evidence hash chain design ensure the traceability of suggestion sources and meet the requirements of medical compliance and quality management. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart illustrating the method for generating health guidance suggestions that integrates risk prediction and evidence-based retrieval, as provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the framework of the health guidance suggestion generation method that integrates risk prediction and evidence-based retrieval provided in the embodiments of the present invention; Figure 3 This is a schematic diagram illustrating examples of output data from each stage provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of the health guidance suggestion generation system that integrates risk prediction and evidence-based retrieval provided in the embodiments of the invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of protection of this invention.

[0026] The inventive concept of this invention is as follows: Addressing the problems in existing technologies such as insufficient fusion of multi-source health data, difficulty in balancing accuracy and interpretability in prediction models, failure to form an effective management loop between prediction and intervention, and lack of reliability in generative health recommendations, this invention provides a method and system for generating health guidance recommendations that integrates risk prediction and evidence-based retrieval. It achieves deep fusion of multi-source data through hierarchical feature engineering and time alignment technology, employs an integrated XGBoost and Transformer model to balance prediction accuracy and feature interpretability, constructs a dynamic evidence-based retrieval database to form a prediction-intervention closed loop, and introduces a multi-dimensional evaluation mechanism to optimize the reliability of health recommendations, ultimately generating personalized, traceable, and intelligent health guidance solutions.

[0027] like Figure 1 and Figure 2 As shown in the embodiment, a method for generating health guidance suggestions that integrates risk prediction and evidence-based retrieval is provided, including the following steps: S1: The original multi-source health data is accessed through the data access layer, the accessed data is processed in a hierarchical manner using feature engineering through the data processing layer, and the multi-source health data after feature engineering is time-aligned through the data fusion layer to obtain fused health data and stored with hash encryption.

[0028] In this embodiment, the system is divided into three layers: a data access layer, a data processing layer, and a data fusion layer. The data access layer connects outpatient and emergency room data, physical examination data, and other external data via APIs and databases. The data processing layer is responsible for identifying and processing outliers and missing values, and for quantifying qualitative variables. The data fusion layer integrates the raw multi-source data and the feature-engineered multi-source data for use by subsequent modules.

[0029] S1.1, through the data access layer, integrates and accesses multi-source heterogeneous health data, including patients' outpatient and emergency records, physical examination data and other external data, through APIs and databases.

[0030] S1.2, the data is subjected to feature engineering and hierarchical processing through the data processing layer, including: The K-nearest neighbor algorithm was used for multivariate imputation of missing values ​​in laboratory test items; For missing vital signs values, the median quantile was used as a substitute. Outliers in continuous variables were detected using the isolated forest algorithm, and then further verified by a whitelist marked by medical experts. For continuous features, standard deviation is performed; for data with dispersion exceeding the threshold, Windsor truncation is performed at the 1% quantile. For discrete variables with multiple values, a hybrid strategy of one-hot encoding and target encoding is adopted to simultaneously preserve feature independence and predictive correlation.

[0031] S1.3 uses a data fusion layer to perform time-series alignment and encryption of data, and uses SHA-256 encrypted hash of patient identity identifiers to achieve cross-system spatiotemporal association of outpatient and emergency records and physical examination data.

[0032] S2, based on integrated health data, uses a hybrid risk prediction model including XGBoost and Transformer to predict the probability of chronic disease prevalence.

[0033] In this embodiment, hypertension, diabetes, cardiovascular and cerebrovascular diseases, and chronic kidney disease are identified as the four most common and harmful chronic diseases affecting the largest number of patients. For patients who are not yet diagnosed, to extract disease risk from health data and generate more predictive prevention and treatment recommendations, this embodiment employs an integrated approach combining algorithms such as XGBoost and Transformer to construct an efficient risk prediction framework that balances accuracy and interpretability. Key risk factors are revealed through techniques such as SHAP values ​​and attention visualization, achieving high accuracy and interpretability, and improving clinical acceptance. The output of this module, along with the fused health data, serves as the input to the next module.

[0034] S2.1, Design of a dual-branch hybrid architecture for a hybrid risk prediction model.

[0035] The static feature processing branch of the XGBoost model uses initial parameters n_estimators=300, max_depth=6, and learning_rate=0.05. Hyperparameters are optimized through grid search, and a stopping criterion is set where the validation set AUC gain consistently falls below 0.002. The loss function is set as follows: , in, Indicates the first The first patient's Round of predicted values, Represents the true value. Indicates the total number of patients. This represents the binary cross-entropy loss function. Indicates the round index, This represents a regularization term to prevent overfitting.

[0036] The Transformer model's temporal feature processing branch constructs a 3-layer Encoder structure, configured with a hidden dimension of 256, 8 multi-head attention mechanisms, and dropout of 0.1 to prevent overfitting. The parameter configuration is optimized through grid search iterations, and the loss function is set as follows: , in, Indicates the first Predicted values ​​for each patient.

[0037] The outputs of the two branches are the prediction results of the first chronic disease prevalence probability. (XGBoost prediction) and prediction results of the probability of developing second chronic diseases (Transformer prediction), the final weighted average of the prediction results is: , in, Weight For weight optimization, Bayesian optimization is employed, with the objective function being to maximize the AUC on the validation set, thereby dynamically calculating the weight coefficients. , .

[0038] After obtaining the probability of chronic disease, the system further outputs the risk classification results of the probability of disease. When the probability of a certain chronic disease is >80%, it is marked as high risk; when the probability is ≥50% and ≤80%, it is marked as medium risk; and when the probability is <50%, it is marked as low risk. Finally, a structured risk label including the probability of chronic disease and risk classification is generated (e.g., {diabetes: high risk, cardiovascular disease: low risk}), rather than a simple probability value. This provides clear input for subsequent prompt word construction and the generation of personalized suggestions by the large language model.

[0039] S2.2, Layered training and verification mechanism.

[0040] A stratified training and validation mechanism was adopted for XGBoost and Transformer. The dataset was randomly divided into training set (70%), validation set (15%), and test set (15%) by patient ID. A differential scheme was configured to use the logistic regression loss function for the XGBoost branch and the BCEWithLogits loss function for the Transformer branch. An early termination criterion was set if the validation set AUC did not improve for 10 consecutive epochs.

[0041] S2.3, Clinical Interpretability System.

[0042] For the XGBoost branch, the Tree-SHAP algorithm is used to generate key feature contribution values. For the Transformer branch, the Integrated Gradients and Attention Roll-out fusion technology is used to generate heatmaps to locate key abnormal waveforms, thereby enabling clinically interpretable analysis of the prediction results.

[0043] S3 constructs a prompt word and a search enhancement generation database based on integrated health data and the probability of chronic disease prevalence, respectively. The large language model performs dynamic evidence-based retrieval of the search enhancement generation database based on the prompt words to generate personalized and evidence-based health guidance suggestions for patients.

[0044] In this embodiment, dynamic prompts are constructed based on integrated health data and the probability of chronic disease prevalence. Combined with search-enhanced generation (RAG) technology, a medical RAG dataset that meets the three core requirements of "accuracy, timeliness, and compliance" is constructed. Through a large language model, medical literature and guidelines are dynamically retrieved to generate personalized, evidence-based health guidance suggestions for patients, effectively reducing the "hallucination" phenomenon.

[0045] S3.1, Multi-source knowledge acquisition mechanism.

[0046] We incrementally collect three core knowledge sources each week: PubMed academic abstracts, WHO and National Health Commission treatment guidelines, and drug regulatory instructions. We convert these into unstructured documents using a PDF text parsing engine and establish a timestamp-based version control system, automatically generating a unique version identifier with each update.

[0047] S3.2, Preprocessing and Indexing Architecture.

[0048] The collected unstructured documents were segmented into sections of 512 tokens (approximately 400 characters each), with 64 tokens overlapping to ensure information coherence between sections. The Sentence-BERT (MiniLM-L6) model was used to transform each text section into a 768-dimensional vector for subsequent semantic retrieval. Based on this, two retrieval systems were established: a dense retrieval system using FAISS's HNSW algorithm (parameters M=32, ef=200) for efficient similarity retrieval of the vectors; and a sparse retrieval system using the BM25 (Best Matching 25) algorithm to build a keyword inverted index, improving the retrieval capability for medical terminology. By combining these two retrieval methods, both semantically relevant content and precise matching of medical keywords can be found.

[0049] S3.3, Dynamic Query Process.

[0050] For each patient, personalized query vectors are automatically generated based on their health records and key risk factors, using suggested keywords. The retrieval process consists of two steps: first, FAISS vector retrieval is used to initially filter out the 50 most relevant literature snippets; then, BM25 is used to refine the keyword ranking of these 50 snippets, selecting the top 10 most relevant ones. A similarity threshold (e.g., 0.45) is set to automatically filter out content with low relevance, ensuring the authority and relevance of the output results. Finally, the selected literature snippets, sources, relevant risk factors, retrieval time, and other information are uniformly packaged into a structured EvidenceReady data package for easy direct access and tracing by subsequent large-scale models. Examples of output data at each stage are provided. Figure 3 As shown.

[0051] S4 performs multi-dimensional evaluations of the health guidance suggestions generated by the large language model, including professionalism, personalization, fluency, and appropriate tone, and automatically re-evaluates and optimizes them based on the multi-dimensional evaluation results.

[0052] In this embodiment, multiple evaluation indicators such as professionalism, personalization, fluency, and appropriate tone are designed. Through an automatic closed-loop process of "scoring → rewriting → re-evaluation", the professionalism, reliability, and practicality of the generated suggestions are ensured.

[0053] S4.1, Local Medical Text Large Model Deployment and Fine-tuning.

[0054] First, a large medical text model was trained to perform multidimensional assessments. The main parameters are shown in Table 1 below.

[0055] Table 1 Training parameters for the large medical text model

[0056] During the fine-tuning phase, the large medical text model undergoes supervised learning on labeled data, with the loss function expressed as: , Among them, among them, This indicates a loss of professional rating. This indicates the loss in personalized ratings. This represents the loss of consistency between the tasks of professionalism and personalization (avoiding assessment conflicts; a highly personalized but medically inaccurate recommendation is dangerous, while a medically correct recommendation that completely disregards patient characteristics is ineffective). Weighting coefficients. Default 0.4 Default 0.4 The default value is 0.2.

[0057] S4.2, Four-Dimensional Scoring System.

[0058] Professionalism (weight 40%): This assesses whether the recommendations align with the latest evidence-based medicine guidelines, clinical consensus, and common medical knowledge, and whether they contain any "illusions" or misinformation. This dimension comprehensively evaluates the medical reliability of health recommendations, requiring that the generated recommendations strictly adhere to the core principles of the latest evidence-based medicine guidelines (such as the NCCN Cancer Standards of Care or the ADA Diabetes Guidelines), while also conforming to expert consensus and basic medical common sense formed in clinical practice, and fundamentally eliminating fabricated content ("illusions") or factual errors that are detached from medical evidence.

[0059] Personalization (weight 30%): Whether the assessment recommendations fully consider the patient's individual characteristics (such as age, gender, underlying diseases, complications, allergy history, medication use, lifestyle habits, risk prediction results, etc.) and whether they can effectively solve the patient's specific problems.

[0060] Fluency (weight 20%): Assess the grammatical and semantic coherence of the text, as well as whether the language style is appropriate for a medical context (e.g., professional, rigorous, empathetic, easy to understand, avoiding harshness, impoliteness, or overly colloquial language).

[0061] Appropriate tone (weight 10%): Avoid harsh / offensive expressions and use encouraging language (such as "suggest" or "may be considered" instead of "must" or "not allowed").

[0062] In this embodiment, as shown in Table 2, professionalism and personalization are evaluated using a previously trained large-scale medical text evaluation model, fluency is evaluated using a fluency and grammar evaluation model, and tone appropriateness is evaluated using a tone and intonation evaluation model based on rule base matching. The latter two are implemented using a large language model (such as GPT-4) interface combined with a professional prompt. Utilizing the language understanding capabilities of the large model enables more detailed semantic analysis, and compared to manual evaluation, the large model's evaluation results are more consistent and reproducible. It also enables large-scale, real-time automated evaluation and is easily adaptable to changes in different disease types and evaluation criteria. This scheme uses the same large-scale medical text evaluation model to evaluate independent professionalism and personalization, avoiding inconsistencies between models and mitigating the inertia problem of large models. Simultaneously, a dedicated fluency model independently evaluates fluency, avoiding interference from medical professionalism in language quality evaluation. For the tone appropriateness dimension, a hybrid scheme is designed, with the rule base handling explicit prohibited words and the large model handling complex emotional intonation.

[0063] Table 2 Evaluation models and threshold standards for different dimensions

[0064] S4.3, Automatic Rewrite Process.

[0065] If the total score is below the first threshold (8.5 points) or any dimension score is below the second threshold (8 points), the automatic rewriting process is initiated. The prompts will emphasize or supplement the low-scoring dimensions (e.g., "Please consider the patient's age and gender characteristics more," "Please consider the severity of the patient's disease"), and the system instructions will be re-injected into the large model for rewriting. A maximum of 3 automatic rewrites are allowed; if the result is still unsatisfactory, it will proceed to manual review.

[0066] S4.4, Feedback Integration.

[0067] Suggestions for any dimension scoring below the second threshold (6 points) are stored in the model performance review pool as adversarial examples for subsequent training. The saved content includes the original suggestion, score, failed dimension, number of rewrite attempts, and the text before and after revision.

[0068] S4.5, Evaluation and verification of effectiveness.

[0069] 1000 historical suggestion texts and their system scores were randomly selected. A three-person expert group independently scored each suggestion (professionalism, personalization, fluency, and tone, with a maximum score of 10). The correlation between the Pearson correlation coefficient calculation system score and the expert average score was verified on both the total score and each dimension. A score was considered passed if the correlation between all dimensions and the total score was greater than or equal to the first correlation threshold (0.9) (indicating high consistency and reliability in model evaluation). If the correlation of a dimension was less than the second correlation threshold (0.7), it was marked as a priority dimension for optimization of the scoring system. Low-scoring suggestions from the manual scoring were back-analyzed to improve the Prompt and dimension weight design.

[0070] S4.6 supports microservice architecture.

[0071] In this embodiment, an event-driven agent architecture is constructed, employing the Kafka / CloudEvents unified messaging protocol. Each agent's prediction, interpretation, retrieval, generation, quality inspection, and feedback are linked in milliseconds via a "subscribe-publish" mechanism. A shared context cache (key-value + vector two-layer structure) is introduced to ensure that patient profiles, risk markers, and evidence are embedded throughout the entire process, providing real-time access and version control. An automated quality inspection-rewrite-republish workflow is built-in to ensure that recommendations meet standards before push notifications and to feed subsequent user metrics back into the model training queue, forming a continuous learning loop. Layered encryption and operation logs meet medical compliance and security audit requirements.

[0072] Based on the same inventive concept, such as Figure 4 As shown, this embodiment of the invention also provides a health guidance suggestion generation system 400 that integrates risk prediction and evidence-based retrieval, including: a multi-source data integration module 410, a hybrid risk prediction module 420, a retrieval enhancement generation module 430, and a quality assessment and optimization module 440.

[0073] The multi-source data integration module 410 is used to access the original multi-source health data through the data access layer, perform hierarchical processing of the accessed data using feature engineering through the data processing layer, and perform time alignment on the multi-source health data after feature engineering processing through the data fusion layer to obtain fused health data and store it with hash encryption.

[0074] The hybrid risk prediction module 420 is used to predict the probability of chronic disease prevalence by constructing a hybrid risk prediction model including XGBoost and Transformer based on fused health data.

[0075] The retrieval enhancement generation module 430 is used to construct prompt words and retrieval enhancement generation databases based on integrated health data and chronic disease prevalence probabilities, respectively. The large language model performs dynamic evidence-based retrieval of the retrieval enhancement generation database based on prompt words to generate personalized and evidence-based health guidance suggestions for patients.

[0076] The quality assessment and optimization module 440 is used to conduct multi-dimensional assessments of the health guidance suggestions generated by the large language model, including professionalism, personalization, fluency, and appropriate tone, and to automatically re-evaluate and optimize based on the results of the multi-dimensional assessment.

[0077] It should be noted that the health guidance suggestion generation system that integrates risk prediction and evidence-based retrieval provided in the above embodiments belongs to the same inventive concept as the health guidance suggestion generation method that integrates risk prediction and evidence-based retrieval. For details of its specific implementation process, please refer to the embodiment of the health guidance suggestion generation method that integrates risk prediction and evidence-based retrieval, which will not be repeated here.

[0078] The specific embodiments described above illustrate the technical solution and beneficial effects of the present invention in detail. It should be understood that the above description is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, additions, and equivalent substitutions made within the scope of the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for generating health guidance recommendations that integrates risk prediction and evidence-based retrieval, characterized in that, Includes the following steps: The data access layer receives raw multi-source health data, the data processing layer performs hierarchical processing on the received data using feature engineering, and the data fusion layer performs time alignment on the feature-engineered multi-source health data to obtain fused health data, which is then stored using hash encryption. Based on integrated health data, a hybrid risk prediction model including XGBoost and Transformer is constructed to predict the probability of chronic disease prevalence. Based on integrated health data and the probability of chronic disease prevalence, a prompt word and a search enhancement generation database are constructed respectively. The large language model performs dynamic evidence-based retrieval of the search enhancement generation database based on the prompt words to generate personalized and evidence-based health guidance suggestions for patients. The health guidance suggestions generated by the large language model are evaluated from multiple dimensions, including professionalism, personalization, fluency, and appropriate tone, and are automatically revised and optimized based on the results of the multi-dimensional evaluation.

2. The method for generating health guidance recommendations that integrates risk prediction and evidence-based retrieval according to claim 1, characterized in that, The process of accessing raw multi-source health data through the data access layer includes: The data access layer enables unified access and integration of multi-source heterogeneous health data, including patients' outpatient and emergency records and physical examination data, through APIs and databases.

3. The method for generating health guidance recommendations that integrates risk prediction and evidence-based retrieval according to claim 1, characterized in that, The step of performing hierarchical processing of the accessed data using feature engineering through the data processing layer includes: The K-nearest neighbor algorithm was used for multivariate imputation of missing values ​​in laboratory test items; For missing vital signs values, the median quantile was used as a substitute. Outliers in continuous variables were detected using the isolated forest algorithm, and then further verified by a whitelist marked by medical experts. For continuous features, standard deviation is performed; for data with dispersion exceeding the threshold, Windsor truncation is performed at the 1% quantile. For discrete variables with multiple values, a hybrid strategy of one-hot encoding and target encoding is adopted to simultaneously preserve feature independence and predictive correlation.

4. The method for generating health guidance recommendations that integrates risk prediction and evidence-based retrieval according to claim 1, characterized in that, The method, based on fused health data, constructs a hybrid risk prediction model including XGBoost and Transformer to predict the probability of chronic disease prevalence, including: The XGBoost model is used as the static feature processing branch and outputs the first chronic disease prevalence probability prediction result based on the fused health data. The Transformer model is used as the temporal feature processing branch and outputs the second chronic disease prevalence probability prediction result based on the fused health data. The first and second chronic disease prevalence probability prediction results are weighted and averaged to obtain the final chronic disease prevalence probability.

5. The method for generating health guidance recommendations that integrates risk prediction and evidence-based retrieval according to claim 1 or 4, characterized in that, After obtaining the probability of chronic disease, the system further outputs the risk classification results of the probability of disease. When the probability of a certain chronic disease is >80%, it is marked as high risk; when the probability is ≥50% and ≤80%, it is marked as medium risk; and when the probability is <50%, it is marked as low risk. Finally, a structured risk label including the probability of chronic disease and risk classification is generated for subsequent prompt word construction and large language model generation.

6. The method for generating health guidance recommendations that integrates risk prediction and evidence-based retrieval according to claim 1 or 4, characterized in that, A hierarchical training and validation mechanism was adopted for XGBoost and Transformer. The dataset was randomly divided into training, validation and test sets according to patient ID. A differential scheme was configured to use the logistic regression loss function for the XGBoost branch and the BCEWithLogits loss function for the Transformer branch. An early stop mechanism was introduced for iterative training. Meanwhile, the Tree-SHAP algorithm is used to generate key feature contribution values ​​for the XGBoost branch, and the Integrated Gradients and Attention Roll-out fusion technology is used to generate heatmaps to locate key abnormal waveforms for the Transformer branch, so as to achieve clinically interpretable analysis of the prediction results.

7. The method for generating health guidance recommendations that integrates risk prediction and evidence-based retrieval according to claim 1, characterized in that, The construction of the retrieval enhancement generation database includes: Regular incremental collection of core knowledge sources, including PubMed academic abstracts, WHO and National Health Commission treatment guidelines, and drug regulatory instructions, is conducted and converted into unstructured documents. The collected unstructured documents are then segmented and vectorized to establish two retrieval systems: one is dense retrieval, which uses FAISS's HNSW algorithm for efficient similarity retrieval of vectors; the other is sparse retrieval, which uses the BM25 algorithm to build a keyword inverted index to retrieve medical professional terms.

8. The method for generating health guidance recommendations that integrates risk prediction and evidence-based retrieval according to claim 7, characterized in that, The large language model performs dynamic evidence-based retrieval of the database based on prompt words to enhance retrieval, including: For each patient, personalized query vectors are automatically generated based on their health records and major risk factors, using prompts. Dense and sparse searches are then performed sequentially to obtain selected literature fragments. The selected literature fragments, sources, relevant risk factors, and search time information are then uniformly packaged into a structured data package for direct access and tracing by the large language model.

9. The method for generating health guidance recommendations that integrates risk prediction and evidence-based retrieval according to claim 1, characterized in that, The health guidance suggestions generated by the large language model are evaluated from multiple dimensions, including professionalism, personalization, fluency, and appropriate tone. Based on the results of this multi-dimensional evaluation, automatic re-evaluation and optimization are implemented, including: A four-dimensional scoring system, including professionalism, personalization, fluency, and appropriate tone, is constructed to automatically evaluate the health guidance suggestions generated by the large language model. If the total score is lower than the first threshold or the score of any dimension is lower than the second threshold, the automatic rewriting process is initiated. Suggestions for any dimension whose scores are below the second threshold are stored in the model performance review pool as adversarial examples for subsequent training. A multi-expert panel was formed to independently score each generated suggestion. The Pearson correlation coefficient was used to calculate the correlation between the system's automatic score and the expert average score. The correlation was verified on the total score and each dimension. If the correlation between all dimensions and the total score was greater than or equal to the first correlation threshold, the verification was passed. If the correlation of any dimension was less than the second correlation threshold, it was marked as a dimension that needed to be optimized first.

10. A health guidance suggestion generation system integrating risk prediction and evidence-based retrieval, implemented using the health guidance suggestion generation method integrating risk prediction and evidence-based retrieval as described in any one of claims 1 to 9, characterized in that, include: The system includes a multi-source data integration module, a hybrid risk prediction module, a retrieval enhancement generation module, and a quality assessment and optimization module. The multi-source data integration module is used to access the original multi-source health data through the data access layer, perform hierarchical processing of the accessed data using feature engineering through the data processing layer, and perform time alignment on the multi-source health data after feature engineering processing through the data fusion layer to obtain fused health data and store it with hash encryption. The hybrid risk prediction module is used to predict the probability of chronic diseases by constructing a hybrid risk prediction model including XGBoost and Transformer based on fused health data. The search enhancement generation module is used to construct prompt words and search enhancement generation database based on integrated health data and the probability of chronic disease prevalence, respectively. The large language model performs dynamic evidence-based retrieval of the search enhancement generation database based on prompt words to generate personalized and evidence-based health guidance suggestions for patients. The quality assessment and optimization module is used to evaluate the health guidance suggestions generated by the large language model from multiple dimensions, including professionalism, personalization, fluency, and appropriate tone, and to automatically re-evaluate and optimize them based on the results of the multi-dimensional assessment.