Community hospital diet exercise intelligent recommendation system and method based on deep fusion of clinical data and storage medium thereof

CN122800293APending Publication Date: 2026-09-22NANJING TIANSU AUTOMATION CONTROL SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611251247.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-09-22

Smart Images

  • Figure CN122800293A_ABST
    Figure CN122800293A_ABST
Patent Text Reader

Abstract

The application discloses a community hospital diet exercise intelligent recommendation system and method based on deep fusion of clinical data and a storage medium thereof, relates to the technical field of intelligent medical treatment and artificial intelligence recommendation, and the system comprises: a data gathering module: connecting a community hospital information system, collecting basic signs, past medical history, examination and inspection and medication records, and generating a clinical data table through cleaning, complementing and normalization; a portrait construction module: extracting physiological indexes, disease codes, drug categories and risk stratification in the clinical data table, converting discrete feature codes, normalizing continuous features, and generating a health portrait vector through full connection neural network fusion; the application integrates multi-source clinical data to construct a health portrait, generates diet exercise safety constraints based on a causal knowledge graph, formulates a phased intervention scheme through Markov decision, builds a whole-cycle closed-loop management and control system for dynamic adjustment, and improves the professionalism and compliance of chronic disease health management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of smart healthcare and artificial intelligence recommendation technology, specifically to a community hospital intelligent recommendation system, method, and storage medium for diet and exercise based on deep integration of clinical data. Background Technology

[0002] With the continuous improvement of primary healthcare and community health management systems, dietary and exercise interventions for patients with chronic diseases and the elderly have become an important part of the daily health services provided by community hospitals. Currently, the health management field is gradually moving towards digital development, with various medical information systems, laboratory examination systems, and chronic disease management systems being widely implemented in community medical institutions. These systems can continuously accumulate clinical data related to patient vital signs, examinations, medical history, and medication. Utilizing digital technology in conjunction with clinical data to provide personalized dietary and exercise guidance has become the mainstream development direction of primary healthcare management. Traditional manual intervention models are limited by manpower and experience, making it difficult to cover a large population. The industry has begun to explore intelligent recommendation methods, attempting to output health intervention plans based on data and algorithms to meet the real needs of community residents for routine and personalized health guidance.

[0003] Currently, the mainstream approach to dietary and exercise guidance in community hospitals still relies primarily on manual judgment by medical staff. The accompanying traditional intelligent recommendation tools also have significant shortcomings. Most existing systems only rely on single-dimensional health data for program recommendations, failing to achieve deep integration of multiple types of clinical data and thus struggling to comprehensively reflect the user's overall health status. Furthermore, traditional programs lack professional medical knowledge graphs and causal logic support, failing to consider the intrinsic connections between medication, physical symptoms, and diet and exercise, easily leading to interventions with potential health risks. Various constraint rules are prone to contradictions and conflicts that cannot be automatically optimized. Recommended programs often use uniform templates, ignoring differences in user lifestyles, resulting in rigid adjustments, poor user acceptance, and low implementation effectiveness. Moreover, most systems only push out programs, lacking end-to-end data tracking and dynamic adjustment capabilities, failing to continuously optimize intervention content based on changes in user health, and ultimately making it difficult to guarantee overall management effectiveness. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing technologies by providing a community hospital intelligent recommendation system, method, and storage medium for diet and exercise based on deep fusion of clinical data. It relies on various business systems within the community hospital to collect comprehensive clinical data, constructs refined health profiles through neural networks, and combines a medical knowledge base and a ternary causal knowledge graph to quantitatively analyze the causal relationships between medication, nutrition, and exercise. It generates and optimizes safety constraint rules, and uses a decision model and dynamic reward algorithm, coupled with a progressive strategy, to generate personalized diet and exercise plans, which are then officially issued after verification by medical staff. The system establishes a full-cycle closed-loop management mechanism, continuously collecting execution and health data, and dynamically iterating and optimizing the plans.

[0005] To address the aforementioned technical problems, this invention provides the following technical solution: Firstly, a community hospital diet and exercise intelligent recommendation system based on deep fusion of clinical data. This system includes: a data aggregation module: connecting to the community hospital information system, collecting basic vital signs, past medical history, examination and testing records, and medication records, and generating a clinical data table through cleaning, completion, and normalization; a profile construction module: extracting physiological indicators, disease codes, drug categories, and risk stratification from the clinical data table, converting discrete feature codes, normalizing continuous features, and then fusing them through a fully connected neural network to generate a health profile vector; and a safety constraint module: incorporating a medical knowledge base and a ternary causal knowledge graph, performing ternary causal effect quantification calculations on the health profile vector to generate... The system comprises a taboo rule base, which outputs a set of safety constraints after conflict resolution via a rule conflict adaptation algorithm; a plan generation module, which models dietary and exercise intervention as a Markov decision process, calculates reward values ​​for each stage based on the set of safety constraints using a phased dynamic reward algorithm, and generates a dietary and exercise plan based on progressive recommendations; a verification and distribution module, which displays the dietary and exercise plan, taboo rules, and alternative plans, receives doctor confirmation or modifications, verifies the causal effects of the modifications using the ternary causal effect quantification algorithm, and generates a formal plan; and a closed-loop module, which collects execution, vital signs, and follow-up data, calculates execution deviations and indicator changes, and drives the profile construction, safety constraint, and plan generation modules to recalculate and generate a revised plan when trigger conditions are met.

[0006] Furthermore, the physiological indicators extracted by the portrait construction module include basic physical signs and laboratory test indicators. Basic physical signs include height, weight, waist circumference, hip circumference, systolic blood pressure, diastolic blood pressure, resting heart rate, blood oxygen saturation, and body temperature. Laboratory test indicators include fasting blood glucose, 2-hour postprandial blood glucose, glycated hemoglobin, total cholesterol, triglycerides, low-density lipoprotein cholesterol, high-density lipoprotein cholesterol, alanine aminotransferase (ALT), aspartate aminotransferase (AST), serum creatinine, serum uric acid, and quantitative urine protein. The extracted disease codes include the primary diagnosis ICD-10 code, complication ICD-10 code, number of complications, duration of illness, and severity classification code. The extracted drug categories include drug pharmacological classification code, number of combination drug groups, single dose, daily frequency of medication, start time of medication, and drug side effect risk level code. The extracted risk stratification includes hypertension risk stratification code, diabetic nephropathy stage code, chronic kidney disease stage code, and cardiovascular and cerebrovascular event risk score level code.

[0007] Furthermore, the fully connected neural network is a three-layer feedforward neural network, with the first layer being the input layer, the second layer being the hidden layer, and the third layer being the output layer. The input layer receives discrete features that have undergone encoding and transformation, and continuous features that have undergone normalization. The number of neurons in the input layer is 64. The number of neurons in the hidden layer is 128, and the activation function of the hidden layer is the ReLU function. The number of neurons in the output layer is 128, and the output layer outputs a health profile vector. The health profile vector is divided into four continuous dimensional segments, each with a length of 32. The training process of the fully connected neural network adopts the batch gradient descent method, with a batch size of 32 and an initial learning rate of 0.001.

