Diet recommendation method, system and equipment for hospital central kitchen and medium
By receiving recipes and ingredient lists to form a standardized recipe library, and combining it with a nutrition knowledge graph and a structured evidence base, a set of dietary recommendations is generated. This solves the problem of the lack of causal links and evidence-driven approaches in existing dietary recommendations, and achieves fine-grained multi-objective trade-offs and improved recommendation acceptance.
Patent Information
- Application Number
- CN202511871232.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-17
AI Technical Summary
Existing hospital dietary recommendation methods lack a traceable causal link from food ingredients to pathological effects, fail to clearly present the logical relationship between diet and patient condition, lack medical evidence-driven judgments, and are difficult to balance the conflicts of multiple objectives such as nutritional balance, pathological restrictions, religious and cultural constraints, and personal taste preferences.
By receiving recipes and ingredient lists to form a standardized recipe library, obtaining patient medical card information for standardized processing, and combining nutritional knowledge graphs and structured evidence bases, directed causal transmission paths are retrieved, path-level evidence aggregation and weighted scoring are performed, and a set of dietary recommendations is generated to ensure a fine-grained balance between medical safety bottom lines and multiple objectives.
It has achieved a traceable causal link and evidence support from food ingredients to the pathological effects on patients, ensuring the bottom line of medical safety. At the same time, it has achieved a fine-grained balance among multiple objectives such as nutritional balance, religious and cultural constraints and patient preferences, improving the acceptance of dietary recommendations and nutritional compliance.
Smart Images

