A knowledge isomorphism-based diet recommendation method and device, equipment and medium
By retrieving dish characteristics from nutrition and traditional Chinese medicine knowledge bases and combining them with user profiles, and by using a large language model to quantify conflicts, the problem of heterogeneous knowledge fusion in multi-agent systems was solved, resulting in more accurate diet recommendations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG HOSPITAL OF TRADITIONAL CHINESE MEDICINE
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-02
AI Technical Summary
In existing multi-agent collaborative health management systems, dietary recommendation systems lack the integration of heterogeneous knowledge from multiple medical theoretical systems, resulting in distorted recommendation results and potential health risks. Furthermore, existing technologies struggle to comprehensively measure the suitability of food for users.
Nutritional indicators and properties/effects of dishes are retrieved from nutrition and traditional Chinese medicine knowledge bases, respectively. Attribute mapping and consistency analysis are performed in conjunction with user profiles. Knowledge conflicts are quantified using a large language model, and recommendation results are integrated to resolve conflicts between heterogeneous knowledge systems.
It achieves more comprehensive and accurate dietary recommendations, reduces the distortion of recommendation results and health risks, and improves the accuracy of dietary recommendations.
Smart Images

Figure CN122135893A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent diet recommendation, and in particular to a diet recommendation method, device, equipment and medium based on knowledge heterogeneity. Background Technology
[0002] In the field of healthcare, with the rapid development of artificial intelligence technology and the improvement of public health awareness, personalized health management systems based on intelligent algorithms have become one of the important research directions, especially for the architecture mode of decomposing complex tasks into multiple professional intelligent agents for collaborative processing. Existing technologies have made some progress. Among them, one existing technology proposes a system for monitoring and optimizing nutritional and physiological states, which collects and analyzes data through multiple functional modules; another existing technology proposes a hierarchical collaborative multi-agent architecture in which a management layer intelligent agent is responsible for task allocation and an operational layer intelligent agent is responsible for specific execution. Both can improve the scalability and specialization of the system.
[0003] However, existing multi-agent collaborative health management systems, especially multi-agent dietary recommendation systems, still have significant shortcomings. First, existing dietary recommendation systems are typically built around a single medical theoretical framework. However, different medical theoretical frameworks have significantly different evaluations of the same food. Measuring the suitability of food for a user solely based on a single medical theory is clearly insufficient, leading to distorted food recommendations and questionable accuracy. Second, recognizing the first problem, existing multi-agent collaborative systems also lack an architectural design that integrates heterogeneous knowledge from multiple medical theoretical frameworks. This makes it difficult to integrate heterogeneous knowledge, easily leading to internal contradictions in the recommendation results. Furthermore, current technologies often resolve these contradictions simply by adding rules or setting priorities, lacking a comprehensive consideration of the user's physical characteristics and the nutritional features of the food. This results in potential risks that could harm the user's health, further compromising recommendation accuracy. Therefore, how to achieve more accurate dietary recommendations based on a multi-agent collaborative architecture by integrating heterogeneous knowledge remains a pressing technical problem to be solved. Summary of the Invention
[0004] This application provides a method, apparatus, device, and medium for dietary recommendation based on knowledge heterogeneity, in order to solve the technical problem that the accuracy of dietary recommendations needs to be improved due to the failure to fully integrate heterogeneous knowledge systems.
[0005] According to a first aspect of the embodiments of this application, a dietary recommendation method based on knowledge heterogeneity is provided, comprising: Based on the dish to be analyzed, knowledge retrieval is performed on a preset nutrition knowledge base and a preset traditional Chinese medicine knowledge base to obtain the nutritional index characteristics and the properties and effects characteristics of the dish to be analyzed. Then, attribute mapping is performed on the nutritional index characteristics and the properties and effects characteristics to construct the food object of the dish to be analyzed. The dish to be analyzed is identified in response to the food photos uploaded by the user. Based on the food object and the user profile of the user, prompt words are generated according to preset rules. The quantitative analysis data fed back by the generated prompt words is received according to the preset large language model. The knowledge conflict between nutrition and traditional Chinese medicine is quantified to determine the knowledge conflict analysis result of the dish to be analyzed. The user profile includes the user's pathological characteristics, physical characteristics and allergen characteristics. Based on the knowledge conflict analysis results, the food objects, user profiles, and quantitative analysis data are integrated to construct a recommendation result for the dish to be analyzed, and the dish to be analyzed is recommended to the user based on the recommendation result.
[0006] This application first conducts knowledge retrieval of the dish to be analyzed using a nutrition knowledge base and a traditional Chinese medicine knowledge base, respectively, to obtain nutritional index characteristics and property and efficacy characteristics. Attribute mapping is then performed to obtain corresponding food objects. Next, user profiles containing pathological characteristics, constitution characteristics, and allergen characteristics, along with preset rules, are used to construct and generate prompt words. Quantitative analysis data is obtained through a large language model to determine the knowledge conflict analysis results of the dish to be analyzed. Finally, the results are integrated to construct and analyze the recommended dishes. By retrieving information from two different theoretical systems—nutrition and traditional Chinese medicine—and combining this with user profile analysis and recommendations, the matching degree of the dish to the user can be comprehensively measured. This integration of heterogeneous knowledge systems allows for more... This approach enables more comprehensive and accurate dietary recommendations. Simultaneously, it generates prompts based on food objects with nutritional and health-related characteristics, as well as user profiles with pathological, constitutional, and allergen-related features. This allows for the identification of multiple dimensions influencing dietary recommendations from both food and user perspectives. Furthermore, it quantifies knowledge conflicts between nutrition and traditional Chinese medicine using a large language model. This model effectively captures and derives related knowledge, accurately quantifying knowledge conflicts across different theoretical frameworks. Finally, it integrates food objects, user profiles, and quantitative analysis data to resolve these knowledge conflicts and obtain recommendation results. By addressing knowledge conflicts within heterogeneous knowledge systems, it achieves more accurate dietary recommendations.
[0007] In some embodiments of this application, the step of performing knowledge retrieval from a preset nutrition knowledge base and a preset traditional Chinese medicine knowledge base based on the dish to be analyzed, to obtain the nutritional index characteristics and property and efficacy characteristics of the dish to be analyzed, specifically includes: The nutritional knowledge base is used to retrieve the nutritional characteristics of the dish to be analyzed. During the retrieval, the matching is based on text similarity. The composition of the ingredients in the dish to be analyzed is analyzed to obtain several ingredient components and their corresponding proportions. Then, knowledge is retrieved from the traditional Chinese medicine knowledge base for each ingredient component to find the properties, flavors, and efficacy characteristics of each ingredient component. Based on the preset rules for quantifying the properties and flavors, the properties and flavors of each ingredient component are quantified into numerical values. By weighted combination of the properties and flavors of each ingredient component, the numerical properties and flavors of the dish to be analyzed are determined. Based on the composition ratio of each ingredient component, several meridian-related efficacy characteristics of the dish to be analyzed are determined, and the flavor and nature characteristics of the dish to be analyzed are combined with the flavor and nature characteristics of the dish to be analyzed to obtain the flavor and nature characteristics of the dish to be analyzed.
[0008] This application first uses a nutrition science knowledge base to retrieve the nutritional characteristics of the dish to be analyzed based on text similarity. Then, it analyzes the ingredients and their proportions, and uses a traditional Chinese medicine knowledge base to retrieve the corresponding properties and efficacy characteristics of each ingredient. Based on the quantification rules of properties and flavors, it determines the numerical characteristics of the dish's properties and flavors, and simultaneously determines its meridian tropism and efficacy characteristics based on its proportions. Finally, it obtains the properties and efficacy characteristics of the dish. By searching through two different theoretical systems—nutrition science and traditional Chinese medicine—it can comprehensively integrate the judgments of the dish from different theoretical systems, thereby comprehensively measuring the match between the dish and the user. This integration of heterogeneous knowledge systems allows for more comprehensive and accurate subsequent dietary recommendations.
[0009] In some embodiments of this application, the step of mapping the nutritional index features and the flavor and efficacy features to construct the food object of the dish to be analyzed specifically includes: Based on the nutritional index characteristics, attribute mapping is performed in the nutrition knowledge base to determine the corresponding first dish evaluation, and based on the property, flavor and efficacy characteristics, attribute mapping is performed in the traditional Chinese medicine knowledge base to determine the corresponding second dish evaluation. A consistency analysis is performed on the evaluations of the first dish and the second dish to determine the consistency coefficient of the evaluation of the dish to be analyzed. Based on the nutritional index characteristics, the property and efficacy characteristics, and the evaluation consistency coefficient, a food object for the dish to be analyzed is constructed.
[0010] This application first obtains a first dish evaluation by mapping attributes in a nutrition knowledge base based on nutritional indicator characteristics, and then obtains a second dish evaluation by mapping attributes in a traditional Chinese medicine knowledge base based on the characteristics of properties, flavors, and effects. Consistency analysis is then conducted to determine the consistency coefficient of the evaluation, thereby constructing the food object corresponding to the dish to be analyzed. By mapping attributes in knowledge bases of different theoretical systems, the dish evaluation under different theoretical systems can be accurately determined, and the consistency coefficient of the dish evaluation under different theoretical systems can be determined through consistency analysis, providing corresponding data and theoretical support for subsequent quantification and resolution of knowledge conflicts.
[0011] In some embodiments of this application, the step of constructing and generating prompt words based on the food object, the user profile, and preset rules specifically includes: Based on preset rules, natural language conversion is performed on the pathological features, physical characteristics, and allergen features of the user profile, as well as the nutritional indicators and properties and effects of the food object, to obtain the corresponding descriptive texts. Based on the text description type corresponding to each description text, the preset prompt word template is filled in to construct the generated prompt words.
[0012] This application first uses natural language conversion to obtain corresponding descriptive text from user profiles and food objects based on preset rules. Then, it fills in the prompt word template according to the text description type of each descriptive text to generate prompt words. It can obtain features from multiple dimensions that affect food recommendations from both food and user perspectives, providing corresponding data and theoretical support for further food recommendations.
[0013] In some embodiments of this application, the quantitative analysis data includes nutritional fit coefficients and traditional Chinese medicine fit coefficients; the step of receiving the quantitative analysis data fed back by the generated prompt words according to a preset large language model, quantifying the knowledge conflict between nutrition and traditional Chinese medicine, and determining the knowledge conflict analysis result of the dish to be analyzed specifically includes: When the product of the nutritional fit coefficient and the traditional Chinese medicine fit coefficient is negative, and the absolute value of either the nutritional fit coefficient or the traditional Chinese medicine fit coefficient is greater than a preset fit threshold, the knowledge conflict analysis result of the dish to be analyzed is determined to have a knowledge conflict. Otherwise, the knowledge conflict analysis result for the dish to be analyzed is determined to be that there is no knowledge conflict.
[0014] This application determines the results of knowledge conflict analysis based on the relationship between the nutritional adaptation coefficient and the traditional Chinese medicine adaptation coefficient in the quantitative analysis data. This can accurately quantify and reflect knowledge conflicts under different theoretical systems, thereby providing corresponding data support for subsequent resolution of knowledge conflicts.
[0015] In some embodiments of this application, the step of integrating the food object, the user profile, and the quantitative analysis data based on the knowledge conflict analysis results to construct a recommendation result for the dish to be analyzed specifically includes: When the knowledge conflict analysis result indicates the existence of a knowledge conflict, the nutritional fit weight is determined based on the pathological characteristics of the user profile, and the traditional Chinese medicine fit weight is determined based on the physical characteristics of the user profile. The decision fit coefficient is obtained by weighting the nutritional fit coefficient and the traditional Chinese medicine fit coefficient based on the nutritional fit weight and the traditional Chinese medicine fit weight. Based on the recommendation decision obtained based on the decision fit coefficient, the food object, the user profile, and the quantitative analysis data are integrated to construct the recommendation result of the dish to be analyzed.
[0016] When knowledge conflicts exist, this application determines the nutritional and traditional Chinese medicine fit weights based on each dimension of the user profile. Then, it combines the nutritional and traditional Chinese medicine fit coefficients to obtain the decision fit coefficient. Based on the decision fit coefficient, the recommendation decision integrates the food object, user profile, and quantitative analysis data to obtain the recommendation result. This can fully measure the fit of different theoretical systems of knowledge to the decision, and when the recommendation result is integrated, it can fully resolve knowledge conflicts and obtain more accurate dietary recommendation results.
[0017] In some embodiments of this application, the step of integrating the food object, the user profile, and the quantitative analysis data based on the knowledge conflict analysis results to construct a recommendation result for the dish to be analyzed specifically includes: When the knowledge conflict analysis result indicates that there is no knowledge conflict, a recommendation decision is obtained based on the nutritional fit coefficient and the traditional Chinese medicine fit coefficient. Based on the recommendation decision, the food object, the user profile, and the quantitative analysis data are integrated to construct the recommendation result for the dish to be analyzed.
[0018] In the absence of knowledge conflicts, this application directly obtains recommendation decisions based on nutritional and traditional Chinese medicine fit coefficients. Then, it integrates food objects, user profiles, and quantitative analysis data based on the recommendation decisions to obtain recommendation results. This fully integrates the evaluation of diets without knowledge conflicts by heterogeneous knowledge systems to obtain recommendation decisions, thereby obtaining more accurate dietary recommendation results.
[0019] According to a second aspect of the embodiments of this application, a diet recommendation device based on knowledge heterogeneity is provided, including a feature retrieval construction module, a conflict quantification analysis module, and a recommendation integration execution module; The feature retrieval construction module is used to perform knowledge retrieval on a preset nutrition knowledge base and a preset traditional Chinese medicine knowledge base according to the dish to be analyzed, to obtain the nutritional index features and the properties and effects features of the dish to be analyzed, and to perform attribute mapping on the nutritional index features and the properties and effects features to construct the food object of the dish to be analyzed; wherein, the dish to be analyzed is identified in response to the food photo uploaded by the user; The conflict quantification analysis module is used to construct and generate prompt words based on the food object and the user profile of the user, based on preset rules, and to receive the quantitative analysis data fed back by the generated prompt words according to a preset large language model, to quantify the knowledge conflict between nutrition and traditional Chinese medicine, and to determine the knowledge conflict analysis result of the dish to be analyzed; wherein, the user profile includes the user's pathological characteristics, physical characteristics and allergen characteristics; The recommendation integration and execution module is used to integrate the food object, the user profile, and the quantitative analysis data according to the knowledge conflict analysis results, construct a recommendation result for the dish to be analyzed, and recommend the dish to be analyzed to the user according to the recommendation result.
[0020] In some embodiments of this application, the feature retrieval construction module includes a nutrition retrieval unit, a composition analysis retrieval unit, a property and flavor feature quantification unit, and a meridian tropism feature determination unit; The nutrition retrieval unit is used to perform knowledge retrieval of the dish to be analyzed from the nutrition knowledge base. During the retrieval, matching is performed based on text similarity to find the nutritional index features of the dish to be analyzed. The composition analysis and retrieval unit is used to analyze the ingredient composition of the dish to be analyzed, obtain several ingredient components and their corresponding proportions, and perform knowledge retrieval on each ingredient component from the traditional Chinese medicine knowledge base to find the properties, flavors and efficacy characteristics of each ingredient component. The property and flavor characteristic quantification unit is used to quantify the property and flavor efficacy characteristics of each ingredient component into numerical values based on preset property and flavor quantification rules, and to determine the property and flavor numerical characteristics of the dish to be analyzed by weighted combination of the property and flavor efficacy characteristics of each ingredient component. The meridian tropism characteristic determination unit is used to determine several meridian tropism efficacy characteristics of the dish to be analyzed based on the composition ratio of each ingredient component, and combine the flavor and nature numerical characteristics of the dish to be analyzed with several meridian tropism efficacy characteristics to obtain the flavor and nature efficacy characteristics of the dish to be analyzed.
[0021] In some embodiments of this application, the feature retrieval construction module includes a dish attribute mapping unit, a consistency analysis unit, and a food object construction unit; The dish attribute mapping unit is used to perform attribute mapping in the nutrition knowledge base according to the nutritional index characteristics to determine the corresponding first dish evaluation, and to perform attribute mapping in the traditional Chinese medicine knowledge base according to the nature, flavor and efficacy characteristics to determine the corresponding second dish evaluation. The consistency analysis unit is used to perform consistency analysis on the evaluation of the first dish and the evaluation of the second dish, and to determine the evaluation consistency coefficient of the dish to be analyzed. The food object construction unit is used to construct the food object of the dish to be analyzed based on the nutritional index characteristics, the flavor and efficacy characteristics, and the evaluation consistency coefficient.
[0022] In some embodiments of this application, the conflict quantification analysis module includes a descriptive text generation unit and a prompt word filling unit; The descriptive text generation unit is used to perform natural language conversion on the pathological features, physical characteristics, and allergen features of the user profile, as well as the nutritional indicators and properties and effects features of the food object, based on preset rules, to obtain the corresponding descriptive texts. The prompt word filling unit is used to fill the preset prompt word template according to the text description type corresponding to each description text, and construct the generated prompt word.
[0023] In some embodiments of this application, the quantitative analysis data includes nutritional fitness coefficients and traditional Chinese medicine fitness coefficients; the conflict quantitative analysis module includes a first conflict analysis unit and a second conflict analysis unit; The first conflict analysis unit is used to determine that the knowledge conflict analysis result of the dish to be analyzed is that there is a knowledge conflict when the product of the nutritional adaptation coefficient and the traditional Chinese medicine adaptation coefficient is negative, and the absolute value of either the nutritional adaptation coefficient or the traditional Chinese medicine adaptation coefficient is greater than a preset adaptation threshold. The second conflict analysis unit is used to determine, otherwise, that the knowledge conflict analysis result of the dish to be analyzed is that there is no knowledge conflict.
[0024] In some embodiments of this application, the recommendation integration execution module includes a first integration execution unit; the first integration execution unit is configured to, when the knowledge conflict analysis result indicates the existence of a knowledge conflict, determine a nutritional fit weight based on the pathological characteristics of the user profile, determine a traditional Chinese medicine fit weight based on the physical characteristics of the user profile, obtain a decision fit coefficient based on the weighted sum of the nutritional fit coefficient and the traditional Chinese medicine fit coefficient using the nutritional fit weight and the traditional Chinese medicine fit weight, and integrate the food object, the user profile, and the quantitative analysis data based on the recommendation decision obtained based on the decision fit coefficient to construct a recommendation result for the dish to be analyzed.
[0025] In some embodiments of this application, the recommendation integration execution module includes a second integration execution unit; the second integration execution unit is used to obtain a recommendation decision based on the nutritional fit coefficient and the traditional Chinese medicine fit coefficient when the knowledge conflict analysis result is that there is no knowledge conflict, and to integrate the food object, the user profile and the quantitative analysis data based on the recommendation decision to construct a recommendation result for the dish to be analyzed.
[0026] This application first conducts knowledge retrieval of the dish to be analyzed using a nutrition knowledge base and a traditional Chinese medicine knowledge base, respectively, to obtain nutritional index characteristics and property and efficacy characteristics. Attribute mapping is then performed to obtain corresponding food objects. Next, user profiles containing pathological characteristics, constitution characteristics, and allergen characteristics, along with preset rules, are used to construct and generate prompt words. Quantitative analysis data is obtained through a large language model to determine the knowledge conflict analysis results of the dish to be analyzed. Finally, the results are integrated to construct and analyze the recommended dishes. By retrieving information from two different theoretical systems—nutrition and traditional Chinese medicine—and combining this with user profile analysis and recommendations, the matching degree of the dish to the user can be comprehensively measured. This integration of heterogeneous knowledge systems allows for more... This approach enables more comprehensive and accurate dietary recommendations. Simultaneously, it generates prompts based on food objects with nutritional and health-related characteristics, as well as user profiles with pathological, constitutional, and allergen-related features. This allows for the identification of multiple dimensions influencing dietary recommendations from both food and user perspectives. Furthermore, it quantifies knowledge conflicts between nutrition and traditional Chinese medicine using a large language model. This model effectively captures and derives related knowledge, accurately quantifying knowledge conflicts across different theoretical frameworks. Finally, it integrates food objects, user profiles, and quantitative analysis data to resolve these knowledge conflicts and obtain recommendation results. By addressing knowledge conflicts within heterogeneous knowledge systems, it achieves more accurate dietary recommendations.
[0027] According to a third aspect of the embodiments of this application, a computer device is provided, comprising: a processor; a memory; and a computer program stored in the memory and configured to be executed by the processor; wherein the processor executes the computer program to implement a knowledge heterogeneous dietary recommendation method as described in this application.
[0028] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute a knowledge heterogeneous diet recommendation method according to this application. Attached Figure Description
[0029] Figure 1This is a flowchart illustrating a dietary recommendation method based on knowledge heterogeneity, as shown in some embodiments of this application. Figure 2 This is a module structure diagram of a knowledge-heterogeneous diet recommendation device shown in some embodiments of this application. Detailed Implementation
[0030] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below in conjunction with the accompanying drawings are exemplary and are only used to explain some embodiments of this application, and should not be construed as limiting the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments shown in this application without inventive effort are within the protection scope of this application.
[0031] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, unless otherwise explicitly specified, "a plurality of" or "several" means two or more.
[0032] Existing multi-agent dietary recommendation systems still have significant shortcomings: First, they are typically built around a single medical theory, but different medical theories offer vastly different evaluations of the same food. Measuring a food's suitability for a user solely based on a single theory is clearly insufficient, leading to distorted recommendations and questionable accuracy. Second, recognizing the first problem, existing multi-agent collaborative systems lack an architectural design that integrates heterogeneous knowledge from multiple medical theories. This makes it difficult to integrate heterogeneous knowledge, easily causing internal contradictions in the recommendation results. Furthermore, current technologies often resolve these contradictions through simple rule stacking or priority settings, lacking a comprehensive consideration of the user's physical characteristics and the nutritional features of the food. This poses a potential risk to the user's health, further compromising recommendation accuracy. Therefore, how to achieve more accurate dietary recommendations based on a multi-agent collaborative architecture by integrating heterogeneous knowledge remains a pressing technical challenge.
[0033] Based on the above technical background, please refer to Figure 1 This application provides a dietary recommendation method based on knowledge heterogeneity, including steps S101 to S103, each step of which is as follows: Step S101: Based on the dish to be analyzed, perform knowledge retrieval from the preset nutrition knowledge base and the preset traditional Chinese medicine knowledge base to obtain the nutritional index characteristics and the properties and effects characteristics of the dish to be analyzed, and perform attribute mapping on the nutritional index characteristics and the properties and effects characteristics to construct the food object of the dish to be analyzed; wherein, the dish to be analyzed is identified in response to the food photo uploaded by the user.
[0034] In some embodiments of this application, the step of performing knowledge retrieval from a preset nutrition knowledge base and a preset traditional Chinese medicine knowledge base based on the dish to be analyzed, to obtain the nutritional index characteristics and property and efficacy characteristics of the dish to be analyzed, specifically includes: The nutritional knowledge base is used to retrieve the nutritional characteristics of the dish to be analyzed. During the retrieval, the matching is based on text similarity. The composition of the ingredients in the dish to be analyzed is analyzed to obtain several ingredient components and their corresponding proportions. Then, knowledge is retrieved from the traditional Chinese medicine knowledge base for each ingredient component to find the properties, flavors, and efficacy characteristics of each ingredient component. Based on the preset rules for quantifying the properties and flavors, the properties and flavors of each ingredient component are quantified into numerical values. By weighted combination of the properties and flavors of each ingredient component, the numerical properties and flavors of the dish to be analyzed are determined. Based on the composition ratio of each ingredient component, several meridian-related efficacy characteristics of the dish to be analyzed are determined, and the flavor and nature characteristics of the dish to be analyzed are combined with the flavor and nature characteristics of the dish to be analyzed to obtain the flavor and nature characteristics of the dish to be analyzed.
[0035] Specifically, when retrieving knowledge through the nutrition knowledge base, a fuzzy matching method based on text similarity will be adopted. The matching will be based on a weighted combination of edit distance and semantic similarity to ensure that the closest nutritional data can be retrieved even for dish names with non-standard descriptions. The nutrition knowledge base stores the nutritional information (represented in numerical form) of each food, including the content of nutrients such as energy, protein, fat, carbohydrates, dietary fiber, sodium, potassium, calcium, iron, vitamin A and vitamin C per 100 grams of food, as well as the food's glycemic index, glycemic load and inflammation index.
[0036] Specifically, the TCM knowledge base stores the nature, flavor, and meridian tropism information (represented by numerical values) and efficacy classification of each food. Nature refers to the cold or hot properties of the food, which are divided into five levels: cold, cool, neutral, warm, and hot. Flavor refers to the taste properties of the food, including the five flavors of sour, bitter, sweet, pungent, and salty, and their combinations. Meridian tropism refers to the organs and meridians through which the food acts, including the twelve meridians such as liver, heart, spleen, lung, and kidney. Efficacy classification includes tonifying qi, nourishing blood, strengthening the spleen, warming yang, nourishing yin, clearing heat, and promoting diuresis. More specifically, for a first dish containing multiple ingredient components, its property value is the sum of the products of the property value of each component and the mass percentage of each component, and its flavor value is the sum of the products of the flavor value of each component and the mass percentage of each component. The cooking method of the first dish will adjust the corresponding property value accordingly. Heating cooking methods such as frying, grilling, etc., make the food more warm, with a correction coefficient of 1.2 to 1.5. Gentle cooking methods such as steaming, boiling, stewing, etc., have little impact on property and flavor, with a correction coefficient of 0.9 to 1.1. Cold dishes and raw foods make the food more cooling, with a correction coefficient of 0.6 to 0.8. As for the meridian tropism and efficacy of the first dish, the meridian tropism and efficacy of the ingredient component with the largest mass percentage are used as the meridian tropism and efficacy of the first dish. If there are multiple ingredient components with a percentage of more than 30%, the meridian tropism and efficacy of the first dish are labeled as the combination of these ingredient components.
[0037] This application first uses a nutrition science knowledge base to retrieve the nutritional characteristics of the dish to be analyzed based on text similarity. Then, it analyzes the ingredients and their proportions, and uses a traditional Chinese medicine knowledge base to retrieve the corresponding properties and efficacy characteristics of each ingredient. Based on the quantification rules of properties and flavors, it determines the numerical characteristics of the dish's properties and flavors, and simultaneously determines its meridian tropism and efficacy characteristics based on its proportions. Finally, it obtains the properties and efficacy characteristics of the dish. By searching through two different theoretical systems—nutrition science and traditional Chinese medicine—it can comprehensively integrate the judgments of the dish from different theoretical systems, thereby comprehensively measuring the match between the dish and the user. This integration of heterogeneous knowledge systems allows for more comprehensive and accurate subsequent dietary recommendations.
[0038] In some embodiments of this application, the step of mapping the nutritional index features and the flavor and efficacy features to construct the food object of the dish to be analyzed specifically includes: Based on the nutritional index characteristics, attribute mapping is performed in the nutrition knowledge base to determine the corresponding first dish evaluation, and based on the property, flavor and efficacy characteristics, attribute mapping is performed in the traditional Chinese medicine knowledge base to determine the corresponding second dish evaluation. A consistency analysis is performed on the evaluations of the first dish and the second dish to determine the consistency coefficient of the evaluation of the dish to be analyzed. Based on the nutritional index characteristics, the property and efficacy characteristics, and the evaluation consistency coefficient, a food object for the dish to be analyzed is constructed.
[0039] Specifically, the evaluation consistency coefficient represents the degree of mutual support between nutritional knowledge and traditional Chinese medicine knowledge on the dish to be analyzed; the closer the evaluation consistency coefficient is to 1, the higher the degree of mutual support; conversely, the lower the degree of mutual support, or even the existence of conflict.
[0040] Preferably, attribute mapping and consistency analysis can be performed using a probabilistic association model built based on machine learning, or using a pre-defined large language model, both of which can directly yield the evaluation consistency coefficient.
[0041] Specifically, when constructing the food object of the dish to be analyzed, the corresponding field names of the food object are determined based on the nutritional index characteristics, the properties and effects characteristics, and the evaluation consistency coefficient, and the corresponding field content is directly filled in.
[0042] This application first obtains a first dish evaluation by mapping attributes in a nutrition knowledge base based on nutritional indicator characteristics, and then obtains a second dish evaluation by mapping attributes in a traditional Chinese medicine knowledge base based on the characteristics of properties, flavors, and effects. Consistency analysis is then conducted to determine the consistency coefficient of the evaluation, thereby constructing the food object corresponding to the dish to be analyzed. By mapping attributes in knowledge bases of different theoretical systems, the dish evaluation under different theoretical systems can be accurately determined, and the consistency coefficient of the dish evaluation under different theoretical systems can be determined through consistency analysis, providing corresponding data and theoretical support for subsequent quantification and resolution of knowledge conflicts.
[0043] Step S102: Based on the food object and the user profile of the user, construct and generate prompt words according to preset rules, and receive the quantitative analysis data fed back by the generated prompt words according to the preset large language model, quantify the knowledge conflict between nutrition and traditional Chinese medicine, and determine the knowledge conflict analysis result of the dish to be analyzed; wherein, the user profile includes the user's pathological characteristics, physical characteristics and allergen characteristics.
[0044] In some embodiments of this application, the step of constructing and generating prompt words based on the food object, the user profile, and preset rules specifically includes: Based on preset rules, natural language conversion is performed on the pathological features, physical characteristics, and allergen features of the user profile, as well as the nutritional indicators and properties and effects of the food object, to obtain the corresponding descriptive texts. Based on the text description type corresponding to each description text, the preset prompt word template is filled in to construct the generated prompt words.
[0045] Specifically, when filling in the prompt word template, if the text description type is a disease description, then the description texts corresponding to the pathological features are traversed, and the corresponding diseases and their severity levels are output sequentially; if the text description type is a constitution description, then the user's constitution type and constitution bias score in the description texts corresponding to the constitution features are output; if the text description type is an allergen feature, then the description texts corresponding to the allergen features are traversed, and the corresponding allergens are output sequentially; if the text description type is a nutritional attribute, then after generating the dish name, the corresponding description is determined based on the content of each nutrient in the dish, such as 20 grams of protein per 100 grams, which is higher than the high protein content threshold. If the weight is 100g or 15g, the description "rich in protein" will be generated. If the text description type is a property, flavor, and efficacy attribute, the description text corresponding to the property, flavor, efficacy, neutrality, flavor, meridian tropism, and efficacy characteristics will be output directly in sequence. If the text description type is an evaluation consistency coefficient, the corresponding description will be determined according to the relationship between the evaluation consistency coefficient and the coefficient threshold. For example, if the evaluation consistency coefficient is greater than 0.7, the description is "the nutritional attributes are highly consistent with the traditional Chinese medicine attributes". If the evaluation consistency coefficient is between 0.4 and 0.7, the description is "the nutritional attributes are partially consistent with the traditional Chinese medicine attributes". If the evaluation consistency coefficient is less than 0.4, the description is "the nutritional attributes and traditional Chinese medicine attributes are significantly different".
[0046] This application first uses natural language conversion to obtain corresponding descriptive text from user profiles and food objects based on preset rules. Then, it fills in the prompt word template according to the text description type of each descriptive text to generate prompt words. It can obtain features from multiple dimensions that affect food recommendations from both food and user perspectives, providing corresponding data and theoretical support for further food recommendations.
[0047] In some embodiments of this application, the quantitative analysis data includes nutritional fit coefficients and traditional Chinese medicine fit coefficients; the step of receiving the quantitative analysis data fed back by the generated prompt words according to a preset large language model, quantifying the knowledge conflict between nutrition and traditional Chinese medicine, and determining the knowledge conflict analysis result of the dish to be analyzed specifically includes: When the product of the nutritional fit coefficient and the traditional Chinese medicine fit coefficient is negative, and the absolute value of either the nutritional fit coefficient or the traditional Chinese medicine fit coefficient is greater than a preset fit threshold, the knowledge conflict analysis result of the dish to be analyzed is determined to have a knowledge conflict. Otherwise, the knowledge conflict analysis result for the dish to be analyzed is determined to be that there is no knowledge conflict.
[0048] Specifically, when the product of the nutritional fit coefficient and the traditional Chinese medicine fit coefficient is negative, it indicates that the nutritional knowledge system and the traditional Chinese medicine knowledge system have opposing evaluations of the dish being analyzed. Conversely, if the absolute value of either the nutritional fit coefficient or the traditional Chinese medicine fit coefficient is greater than a preset fit threshold, it indicates that the evaluation of the corresponding theoretical system is significant. Therefore, when both conditions are met, it means that the opposing evaluations are also significant, i.e., there is a knowledge conflict between the nutritional knowledge system and the traditional Chinese medicine knowledge system regarding the dish being analyzed. More specifically, the preferred value for the preset fit threshold is 1.5.
[0049] This application determines the results of knowledge conflict analysis based on the relationship between the nutritional adaptation coefficient and the traditional Chinese medicine adaptation coefficient in the quantitative analysis data. This can accurately quantify and reflect knowledge conflicts under different theoretical systems, thereby providing corresponding data support for subsequent resolution of knowledge conflicts.
[0050] Step S103: Based on the knowledge conflict analysis results, integrate the food object, the user profile, and the quantitative analysis data to construct a recommendation result for the dish to be analyzed, and recommend the dish to be analyzed to the user based on the recommendation result.
[0051] In some embodiments of this application, the step of integrating the food object, the user profile, and the quantitative analysis data based on the knowledge conflict analysis results to construct a recommendation result for the dish to be analyzed specifically includes: When the knowledge conflict analysis result indicates the existence of a knowledge conflict, the nutritional fit weight is determined based on the pathological characteristics of the user profile, and the traditional Chinese medicine fit weight is determined based on the physical characteristics of the user profile. The decision fit coefficient is obtained by weighting the nutritional fit coefficient and the traditional Chinese medicine fit coefficient based on the nutritional fit weight and the traditional Chinese medicine fit weight. Based on the recommendation decision obtained based on the decision fit coefficient, the food object, the user profile, and the quantitative analysis data are integrated to construct the recommendation result of the dish to be analyzed.
[0052] Specifically, the decision fit coefficient is as follows: ; in, For decision fit coefficient, These are the nutritional fit coefficient and the traditional Chinese medicine fit coefficient, respectively. These are the nutritional adaptation weights and the traditional Chinese medicine adaptation weights, respectively.
[0053] Preferably, the nutritional adaptation weights and traditional Chinese medicine adaptation weights can be determined using a pre-defined large language model, which can directly yield the corresponding adaptation weight values.
[0054] More specifically, when the decision fit coefficient When the decision fit coefficient is greater than 0, the recommended decision is to suggest consumption, and the rationale for this recommendation is derived by integrating the food object, user profile, and quantitative analysis data. Based on the recommendation decision and the rationale, a recommendation result is obtained. When the value is less than 0, the recommended decision is to avoid eating the food. The reasons for avoiding eating the food are obtained by integrating the food object, user profile, and quantitative analysis data. The recommended result is then obtained based on the recommended decision and the reasons.
[0055] When knowledge conflicts exist, this application determines the nutritional and traditional Chinese medicine fit weights based on each dimension of the user profile. Then, it combines the nutritional and traditional Chinese medicine fit coefficients to obtain the decision fit coefficient. Based on the decision fit coefficient, the recommendation decision integrates the food object, user profile, and quantitative analysis data to obtain the recommendation result. This can fully measure the fit of different theoretical systems of knowledge to the decision, and when the recommendation result is integrated, it can fully resolve knowledge conflicts and obtain more accurate dietary recommendation results.
[0056] In some embodiments of this application, the step of integrating the food object, the user profile, and the quantitative analysis data based on the knowledge conflict analysis results to construct a recommendation result for the dish to be analyzed specifically includes: When the knowledge conflict analysis result indicates that there is no knowledge conflict, a recommendation decision is obtained based on the nutritional fit coefficient and the traditional Chinese medicine fit coefficient. Based on the recommendation decision, the food object, the user profile, and the quantitative analysis data are integrated to construct the recommendation result for the dish to be analyzed.
[0057] Specifically, when there is no knowledge conflict, the recommendation decision is made directly based on the values of the nutritional compatibility coefficient and the traditional Chinese medicine compatibility coefficient: if both are positive and their absolute values are greater than the preset compatibility threshold, the recommendation decision is to suggest consumption; if both are negative and their absolute values are greater than the preset compatibility threshold, the recommendation decision is not to suggest consumption; if both are positive or negative, but their absolute values are less than the preset compatibility threshold, the recommendation decision is to consume in moderation. More specifically, after obtaining the recommendation decision, the food object, user profile, and quantitative analysis data are integrated based on the obtained recommendation decision to obtain the corresponding reasons, thereby obtaining the recommendation result based on the recommendation decision and reasons.
[0058] In the absence of knowledge conflicts, this application directly obtains recommendation decisions based on nutritional and traditional Chinese medicine fit coefficients. Then, it integrates food objects, user profiles, and quantitative analysis data based on the recommendation decisions to obtain recommendation results. This fully integrates the evaluation of diets without knowledge conflicts by heterogeneous knowledge systems to obtain recommendation decisions, thereby obtaining more accurate dietary recommendation results.
[0059] Compared to existing technologies, this application first performs knowledge retrieval on the dish to be analyzed using a nutrition knowledge base and a traditional Chinese medicine knowledge base, respectively, to obtain nutritional index characteristics and property and efficacy characteristics. Attribute mapping is then performed to obtain corresponding food objects. Next, user profiles containing pathological characteristics, constitution characteristics, and allergen characteristics, along with preset rules, are used to construct and generate prompt words. Quantitative analysis data is obtained through a large language model to determine the knowledge conflict analysis results of the dish to be analyzed. These results are then integrated to construct and analyze recommendation results for the dish to be analyzed. By retrieving information from two different theoretical systems—nutrition and traditional Chinese medicine—and combining this with user profile analysis and recommendation, the matching degree of the dish to the user can be comprehensively measured. This approach achieves its goal by fusing heterogeneous knowledge bases. The system provides a more comprehensive and accurate dietary recommendation system. Simultaneously, it generates prompts based on food objects with nutritional indicators and properties / effects, and user profiles with pathological, constitutional, and allergen characteristics. This allows for the identification of multiple dimensions influencing dietary recommendations from both food and user perspectives. Furthermore, it quantifies knowledge conflicts between nutrition and traditional Chinese medicine using a large language model. This model enables the full derivation of related knowledge capture, accurately quantifying knowledge conflicts across different theoretical systems. Finally, it integrates food objects, user profiles, and quantitative analysis data to resolve knowledge conflicts and obtain recommendation results. By addressing knowledge conflicts within heterogeneous knowledge systems, it achieves more accurate dietary recommendations.
[0060] For a method corresponding to the one described above, please refer to [link to relevant documentation]. Figure 2 This application provides a knowledge-heterogeneous diet recommendation device, including a feature retrieval and construction module 210, a conflict quantification analysis module 220, and a recommendation integration and execution module 230. The feature retrieval construction module 210 is used to perform knowledge retrieval on a preset nutrition knowledge base and a preset traditional Chinese medicine knowledge base according to the dish to be analyzed, to obtain the nutritional index features and the properties and effects features of the dish to be analyzed, and to perform attribute mapping on the nutritional index features and the properties and effects features to construct the food object of the dish to be analyzed; wherein, the dish to be analyzed is identified in response to the food photo uploaded by the user; The conflict quantification analysis module 220 is used to construct and generate prompt words based on the food object and the user profile of the user, based on preset rules, and receive the quantitative analysis data fed back by the generated prompt words according to the preset large language model, quantify the knowledge conflict between nutrition and traditional Chinese medicine, and determine the knowledge conflict analysis result of the dish to be analyzed; wherein, the user profile includes the user's pathological characteristics, physical characteristics and allergen characteristics; The recommendation integration execution module 230 is used to integrate the food object, the user profile and the quantitative analysis data according to the knowledge conflict analysis results, construct the recommendation results of the dish to be analyzed, and analyze and recommend the dish to be analyzed to the user according to the recommendation results.
[0061] In some embodiments of this application, the feature retrieval construction module 210 includes a nutrition retrieval unit, a composition analysis retrieval unit, a property and flavor feature quantification unit, and a meridian tropism feature determination unit; The nutrition retrieval unit is used to perform knowledge retrieval of the dish to be analyzed from the nutrition knowledge base. During the retrieval, matching is performed based on text similarity to find the nutritional index features of the dish to be analyzed. The composition analysis and retrieval unit is used to analyze the ingredient composition of the dish to be analyzed, obtain several ingredient components and their corresponding proportions, and perform knowledge retrieval on each ingredient component from the traditional Chinese medicine knowledge base to find the properties, flavors and efficacy characteristics of each ingredient component. The property and flavor characteristic quantification unit is used to quantify the property and flavor efficacy characteristics of each ingredient component into numerical values based on preset property and flavor quantification rules, and to determine the property and flavor numerical characteristics of the dish to be analyzed by weighted combination of the property and flavor efficacy characteristics of each ingredient component. The meridian tropism characteristic determination unit is used to determine several meridian tropism efficacy characteristics of the dish to be analyzed based on the composition ratio of each ingredient component, and combine the flavor and nature numerical characteristics of the dish to be analyzed with several meridian tropism efficacy characteristics to obtain the flavor and nature efficacy characteristics of the dish to be analyzed.
[0062] In some embodiments of this application, the feature retrieval construction module 210 includes a dish attribute mapping unit, a consistency analysis unit, and a food object construction unit; The dish attribute mapping unit is used to perform attribute mapping in the nutrition knowledge base according to the nutritional index characteristics to determine the corresponding first dish evaluation, and to perform attribute mapping in the traditional Chinese medicine knowledge base according to the nature, flavor and efficacy characteristics to determine the corresponding second dish evaluation. The consistency analysis unit is used to perform consistency analysis on the evaluation of the first dish and the evaluation of the second dish, and to determine the evaluation consistency coefficient of the dish to be analyzed. The food object construction unit is used to construct the food object of the dish to be analyzed based on the nutritional index characteristics, the flavor and efficacy characteristics, and the evaluation consistency coefficient.
[0063] In some embodiments of this application, the conflict quantification analysis module 220 includes a descriptive text generation unit and a prompt word filling unit; The descriptive text generation unit is used to perform natural language conversion on the pathological features, physical characteristics, and allergen features of the user profile, as well as the nutritional indicators and properties and effects features of the food object, based on preset rules, to obtain the corresponding descriptive texts. The prompt word filling unit is used to fill the preset prompt word template according to the text description type corresponding to each description text, and construct the generated prompt word.
[0064] In some embodiments of this application, the quantitative analysis data includes nutritional compatibility coefficients and traditional Chinese medicine compatibility coefficients; the conflict quantitative analysis module 220 includes a first conflict analysis unit and a second conflict analysis unit; The first conflict analysis unit is used to determine that the knowledge conflict analysis result of the dish to be analyzed is that there is a knowledge conflict when the product of the nutritional adaptation coefficient and the traditional Chinese medicine adaptation coefficient is negative, and the absolute value of either the nutritional adaptation coefficient or the traditional Chinese medicine adaptation coefficient is greater than a preset adaptation threshold. The second conflict analysis unit is used to determine, otherwise, that the knowledge conflict analysis result of the dish to be analyzed is that there is no knowledge conflict.
[0065] In some embodiments of this application, the recommendation integration execution module 230 includes a first integration execution unit; the first integration execution unit is configured to, when the knowledge conflict analysis result indicates the existence of a knowledge conflict, determine a nutritional fit weight based on the pathological characteristics of the user profile, determine a traditional Chinese medicine fit weight based on the physical characteristics of the user profile, obtain a decision fit coefficient based on the weighted sum of the nutritional fit coefficient and the traditional Chinese medicine fit coefficient based on the nutritional fit weight and the traditional Chinese medicine fit weight, and integrate the food object, the user profile, and the quantitative analysis data based on the recommendation decision obtained based on the decision fit coefficient to construct a recommendation result for the dish to be analyzed.
[0066] In some embodiments of this application, the recommendation integration execution module 230 includes a second integration execution unit; the second integration execution unit is used to obtain a recommendation decision based on the nutritional fit coefficient and the traditional Chinese medicine fit coefficient when the knowledge conflict analysis result is that there is no knowledge conflict, and to integrate the food object, the user profile and the quantitative analysis data based on the recommendation decision to construct a recommendation result for the dish to be analyzed.
[0067] This application first conducts knowledge retrieval of the dish to be analyzed using a nutrition knowledge base and a traditional Chinese medicine knowledge base, respectively, to obtain nutritional index characteristics and property and efficacy characteristics. Attribute mapping is then performed to obtain corresponding food objects. Next, user profiles containing pathological characteristics, constitution characteristics, and allergen characteristics, along with preset rules, are used to construct and generate prompt words. Quantitative analysis data is obtained through a large language model to determine the knowledge conflict analysis results of the dish to be analyzed. Finally, the results are integrated to construct and analyze the recommended dishes. By retrieving information from two different theoretical systems—nutrition and traditional Chinese medicine—and combining this with user profile analysis and recommendations, the matching degree of the dish to the user can be comprehensively measured. This integration of heterogeneous knowledge systems allows for more... This approach enables more comprehensive and accurate dietary recommendations. Simultaneously, it generates prompts based on food objects with nutritional and health-related characteristics, as well as user profiles with pathological, constitutional, and allergen-related features. This allows for the identification of multiple dimensions influencing dietary recommendations from both food and user perspectives. Furthermore, it quantifies knowledge conflicts between nutrition and traditional Chinese medicine using a large language model. This model effectively captures and derives related knowledge, accurately quantifying knowledge conflicts across different theoretical frameworks. Finally, it integrates food objects, user profiles, and quantitative analysis data to resolve these knowledge conflicts and obtain recommendation results. By addressing knowledge conflicts within heterogeneous knowledge systems, it achieves more accurate dietary recommendations.
[0068] It should be understood that the apparatus provided in this application corresponds to the aforementioned method. The knowledge heterogeneity-based diet recommendation apparatus provided in this application can implement the knowledge heterogeneity-based diet recommendation method provided in any embodiment of this application.
[0069] Adaptively, embodiments of this application also provide a computer device and a computer-readable storage medium.
[0070] The computer device includes: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor; The processor executes the computer program to implement a dietary recommendation method based on knowledge heterogeneity, as described in this application.
[0071] The computer-readable storage medium stores multiple instructions adapted for loading by a processor to execute a knowledge-heterogeneous dietary recommendation method of this application.
[0072] The above description represents some embodiments of this application, providing a further detailed explanation of the purpose, technical solution, and beneficial effects of this application. It should be understood that the above-described embodiments of this application should not be construed as limiting this application. In particular, any changes, modifications, equivalent substitutions, and variations made by those skilled in the art within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A dietary recommendation method based on knowledge heterogeneity, characterized in that, include: Based on the dish to be analyzed, knowledge retrieval is performed on a preset nutrition knowledge base and a preset traditional Chinese medicine knowledge base to obtain the nutritional index characteristics and the properties and effects characteristics of the dish to be analyzed. Then, attribute mapping is performed on the nutritional index characteristics and the properties and effects characteristics to construct the food object of the dish to be analyzed. The dish to be analyzed is identified in response to the food photos uploaded by the user. Based on the food object and the user profile of the user, prompt words are generated according to preset rules. The quantitative analysis data fed back by the generated prompt words is received according to the preset large language model. The knowledge conflict between nutrition and traditional Chinese medicine is quantified to determine the knowledge conflict analysis result of the dish to be analyzed. The user profile includes the user's pathological characteristics, physical characteristics and allergen characteristics. Based on the knowledge conflict analysis results, the food objects, user profiles, and quantitative analysis data are integrated to construct a recommendation result for the dish to be analyzed, and the dish to be analyzed is recommended to the user based on the recommendation result.
2. The dietary recommendation method based on knowledge heterogeneity according to claim 1, characterized in that, The step involves retrieving knowledge from a pre-set nutrition knowledge base and a pre-set traditional Chinese medicine knowledge base based on the dish to be analyzed, to obtain the nutritional index characteristics and properties and efficacy characteristics of the dish to be analyzed, specifically including: The nutritional knowledge base is used to retrieve the nutritional characteristics of the dish to be analyzed. During the retrieval, the matching is based on text similarity. The composition of the ingredients in the dish to be analyzed is analyzed to obtain several ingredient components and their corresponding proportions. Then, knowledge is retrieved from the traditional Chinese medicine knowledge base for each ingredient component to find the properties, flavors, and efficacy characteristics of each ingredient component. Based on the preset rules for quantifying the properties and flavors, the properties and flavors of each ingredient component are quantified into numerical values. By weighted combination of the properties and flavors of each ingredient component, the numerical properties and flavors of the dish to be analyzed are determined. Based on the composition ratio of each ingredient component, several meridian-related efficacy characteristics of the dish to be analyzed are determined, and the flavor and nature characteristics of the dish to be analyzed are combined with the flavor and nature characteristics of the dish to be analyzed to obtain the flavor and nature characteristics of the dish to be analyzed.
3. The dietary recommendation method based on knowledge heterogeneity according to claim 1, characterized in that, The step of mapping the nutritional indicators and the properties and effects of the dish to be analyzed into a food object by performing attribute mapping on the nutritional indicators and the properties and effects specifically includes: Based on the nutritional index characteristics, attribute mapping is performed in the nutrition knowledge base to determine the corresponding first dish evaluation, and based on the property, flavor and efficacy characteristics, attribute mapping is performed in the traditional Chinese medicine knowledge base to determine the corresponding second dish evaluation. A consistency analysis is performed on the evaluations of the first dish and the second dish to determine the consistency coefficient of the evaluation of the dish to be analyzed. Based on the nutritional index characteristics, the property and efficacy characteristics, and the evaluation consistency coefficient, a food object for the dish to be analyzed is constructed.
4. The dietary recommendation method based on knowledge heterogeneity according to claim 3, characterized in that, The step of generating prompt words based on the food object, combined with the user's profile, and based on preset rules, specifically includes: Based on preset rules, natural language conversion is performed on the pathological features, physical characteristics, and allergen features of the user profile, as well as the nutritional indicators and properties and effects of the food object, to obtain the corresponding descriptive texts. Based on the text description type corresponding to each description text, the preset prompt word template is filled in to construct the generated prompt words.
5. The dietary recommendation method based on knowledge heterogeneity according to claim 1, characterized in that, The quantitative analysis data includes nutritional fit coefficients and traditional Chinese medicine fit coefficients; the step of receiving the quantitative analysis data fed back by the generated prompts according to a preset large language model, quantifying the knowledge conflict between nutrition and traditional Chinese medicine, and determining the knowledge conflict analysis result of the dish to be analyzed, specifically includes: When the product of the nutritional fit coefficient and the traditional Chinese medicine fit coefficient is negative, and the absolute value of either the nutritional fit coefficient or the traditional Chinese medicine fit coefficient is greater than a preset fit threshold, the knowledge conflict analysis result of the dish to be analyzed is determined to have a knowledge conflict. Otherwise, the knowledge conflict analysis result for the dish to be analyzed is determined to be that there is no knowledge conflict.
6. The dietary recommendation method based on knowledge heterogeneity according to claim 5, characterized in that, The step of integrating the food object, the user profile, and the quantitative analysis data based on the knowledge conflict analysis results to construct a recommendation result for the dish to be analyzed specifically includes: When the knowledge conflict analysis result indicates the existence of a knowledge conflict, the nutritional fit weight is determined based on the pathological characteristics of the user profile, and the traditional Chinese medicine fit weight is determined based on the physical characteristics of the user profile. The decision fit coefficient is obtained by weighting the nutritional fit coefficient and the traditional Chinese medicine fit coefficient based on the nutritional fit weight and the traditional Chinese medicine fit weight. Based on the recommendation decision obtained based on the decision fit coefficient, the food object, the user profile, and the quantitative analysis data are integrated to construct the recommendation result of the dish to be analyzed.
7. The dietary recommendation method based on knowledge heterogeneity according to claim 5, characterized in that, The step of integrating the food object, the user profile, and the quantitative analysis data based on the knowledge conflict analysis results to construct a recommendation result for the dish to be analyzed specifically includes: When the knowledge conflict analysis result indicates that there is no knowledge conflict, a recommendation decision is obtained based on the nutritional fit coefficient and the traditional Chinese medicine fit coefficient. Based on the recommendation decision, the food object, the user profile, and the quantitative analysis data are integrated to construct the recommendation result for the dish to be analyzed.
8. A diet recommendation device based on knowledge heterogeneity, characterized in that, It includes a feature retrieval construction module, a conflict quantification analysis module, and a recommendation integration and execution module; The feature retrieval construction module is used to perform knowledge retrieval on a preset nutrition knowledge base and a preset traditional Chinese medicine knowledge base according to the dish to be analyzed, to obtain the nutritional index features and the properties and effects features of the dish to be analyzed, and to perform attribute mapping on the nutritional index features and the properties and effects features to construct the food object of the dish to be analyzed; wherein, the dish to be analyzed is identified in response to the food photo uploaded by the user; The conflict quantification analysis module is used to construct and generate prompt words based on the food object and the user profile of the user, based on preset rules, and to receive the quantitative analysis data fed back by the generated prompt words according to a preset large language model, to quantify the knowledge conflict between nutrition and traditional Chinese medicine, and to determine the knowledge conflict analysis result of the dish to be analyzed; wherein, the user profile includes the user's pathological characteristics, physical characteristics and allergen characteristics; The recommendation integration and execution module is used to integrate the food object, the user profile and the quantitative analysis data according to the knowledge conflict analysis results, construct the recommendation results of the dish to be analyzed, and analyze and recommend the dish to be analyzed to the user according to the recommendation results.
9. A computer device, characterized in that, include: processor; Memory; A computer program stored in the memory and configured to be executed by the processor; When the processor executes the computer program, it implements a knowledge-heterogeneous dietary recommendation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to execute a knowledge-heterogeneous dietary recommendation method according to any one of claims 1 to 7.