[0008] Furthermore, the ternary causal knowledge graph includes three core entities: drug entities, nutrition entities, and exercise entities, along with causal relationship edges between these entities. The drug entity stores the generic name of the drug, its target, metabolic pathway in vivo, side effects, parameters related to the drug's impact on nutrient absorption, and parameters related to the drug's impact on human exercise capacity. The nutrition entity stores macronutrients, micronutrients, food components, food GI values, purine content, and sodium content. The exercise entity stores exercise type, exercise metabolic equivalent, cardiovascular system load value, joint pressure value, and parameters related to blood glucose levels. The causal relationship edges are configured with weight values, which are calculated based on clinical meta-analysis data and standardized to the 0-1 range through linear transformation.

[0009] Furthermore, the specific steps of the security constraint module in generating a taboo rule library by performing ternary causal effect quantification calculation on the health profile vector include: extracting drug features, disease features, and physiological indicator features from the health profile vector; traversing all combinations of drug entities, nutrition entities, and exercise entities in the ternary causal knowledge graph; performing ternary causal effect quantification calculation on each combination to obtain a comprehensive intervention effect value; dividing the comprehensive intervention effect value into three intervals: less than -0.3 is marked as absolutely taboo, -0.3 to 0 is marked as cautiously recommended, and greater than 0 is marked as recommended; generating corresponding taboo rules for combinations marked as absolutely taboo, each taboo rule including the generic name of the drug involved, the type of nutrition, the type of exercise, and the restriction conditions; and summarizing all generated taboo rules to form a user-specific taboo rule library.

[0010] Furthermore, the modeling of dietary and exercise intervention as a Markov decision process comprises five components: state space, action space, reward function, state transition probability, and discount factor. The state space includes a user health profile vector, a set of safety constraints, a user dietary preference vector, a user exercise preference vector, historical intervention effect data for the past four weeks, current time information, weather information, and geographic location information. The action space includes daily dietary combinations and weekly exercise combinations. Daily dietary combinations include ingredient types, ingredient quantities, and cooking methods; weekly exercise combinations include exercise type, duration, frequency, and intensity. The reward function employs a phased dynamic reward algorithm. The state transition probability is derived from statistical analysis of massive amounts of historical community clinical intervention data. The discount factor is set according to the user's short-term and long-term health goals, with the discount factor for short-term goals ranging from 0.9 to 0.95 and the discount factor for long-term goals ranging from 0.8 to 0.85.

[0011] Furthermore, the progressive recommendation in the solution generation module divides the intervention cycle into three stages: the adaptation period (weeks 1-4) during which the recommended solution differs from the user's existing diet and exercise habits by no more than 20%, with adjustments made weekly and each adjustment not exceeding 10%; the reinforcement period (weeks 5-12) during which the solution is adjusted every two weeks and each adjustment not exceeding 15%; and the maintenance period (week 13 and onwards) during which the solution is adjusted monthly, while providing three different styles of solutions. The generated diet and exercise plan includes an initial diet plan and an initial exercise plan. The initial diet plan includes the names of ingredients for three meals a day, the weight of ingredients, recommended cooking methods, and meal distribution ratios. The initial exercise plan includes a schedule of five exercise sessions per week.

[0012] Furthermore, the closed-loop module collects daily dietary records and exercise check-in data reported by users on their mobile devices, supporting automatic synchronization of dietary content recognition and exercise bracelet data via photo recognition; it collects weekly basic vital sign data measured by users themselves; and it collects monthly examination and test data and doctor's records from users' follow-up visits to community hospitals. The calculated evaluation indicators include dietary execution deviation, exercise execution deviation, overall plan completion rate, and core physiological indicator change rate. The triggering conditions for the closed-loop module include: the user's dietary or exercise execution deviation exceeding 30% for two consecutive weeks, the user's core physiological indicators failing to reach the control target for one consecutive month, the user experiencing new complications, or adjustments to the medication plan. After triggering, the system completes incremental data processing, updates the health profile, regenerates contraindication rules, iterates the recommended plan, and pushes the revised plan to the doctor for review.

[0013] On the other hand, a community hospital-based intelligent recommendation method for diet and exercise based on deep integration of clinical data includes the following steps: S1 Data Aggregation: The data aggregation module connects to various business systems of the community hospital, collecting user basic vital signs, past medical history, examination and test results, and medication records using real-time synchronization and timed batch synchronization. The raw data is cleaned, completed, and normalized to generate a standardized clinical data table; S2 Health Profile Construction: The profile construction module extracts four types of features from the clinical data table: physiological indicators, disease codes, drug categories, and risk stratification. Discrete features are encoded and converted, and continuous features are normalized. Then, a three-layer fully connected neural network is used to complete feature fusion, generating a user-specific health profile vector; S3 Safety Constraint Generation: The safety constraint module retrieves the built-in medical knowledge base and ternary causal knowledge graph, combines them with the health profile vector to perform ternary causal effect quantification calculation, and generates a contraindication rule base. Then, a rule conflict adaptation algorithm is used to eliminate rule conflicts, outputting a rule base that includes dietary information. The system consists of three main components: S1, exercise and a set of safety constraints for alternative solutions; S4, diet and exercise plan generation: This module models diet and exercise intervention as a Markov decision process, combines the safety constraint set, calculates the reward value for each stage using a phased dynamic reward algorithm, and then generates a complete diet and exercise plan based on a progressive recommendation strategy, divided into adaptation, reinforcement, and maintenance phases; S5, plan verification and distribution: This module displays the diet and exercise plan, contraindications, and alternative solutions, receives confirmation or modification from doctors, and uses a ternary causal effect quantification algorithm to verify the causal effect of the modifications. After verification, a formal plan is generated and distributed; S6, closed-loop iterative optimization: This closed-loop module collects user plan execution data, vital sign data, and follow-up data on a daily, weekly, and monthly basis, calculates execution deviation and physiological indicator change rates; when a preset correction trigger condition is detected, the health profile, contraindications, and safety constraints are updated sequentially, a corrected plan is iteratively generated, and pushed to the doctor for review, achieving closed-loop optimization of the plan.

[0014] Thirdly, a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, can be used to execute the system.

[0015] Compared with existing technologies, this intelligent recommendation system, method, and storage medium for diet and exercise in community hospitals based on deep integration of clinical data have the following beneficial effects: First, this invention breaks down data barriers between various business systems in community hospitals through deep integration of multi-source clinical data and intelligent feature fusion. It comprehensively aggregates health information across all dimensions, including physical examinations, medical history, and medication. Relying on neural networks, it completes feature extraction and fusion to construct a refined user health profile. Second, it combines a medical knowledge base and a ternary causal knowledge graph to conduct quantitative analysis of causal effects, generating compliance constraint rules from the perspective of the relationship between drugs, nutrition, and exercise. Algorithms resolve rule conflicts, forming a systematic diet and exercise safety constraint system. Third, it breaks away from the traditional intervention model based on a single indicator, defining intervention boundaries based on medical causal logic. This ensures that the intervention plan aligns with the user's actual health condition while mitigating health risks caused by improper diet and exercise combinations from a medical perspective, thus improving the professionalism and safety of the intervention plan.