Figure CN121687401A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of health management technology, and in particular relates to a dietary recommendation method, system, equipment and medium for a hospital central kitchen. Background Technology
[0002] With the development of hospital central kitchen food supply, automatic hospital meal recommendation technology has emerged, which performs preliminary screening of meals based on basic constraints and provides corresponding meal recommendations.
[0003] In traditional techniques, strict contraindications are first set based on basic information such as the patient's pathological type, and dishes that do not meet the contraindications are directly deleted. Then, a diet is matched for the patient from the remaining dishes to balance the patient's needs and preferences.
[0004] However, the above-mentioned dietary recommendation methods lack a traceable causal link from food ingredients to pathological effects, cannot clearly present the logical relationship between diet and patient condition, lack evidence-driven judgment with confidence, the recommendation decision is not supported by corresponding medical evidence scores, and when multiple goals such as nutritional balance, pathological limitations, religious and cultural constraints, and personal taste preferences conflict, they cannot provide fine-grained and explainable arbitration logic and alternative solutions, making it difficult to balance clinical responsibility and patient dietary acceptance. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, system, equipment, and medium for dietary recommendations in a hospital central kitchen that can take into account patients' dietary preferences and clinical dietary advice, in order to address the above-mentioned technical problems.
[0006] Firstly, this application provides a dietary recommendation method for a hospital central kitchen, including:
[0007] The system receives recipes and ingredient lists uploaded from the central kitchen, and performs recipe analysis on each dish based on the recipes and ingredient lists to obtain a standardized recipe library. The standardized recipe library includes the nutritional vector of each dish and the corresponding recipe version identifier.
[0008] Obtain patient medical card information, and standardize the patient medical card information based on the static attributes, diagnosis list, time series of test indicators, dietary restrictions and religious and cultural constraints recorded in the patient medical card information to obtain the patient's real-time state vector;
[0009] Based on current availability of dishes, current inventory information, and patient dining scenarios, a set of candidate dishes that meet the constraints of availability and scenario are selected from the standardized dish library;
[0010] Based on the nutritional vector of each candidate dish and the patient's real-time state vector in the candidate dish set, the directed causal transmission path from the nutrient exposure node of the candidate dish to the patient's diagnosis is retrieved in the pre-constructed nutritional knowledge graph and structured evidence base. The corresponding edge-level evidence set is loaded for each directed causal transmission path to obtain the path set and edge-level evidence information.
[0011] Based on path set and edge-level evidence information, path-level evidence aggregation is performed for each candidate dish to obtain the probabilistic risk value of each candidate dish for each patient's diagnosis.
[0012] Based on probabilistic risk values, nutritional vectors of dishes, and real-time state vectors of patients, candidate dishes in the candidate dish set that exceed a preset safety threshold are subject to hard safety rejection. Based on a dynamic priority strategy, the remaining candidate dishes in the candidate dish set that are not subject to hard safety rejection are weighted and ranked to obtain a set of dietary recommendations.
[0013] In one embodiment, the recipes for each dish are analyzed based on the recipe and ingredient list to obtain a standardized recipe library, including:
[0014] Based on the recipe and ingredient list, each ingredient in the recipe is standardized and mapped to obtain a set of ingredient identifiers and ingredient usage information.
[0015] Based on the raw material identifier set, the corresponding raw material nutrient vector is retrieved from the nutrient composition base table, and the raw material nutrient vector is linearly weighted and summed according to the raw material usage information to obtain the initial nutrient vector of the formula.
[0016] Based on the initial nutritional vector of the recipe, the corresponding processing retention coefficient is loaded according to the processing method of each raw material in the recipe, and the nutrient components in the initial nutritional vector of the recipe are multiplied and adjusted according to the processing retention coefficient to obtain the final nutritional vector of the dish.
[0017] Based on the nutritional vector of the dish, the recipe and the ingredient list, a recipe version identifier is generated through hash operation, and the recipe version identifier and the nutritional vector of the dish are written into the standardized dish library.
[0018] In one embodiment, based on the nutritional vector of each candidate dish in the candidate dish set and the patient's immediate state vector, a directed causal transmission path from the nutrient exposure node of the candidate dish to the patient's diagnosis is retrieved from a pre-constructed nutritional knowledge graph and a structured evidence base. A corresponding set of edge-level evidence is then loaded for each directed causal transmission path, resulting in a path set and edge-level evidence information, including:
[0019] The exposure degree of each nutrient is calculated based on the nutrient vector of each candidate dish, and the exposure degree is mapped to a set of exposure nodes;
[0020] Based on the set of exposed nodes, all directed paths from the set of exposed nodes to the diagnosis list in the patient's immediate state vector are retrieved in the nutrition knowledge graph to obtain the path set.
[0021] Based on the structured evidence base, the evidence set associated with each directed path in the path set is read one by one, and the edge weight and confidence of each directed path are calculated to obtain edge-level evidence information.
[0022] The edge weights are obtained using the following formula:
[0023]
[0024] The confidence level can be obtained using the following formula:
[0025]
[0026] in, Edges that provide evidence of a directed path association; For the collection of evidence, As evidence Evidence quality score; Indicate that the evidence The reported effect estimates are the values after standardization and scaling; and This is the normalized value for the evidence quality score.
[0027] In one embodiment, path-level evidence aggregation is performed for each candidate dish based on the path set and edge-level evidence information to obtain the probabilistic risk value of each candidate dish for each patient's diagnosis, including:
[0028] For each directed path in the path set, the score of the first path is calculated based on the edge weight and confidence level.
[0029] If the same evidence is referenced repeatedly in a directed path, the path score is adjusted based on the number of times it is referenced repeatedly to obtain the second path score;
[0030] The aggregated impact score is obtained by weighted summing of the second path scores of all directed paths from the same candidate dish to a specific diagnosis.
[0031] The aggregated impact score is mapped to a probabilistic risk value according to the preset mapping function;
[0032] The probabilistic risk value can be obtained using the following formula:
[0033]
[0034]
[0035]
[0036]
[0037] in, Probabilistic risk value; To score the aggregated impact; Correction factor for repeated evidence; This refers to the number of repeated references. Score the second path; For directed paths Middle The right to the side; For directed paths The confidence level of edge e in the middle; For directed paths The number of sides; This is the path decay factor; and These are calibration parameters.
[0038] In one embodiment, based on probabilistic risk values, nutritional vectors of dishes, and the patient's immediate state vector, candidate dishes in the candidate dish set that exceed a preset safety threshold are subject to hard safety rejection. Then, based on a dynamic priority strategy, the remaining candidate dishes in the candidate dish set that were not hard safety rejected are weighted and ranked to obtain a dietary recommendation set, including:
[0039] A dynamic priority vector is generated based on the patient's current recovery stage, medical order template, and treatment priority in the patient's real-time status vector, and diagnostic importance weights are assigned to different diagnoses.
[0040] Based on the probabilistic risk values of multiple diagnoses corresponding to the same candidate dish, the probabilistic risk value of multiple diagnoses is obtained, and it is determined whether there is any candidate dish whose probabilistic risk value of multiple diagnoses is greater than or equal to the safety threshold. If so, the candidate dish whose probabilistic risk value of multiple diagnoses is greater than or equal to the safety threshold is marked as prohibited according to the hard safety rejection.
[0041] A comprehensive score is calculated for each candidate dish that passes the hard safety veto based on the dynamic priority vector and diagnostic importance weight;
[0042] The overall score is obtained using the following formula:
[0043]
[0044]
[0045]
[0046]
[0047] in, Candidate dishes Overall score; For the goal The dynamic priority vector; For the goal of medical safety; Assigning importance weights to diagnoses; To convert the risk value into a probabilistic value for multiple diagnoses; To achieve the goal of nutritional balance; The nutritional deviation vector is the difference between the nutritional vector of the dish and the target nutritional vector of the patient. For preferred targets;
[0048] The candidate dishes that passed the strict safety veto were sorted in ascending order of their comprehensive scores to obtain a set of dietary recommendations.
[0049] In one embodiment, the method further includes:
[0050] For candidate dishes marked as prohibited, extract several directed paths from the path set that contribute the most to the aggregated score based on the second path score to obtain candidate sub-paths;
[0051] For each directed path of the candidate sub-path, an evidence card is generated; the evidence card includes a summary of the original dietary guidelines, the type of evidence, and the quality of evidence.
[0052] In one embodiment, the method further includes:
[0053] Construct flavor representation vectors based on each dish in a standardized menu library;
[0054] For each candidate dish that passes the hard safety veto, the cosine similarity between the dish's nutritional vector and flavor representation vector and the preferred dish vector in the patient's medical card information is calculated to obtain a similarity index.
[0055] Based on the principles of similarity priority and minimizing nutritional deviation, and combining similarity indicators, probabilistic risk values, and nutritional deviation vectors, a list of alternative suggestions is obtained for candidate dishes that have passed the hard safety rejection.
[0056] Secondly, this application also provides a dietary recommendation system for a hospital central kitchen, including:
[0057] The recipe module is used to receive recipes and ingredient lists uploaded by the central kitchen, and to perform recipe parsing on each recipe based on the recipes and ingredient lists to obtain a standardized recipe library. The standardized recipe library includes the nutritional vector of each recipe and the corresponding recipe version identifier.
[0058] The patient module is used to obtain patient medical card information and standardize the patient medical card information based on the static attributes, diagnosis list, time series of test indicators, dietary restrictions and religious and cultural constraints recorded in the patient medical card information to obtain the patient's real-time state vector.
[0059] The candidate module is used to select a set of candidate dishes that meet the availability and scenario constraints from the standardized menu based on the current availability of the dishes, the current inventory information, and the patient's dining scenario.
[0060] The matching module is used to retrieve directed causal transmission paths from the nutrient exposure nodes of candidate dishes to the patient's diagnosis in a pre-built nutrition knowledge graph and structured evidence base based on the nutritional vector of each candidate dish and the patient's real-time state vector in the candidate dish set. It also loads the corresponding edge-level evidence set for each directed causal transmission path to obtain the path set and edge-level evidence information.
[0061] The risk assessment module is used to perform path-level evidence aggregation for each candidate dish based on the path set and edge-level evidence information, and obtain the probabilistic risk value of each candidate dish for each patient's diagnosis.
[0062] The dietary recommendation module is used to hard-safely reject candidate dishes in the candidate dish set that exceed a preset safety threshold based on probabilistic risk values, dish nutrition vectors, and patient real-time status vectors. Based on a dynamic priority strategy, the remaining candidate dishes in the candidate dish set that have not been hard-safely rejected are weighted and ranked to obtain a dietary recommendation set.
[0063] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above-mentioned dietary recommendation methods for hospital central kitchens.
[0064] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described hospital central kitchen dietary recommendation methods.
[0065] The aforementioned hospital central kitchen's dietary recommendation method, system, equipment, and media involve the following technical solution: First, the central kitchen uploads recipes and ingredient lists. Through recipe parsing, a standardized recipe library is created, containing nutritional vectors for each dish and corresponding recipe version identifiers. Simultaneously, patient medical card information is acquired and standardized based on static attributes, diagnostic lists, time series of test indicators, dietary restrictions, and religious / cultural constraints to obtain the patient's real-time state vector. Then, combining current dish availability, inventory information, and the patient's dining scenario, a set of candidate dishes meeting the availability and scenario constraints is selected from the standardized recipe library. Finally, based on the nutritional vectors of the candidate dishes and the patient's real-time state vector, a search is performed in a pre-constructed nutritional knowledge graph and structured evidence library. The process establishes a directed causal pathway from the nutrient exposure nodes of selected dishes to patient diagnoses, and loads corresponding edge-level evidence sets to obtain the path set and edge-level evidence information. Then, path-level evidence aggregation yields the probabilistic risk values of each candidate dish for various patient diagnoses. Finally, candidate dishes exceeding a preset safety threshold are first rigidly rejected, and the remaining unrejected candidate dishes are weighted and ranked based on a dynamic priority strategy to obtain a set of dietary recommendations. This process achieves a traceable causal link and evidence support from dish components to patient pathological effects, ensuring a baseline of medical safety. Simultaneously, it achieves fine-grained trade-offs among multiple objectives such as nutritional balance, religious and cultural constraints, and patient preferences, improving the acceptability, nutritional adherence, and auditability of dietary recommendations. Attached Figure Description
[0066] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0067] Figure 1 This is a flowchart illustrating the dietary recommendation method for a hospital central kitchen according to the present invention.
[0068] Figure 2 This is a flowchart illustrating the steps of step S104.
[0069] Figure 3 This is a flowchart illustrating the steps of step S105.
[0070] Figure 4 This is a structural diagram of the dietary recommendation system for a hospital central kitchen according to the present invention. Detailed Implementation
[0071] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0072] In one embodiment, such as Figure 1 As shown, a dietary recommendation method for a hospital central kitchen is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0073] S101. Receive the recipes and ingredient lists uploaded by the central kitchen, and perform recipe analysis on each dish according to the recipes and ingredient lists to obtain a standardized recipe library; the standardized recipe library includes the nutritional vector of each dish and the corresponding recipe version identifier.
[0074] This example illustrates how a pre-defined data interface receives recipes and ingredient lists uploaded by a hospital's central kitchen. The recipes include the ingredient composition of each dish, the order in which they are added, and processing parameters. The ingredient lists specify the exact quantity, specifications, and source of each ingredient. Furthermore, aiming to quantify nutritional information and ensure recipe traceability, the non-standardized recipe information is transformed into structured data in a unified format through integrated analysis of ingredient composition, dosage, and processing effects, forming a standardized recipe library. The nutritional vectors stored in this standardized library are multi-dimensional data carriers obtained by quantifying the content of various nutrients in the dishes, such as protein, carbohydrates, vitamins, and minerals. Recipe version identifiers are generated by encoding key information in the recipe, enabling traceability and management of different batches and adjusted versions of recipes and their corresponding nutritional data, ensuring the accuracy and auditability of nutritional data in subsequent recommendations.
[0075] S102. Obtain the patient's medical card information, and standardize the patient's medical card information according to the static attributes, diagnosis list, time series of test indicators, dietary restrictions and religious and cultural constraints recorded in the patient's medical card information to obtain the patient's real-time state vector.
[0076] This example illustrates how, through integration with the Hospital Information System (HIS) and Laboratory Information System (LIS), comprehensive information associated with the patient's medical card is obtained. This information specifically covers static attributes, diagnostic lists, time series of laboratory test results, dietary restrictions, and religious / cultural constraints. Static attributes include stable physiological and health background information such as the patient's gender, age, height, weight, and history of underlying diseases. The diagnostic list includes the current disease type, stage, and complications confirmed by a clinician, uniformly identified using the International Classification of Diseases (ICD) code. The time series of laboratory test results includes monitoring data of key physiological indicators for the patient over the past 1-3 months, such as blood glucose, blood lipids, and liver and kidney function indicators, including the testing time, indicator values, and reference ranges. Dietary restrictions refer to food or nutrient limitations imposed by the patient due to allergies, disease treatment needs, or medication use. Religious / cultural constraints are dietary preferences imposed by the patient due to religious beliefs or regional cultural customs. Furthermore, the multi-dimensional information is standardized, specifically including mapping the diagnosis list to ICD codes to eliminate differences in diagnostic statements from different physicians; performing data noise reduction and normalization on the time series of test indicators; and labeling dietary restrictions and religious and cultural constraints, such as "high sugar restriction" and "halal diet," and integrating all the processed information into a structured real-time patient status vector.
[0077] S103. Based on the current availability of dishes, current inventory information, and patient dining scenarios, select a set of candidate dishes that meet the availability and scenario constraints from the standardized dish library.
[0078] Furthermore, the application obtains real-time data on the availability of dishes, current inventory, and patient dining scenarios from the hospital's central kitchen. The availability data is synchronized in real-time by the kitchen management system, indicating whether each dish has been processed, meets food safety inspection standards, and is available for supply. Current inventory information includes finished dish inventory, representing the quantity of processed dishes awaiting supply. Patient dining scenario information is determined based on the patient's visit time, treatment stage, and medical orders, such as breakfast, lunch, post-operative rehabilitation, and intensive care scenarios. Different scenarios correspond to different dietary needs; for example, post-operative rehabilitation scenarios require priority given to easily digestible, high-protein dishes. Based on the above three types of data, candidate dishes are screened from a standardized menu. Specifically, dishes marked as "unavailable" in the current availability data or showing a shortage of finished products in the inventory information are removed to ensure that the screened dishes have actual supply conditions. In combination with the constraints of the patient's dining scenario, such as prioritizing staple foods like porridge and steamed buns, as well as light side dishes for breakfast, and prioritizing liquid or semi-liquid dishes for intensive care, a set of candidate dishes that meets the availability and scenario constraints is formed, which lays the foundation for narrowing down the scope and making accurate recommendations in the future.
[0079] S104. Based on the nutritional vector of each candidate dish and the patient's real-time state vector in the candidate dish set, retrieve the directed causal transmission path from the nutrient exposure node of the candidate dish to the patient's diagnosis in the pre-constructed nutritional knowledge graph and structured evidence base, and load the corresponding edge-level evidence set for each directed causal transmission path to obtain the path set and edge-level evidence information.
[0080] Optionally, for each candidate dish in the candidate dish set, its corresponding nutritional vector in the standardized dish library is extracted. Simultaneously, the standardized real-time patient state vector is retrieved. Using these two types of vectors as the core retrieval criteria, a causal transmission path retrieval operation is initiated in the pre-constructed nutritional knowledge graph and structured evidence library. The nutritional knowledge graph is a structured knowledge network built based on medical guidelines, clinical research literature, and nutritional theories. Nodes in this network include nutrients, physiological indicators, and disease diagnoses. Directed edges between nodes represent causal relationships between different nodes, such as "increased glucose intake leads to elevated blood sugar" or "elevated blood sugar leads to worsening of type 2 diabetes." The structured evidence library stores medical evidence supporting the directed edge relationships in the nutritional knowledge graph, including evidence sources such as the "Chinese Dietary Guidelines" and PubMed-indexed literature, evidence types such as randomized controlled trials and cohort studies, and information such as evidence quality scores. Specifically, the retrieval process involves locating directed causal transmission paths from nutrient exposure nodes of candidate dishes to diagnostic nodes in the patient's immediate state vector. Nutrient exposure nodes are calculated based on the dish's nutrient vector, representing potential changes in specific nutrient levels in the patient's body after consuming that dish. After retrieving all directed causal transmission paths related to the patient's diagnosis, a corresponding edge-level evidence set is loaded for each path. This set contains all medical evidence data corresponding to each directed edge in the path, such as abstracts of clinical research literature supporting the theory that "increased glucose intake leads to elevated blood sugar," and evidence quality scores. These are ultimately integrated to form the path set and edge-level evidence information.
[0081] S105. Based on the path set and edge-level evidence information, perform path-level evidence aggregation for each candidate dish to obtain the probabilistic risk value of each candidate dish for each patient's diagnosis.
[0082] Furthermore, based on the acquired path set and edge-level evidence information, path-level evidence aggregation is performed on each candidate dish. Quantitative calculations are used to integrate the evidence strength of each directed causal transmission path, yielding the probabilistic risk value of the candidate dish for each patient's diagnosis. Specifically, for each directed causal transmission path in the path set, its path score is calculated. ,in, For a single directed causal transmission path The path score is used to characterize the strength of the path's influence on patient diagnosis; As a duplicate evidence correction factor, when multiple pathways repeatedly cite the same medical evidence, this factor weakens the weight inflation effect of duplicate evidence and avoids evaluation bias caused by duplicate citation of evidence; For path Middle The edge weights, based on the effect size of evidence in the edge-level evidence set, such as the correlation coefficient between nutrient intake and disease risk in clinical studies, are used to characterize the edge. The strength of the effect corresponding to the causal relationship; For path Middle The confidence level is derived from the quality score transformation of evidence in the edge-level evidence set, representing the edge. The credibility of the corresponding causal relationship; This is the path attenuation factor, with a value ranging from 0 to 1, used to weaken the association strength attenuation caused by excessively long paths. For path Number of edges contained That is, the path score is adjusted to decrease as the path length increases; The sign function determines the direction of the path's influence on the patient's diagnosis by calculating the sign of the product of all edge weights in the path. A positive sign indicates an increased risk of disease, while a negative sign indicates a decreased risk of disease.
[0083] Furthermore, the path scores of all directed causal pathways for the same candidate dish in relation to a specific diagnosis of a patient are weighted and summed to obtain the aggregated impact score of the candidate dish on that diagnosis. ,in, The aggregated impact score of candidate dishes on a patient's specific diagnosis (diag) comprehensively reflects the overall impact of all pathways on that diagnosis; This is the set of all directed causal pathways from a candidate dish to a patient's diagnosis. Using a pre-defined S-shaped mapping function, the aggregated impact score is converted into a probabilistic risk value. ,in, The value is the probabilistic risk value of the candidate dish for a patient's specific diagnosis. The value ranges from 0 to 1. The higher the value, the greater the likelihood that the dish will exacerbate the patient's corresponding disease risk. and To calibrate the parameters, historical clinical data, such as records of changes in patients' conditions after consuming a certain type of food, were fitted using a logistic regression model to ensure consistency between the probabilistic risk value and the actual clinical risk.
[0084] S106. Based on probabilistic risk values, nutritional vectors of dishes, and real-time state vectors of patients, candidate dishes in the candidate dish set that exceed the preset safety threshold are subject to hard safety rejection. Based on a dynamic priority strategy, the remaining candidate dishes in the candidate dish set that have not been hard safety rejected are weighted and ranked to obtain a dietary recommendation set.
[0085] In a schematic manner, the preset safety threshold is set based on clinical treatment guidelines and nutrition guidelines, and can be adjusted according to the type of hospital department and the characteristics of the patient group. The probabilistic risk value of each candidate dish for all patient diagnoses is compared with the safety threshold one by one. If the probabilistic risk value of a candidate dish for any diagnosis exceeds the safety threshold, it is determined that the dish may have an adverse effect on the patient's condition, and a hard safety rejection is performed, directly excluding it from the subsequent recommendation range to ensure the bottom line of medical safety. Furthermore, for the remaining candidate dishes that are not hard safety rejected, a weighted scoring and ranking process based on a dynamic priority strategy is initiated. For example, this combines the patient's current status vector (recovery stage), medical order templates (such as a doctor's order for a "low-salt, low-fat diet"), and treatment priorities (such as prioritizing nutritional needs related to stable vital signs for critically ill patients) to construct a dynamic priority vector. This vector assigns real-time weights to various recommendation objectives, such as medical safety, nutritional balance, religious and cultural compliance, and taste preferences. Representing different recommendation goals, Representing the current time point, the weight values are dynamically adjusted according to changes in the patient's condition. For example, during the postoperative recovery period, the weight of the "nutritional balance" target is higher than that of the "taste preference" target. At the same time, based on the severity of the patient's diagnosis and the urgency of treatment, diagnostic importance weights are assigned to each diagnosis to correct the degree of influence of the risk values corresponding to different diagnoses in the comprehensive assessment.
[0086] Optionally, a comprehensive score can be calculated for the remaining candidate dishes based on a dynamic priority vector and diagnostic importance weights. ,in, Candidate dishes The comprehensive score reflects its performance under each recommended objective. Candidate dishes In recommended goals The objective function values are as follows, specifically including the medical safety objective function. It can be calculated based on diagnostic importance weights and probabilistic risk values; the lower the risk value, the higher the function value, and it also includes a nutritional balance objective function. It can be calculated based on the deviation between the nutritional vector of the dish and the target nutritional vector of the patient. The smaller the deviation, the higher the value of the function. There are also objective functions that include religious culture and preferences. The function can be calculated based on whether the dishes conform to the patient's religious constraints and taste preferences; the higher the conformity, the higher the function value. Furthermore, candidate dishes that were not explicitly rejected for safety are ranked according to their overall scores from highest to lowest. The ranking result constitutes the final set of dietary recommendations, which can be directly provided to patients or healthcare professionals as a basis for dietary choices.
[0087] The dietary recommendation method used in the aforementioned hospital central kitchen involves parsing and standardizing the recipes uploaded by the central kitchen into a recipe library containing nutrient vectors and recipe version identifiers. Based on the patient's medical card, the patient's static attributes, diagnosis and testing time series, contraindications, and religious / cultural constraints are unified into a patient's real-time state vector. Combining current dish availability and inventory with the dining scenario, a set of available candidate dishes is selected from the standardized recipe library. Then, a directed causal path from nutrient exposure in candidate dishes to patient diagnosis is retrieved from a pre-constructed nutrient knowledge graph and structured evidence library, and corresponding literature evidence is loaded. The retrieved paths are then further processed. The system aggregates evidence at the edge level and generates probabilistic risk values at the path level and menu level. These risk values are used to first trigger a hard safety veto to eliminate obviously unsafe items. Then, based on the dynamic priority determined by the rehabilitation stage or medical order template, the remaining candidates are weighted and scored according to objectives such as safety, nutritional deviation, and preference to generate a final recommendation set. This achieves causal filtering based on clinical evidence, fine-grained arbitration of dynamic priorities, and auditable recommendation output. This improves personalized matching, interpretability, and patient acceptance of nutritional meals while ensuring the bottom line of medical safety, which is conducive to improving clinical rehabilitation effects and subsequent accountability.
[0088] In one embodiment, the recipes for each dish are analyzed based on the recipe and ingredient list to obtain a standardized recipe library, including:
[0089] S11. Based on the recipe and ingredient list, standardize and map each ingredient in the recipe to obtain the ingredient identifier set and ingredient usage information.
[0090] This example illustrates how a standardized mapping operation is performed on each ingredient in a recipe and ingredient list, based on a pre-built ingredient standard dictionary. The ingredient standard dictionary stores industry-standard ingredient classification codes, alias mappings, and specification standards, ensuring that the same ingredient described differently can be uniformly identified. During the mapping process, text matching and alias replacement are performed on the ingredient names in the recipe, associating them with unique ingredient standard codes to form a set of ingredient identifiers. Simultaneously, the usage data for each ingredient is extracted from the ingredient list, and the usage of different units is uniformly converted to obtain standardized ingredient usage information.
[0091] S12. Based on the raw material identifier set, retrieve the corresponding raw material nutrient vector from the nutrient composition base table, and perform linear weighted summation on the raw material nutrient vector according to the raw material usage information to obtain the initial nutrient vector of the formula.
[0092] Furthermore, a pre-constructed nutrient composition table is invoked. This table, based on the *Chinese Food Composition Table* and authoritative nutrition databases, stores the nutrient vectors for each ingredient. Each component of this vector corresponds to a nutrient class, such as protein, fat, carbohydrates, vitamin B1, and calcium, and its content per unit mass of ingredient. Based on the standard code of each ingredient in the ingredient identifier set, the corresponding nutrient vector is retrieved from the nutrient composition table. Using the ingredient dosage information as weight, a linear weighted sum is performed on each ingredient's nutrient vector to calculate the initial nutrient vector for the formula. ,in, The initial nutrient vector of the recipe represents the theoretical nutritional composition of the dish without considering the effects of processing. This refers to the types and quantities of ingredients in a dish recipe; For the first Standardized usage of various raw materials; For the first The raw material nutrient vector, and the components of the vector are related to... The nutrient categories are matched one-to-one, and the nutritional contributions of all raw materials are accumulated through weighted summation.
[0093] S13. Based on the initial nutritional vector of the recipe, the corresponding processing retention coefficient is loaded according to the processing method used for each raw material in the recipe. The nutrient components in the initial nutritional vector of the recipe are multiplied and adjusted according to the processing retention coefficient to obtain the final nutritional vector of the dish.
[0094] In a schematic manner, a pre-constructed processing influence database is first retrieved. This database stores the retention coefficients of various nutrients for different processing methods, such as steaming, boiling, frying, grilling, and braising. The retention coefficient is the ratio of the actual nutrient content after processing to the theoretical content before processing, ranging from 0 to 1. A higher value indicates less damage to the corresponding nutrient by the processing method; for example, steaming has a higher retention coefficient for vitamin C than frying. Specifically, based on the processing methods of each ingredient recorded in the recipe, the retention coefficients of each nutrient under each processing method for each ingredient are loaded from the processing influence database, forming a retention coefficient matrix. The first in the matrix Line number Column elements Indicates the first After processing the first type of raw material The retention coefficients of nutrient-like substances. Furthermore, the retention coefficient matrix is used to analyze the initial nutrient vector of the formulation. The components of each nutrient in the formula are multiplied and adjusted to obtain the final nutritional vector of the dish. ,in, The first in the nutritional vector of the dish The final content of nutrient-like substances; For the first The first of the raw material nutrient vectors Content of various nutrients; For the first After processing the first type of raw material Nutrient retention coefficient. By introducing a retention coefficient, the loss of nutrients during processing is corrected, making the final nutritional profile of the dish more closely match the nutritional status at the time of actual consumption.
[0095] S14. Based on the dish nutrition vector, dish recipe and ingredient list, generate a recipe version identifier through hash operation, and write the recipe version identifier and dish nutrition vector into the standardized dish library.
[0096] Indicatively, the input dataset for the hash operation is defined. This dataset contains core information such as the dish's nutritional vector, the standard code set of the ingredients for the dish's recipe, a list of processing methods, and key data from the ingredient list. This ensures that different recipe version identifiers can be generated when the recipe, dosage, or processing method of the same dish changes. Optionally, the SHA-256 hash algorithm is used to hash the input dataset, generating a fixed-length hash value. This hash value is the recipe version identifier. The recipe version identifier is associated with and stored in the corresponding dish nutritional vector, and written into a standardized dish library. Simultaneously, a mapping relationship between the recipe version identifier and the basic information of the dish is established, ensuring that the corresponding dish nutritional data can be quickly retrieved from the standardized dish library using the recipe version identifier.
[0097] In one embodiment, such as Figure 2 As shown, based on the nutritional vectors of each candidate dish and the patient's immediate state vector in the candidate dish set, directed causal transmission paths from the nutrient exposure nodes of the candidate dishes to the patient's diagnosis are retrieved in a pre-constructed nutritional knowledge graph and structured evidence base. Corresponding edge-level evidence sets are then loaded for each directed causal transmission path, resulting in a path set and edge-level evidence information, including:
[0098] S201. Calculate the exposure of each nutrient based on the nutrient vector of each candidate dish, and map the exposure to a set of exposure nodes.
[0099] In a schematic manner, the nutritional vector of candidate dishes is extracted, containing specific content data of various nutrients in the dish. Combined with basic physiological and nutritional requirements parameters such as patient weight and daily recommended nutrient intake from the patient's real-time status vector, the exposure degree for each nutrient is calculated. The exposure degree characterizes the actual exposure level of the corresponding nutrient in the patient's body after consuming the candidate dish. Its calculation logic is related to the portion size of the dish consumed and the patient's individual metabolic characteristics, such as the impact of basal metabolic rate on nutrient absorption, ensuring that the exposure degree accurately reflects the physiological effects after dish intake. Furthermore, a pre-built exposure node mapping rule library is invoked. This rule library stores the correspondence between nutrient exposure levels and "exposure nodes" in the nutrition knowledge graph. For example, "sodium exposure > 200mg / meal" corresponds to a "high sodium exposure node," and "dietary fiber exposure < 5g / meal" corresponds to a "low dietary fiber exposure node." The calculated nutrient exposure degrees are matched to predefined nodes in the nutrition knowledge graph, forming the exposure node set corresponding to the candidate dish.
[0100] S202. Based on the set of exposed nodes, retrieve all directed paths from the set of exposed nodes to the diagnosis list in the patient's immediate state vector in the nutrition knowledge graph to obtain the path set.
[0101] Furthermore, starting with the set of exposed nodes, and ending with the diagnostic nodes included in the diagnosis list of the patient's immediate state vector, such as "type 2 diabetes" and "grade 3 hypertension," a directed path retrieval process is initiated in the nutrition knowledge graph. The nutrition knowledge graph includes node types covering nutrient exposure nodes, physiological indicator nodes such as "elevated fasting blood glucose" and "elevated systolic blood pressure," pathological state nodes such as "insulin resistance," and diagnostic nodes. Directed edges between nodes represent causal relationships between different nodes, such as "high glucose exposure node" → "elevated fasting blood glucose node" → "type 2 diabetes diagnosis node," and the edge attributes include the direction and core influencing mechanism of the relationship, such as "promote" and "inhibit." Optionally, the retrieval process employs an improved breadth-first search algorithm, setting a path length threshold to avoid retrieving long paths with low relevance, and setting a relevance strength threshold to retain only paths whose edge attributes meet preset standards for relevance strength, ensuring the relevance and effectiveness of the retrieval results. By traversing all qualified directed paths from the set of exposure nodes to the diagnosis node, these paths are integrated into a path set, each path fully presenting the causal transmission chain from nutrient exposure to patient diagnosis.
[0102] S203. Based on the structured evidence base, read the associated evidence set for each directed path in the path set, and calculate the edge weight and confidence for each directed path to obtain edge-level evidence information.
[0103] The edge weights are obtained using the following formula:
[0104]
[0105] The confidence level can be obtained using the following formula:
[0106]
[0107] in, Edges that provide evidence of a directed path association; For the collection of evidence, As evidence Evidence quality score; Indicate that the evidence The reported effect estimates are the values after standardization and scaling; and This is the normalized value for the evidence quality score.
[0108] Furthermore, a structured evidence base is invoked. This evidence base stores data according to a mapping relationship of "edge identifier - evidence set," where the "edge identifier" corresponds to the unique code of each directed edge in the nutrition knowledge graph, and the "evidence set" contains all medical evidence supporting the association of that edge, such as clinical research literature and authoritative dietary guidelines. For each directed path in the path set, the evidence set corresponding to each directed edge in the path is read one by one, that is, for each edge in the path... Extract the evidence set corresponding to the edge from the structured evidence base. This completes the association and binding of paths and evidence.
[0109] Subsequently, the system based on the extracted evidence set Calculate each edge separately Boundary rights With confidence level Border rights ,in, Let be an edge in a directed path, used to connect two related nodes in the nutrient knowledge graph; For the edge The corresponding evidence set contains all medical evidence that supports the relationship between the edges; For the collection of evidence The Middle The evidence quality score is based on dimensions such as evidence type, sample size, and rigor of research design. It is obtained by normalization through a preset scoring model, such as the GRADE scoring system, and the value ranges from 0 to 1. The higher the value, the better the evidence quality. For the collection of evidence The Middle The effect estimates from individual evidence reports are scaled uniformly. The scaling logic needs to eliminate differences in effect size units between different pieces of evidence. For example, "relative risk RR=1.5" and "risk difference RD=0.2" should be converted into effect indicators of a uniform dimension to ensure that effect estimates from different pieces of evidence can be directly used in the calculation; (marginal weights) Essentially, it is a weighted average effect estimate of the association relationship of the side, which can comprehensively reflect the degree of support of all evidence for the strength of the association relationship of the side.
[0110] Confidence The definitions of each parameter are consistent with those in the edge weight calculation; confidence level The accumulated evidence quality score reflects the edge The credibility of the association depends on the evidence set. Medium- to high-quality evidence The more evidence that is close to 1, the better. The closer the product is to 0, The closer the value is to 1, the higher the credibility of the relationship; conversely, if the quality of the evidence is low or the quantity of evidence is insufficient, The value will decrease accordingly. For each edge... Boundary rights Confidence level With the corresponding set of evidence By integrating these elements, we can form edge-level evidence information and achieve a complete association between the path set and the edge-level evidence information.
[0111] In one embodiment, such as Figure 3 As shown, path-level evidence aggregation is performed on each candidate dish based on the path set and edge-level evidence information to obtain the probabilistic risk value of each candidate dish for each patient's diagnosis, including:
[0112] S301. For each directed path in the path set, calculate the score of the first path based on the edge weight and confidence level.
[0113] Specifically, this involves extracting the edge weights and confidence scores of all edges in a directed path, that is, obtaining each edge in the path one by one. Corresponding edge weight The strength of the effect characterizing edge association, and the confidence level. Characterize the reliability of edge relationships; simultaneously count the number of edges contained in the directed path. The number of edges directly reflects the causal transmission hierarchy of the path; the more levels there are, the weaker the association may be. Furthermore, a path decay factor is introduced. This is used to weaken the influence weight of long paths and avoid the problem of reduced association credibility due to excessively long paths. For example, when calculating the score of the first path, the absolute value of the edge weight of all edges in the path is first multiplied by the confidence score. This integrates the strength and reliability of single-edge effects, and then combines the calculation results with the path attenuation term. Multiplication corrects for the impact on path length, and finally, the result is processed using a sign function. Determine the direction of the path's influence; a positive sign indicates an increased risk of disease, while a negative sign indicates a decreased risk of disease, thus forming the first path score.
[0114] S302. If the same evidence is repeatedly referenced in a directed path, the path score is adjusted according to the number of times it is repeatedly referenced to obtain the second path score.
[0115] The evidence citations for each directed path are examined to determine whether there are instances of duplicate citations of the same medical evidence within the path, i.e., evidence sets from different sides. The evidence contains the same entries. If duplicate citations exist, count the number of times each type of duplicate evidence is cited in that path. This refers to the total number of times a piece of evidence is cited in this path, and a duplicate evidence correction factor is calculated based on the number of duplicate citations. In other words, the more times the evidence is cited repeatedly, the smaller the correction factor becomes. This weakens the weight inflation effect of repeated evidence on the path score and avoids artificially inflated path scores due to repeated citations of the same evidence. The first path score is then compared with the repeated evidence correction factor. Multiplying these values and adjusting the path scores for repeatedly cited evidence yields the final second path score. , It comprehensively reflects the effect strength, credibility, length impact of the path, and the actual impact after correction of repeated evidence.
[0116] S303. The weighted sum of the second path scores of all directed paths from the same candidate dish to a specific diagnosis is used to obtain the aggregated impact score.
[0117] Furthermore, for each candidate dish and each patient's diagnosis, a "candidate dish - specific diagnosis" correspondence is established, and all directed paths under this correspondence are selected, i.e., all paths in the path set pointing from the candidate dish's exposed node to the specific diagnosis. Second path scores are then assigned to these paths. A weighted summation is performed, without introducing additional weighting coefficients. This means that each path's contribution to the diagnostic risk is assumed to have equal basic weight. The impact of all paths is aggregated through direct summation, ultimately yielding the aggregated impact score of the candidate dish for that specific diagnosis. ,in, To aggregate the impact score, the numerical value directly reflects the overall risk impact of the candidate dish on a specific diagnosis. A positive value indicates increased risk, and the larger the value, the higher the risk; a negative value indicates decreased risk, and the smaller the value, the lower the risk. It is the set of all directed paths under the "candidate dish - specific diagnosis" correspondence; The score for the second path of each path in the set.
[0118] S304. According to the preset mapping function, the aggregated impact score is mapped to obtain the probabilistic risk value.
[0119] The probabilistic risk value can be obtained using the following formula:
[0120]
[0121]
[0122]
[0123]
[0124] in, Probabilistic risk value; To score the aggregated impact; Correction factor for repeated evidence; This refers to the number of repeated references. Score the second path; For directed paths Middle The right to the side; For directed paths The confidence level of edge e in the middle; For directed paths The number of sides; This is the path decay factor; and These are calibration parameters.
[0125] As an example, the preset S-shaped mapping function, i.e., the logistic regression function, is invoked to aggregate the impact score. Convert to probabilistic risk value This enables a standardized transformation from "impact rating" to "probabilistic risk," facilitating a more intuitive assessment of the risk level of candidate dishes. ,in, The value is a probabilistic risk value, ranging from 0 to 1. The closer the value is to 1, the higher the probability that the candidate dish will exacerbate the specific diagnostic risk; the closer the value is to 0, the lower the risk. and The calibration parameters are used to adjust the slope and intercept of the mapping function to ensure that the probabilistic risk value accurately matches the actual clinical risk level; exp is the natural exponential function, which uses the S-curve property to transform the unbounded range of values. Compress the risk value to the 0~1 range to achieve standardized output of the risk value.
[0126] In one embodiment, based on probabilistic risk values, nutritional vectors of dishes, and the patient's immediate state vector, candidate dishes in the candidate dish set that exceed a preset safety threshold are subject to hard safety rejection. Then, based on a dynamic priority strategy, the remaining candidate dishes in the candidate dish set that were not hard safety rejected are weighted and ranked to obtain a dietary recommendation set, including:
[0127] S21. Generate a dynamic priority vector based on the patient's current recovery stage, medical order template, and treatment priority in the patient's real-time status vector, and assign diagnostic importance weights to different diagnoses.
[0128] Indicatively, key information is extracted from the patient's real-time state vector, including the patient's current recovery stage, medical order template, and treatment priority, to construct a dynamic priority vector. ,in The core objectives of dietary recommendations include medical safety goals, nutritional balance goals, and goals related to religious culture and taste preferences. Representing the current time point, the numerical value of each component in the vector represents the priority weight of the corresponding target, enabling dynamic adjustment of priority based on the patient's condition. Simultaneously, based on the clinical severity, treatment urgency, and dietary sensitivity of each diagnosis in the patient's diagnosis list, a diagnostic importance weight is assigned to each diagnosis. For example, the weight of a diagnosis of acute myocardial infarction is higher than that of a diagnosis of mild hypertension, and the weight of a diagnosis of diabetic ketoacidosis is higher than that of a diagnosis of gestational diabetes, to ensure that the risk impact of severe diagnoses is more fully considered in subsequent risk assessments.
[0129] S22. Based on the probabilistic risk values of multiple diagnoses corresponding to the same candidate dish, obtain the probabilistic risk value of multiple diagnoses, and determine whether there is any candidate dish whose probabilistic risk value of multiple diagnoses is greater than or equal to the safety threshold. If so, mark the candidate dish whose probabilistic risk value of multiple diagnoses is greater than or equal to the safety threshold as prohibited according to the hard safety rejection.
[0130] As an illustration, for each candidate dish, its probabilistic risk value for all diagnoses of the patient is retrieved and integrated to form a multi-diagnosis probabilistic risk value set for that dish. ,in The number of diagnoses in the patient's diagnosis list. For the dishes targeted at the first The probabilistic risk values for each diagnosis are used; this set represents the probabilistic risk values for multiple diagnoses corresponding to the same candidate dish. Furthermore, a preset safety threshold is retrieved. Each risk value in the multi-diagnostic probabilistic risk value set is compared one by one with the safety threshold. If any risk value exists in the multi-diagnostic probabilistic risk value set of a candidate dish... ≥ If a dish is determined to have an adverse clinical impact on a patient's diagnosis, a strict safety veto is immediately implemented, marking the candidate dish as "prohibited from recommendation" and directly excluding it from the subsequent recommendation process, thus ensuring the medical safety baseline of dietary recommendations.
[0131] S23. Calculate the comprehensive score for each candidate dish that passes the hard safety veto based on the dynamic priority vector and diagnostic importance weight.
[0132] The overall score is obtained using the following formula:
[0133]
[0134]
[0135]
[0136]
[0137] in, Candidate dishes Overall score; For the goal The dynamic priority vector; For the goal of medical safety; Assigning importance weights to diagnoses; To convert the risk value into a probabilistic value for multiple diagnoses; To achieve the goal of nutritional balance; The nutritional deviation vector is the difference between the nutritional vector of the dish and the target nutritional vector of the patient. For preferred targets.
[0138] Furthermore, the remaining candidate dishes, after being rejected by hard safety measures, are then evaluated based on a dynamic priority vector. Importance weight of diagnosis A comprehensive scoring model was constructed, incorporating medical safety objectives, nutritional balance objectives, and religious culture and taste preference objectives, to calculate the comprehensive score for each candidate dish. Candidate dishes The overall score indicates that the dish better meets the patient's current dietary needs; For the first A dynamic priority vector for each recommended target, with component values dynamically adjusted according to the patient's condition; Candidate dishes In the The objective function values under the recommended objectives include the medical safety objective function. Nutritional balance objective function Religious culture and taste preferences objective function . Let k be the diagnostic importance weight of the k-th diagnosis; Candidate dishes Regarding the first The multi-diagnostic probabilistic risk value for each diagnostic item; a negative sign indicates a higher risk value for the candidate dish. The lower the value, the lower the overall score of the dish, thus suppressing the weight of high-risk dishes. Candidate dishes The difference between the nutritional vector of the dishes and the target nutritional vector of the patient is the nutritional deviation vector. Each component in the vector represents the amount of intake deviation of the corresponding nutrient. The target nutritional vector of the patient is the daily recommended intake vector of nutrients set based on the patient's age, weight, recovery stage, and diagnostic needs. This is a weighted matrix of nutrient importance; for example, protein has a higher weight than carbohydrates during the postoperative recovery period. The negative sign indicates that the smaller the nutritional deviation, the higher the value of the patient's target nutrient vector, and dishes that ensure nutritional balance can get higher scores. Candidate dishes The preference score is calculated based on the religious and cultural constraints and taste preference records in the patient's instantaneous state vector. The higher the score of the dish that meets the constraints and preferences, the lower the score.
[0139] S24. Sort the candidate dishes that have passed the hard safety veto in order of their comprehensive scores from smallest to largest to obtain the dietary recommendation set.
[0140] This example illustrates how candidate dishes are sorted in ascending order of their overall scores. During the sorting process, dishes with higher overall scores appear earlier in the ranking and are given priority for recommendation to patients. After sorting, the results are integrated into a structured dietary recommendation set. This set includes the names of the candidate dishes, a summary of their nutritional vectors, their overall scores, and a description of their recommendation priority. This set can be directly output to the hospital's central kitchen for meal preparation or provided to patients and healthcare staff as a basis for dietary choices.
[0141] In one embodiment, the method further includes:
[0142] S31. For candidate dishes marked as prohibited, extract several directed paths from the path set that contribute the most to the aggregation impact score according to the second path score, and obtain candidate sub-paths.
[0143] This is an example of filtering candidate dishes from the set of candidate dishes that have been marked as "not recommended". Each dish is excluded because it contains at least one of the following conditions: ≥ However, these were rejected due to strict safety considerations. For each prohibited candidate dish, the set of paths corresponding to it during the risk assessment phase was retrieved. This set is the set of directed causal transmission paths from the nutrient exposure node to the patient's diagnosis, which was previously constructed to calculate the aggregated impact score of the dish. The second path score of each directed path in this set was further extracted. Since the absolute value of the second path score directly reflects the path's contribution to the aggregated impact score—that is, the larger the absolute value, the more significant the path's contribution to increasing the risk value in the final risk assessment—all paths in the path set are sorted in descending order based on the absolute value of the second path score. Several top-ranked paths are selected as candidate sub-paths according to preset rules. Selection criteria can be based on a fixed number or a contribution percentage threshold, such as selecting paths with a cumulative contribution percentage exceeding 80% of the total contribution, ensuring that the selected candidate sub-paths accurately pinpoint the core causal link that led to the dish's ban.
[0144] S32. Generate an evidence card for each directed path of the candidate sub-paths; the evidence card includes a summary of the original dietary guidelines, the type of evidence, and the quality of evidence.
[0145] For each candidate sub-path, a structured evidence card generation process is initiated. This card aims to clearly present the medical evidence supporting the causal relationship of the path, facilitating patients, healthcare professionals, or nutrition managers to trace the specific reasons why the dish was prohibited. For the original dietary guideline summary, the edge-level evidence set corresponding to each edge of the candidate sub-path is retrieved from the structured evidence database. The evidence entries from authoritative medical dietary guidelines were selected, and core content directly related to the causal relationship of the pathway was extracted to ensure that the abstract accurately reflects the guidelines' recommendations on the pathway association, and that the language is concise and easy to understand. For evidence type, each piece of evidence was categorized and labeled according to its research design methodology. Common types include randomized controlled trials (RCTs), prospective cohort studies, retrospective case-control studies, expert consensus, and systematic reviews. Different labeling types can intuitively reflect the scientific research basis of the evidence, helping users determine the level of reliability. For evidence quality, based on the previously calculated evidence quality score... To perform a level conversion, for example, set... ≥0.8 corresponds to "high quality", 0.5≤ <0.8 corresponds to "medium quality" A score <0.5 corresponds to "low quality," transforming abstract numerical values into intuitive quality levels. The cards also briefly highlight the core criteria for quality scoring. The original dietary guidelines summary, evidence type, and evidence quality are integrated into a unified evidence card format. Each card is linked to a corresponding candidate sub-path, forming an evidence-based document explaining the reasons for food prohibition. When patients or healthcare professionals want to understand why a particular dish cannot be eaten, this document, along with the dish's information, allows them to weigh their personal dietary preferences against clinical rehabilitation dietary recommendations.
[0146] In one embodiment, the method further includes:
[0147] S41. Construct flavor representation vectors based on each dish in the standardized menu library.
[0148] This example illustrates how, using a standardized menu as a data foundation, flavor-related attribute information for each dish in the menu is extracted. These attributes encompass taste, texture, flavor, and flavor associated with specific ingredients. A standardized quantification system is employed to process these attributes, such as dividing each attribute into a continuous scoring range of 0 to 10, categorized as "none-weak-medium-strong-extremely strong," where "0" represents no effect and "10" represents extremely strong effect. An independent flavor representation vector dimension is assigned to each dish, with each dimension corresponding to a quantified flavor attribute. The quantified scores of each attribute are used as vector components to form the flavor representation vector for that dish. During vector construction, calibration is performed in conjunction with the dish's ingredient composition and cooking techniques to ensure that the flavor representation vector accurately reflects the actual taste characteristics of the dish when consumed.
[0149] S42. For each candidate dish that passes the hard safety veto, calculate the cosine similarity between the dish's nutritional vector and flavor representation vector and the preferred dish vector in the patient's medical card information to obtain a similarity index.
[0150] The patient's preferred dishes are extracted from their medical card information, including dishes repeatedly selected in their historical order history and explicitly marked "preferred" dishes. Based on the flavor and nutritional vectors of these preferred dishes, a patient's preferred dish vector is constructed. For each candidate dish that passes strict safety rejection, its comprehensive vector (nutritional and flavor vectors) is retrieved and compared with the patient's preferred dish vector using cosine similarity calculation to obtain a similarity index. ,in, The value ranges from 0 to 1, with values closer to 1 indicating a more comprehensive vector of candidate dishes. Vector of patient's preferred dishes The higher the similarity; This represents the number of dimensions of the composite vector; The first in the comprehensive vector of candidate dishes The component values of each dimension; The first in the patient's preferred dish vector The component values of each dimension; Characterizes the directional consistency between vectors; This is used to standardize the dot product results, eliminate the influence of the absolute numerical value of the vectors, and ensure that the similarity only reflects the degree of directional association.
[0151] S43. Based on the principles of similarity priority and minimizing nutritional deviation, and combining similarity indicators, probabilistic risk values, and nutritional deviation vectors, a list of alternative suggestions is obtained for candidate dishes that have passed the hard safety rejection.
[0152] This approach, illustratively speaking, follows the dual principles of "similarity priority" and "minimizing nutritional deviation." It combines similarity indicators, the probabilistic risk values of candidate dishes, and nutritional deviation vectors to screen and rank candidate alternatives, resulting in a list of suggested alternatives. The similarity priority principle prioritizes candidate dishes with similarity indicators exceeding a preset similarity threshold, ensuring that the alternative dishes closely match patient preferences in taste and nutritional characteristics, thus increasing patient acceptance. The nutritional deviation minimization principle prioritizes dishes with smaller nutritional deviation vector magnitudes among those meeting similarity requirements. The magnitude of the nutritional deviation vector is calculated... ,in, The nutritional deviation vector is the first Components of each dimension The nutritional dimension is represented by a smaller modulus, indicating a smaller deviation between the nutritional composition of the dish and the patient's target nutritional needs. Furthermore, candidate dishes meeting the above two principles undergo a second verification using probabilistic risk values to ensure that the probabilistic risk values of the selected alternative dishes remain below a safe threshold. Further, candidate dishes are sorted in descending order of similarity index, ascending order of nutritional deviation vector modulus, and ascending order of probabilistic risk value, forming an alternative suggestion list. This list includes the name of the alternative dish, its similarity index score, a description of the degree of nutritional deviation, and its probabilistic risk value, providing patients with a clear basis for alternative selection.
[0153] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be performed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be performed at different times, and the order in which these steps or stages are performed is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of steps or stages in other steps.
[0154] Based on the same inventive concept, this application also provides a dietary recommendation system for a hospital central kitchen to implement the dietary recommendation method for a hospital central kitchen as described above. The solution provided by this system is similar to the solution described in the above method; therefore, the specific limitations of one or more embodiments of the dietary recommendation system for a hospital central kitchen provided below can be found in the limitations of the dietary recommendation method for a hospital central kitchen described above, and will not be repeated here.
[0155] In one exemplary embodiment, such as Figure 4 As shown, a dietary recommendation system for a hospital central kitchen is provided, including:
[0156] The recipe module 401 is used to receive recipes and ingredient lists uploaded by the central kitchen, and to perform recipe parsing processing on each dish according to the recipes and ingredient lists to obtain a standardized recipe library; the standardized recipe library includes the nutritional vector of each dish and the corresponding recipe version identifier.
[0157] The patient module 402 is used to obtain patient medical card information and standardize the patient medical card information according to the static attributes, diagnosis list, time series of test indicators, dietary restrictions and religious and cultural constraints recorded in the patient medical card information to obtain the patient's real-time state vector.
[0158] Candidate module 403 is used to select a set of candidate dishes that meet the availability and scenario constraints from a standardized menu based on the current availability of dishes, current inventory information and the patient's dining scenario.
[0159] The matching module 404 is used to retrieve the directed causal transmission path from the nutrient exposure node of the candidate dish to the patient's diagnosis in the pre-built nutrition knowledge graph and structured evidence base based on the nutrient vector of each candidate dish in the candidate dish set and the patient's real-time state vector, and load the corresponding edge-level evidence set for each directed causal transmission path to obtain the path set and edge-level evidence information.
[0160] The risk assessment module 405 is used to perform path-level evidence aggregation for each candidate dish based on the path set and edge-level evidence information, and obtain the probabilistic risk value of each candidate dish for each patient's diagnosis.
[0161] The dietary recommendation module 406 is used to perform hard safety rejection on candidate dishes in the candidate dish set that exceed a preset safety threshold based on probabilistic risk values, dish nutrition vectors, and patient real-time state vectors. Based on a dynamic priority strategy, it performs weighted scoring and sorting on the remaining candidate dishes in the candidate dish set that have not been hard safety rejected, to obtain a dietary recommendation set.
[0162] In one embodiment, the menu module 401 is further configured to:
[0163] Based on the recipe and ingredient list, each ingredient in the recipe is standardized and mapped to obtain a set of ingredient identifiers and ingredient usage information.
[0164] Based on the raw material identifier set, the corresponding raw material nutrient vector is retrieved from the nutrient composition base table, and the raw material nutrient vector is linearly weighted and summed according to the raw material usage information to obtain the initial nutrient vector of the formula.
[0165] Based on the initial nutritional vector of the recipe, the corresponding processing retention coefficient is loaded according to the processing method of each raw material in the recipe, and the nutrient components in the initial nutritional vector of the recipe are multiplied and adjusted according to the processing retention coefficient to obtain the final nutritional vector of the dish.
[0166] Based on the nutritional vector of the dish, the recipe and the ingredient list, a recipe version identifier is generated through hash operation, and the recipe version identifier and the nutritional vector of the dish are written into the standardized dish library.
[0167] In one embodiment, the matching module 404 is further configured to:
[0168] The exposure degree of each nutrient is calculated based on the nutrient vector of each candidate dish, and the exposure degree is mapped to a set of exposure nodes;
[0169] Based on the set of exposed nodes, all directed paths from the set of exposed nodes to the list of diagnoses in the patient's immediate state vector are retrieved in the nutrition knowledge graph to obtain the path set.
[0170] Based on the structured evidence base, the evidence set associated with each directed path in the path set is read one by one, and the edge weight and confidence of each directed path are calculated to obtain edge-level evidence information.
[0171] In one embodiment, the risk assessment module 405 is further configured to:
[0172] For each directed path in the path set, the score of the first path is calculated based on the edge weight and confidence level.
[0173] If the same evidence is cited repeatedly in a directed path, the path score is adjusted based on the number of times it is cited repeatedly to obtain the second path score;
[0174] The aggregated impact score is obtained by weighted summing of the second path scores of all directed paths from the same candidate dish to a specific diagnosis.
[0175] The aggregated impact score is mapped to a probabilistic risk value using a preset mapping function.
[0176] In one embodiment, the diet recommendation module 406 is further configured to:
[0177] A dynamic priority vector is generated based on the patient's current recovery stage, medical order template, and treatment priority in the patient's real-time status vector, and diagnostic importance weights are assigned to different diagnoses.
[0178] Based on the probabilistic risk values of multiple diagnoses corresponding to the same candidate dish, the probabilistic risk value of multiple diagnoses is obtained, and it is determined whether there is any candidate dish whose probabilistic risk value of multiple diagnoses is greater than or equal to the safety threshold. If so, the candidate dish whose probabilistic risk value of multiple diagnoses is greater than or equal to the safety threshold is marked as prohibited according to the hard safety rejection.
[0179] A comprehensive score is calculated for each candidate dish that passes the hard safety veto based on the dynamic priority vector and diagnostic importance weight;
[0180] The candidate dishes that passed the strict safety veto were sorted in ascending order of their comprehensive scores to obtain a set of dietary recommendations.
[0181] In one embodiment, an interpretable module is also included for:
[0182] For candidate dishes marked as prohibited, extract several directed paths from the path set that contribute the most to the aggregated score based on the second path score to obtain candidate sub-paths;
[0183] For each directed path of the candidate sub-path, an evidence card is generated; the evidence card includes a summary of the original dietary guidelines, the type of evidence, and the quality of evidence.
[0184] In one embodiment, a replacement scheme module is also included, for:
[0185] Construct flavor representation vectors based on each dish in a standardized menu library;
[0186] For each candidate dish that passes the hard safety veto, the cosine similarity between the dish's nutritional vector and flavor representation vector and the preferred dish vector in the patient's medical card information is calculated to obtain a similarity index.
[0187] Based on the principles of similarity priority and minimizing nutritional deviation, and combining similarity indicators, probabilistic risk values, and nutritional deviation vectors, a list of alternative suggestions is obtained for candidate dishes that have passed the hard safety rejection.
[0188] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps in the above method embodiments.
[0189] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0190] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0191] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.
Claims
1. A meal recommendation method for a hospital central kitchen, characterized by, The method comprises: receiving dish recipes and ingredient lists uploaded by a central kitchen, and performing recipe analysis processing on each dish based on the dish recipes and the ingredient lists to obtain a standardized dish library; the standardized dish library comprises dish nutrition vectors of each dish and corresponding recipe version identifiers; obtaining patient medical card information, and performing standardization processing on the patient medical card information based on static attributes, diagnosis lists, test index time series, dietary taboos and religious and cultural constraints recorded in the patient medical card information to obtain a patient instant state vector; based on current dish availability, current inventory information and patient meal scenarios, filtering a candidate dish set that meets supplyability and scenario constraints from the standardized dish library; based on the dish nutrition vectors of each candidate dish in the candidate dish set and the patient instant state vector, searching for directed causal transmission paths from nutrient exposure nodes of the candidate dish to patient diagnoses in a pre-constructed nutrition knowledge graph and structured evidence base, and loading corresponding edge-level evidence sets for each directed causal transmission path to obtain a path set and edge-level evidence information; based on the path set and the edge-level evidence information, performing path-level evidence aggregation for each candidate dish to obtain probabilistic risk values of each candidate dish for each diagnosis of the patient; based on the probabilistic risk values, the dish nutrition vectors and the patient instant state vector, performing hard safety rejection on candidate dishes in the candidate dish set that are higher than a preset safety threshold, and based on a dynamic priority strategy, performing weighted scoring and sorting on the remaining candidate dishes in the candidate dish set that have not been hard safety rejected to obtain a meal recommendation set.
2. The method of claim 1, wherein, The method comprises: performing standardization mapping on each raw material in the recipe based on the dish recipe and the ingredient list to obtain a raw material identifier set and raw material quantity information; based on the raw material identifier set, retrieving corresponding raw material nutrition vectors from a nutrient composition base table, and performing linear weighted summation on the raw material nutrition vectors based on the raw material quantity information to obtain a recipe initial nutrition vector; based on the recipe initial nutrition vector, loading corresponding processing retention coefficients in combination with the processing methods adopted by each raw material in the dish recipe, and performing multiplicative adjustment on each nutrient component in the recipe initial nutrition vector based on the processing retention coefficients to obtain the final dish nutrition vector; based on the dish nutrition vector, the dish recipe and the ingredient list, generating a recipe version identifier through hash operation, and writing the recipe version identifier and the dish nutrition vector into the standardized dish library.
3. The method of claim 2, wherein, The method comprises: based on the dish nutrition vectors of each candidate dish in the candidate dish set and the patient instant state vector, searching for directed causal transmission paths from nutrient exposure nodes of the candidate dish to patient diagnoses in a pre-constructed nutrition knowledge graph and structured evidence base, and loading corresponding edge-level evidence sets for each directed causal transmission path to obtain a path set and edge-level evidence information, comprising: According to the dish nutrition vector of each candidate dish, exposure degrees are calculated for each nutrient, and the exposure degrees are mapped into a set of exposure nodes; Based on the set of exposure nodes, all directed paths from the set of exposure nodes to the diagnosis list in the patient's instant state vector are retrieved in the nutritional knowledge graph to obtain the set of paths; Based on the structured evidence base, the set of evidence associated with each directed path in the set of paths is read, and the edge weight and confidence of each directed path are calculated to obtain the edge-level evidence information; The edge weight is obtained by the following formula: The confidence is obtained by the following formula: wherein, is the edge associated with the directed path; is the set of evidence, is evidence a quality score for evidence; represents the value of the effect reported in evidence on a uniform scale; and is the normalized value of the quality score for evidence.
4. The method of claim 3, wherein, Based on the set of paths and the edge-level evidence information, path-level evidence aggregation is performed for each candidate dish to obtain a probabilistic risk value of each candidate dish for each diagnosis of the patient, including: For each directed path in the set of paths, a first path score is calculated according to the edge weight and the confidence; If the directed path repeatedly references the same evidence, the path score is modified according to the number of repeated references to obtain a second path score; The second path scores of all directed paths of the same candidate dish to a specific diagnosis are weighted and summed to obtain an aggregated impact score; The aggregated impact score is mapped to obtain the probabilistic risk value according to a preset mapping function; The probabilistic risk value is obtained by the following formula: in, Probabilistic risk value; To score the aggregated impact; Correction factor for repeated evidence; This refers to the number of repeated references. Score the second path; For directed paths Middle The right to the side; For directed paths The confidence level of edge e in the middle; For directed paths The number of sides; This is the path decay factor; and These are calibration parameters.
5. The method of claim 4, wherein, Based on the probabilistic risk value, the dish nutrition vector, and the patient's instant state vector, the candidate dishes in the candidate dish set that are higher than a preset safety threshold are hard safety vetoed, and the remaining candidate dishes in the candidate dish set that are not hard safety vetoed are weighted and scored and sorted based on a dynamic priority strategy to obtain a meal recommendation set, including: A dynamic priority vector is generated according to the patient's current rehabilitation stage, medical order template, and diagnosis priority in the patient's instant state vector, and a diagnosis importance weight is assigned to different diagnoses; A multi-diagnosis probabilistic risk value is obtained according to the probabilistic risk values of the same candidate dish corresponding to multiple diagnoses, and it is determined whether the multi-diagnosis probabilistic risk value of any candidate dish is greater than or equal to the safety threshold. If so, the candidate dish whose multi-diagnosis probabilistic risk value is greater than or equal to the safety threshold is marked as prohibited according to the hard safety veto; A comprehensive score is calculated for each candidate dish that passes the hard safety veto according to the dynamic priority vector and the diagnosis importance weight; The comprehensive score is obtained by the following formula: wherein, is a composite score of candidate dishes ; is a dynamic priority vector of target ; is a medical safety target; is a diagnostic importance weight; is a multi-diagnosis probabilistic risk value; is a nutritional balance target; is a nutritional deviation vector resulting from the difference between the nutritional vector of the dish and the target nutritional vector of the patient; is a preference target; The candidate dishes that pass the hard safety veto are sorted in order of the comprehensive score from small to large to obtain the meal recommendation set.
6. The method of claim 5, wherein, The method further includes: For the candidate dishes marked as prohibited, a number of directed paths that contribute most to the aggregated impact score are extracted from the set of paths according to the second path score to obtain candidate sub-paths; An evidence card is generated for each directed path of the candidate sub-paths; the evidence card includes an original meal guideline abstract, an evidence type, and an evidence quality.
7. The method of claim 6, wherein, The method further includes: A taste representation vector is constructed based on each dish in the standardized dish library; For each candidate dish that passes the hard safety veto, a cosine similarity with a preferred dish vector in the patient's medical card information is calculated according to the dish nutrition vector and the taste representation vector, to obtain a similarity index; Based on the similarity priority and the nutrition deviation minimization principle, the candidate dish that passes the hard safety veto is replaced according to the similarity index, the probabilistic risk value and the nutrition deviation vector, to obtain a replacement suggestion list.
8. A meal recommendation system for a hospital central kitchen, characterized in that, The system comprises: A dish module for receiving dish recipes and ingredient lists uploaded by a central kitchen, and performing recipe analysis processing on each dish according to the dish recipes and the ingredient lists, to obtain a standardized dish library; the standardized dish library comprises a dish nutrition vector and a corresponding recipe version identifier of each dish; A patient module for obtaining patient medical card information, and performing standardized processing on the patient medical card information according to static attributes, diagnosis lists, test index time series, dietary taboos and religious and cultural constraints recorded in the patient medical card information, to obtain a patient real-time state vector; A candidate module for filtering a candidate dish set that meets the supplyability and scenario constraints from the standardized dish library based on current dish availability, current inventory information and patient meal scenarios; A matching module for retrieving a directed causal transmission path from a nutrient exposure node of a candidate dish to a patient diagnosis in a pre-constructed nutrition knowledge graph and structured evidence base based on the dish nutrition vector of each candidate dish in the candidate dish set and the patient real-time state vector, and loading a corresponding edge-level evidence set for each directed causal transmission path, to obtain a path set and edge-level evidence information; A risk assessment module for performing path-level evidence aggregation for each candidate dish based on the path set and the edge-level evidence information, to obtain a probabilistic risk value of each candidate dish for each diagnosis of the patient; A meal recommendation module for performing hard safety veto on the candidate dishes in the candidate dish set that are higher than a preset safety threshold based on the probabilistic risk value, the dish nutrition vector and the patient real-time state vector, and performing weighted scoring and sorting on the remaining candidate dishes in the candidate dish set that are not hard safety vetoed based on a dynamic priority strategy, to obtain a meal recommendation set. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor implements the method of any one of claims 1-7 when executing the computer program.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by the processor, implements the method of any one of claims 1-7.