[0016] Second, this invention utilizes a Markov decision process combined with a phased dynamic reward mechanism and a progressive recommendation strategy to formulate dietary and exercise intervention plans. The plan content is adjusted gradually according to different intervention stages, taking into account the user's original lifestyle habits and health improvement goals, effectively enhancing user willingness to implement the plan and long-term adherence. Simultaneously, a full-cycle closed-loop management system is established, collecting data on plan implementation, changes in vital signs, and follow-up visits at different times to dynamically monitor the intervention effect. The plan is automatically iterated and updated when implementation deviations, abnormal indicators, or changes in health status occur. Collaboration with medical staff for manual verification and adjustment achieves an organic combination of intelligent algorithms and professional medical judgment, ensuring that the intervention plan continuously adapts to the user's dynamically changing health status and guaranteeing the long-term and stable implementation of health management effects.

[0017] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination or study, or may be learned from the practice of the invention. Attached Figure Description

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

[0019] Figure 1 This is a framework diagram of a community hospital's intelligent recommendation system for diet and exercise based on deep integration of clinical data.

[0020] Figure 2The flowchart shows a community hospital's intelligent recommendation method for diet and exercise based on deep fusion of clinical data.

[0021] Figure 3 This is a schematic diagram illustrating the data transmission between modules of a community hospital's intelligent recommendation system for diet and exercise based on deep integration of clinical data.

[0022] Figure 4 A graph comparing patient adherence and glycemic reduction at different risk stratifications;

[0023] Figure 5 Comparison chart of vector four-dimensional radar for patient health profiling;

[0024] Figure 6 This is a graph showing the implementation of a 2-week progressive intervention program and the trend of physiological indicators. Detailed Implementation

[0025] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0026] Example 1 (refer to) Figure 1 One embodiment of the present invention proposes a community hospital intelligent recommendation system for diet and exercise based on deep fusion of clinical data. This system connects to various information business systems of community hospitals to complete the collection of multi-source clinical data. Relying on fully connected neural networks, ternary causal knowledge graphs, Markov decision processes, and various quantitative algorithms, it sequentially completes the analysis of user health status, generation of safety constraint rules, and compilation of personalized diet and exercise plans. At the same time, it is equipped with a doctor manual review module and a full-cycle closed-loop iterative architecture. It can output diet and exercise intervention plans that conform to the standards of clinical medicine, nutrition, and sports medicine for community patients and people with chronic diseases, and are adapted to their individual physical condition, disease status, medication status, and daily routines. It has the characteristics of stable data connection, rigorous rule system, strong plan adaptability, and long-term dynamic optimization.

[0027] The system consists of a data aggregation module, a profile building module, a security constraint module, a scheme generation module, a verification and distribution module, and a closed-loop module. Each module works in sequence according to the data flow logic.

[0028] The overall operation process is as follows: The data aggregation module connects to various information systems within the hospital, collects various types of raw clinical data using a dual synchronization mode, and completes standardized processing to obtain a clinical data table; the profile construction module extracts multiple features from the data table and performs preprocessing, using a three-layer feedforward fully connected neural network to achieve multi-dimensional feature fusion and generate a health profile vector; the safety constraint module calls the built-in medical knowledge base and ternary causal knowledge graph, combines the health profile vector to perform ternary causal effect quantification calculation, generates a contraindication rule base, and then resolves the contradictions between rules through a rule conflict adaptation algorithm, outputting a complete set of safety constraints; the plan generation module constructs the dietary and exercise intervention process into a Markov decision... The planning process combines a set of safety constraints, a phased dynamic reward algorithm, and a progressive recommendation strategy to generate a complete dietary and exercise intervention plan in stages. The verification and distribution module visualizes the plan content, contraindications, and alternative plans, receives confirmation or modification instructions from doctors, and uses a ternary causal effect quantification algorithm to verify the modifications. Once verified, the formal implementation plan is issued. The closed-loop module collects user plan execution data, self-measured vital signs data, and hospital follow-up data at different time periods (daily, weekly, and monthly), calculates multiple evaluation indicators, and drives all front-end functional modules to recalculate when the monitored data meets preset trigger conditions, completing plan iteration and optimization. Figure 3 As shown.

[0029] Specifically, the overall logic of this system's operation involves establishing a complete operational chain encompassing clinical data collection and standardized processing, user health status representation, safety constraint rule construction, personalized intervention plan generation, professional manual verification, and a closed-loop iteration throughout the entire lifecycle. First, it breaks down data barriers between different business systems in community hospitals, achieving unified aggregation and standardized processing of heterogeneous clinical data. Then, it uses neural networks to fuse and express massive amounts of fragmented clinical features, forming vector data that comprehensively reflects users' physiological state, illness status, medication use, and health risk levels. Relying on knowledge graphs and causal quantification algorithms, it mines the correlations and influences between three categories of objects: drugs, nutrition, and exercise. Combining medical theory, it generates compliant constraint rules and optimizes conflicting rules to ensure the rule system is implementable. Combining Markov decision models and phased recommendation logic, it generates progressive intervention plans that align with users' existing lifestyles within predetermined safety boundaries. A manual review process by community doctors is included to compensate for the shortcomings of intelligent algorithms in specific personalized scenarios. Finally, relying on long-term data monitoring and automatic triggering mechanisms, the system continuously updates intervention plans based on changes in users' physical condition, medication plans, and lifestyle habits, ensuring the actual effectiveness of long-term health interventions.

[0030] Optionally, the data aggregation module connects to the community hospital's HIS system, LIS laboratory system, physical examination management system, and chronic disease management system using a combination of real-time synchronization and scheduled batch synchronization; it collects basic vital signs data and medication data of patients visiting the hospital on the same day in real-time; and it collects examination and test reports and complete past medical history data of all patients from the previous day at 2:00 AM on a scheduled batch basis.

[0031] The collected basic vital signs data include height, weight, waist circumference, hip circumference, systolic blood pressure, diastolic blood pressure, resting heart rate, blood oxygen saturation, and body temperature. The collected examination and test data include fasting blood glucose, 2-hour postprandial blood glucose, glycated hemoglobin, total cholesterol, triglycerides, low-density lipoprotein cholesterol, high-density lipoprotein cholesterol, alanine aminotransferase (ALT), aspartate aminotransferase (AST), serum creatinine, serum uric acid, and quantitative urine protein. The module sequentially performs cleaning, completion, and normalization operations on all collected raw data: the cleaning stage primarily removes duplicate data pushed by the system, garbled data, and abnormal data that significantly deviates from the medical normal range; the completion stage supplements missing or incomplete data items by combining the user's historical records and the hospital's standard field library; the normalization stage standardizes the dimensions, numerical precision, and field formats of data output from different collection devices and different business systems, ultimately generating a uniformly formatted, complete, and dimensionally standardized clinical data table.

[0032] Specifically, the application scenarios and data update frequencies of various business systems in community hospitals differ significantly. The HIS system primarily handles immediate tasks such as outpatient visits, real-time vital sign recording, and prescription issuance, with data generation and updates occurring in real time. The LIS laboratory system and physical examination management system focus on periodic test reports and physical examination reports, with data updated centrally daily. The chronic disease management system stores relatively static data such as patients' past medical history and disease severity levels over long periods. This module employs a dual mechanism of real-time synchronization and scheduled batch synchronization. During peak daytime business hours, it captures vital sign and medication data of newly admitted patients in real time to ensure data timeliness. Batch synchronization tasks are performed at 2 AM, a low-peak time for hospital operations, to avoid large-scale data transmission consuming network bandwidth and affecting the normal operation of the hospital's daily business. Standardized processing procedures unify the form of heterogeneous data, eliminate data format differences, and provide a standardized and reliable data foundation for subsequent modules to perform feature extraction and model calculations.

[0033] For example, the data aggregation module maintains a 24 / 7 data interface connection. When a patient visits a community hospital outpatient clinic, the system captures the patient's basic vital signs measured that day, as well as medication records corresponding to prescriptions issued by the outpatient doctor. At a fixed time each morning, the module automatically initiates a batch synchronization task, traversing all registered patient files in the hospital and uniformly extracting all previous day's test results, physical examination reports, past medical history, complication records, and other data. During the data processing phase, the system automatically identifies and deletes duplicate records, completes missing remarks fields in the files, standardizes the units and display precision of various numerical data, and ultimately integrates them into a standardized clinical data table for each patient.

[0034] Optionally, the features extracted by the profiling module include four main categories: physiological indicators, disease codes, drug categories, and risk stratification. Physiological indicators include basic physical signs and laboratory test indicators. Basic physical signs include height, weight, waist circumference, hip circumference, systolic blood pressure, diastolic blood pressure, resting heart rate, blood oxygen saturation, and body temperature. Laboratory test indicators include fasting blood glucose, 2-hour postprandial blood glucose, glycated hemoglobin, total cholesterol, triglycerides, low-density lipoprotein cholesterol, high-density lipoprotein cholesterol, alanine aminotransferase (ALT), aspartate aminotransferase (AST), serum creatinine, serum uric acid, and quantitative urine protein. Disease codes include the primary diagnosis ICD-10 code, complication ICD-10 code, number of complications, duration of illness, and severity classification code. Drug categories include drug pharmacological classification code, number of combination drug groups, single dose, daily frequency of administration, start time of administration, and drug side effect risk level code. Risk stratification includes hypertension risk stratification code, diabetic nephropathy stage code, chronic kidney disease stage code, and cardiovascular event risk score level code.

[0035] The module performs encoding conversion operations on discrete features such as disease codes, drug codes, and risk stratification codes, converting text-based and categorical labels into numerical formats recognizable by the model. It performs normalization processing on continuous features such as height, blood pressure, and blood sugar, mapping values ​​with varying ranges to a unified numerical range. The preprocessed feature data is input into a three-layer feedforward neural network. The first layer is the input layer with 64 neurons, receiving all preprocessed features; the second layer is the hidden layer with 128 neurons, using ReLU as the activation function; and the third layer is the output layer with 128 neurons, outputting a health profile vector. The health profile vector is divided into four consecutive dimensional segments, each with a length of 32. The network training process uses batch gradient descent with a batch size of 32 and an initial learning rate of 0.001, ending training once the model loss value stabilizes.

[0036] Specifically, features collected in clinical settings are categorized into discrete and continuous features. Discrete features are mostly classification codes and rank labels, which cannot be directly recognized and processed by neural networks, thus requiring encoding conversion. Continuous features have large numerical ranges and inconsistent dimensions; normalization can balance the weight of various features and improve the overall computational accuracy of the model. A three-layer feedforward fully connected neural network completes data reception, feature association mining, and vector output layer by layer. The segmented health profile vector design facilitates subsequent modules to selectively retrieve information from four dimensions: physiology, disease, medication, and risk, based on business needs. Batch gradient descent updates model parameters using batch samples, effectively reducing model fluctuations caused by single-sample training and adapting to model training scenarios with large amounts of patient data in the community.

[0037] For example, for individuals with chronic diseases seeking medical treatment within the community, the profile construction module extracts four main categories of features from the corresponding clinical data table, performs digitization conversion on all coded discrete features, and normalizes various physiological indicators. The processed feature data is then fed into a three-layer feedforward fully connected neural network. The neurons in each layer sequentially receive data, fuse features, and output vectors, ultimately yielding a segmented health profile vector that comprehensively represents the individual's overall health status. Figure 5 As shown.

[0038] Optionally, the safety constraint module incorporates a medical knowledge base and a ternary causal knowledge graph. The medical knowledge base includes a nutritional composition database and an exercise metabolic equivalent database; the nutritional composition database stores the macronutrient content, micronutrient content, food GI value, purine content, sodium content, potassium content, fat content, and protein content of ingredients and pre-prepared meals; the exercise metabolic equivalent database stores the exercise metabolic equivalent, cardiovascular system load value, joint pressure value, blood glucose influence coefficient, and blood pressure influence coefficient for aerobic exercise, strength training, and daily activities.

[0039] The ternary causal knowledge graph includes three types of entities: drug entities, nutrition entities, and exercise entities, and causal relationship edges between these entities. Drug entities store the generic name of the drug, its target, metabolic pathway in vivo, side effects, parameters on the drug's impact on nutrient absorption, and parameters on the drug's impact on human exercise capacity. Nutrition entities store macronutrients, micronutrients, food components, food GI values, purine content, and sodium content. Exercise entities store exercise type, exercise metabolic equivalent, cardiovascular system load value, joint pressure value, and parameters on blood glucose. Causal relationship edges are configured with weight values, which are calculated based on clinical meta-analysis data and standardized to the 0-1 range through linear transformation.

[0040] The safety constraint module performs ternary causal effect quantification calculations on health profile vectors to generate a taboo rule library. Specific steps include: extracting drug features, disease features, and physiological indicator features from the health profile vectors; traversing all combinations of drug entities, nutrition entities, and exercise entities in the ternary causal knowledge graph; performing ternary causal effect quantification calculations on each combination to obtain a comprehensive intervention effect value; dividing the comprehensive intervention effect value into three intervals: values ​​less than -0.3 are marked as absolutely taboo, values ​​between -0.3 and 0 are marked as cautiously recommended, and values ​​greater than 0 are marked as recommended; generating corresponding taboo rules for combinations marked as absolutely taboo, each taboo rule including the generic name of the drug involved, the type of nutrition, the type of exercise, and the restrictions; and summarizing all generated taboo rules to form a user-specific taboo rule library.

[0041] The mathematical expression for the ternary causal effect quantification algorithm is: in, For users drugs Nutrition sports The combined intervention effect value of the three-factor combination, For drugs With nutrition Causal correlation weights For users For drugs The sensitivity coefficient, For nutrition With sports Causal correlation weights For users For sports tolerance coefficient For users Individual risk correction coefficient.

[0042] Among them, causal association weight , The calculation formula is: ; This represents the total number of samples in the clinical meta-analysis. The association score between two types of entities in a single clinical sample; user sensitivity coefficient. The calculation formula is: ; For current users targeting drugs Physiological response test values, This represents the average response of the entire population to the drug. The standard deviation of the response values ​​for the entire population; user tolerance coefficient. The calculation formula is: ; For current users targeting sports The body tolerance test value, This represents the average tolerance level for this sport across the entire population. Standard deviation of tolerance values ​​for the entire population; individual risk correction factor. The calculation formula is: ; For the current user, a risk score is assigned based on the combination of medication, nutrition, and exercise. The maximum risk score preset by the system.

[0043] The module then uses a rule conflict adaptation algorithm to eliminate rule conflicts. The mathematical expression of the algorithm is: in, For a set of rules Overall compatibility; For rules Priority weights; For rules The indicator variable satisfies (1 if satisfied, otherwise 0). This is the conflict penalty coefficient; For rules With rules The mutual exclusion coefficient, with a value range of [0,1]; summation subscript Used to avoid duplicate counting.

[0044] Among them, rule priority weight The calculation formula is: ; This refers to the medical risk level score corresponding to a single rule. The sum of risk level scores for all rules within the rule set; conflict penalty coefficient. The calculation formula is: ; The total number of mutually exclusive rules within the rule set; the mutual exclusion coefficient of the rules. The calculation formula is: ; For rules With rules The content conflict between them is quantified into a score. The maximum value of the rule conflict quantification score preset by the system.

[0045] After conflict resolution, a set of safety constraints is output, which includes a subset of dietary safety constraints and a subset of exercise safety constraints. The dietary safety constraints subset includes a list of prohibited food types, the daily intake limit for a single food, the recommended intake range for a single food, restrictions on cooking methods, the daily total calorie intake range, the protein energy ratio range, the fat energy ratio range, the carbohydrate energy ratio range, the daily sodium intake limit, and the daily purine intake limit. The exercise safety constraints subset includes a list of prohibited exercise types, the maximum duration of a single exercise session, the weekly total exercise duration limit, the exercise intensity limit, the heart rate range during exercise, and the requirements for pre- and post-exercise blood glucose monitoring. The set of safety constraints also includes a priority identifier for each constraint and a list of alternative constraint schemes that cannot completely eliminate conflicts. All content is stored in a structured data format.

[0046] Specifically, the medical knowledge base provides fundamental data support from nutrition and sports medicine for the constraints related to dietary management and exercise planning. The ternary causal knowledge graph establishes a network of relationships between drugs, nutrition, and exercise. The ternary causal effect quantification algorithm accurately determines the degree of impact of different combinations on the user's current physical state, classifying them into three levels: absolute contraindication, cautious recommendation, and recommended, ensuring the medical safety of intervention plans from the outset. Because multiple constraint rules can easily lead to mutually exclusive or contradictory requirements during execution, the rule conflict adaptation algorithm filters rules by quantifying the overall adaptability of the rule set, prioritizing rules with higher priority and configuring alternative solutions for conflict scenarios that cannot be completely resolved, ensuring the final output set of safety constraints is executable.

[0047] For example, the safety constraint module retrieves basic parameter data for various foods and sports from the medical knowledge base. Simultaneously, it combines this data with entities and relationships within a ternary causal knowledge graph to match the user's corresponding drug, nutrition, and exercise combinations and calculate the effects. Based on the calculation results, it generates corresponding contraindication rules. When multiple rules conflict, the system optimizes and adjusts them using a rule conflict adaptation algorithm, supplementing alternative solutions. Ultimately, this forms a safety constraint set that includes two types of constraints: diet and exercise, priority markers, and alternative solutions. Figure 4 As shown.

[0048] Optionally, the solution generation module models the dietary and exercise intervention as a Markov decision process, which includes five components: state space, action space, reward function, state transition probability, and discount factor. The state space includes a user health profile vector, a set of safety constraints, a user dietary preference vector, a user exercise preference vector, historical intervention effect data for the past four weeks, current time information, weather information, and geographical location information. The action space includes daily diet combinations and weekly exercise combinations. Daily diet combinations include the types of ingredients, the weight of ingredients, and the cooking method. Weekly exercise combinations include the type of exercise, the duration of exercise, the frequency of exercise, and the intensity of exercise. The reward function adopts a phased dynamic reward algorithm. The state transition probability is derived from a large amount of historical data on community clinical interventions. The discount factor is set according to the user's short-term and long-term health goals. The discount factor for short-term goals ranges from 0.9 to 0.95, and the discount factor for long-term goals ranges from 0.8 to 0.85.

[0049] The mathematical expression for the phased dynamic reward algorithm is: in, For the first The total reward value of each step decision. For the weighting coefficient of safety constraint satisfaction, For the degree of satisfaction of safety constraints, The weighting coefficient for the degree of improvement in health indicators. As for the degree of improvement in health indicators, The weighting coefficient for user compliance score. Score user compliance, and Among them, the weighting coefficient for the satisfaction of security constraints. Weighting coefficients for improvement in health indicators User compliance score weighting coefficient The calculation formula is: ; ; ; For the first The target weight values ​​for the stage-specific security constraint dimension. For the first The target weight values ​​for the health indicator improvement dimensions in each stage. For the first Target weight values ​​for user compliance at different stages; security constraint satisfaction The calculation formula is: ; For the first The number of projects that meet safety constraints in the decision-making process. The total number of projects is constrained by safety requirements; the degree of improvement in health indicators. The calculation formula is: ; For the first The difference in improvement of core health indicators of users at each stage Initial baseline values ​​for user health metrics; user compliance score The calculation formula is: ; For the first The actual amount of intervention content completed by users at each stage. For the first The total amount of intervention content in the phased system planning.

[0050] The module employs a progressive recommendation strategy, dividing the intervention period into three phases: the adaptation phase (weeks 1-4) where the recommended plan differs from the user's existing diet and exercise habits by no more than 20%, with adjustments made weekly, each adjustment not exceeding 10%; the reinforcement phase (weeks 5-12) where the plan is adjusted every two weeks, each adjustment not exceeding 15%; and the maintenance phase (week 13 and onwards) where the plan is adjusted monthly, while providing three different styles of plans. The generated diet and exercise plan includes an initial diet plan and an initial exercise plan; the initial diet plan includes the names of ingredients for three meals a day, ingredient quantities, recommended cooking methods, and meal distribution ratios; the initial exercise plan includes a weekly exercise schedule of 5 sessions, including 3 aerobic exercises and 2 strength training sessions, each lasting 30-60 minutes.

[0051] Specifically, the Markov Decision Process transforms the dynamically changing dietary and exercise intervention into a multi-stage decision problem. It comprehensively considers user health status, safety constraints, personal dietary and exercise preferences, historical intervention effects, and external environmental information to select the optimal intervention combination within compliant action limits. A phased dynamic reward algorithm evaluates the merits of each decision step from three dimensions: rule compliance, improvement in health indicators, and user compliance. Weighting coefficients can be dynamically adjusted according to different intervention stages. The progressive recommendation strategy follows the principle of gradual intervention, gradually guiding users to change their existing dietary and exercise habits, reducing resistance to implementation. Different adjustment frequencies and magnitudes are set for different intervention stages, balancing the effectiveness of health intervention with the feasibility of long-term user adherence.

[0052] For example, the solution generation module constructs a Markov decision process by combining the user's various status information and safety constraints, and determines the discount factor value based on the user's set health goals. The system uses a phased dynamic reward algorithm to calculate the reward value for different decisions, thereby selecting the optimal diet and exercise combination. Then, according to the phase division and adjustment rules of the adaptation period, reinforcement period, and maintenance period, a complete diet and exercise plan is generated, specifying all details such as daily meal combinations and weekly exercise schedules. Figure 6 As shown.

[0053] Optionally, the verification and distribution module displays the diet and exercise plan, contraindications, and alternative solutions. It receives confirmation or modification instructions from doctors, verifies the causal effect of the modified content using a ternary causal effect quantification algorithm, generates a formal plan, and completes the distribution. The module's interface is divided into four sections: diet details, exercise schedule, safety contraindications, and risk warnings. When doctors manually modify the types and amounts of ingredients, exercise types, and exercise durations based on the patient's actual situation, the module automatically extracts the corresponding drug, nutritional, and exercise combinations and recalculates the comprehensive intervention effect value using the ternary causal effect quantification formula. If the calculation result does not trigger an absolute contraindication rule, the verification is considered successful, a formal plan is generated, and synchronized to the user's end and the hospital's archive. If the calculation result indicates an absolute contraindication, a risk warning pops up on the interface, marking the specific risk points and reminding the doctor to readjust the plan.

[0054] Specifically, the verification and distribution module serves as a manual risk control checkpoint before the intervention plan is officially implemented. Leveraging the professional clinical experience of community-based doctors, it compensates for the limitations of intelligent algorithms in specific, personalized scenarios. A causal effect verification is performed again on the manually modified plan content, creating a double safety guarantee to prevent health risks caused by human negligence and ensure that the final distributed plan fully complies with medical requirements.

[0055] For example, the verification and distribution module displays the automatically generated diet and exercise plan, various contraindications, and alternative solutions on the doctor's interface. The doctor adjusts the plan based on the patient's physical condition and specific lifestyle needs, and the module automatically performs causal verification on the modifications. If the modifications are compliant, the plan is officially distributed; if the modifications violate contraindications, a risk warning will pop up on the interface, guiding the doctor to re-edit the plan.

[0056] Optionally, the closed-loop module collects daily dietary records and exercise check-in data voluntarily reported by users on their mobile devices, supporting automatic synchronization of dietary content recognition and fitness tracker data; weekly basic vital sign data voluntarily measured by users; and monthly examination and test data and doctor's records from users' follow-up visits to community hospitals. The evaluation indicators calculated by the module include dietary execution deviation, exercise execution deviation, overall program completion rate, and core physiological indicator change rate.

[0057] The closed-loop module is triggered by the following conditions: the user's deviation from dietary or exercise adherence exceeds 30% for two consecutive weeks; the user's core physiological indicators fail to reach the control target for one consecutive month; or the user develops new complications or the medication regimen is adjusted. When the trigger conditions are met, the module drives the data aggregation module, health profile construction module, safety constraint module, and plan generation module to sequentially complete incremental data processing, update the health profile, regenerate contraindication rules, and iterate the recommended plan. The revised plan is then pushed back to the doctor for review.

[0058] Specifically, the cyclical data collection mode can comprehensively collect users' plan implementation status, home self-testing vital signs data, and in-hospital follow-up and treatment data, enabling multi-dimensional evaluation of the actual operational effectiveness of existing intervention plans. Three trigger conditions correspond to three typical scenarios: insufficient user compliance, failure to achieve expected health intervention effects, and changes in the user's physical condition and medication regimen, covering the main causes of plan failure. The closed-loop iterative process starts with incremental data processing at the bottom layer, progressively updating health profiles, constraint rules, and intervention plans, ensuring that the iterative plan continuously matches the user's current actual situation.

[0059] For example, the closed-loop module continuously collects various types of data reported by users according to daily, weekly, and monthly cycles, and calculates the corresponding evaluation indicators. When the monitored data meets the preset trigger conditions, the system automatically starts the full-process iterative process, updating various data, health profiles, constraint rules, and intervention plans in sequence. The revised plan after the iteration is completed will be pushed to the doctor for review again.

[0060] Example 2: Refer to Figure 2This invention also provides a method for intelligent recommendation of diet and exercise in community hospitals based on deep fusion of clinical data. This method is applied to the aforementioned intelligent recommendation system for diet and exercise in community hospitals based on deep fusion of clinical data. The specific steps of this method are as follows: S1 Data Aggregation: The data aggregation module connects to various business systems of the community hospital, collecting raw data such as user basic vital signs, past medical history, examination and testing records, and medication records using a real-time synchronization + timed batch synchronization method. The raw data is cleaned, completed, and normalized to generate a standardized clinical data table; S2 Health Profile Construction: The profile construction module extracts four types of features from the clinical data table: physiological indicators, disease codes, drug categories, and risk stratification. Discrete features are encoded and converted, and continuous features are normalized. Then, a three-layer fully connected neural network is used to complete feature fusion, generating a user-specific health profile vector; S3 Safety Constraint Generation: The safety constraint module retrieves the built-in medical knowledge base and ternary causal knowledge graph, combines them with the health profile vector to perform ternary causal effect quantification calculation, and generates a prohibition rule base; then... The rule conflict adaptation algorithm eliminates rule conflicts and outputs a set of safety constraints including two types of constraints: diet and exercise, as well as alternative solutions. S4 Diet and Exercise Plan Generation: The plan generation module models the diet and exercise intervention as a Markov decision process, combines the safety constraint set, calculates the reward value for each stage using a phased dynamic reward algorithm, and then generates a complete diet and exercise plan based on a progressive recommendation strategy, divided into adaptation, reinforcement, and maintenance phases. S5 Plan Verification and Distribution: The verification and distribution module displays the diet and exercise plan, contraindications, and alternative solutions, receives confirmation or modification operations from doctors, and uses a ternary causal effect quantification algorithm to verify the causal effect of the modifications. After successful verification, a formal plan is generated and distributed. S6 Closed-Loop Iterative Optimization: The closed-loop module collects user plan execution data, vital sign data, and follow-up data on a daily, weekly, and monthly basis, calculating execution deviations and physiological indicator change rates. When a preset correction trigger condition is detected, the health profile, contraindications, and safety constraints are updated sequentially, iteratively generating a corrected plan and pushing it to the doctor for review, achieving closed-loop optimization of the plan.

[0061] Specifically, this method strictly follows a step-by-step execution sequence: data processing, health status modeling, security rule generation, intervention plan development, manual verification and distribution, and closed-loop iterative optimization. Each execution step corresponds to an independent functional module within the system, with data flowing sequentially and logic interconnected between steps. The entire method is based on real clinical data from community hospitals, combining professional medical knowledge graphs and various intelligent algorithms to ensure the professionalism and safety of intervention plans. Coupled with manual review and a closed-loop iterative mechanism, it achieves a complete workflow from single plan generation to long-term dynamic optimization, adapting to the business needs of community hospitals for routine chronic disease management and public health interventions.

[0062] Optionally, in step S1, the real-time synchronization mode is responsible for collecting the basic vital signs data and medication data of patients who visit the clinic on the same day. The scheduled batch synchronization is set at 2:00 AM every day to collect the examination and test reports and complete medical history data of all patients from the previous day. The cleaning operation removes duplicate, garbled, and abnormal data, the completion operation completes the missing fields in the file, and the normalization operation unifies the data dimensions, format, and precision, ultimately forming a standardized clinical data table.

[0063] Optionally, in step S2, the extracted physiological indicators include two categories: basic physical signs and laboratory test indicators. At the same time, disease codes, drug categories, and risk stratification-related features are extracted. Discrete features are converted into codes, and continuous features are normalized. The data is fed into a three-layer feedforward fully connected neural network. The network is trained using the batch gradient descent method with a batch size of 32 and an initial learning rate of 0.001. The final output is a health profile vector divided into four dimensions.

[0064] Optionally, in step S3, a medical knowledge base is formed by retrieving a nutritional component database and an exercise metabolic equivalent database, and a ternary causal knowledge graph containing three types of entities: drugs, nutrition, and exercise is retrieved; the comprehensive intervention effect value of the entity combination is calculated using the ternary causal effect quantification formula, and the system is divided into three levels according to the numerical range: absolute contraindication, cautious recommendation, and recommendation to generate a contraindication rule base; then, the rule conflict adaptation algorithm is used to calculate the comprehensive adaptation degree of the rule set, complete the conflict resolution and configure alternative solutions, and finally output a structured and stored set of safety constraints.

[0065] Optionally, in step S4, a Markov decision process including a state space, action space, reward function, state transition probability, and discount factor is constructed; a phased dynamic reward algorithm is used to calculate the reward value of each decision step, and the optimal action combination is selected with the goal of maximizing the reward value; progressive recommendations are executed according to three phases: adaptation period, reinforcement period, and maintenance period, and the adjustment frequency and adjustment range of each phase are set to generate a diet and exercise plan including meal details and exercise schedule.

[0066] Optionally, in step S5, the entire protocol content, contraindications, and alternative protocols are visualized; for the doctor's modifications, the ternary causal effect quantification calculation is re-executed to determine whether an absolute contraindication is violated; if the verification passes, the official protocol is issued; if the verification fails, the doctor is continuously prompted to adjust the content.

[0067] Optionally, in step S6, daily data on diet and exercise check-in is collected, weekly data on home self-tested vital signs is collected, and monthly data on hospital follow-up visits and medical records are collected. Four evaluation indicators are calculated: diet execution deviation, exercise execution deviation, overall completion rate of the plan, and change rate of core physiological indicators. If any of the following occurs: two consecutive weeks of execution deviation exceeding the standard, indicators failing to meet the standard for a long period of time, new complications, or medication adjustments, the entire process is iterated, the data, profile, rules, and plan are updated, and the plan is resubmitted for doctor's review.

[0068] For example, when health management subjects within the community use this method to complete the entire health intervention process, the system first collects and standardizes clinical data, then extracts features and constructs a health profile, generating safety constraint rules based on knowledge graphs and quantitative algorithms. On this basis, it combines multiple algorithms to generate a phased diet and exercise plan, which is then officially issued for implementation after review and verification by the community doctor. The system continuously monitors the user's plan implementation, changes in physical indicators, and in-hospital medical records. Once correction conditions are triggered, the system automatically iterates and updates the entire intervention plan, submitting it again for doctor review, thus achieving long-term dynamic optimization.

[0069] Example 3: Based on the same inventive concept, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described intelligent recommendation method for diet and exercise in community hospitals based on deep fusion of clinical data.

[0070] It should be noted that the interactions between the various modules and steps described above do not necessarily imply direct connection of lines, forced serial execution of steps, indirect connection, or reasonable parallel execution. Any method that achieves the purpose of this invention can be applied to the embodiments of this invention. The above descriptions are merely exemplary embodiments of this invention and should not be construed as limiting the scope of this invention.

[0071] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A community hospital intelligent recommendation system for diet and exercise based on deep fusion of clinical data, characterized in that: The system includes; Data aggregation module: Connects to the community hospital information system, collects basic vital signs, past medical history, examination and test records and medication records, and generates clinical data tables after cleaning, completion and normalization; Profile building module: Extracts physiological indicators, disease codes, drug categories and risk stratification from the clinical data table, converts discrete feature codes and normalizes continuous features, and then fuses them through a fully connected neural network to generate a health profile vector; Safety constraint module: It has a built-in medical knowledge base and a ternary causal knowledge graph. It performs ternary causal effect quantification calculation on health profile vectors to generate a taboo rule library. After eliminating conflicts through a rule conflict adaptation algorithm, it outputs a set of safety constraints. Solution generation module: Models dietary and exercise intervention as a Markov decision process, calculates the reward value of each stage based on the set of safety constraints using a phased dynamic reward algorithm, and generates a dietary and exercise plan by combining progressive recommendation. Verification and distribution module: Displays the diet and exercise plan, contraindications and alternative solutions, receives confirmation or modification from the doctor, and generates the official plan after verifying the causal effect of the modification using the ternary causal effect quantification algorithm. Closed-loop module: Collects execution, vital signs and follow-up data, calculates execution deviation and indicator changes, and drives the profile construction, security constraint and scheme generation modules to recalculate and generate corrective schemes when trigger conditions are met.

2. The intelligent recommendation system for diet and exercise in community hospitals based on deep fusion of clinical data as described in claim 1, characterized in that, The physiological indicators extracted by the portrait construction module include basic physical signs and laboratory test indicators. Basic physical signs include height, weight, waist circumference, hip circumference, systolic blood pressure, diastolic blood pressure, resting heart rate, blood oxygen saturation, and body temperature. Laboratory test indicators include fasting blood glucose, 2-hour postprandial blood glucose, glycated hemoglobin, total cholesterol, triglycerides, low-density lipoprotein cholesterol, high-density lipoprotein cholesterol, alanine aminotransferase (ALT), aspartate aminotransferase (AST), serum creatinine, serum uric acid, and quantified urine protein. The extracted disease codes include the primary diagnosis ICD-10 code, complication ICD-10 code, number of complications, duration of illness, and severity classification code. The extracted drug categories include drug pharmacological classification code, number of combination drug groups, single dose, daily frequency of medication, start time of medication, and drug side effect risk level code. The extracted risk stratification includes hypertension risk stratification code, diabetic nephropathy stage code, chronic kidney disease stage code, and cardiovascular and cerebrovascular event risk score level code.

3. The intelligent recommendation system for diet and exercise in community hospitals based on deep fusion of clinical data as described in claim 1, characterized in that, The fully connected neural network is a three-layer feedforward neural network, with the first layer being the input layer, the second layer being the hidden layer, and the third layer being the output layer. The input layer receives discrete features that have undergone encoding and transformation, as well as continuous features that have undergone normalization, and has 64 neurons. The hidden layer has 128 neurons, and the activation function of the hidden layer is the ReLU function. The output layer has 128 neurons and outputs a health profile vector. The health profile vector is divided into four consecutive dimensional segments, each with a length of 32. The fully connected neural network is trained using batch gradient descent with a batch size of 32 and an initial learning rate of 0.

001.

4. The intelligent recommendation system for diet and exercise in community hospitals based on deep fusion of clinical data as described in claim 1, characterized in that, The ternary causal knowledge graph includes three core entities: drug entities, nutrition entities, and exercise entities, along with causal relationship edges between these entities. The drug entity stores the generic name of the drug, its target, metabolic pathway, side effects, parameters related to the drug's impact on nutrient absorption, and parameters related to the drug's impact on human exercise capacity. The nutrition entity stores macronutrients, micronutrients, food components, food GI values, purine content, and sodium content. The exercise entity stores exercise type, exercise metabolic equivalent, cardiovascular load, joint pressure, and blood glucose impact parameters. Each causal relationship edge is configured with a weight value, calculated based on clinical meta-analysis data and standardized to the 0-1 range through linear transformation.

5. The intelligent recommendation system for diet and exercise in community hospitals based on deep fusion of clinical data as described in claim 1, characterized in that, The specific steps of the security constraint module in generating a taboo rule library by performing ternary causal effect quantification calculation on the health profile vector include: extracting drug features, disease features, and physiological indicator features from the health profile vector; traversing all combinations of drug entities, nutrition entities, and exercise entities in the ternary causal knowledge graph; performing ternary causal effect quantification calculation on each combination to obtain a comprehensive intervention effect value; dividing the comprehensive intervention effect value into three intervals: less than -0.3 is marked as absolutely taboo, -0.3 to 0 is marked as cautiously recommended, and greater than 0 is marked as recommended; generating corresponding taboo rules for combinations marked as absolutely taboo, each taboo rule including the generic name of the drug involved, the type of nutrition, the type of exercise, and the restriction conditions; and summarizing all generated taboo rules to form a user-specific taboo rule library.

6. The intelligent recommendation system for diet and exercise in community hospitals based on deep fusion of clinical data as described in claim 1, characterized in that, The proposed modeling of dietary and exercise intervention as a Markov decision process comprises five components: state space, action space, reward function, state transition probability, and discount factor. The state space includes a user health profile vector, a set of safety constraints, a user dietary preference vector, a user exercise preference vector, historical intervention effect data from the past four weeks, current time information, weather information, and geographic location information. The action space includes daily dietary combinations and weekly exercise combinations. Daily dietary combinations include ingredient types, ingredient quantities, and cooking methods; weekly exercise combinations include exercise type, duration, frequency, and intensity. The reward function employs a phased dynamic reward algorithm. The state transition probability is derived from statistical analysis of massive amounts of historical community clinical intervention data. The discount factor is set according to the user's short-term and long-term health goals, with short-term goals corresponding to a discount factor range of 0.9 to 0.95 and long-term goals corresponding to a discount factor range of 0.8 to 0.

85.

7. The intelligent recommendation system for diet and exercise in community hospitals based on deep fusion of clinical data as described in claim 1, characterized in that, The progressive recommendation in the proposed plan generation module divides the intervention period into three phases: the adaptation period (weeks 1-4) during which the recommended plan differs from the user's existing diet and exercise habits by no more than 20%, with adjustments made weekly and each adjustment not exceeding 10%; the reinforcement period (weeks 5-12) during which the plan is adjusted every two weeks and each adjustment not exceeding 15%; and the maintenance period (week 13 and onwards) during which the plan is adjusted monthly, while providing three different styles of plans. The generated diet and exercise plan includes an initial diet plan and an initial exercise plan. The initial diet plan includes the names of ingredients for three meals a day, the weight of ingredients, recommended cooking methods, and meal distribution ratios. The initial exercise plan includes a schedule of five exercise sessions per week.

8. The intelligent recommendation system for diet and exercise in community hospitals based on deep fusion of clinical data as described in claim 1, characterized in that, The closed-loop module collects daily dietary records and exercise check-in data reported by users on their mobile devices, and supports automatic synchronization of dietary content recognition and exercise bracelet data via photo capture; it also collects weekly basic vital sign data measured by users themselves. Collect monthly examination and test data and doctor's records from users' follow-up visits to community hospitals; The calculated evaluation indicators include dietary adherence deviation, exercise adherence deviation, overall program completion rate, and rate of change in core physiological indicators. The triggering conditions for the closed-loop module include: the user's deviation from diet or exercise exceeds 30% for two consecutive weeks, the user's core physiological indicators fail to reach the control target for one consecutive month, the user develops new complications or the medication plan is adjusted; after triggering, the system completes incremental data processing, updates the health profile, regenerates contraindication rules and iterates the recommended plan, and pushes the revised plan to the doctor for review.

9. A method for intelligent recommendation of diet and exercise in community hospitals based on deep fusion of clinical data, wherein the method is used in the intelligent recommendation system for diet and exercise in community hospitals based on deep fusion of clinical data as described in any one of claims 1-8, characterized in that, The specific steps of this method are as follows: S1 Data Aggregation: Through the data aggregation module, it connects with various business systems of community hospitals and collects data on users' basic vital signs, past medical history, examination and test results, and medication records using real-time synchronization and timed batch synchronization. The raw data is cleaned, completed, and normalized to generate standardized clinical data tables. S2 Health Profile Construction: The profile construction module extracts four types of features from the clinical data table: physiological indicators, disease codes, drug categories, and risk stratification. It performs encoding conversion on discrete features and normalization on continuous features. Then, it completes feature fusion through a three-layer fully connected neural network to generate a user-specific health profile vector. S3 Safety Constraint Generation: The safety constraint module retrieves the built-in medical knowledge base and ternary causal knowledge graph, combines the health profile vector to perform ternary causal effect quantification calculation, and generates a taboo rule base; then, it eliminates rule conflicts through a rule conflict adaptation algorithm and outputs a set of safety constraints that includes two types of constraints: diet and exercise, as well as alternative solutions. S4 Diet and Exercise Program Generation: The program generation module models the diet and exercise intervention as a Markov decision process, combines it with a set of safety constraints, uses a phased dynamic reward algorithm to calculate the reward value for each stage, and then generates a complete diet and exercise plan based on a progressive recommendation strategy, divided into adaptation, reinforcement, and maintenance phases. S5 Plan Verification and Distribution: The verification and distribution module displays the diet and exercise plan, contraindications, and alternative plans. It receives confirmation or modification operations from doctors and uses a ternary causal effect quantification algorithm to verify the causal effect of the modified content. After the verification is passed, the official plan is generated and distributed. S6 Closed-Loop Iterative Optimization: The closed-loop module collects user plan execution data, vital sign data, and follow-up data on a daily, weekly, and monthly basis, and calculates execution deviation and physiological indicator change rate. When the preset correction trigger condition is detected, the health profile, contraindication rules, and safety constraints are updated sequentially, and a correction plan is generated iteratively and pushed to the doctor for review, thus realizing closed-loop optimization of the plan.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program can be used to perform the system according to any one of claims 1-8.