Healthy diet knowledge accurate retrieval engine based on large language model

Through the precise retrieval engine for healthy diet knowledge based on a large language model, we can deeply understand user intentions and accurately retrieve data from the healthy diet knowledge base to generate personalized recommendations. This solves the problem that existing systems cannot provide accurate and personalized diet recommendations, and achieves efficient and precise healthy diet knowledge recommendations.

CN120632073APending Publication Date: 2025-09-12北京豆果信息技术有限公司 +1

Patent Information

Application Number
CN202510762222.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing healthy diet knowledge retrieval systems are unable to provide accurate and personalized diet recommendations. Especially when faced with diverse query methods and complex user needs, traditional retrieval methods cannot fully understand user intentions, resulting in poor relevance and accuracy of retrieval results.

Method used

It adopts a precise retrieval engine for healthy diet knowledge based on a large language model, receives user input through the user interface module, the natural language understanding module deeply understands user intentions and key information, the healthy diet knowledge base module stores relevant data, the precise retrieval module retrieves relevant data from it, the personalized suggestion module generates suggestions, and optimizes the system logic through the feedback learning module.

Benefits of technology

It achieves efficient and accurate recommendations of healthy diet knowledge, provides personalized diet suggestions, improves the relevance and accuracy of search results, meets the personalized needs of users, and optimizes system performance through continuous learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632073A_ABST
    Figure CN120632073A_ABST
Patent Text Reader

Abstract

The invention discloses a healthy diet knowledge accurate retrieval engine based on a large language model. The healthy diet knowledge accurate retrieval engine comprises a user interface module, a natural language understanding module, a healthy diet knowledge base module, an accurate retrieval module, a personalized suggestion module and a feedback learning module. The engine receives healthy diet related problems through a user interface, performs natural language understanding by using a large language model, and extracts user intentions and key information. And then, related data is accurately retrieved from the healthy diet knowledge base, and personalized diet suggestions are generated in combination with the personal health information of the user. The engine also has a feedback learning function, collects user feedback and optimizes the processing logic of each module. According to the method, intelligent retrieval and personalized recommendation of healthy diet knowledge are realized, the efficiency of acquiring accurate and practical healthy diet information by the user is improved, and the user is helped to formulate and execute a more scientific and reasonable diet plan, so that the formation of a healthy lifestyle is promoted, and long-term reliable healthy diet guidance service is provided for the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a precise retrieval engine for healthy diet knowledge based on a large language model. Background Art

[0002] With the development of artificial intelligence technology, Natural Language Processing (NLP) capabilities based on Large Language Models (LLMs) are becoming increasingly powerful. While people's demand for knowledge about healthy diets is increasing, existing knowledge retrieval systems are mostly keyword-based and often fail to provide accurate and personalized dietary recommendations.

[0003] Especially when faced with diverse query methods and complex user needs, traditional retrieval methods are unable to fully understand user intentions, resulting in poor relevance and accuracy of retrieval results. Summary of the Invention

[0004] In view of this, an embodiment of the present invention proposes a precise retrieval engine for healthy diet knowledge based on a large language model, which deeply understands the user's natural language input to achieve efficient and accurate healthy diet knowledge recommendations and personalized suggestions to solve the above technical problems.

[0005] To achieve the above objectives, the present invention provides a precise search engine for healthy diet knowledge based on a large language model, which includes:

[0006] A user interface module for receiving questions related to healthy eating input by a user;

[0007] A natural language understanding module is used to process the healthy diet-related questions input by the user based on a large language model, analyze and extract user intentions and key information;

[0008] Healthy diet knowledge base module, used to store structured and unstructured data related to healthy diet;

[0009] A precise retrieval module, configured to retrieve relevant healthy diet data from the healthy diet knowledge base module based on the user intention and key information extracted by the natural language understanding module;

[0010] A personalized recommendation module, configured to generate personalized dietary recommendations based on the user's personal health information and the healthy diet data retrieved by the precise retrieval module; and

[0011] A feedback learning module is used to collect user feedback information on the personalized diet recommendations and optimize the processing logic of the natural language understanding module, the precise retrieval module, and the personalized recommendation module based on the feedback information.

[0012] Furthermore, the natural language understanding module specifically includes:

[0013] An intent classification submodule, which is used to leverage the text classification capabilities of the large language model to classify user-input questions related to healthy eating into one of multiple predefined user intent categories;

[0014] The entity recognition submodule is used to use the named entity recognition capability of the large language model to identify entity information related to healthy diet from healthy diet-related questions input by users;

[0015] The semantic relationship extraction submodule is used to analyze the semantic relationships between the identified entity information by leveraging the semantic understanding capabilities of the large language model; and

[0016] The information integration submodule is used to combine the user intent category of the intent classification submodule, the entity information of the entity recognition submodule and the semantic relationship of the semantic relationship extraction submodule to generate a structured query representation; wherein the key information includes the entity information and the semantic relationship.

[0017] Furthermore, the natural language understanding module further specifically includes:

[0018] The user profile building submodule is used to build a user profile that includes the user's health status, physiological characteristics, and eating habits based on the healthy eating-related questions input by the user and the personal information provided by the user;

[0019] A nutritional needs analysis submodule, configured to analyze the user's personalized nutritional needs based on the user portrait using a deep learning algorithm;

[0020] The health risk assessment submodule is used to assess the user's potential health risks based on the user portrait and the personalized nutritional needs using a pre-trained health risk model.

[0021] Furthermore, the healthy diet knowledge base module stores: disease-related medical literature data; nutritional guide data for different health conditions; food nutrient composition data; and healthy diet pattern data based on demographic characteristics of the population extracted from the population's healthy diet data through a data mining algorithm.

[0022] Furthermore, the precise search module specifically includes:

[0023] A semantic vectorization unit, configured to convert the user intent and the key information into a query semantic vector;

[0024] A multimodal data processing unit, configured to perform feature extraction, standardization, and vectorization on the structured data and unstructured data in the healthy diet knowledge base module to generate a knowledge base semantic vector set;

[0025] A similarity calculation unit, configured to calculate the similarity between the query semantic vector and each vector in the knowledge base semantic vector set;

[0026] The retrieval, screening and sorting unit is used to screen out knowledge base entries with a similarity higher than a preset similarity threshold according to the similarity threshold; further filter the screened knowledge base entries in combination with the user portrait and the personalized nutritional needs to obtain a set of candidate entries that meet the user's personalized needs; sort the candidate entry set in descending order according to similarity, and output a personalized healthy diet recommendation list.

[0027] Furthermore, the personalized suggestion module includes:

[0028] A user health status analysis unit, configured to generate a comprehensive analysis report on the user's health status based on the user's personal health information, wherein the user's personal health information includes age, gender, height, weight, activity level, past medical history, and current health status;

[0029] A diet plan generating unit, configured to generate a preliminary personalized diet plan using a rule-based reasoning system based on the comprehensive analysis report of the user's health status and the healthy diet data;

[0030] a nutritional balance assessment unit, configured to analyze and determine the nutritional balance of the preliminary personalized diet plan based on nutritional standards and using a nutritional balance algorithm, and obtain a nutritional balance analysis result, which includes macronutrient ratios, micronutrient intake, dietary fiber content, and total energy intake;

[0031] The recommendation optimization unit is used to optimize the preliminary diet plan according to the nutritional balance analysis results using an iterative optimization algorithm, and finally generate personalized diet recommendations.

[0032] Furthermore, the feedback learning module includes:

[0033] A user satisfaction evaluation unit is used to collect and analyze user satisfaction feedback on personalized diet recommendations to obtain user feedback data;

[0034] The long-term effect tracking unit is used to track changes in the user's health status after adopting dietary recommendations. By regularly collecting multiple health indicators including the user's weight, body fat percentage, blood pressure, and blood sugar, the user's health status trend data is obtained;

[0035] A model parameter adjustment unit is used to dynamically adjust the model parameters of the natural language understanding module, the precise retrieval module and the personalized suggestion module according to the user feedback data and the user health status change trend data.

[0036] Furthermore, the nutritional requirement analysis submodule is specifically used to:

[0037] Standardize multiple indicators in the user profile, including age, gender, height, weight, activity level, and chronic disease history, to obtain standardized user profile data;

[0038] Using a convolutional neural network to extract features from the standardized user portrait data to generate a user health feature vector;

[0039] Inputting the user's health feature vector into a pre-trained multi-layer perceptron to obtain a preliminary nutritional requirement estimation result of the user;

[0040] Incorporating contextual information such as the user's geographic location, season, and occupation, the attention mechanism is used to adjust the preliminary nutritional needs estimate to obtain a context-sensitive nutritional needs estimate.

[0041] Based on the context-dependent nutritional needs estimation results, personalized nutritional recommendations that meet the user's taste preferences and health goals are generated.

[0042] Furthermore, the nutritional balance assessment unit is specifically used to:

[0043] receiving the preliminary personalized dietary plan;

[0044] Calculating the specific nutrient content of each ingredient in the preliminary personalized diet plan based on a preset ingredient nutrient database;

[0045] Summarizing and calculating the total nutritional composition of the preliminary personalized diet plan, which includes macronutrients, micronutrients, dietary fiber and total energy intake;

[0046] Determine the user's recommended daily nutrient intake based on the user's personal characteristics and nutritional standards;

[0047] Comparing the total nutritional content with the recommended daily nutritional intake, calculating the percentage of the actual intake of each nutrient to the recommended intake, and obtaining nutrient intake ratio data;

[0048] Based on the preset nutritional balance algorithm, the system evaluates whether the macronutrient ratio, micronutrient intake, dietary fiber content, and total energy intake meet the balance standards and obtains the nutritional balance assessment results.

[0049] Based on the nutrient intake ratio data and the nutritional balance assessment results, a nutritional balance analysis result is generated, which includes the percentage of the actual intake of each nutrient to the recommended intake, and the assessment result of whether it meets the balance standard, and provides adjustment suggestions when nutritional imbalance is found.

[0050] Furthermore, the suggestion optimization unit is specifically used to:

[0051] Receiving the nutritional balance analysis result;

[0052] Based on a preset iterative optimization algorithm, the preliminary personalized diet plan is optimized, specifically including:

[0053] Step a: Identify nutrients that do not meet the balance standards in the nutritional balance analysis results;

[0054] Step b: Adjust the types and amounts of relevant ingredients based on the unbalanced nutrients;

[0055] Step c: using the nutritional balance assessment unit to recalculate the nutrient intake ratio data and nutritional balance assessment results of the adjusted plan;

[0056] Step d: Compare the nutrient intake ratio data before and after the adjustment and the nutritional balance assessment results. If the overall balance is improved, keep the adjustment; otherwise, try other adjustment plans (other adjustment plans are not clearly expressed);

[0057] Step e: Repeat steps a to d until a preset nutritional balance standard is reached or a maximum number of iterations is reached;

[0058] Based on the final optimization results, personalized dietary recommendations are generated, including recommended ingredients, amounts, and cooking methods.

[0059] The above technical solution has the following beneficial technical effects:

[0060] By combining the user interface module with the natural language understanding module, the engine can accurately understand users' questions about healthy eating, extracting key information and user intent. This deep understanding of user needs greatly improves the accuracy of subsequent searches and recommendations, allowing the engine to better meet users' personalized needs.

[0061] The combination of the Healthy Diet Knowledge Base module and the Precision Search module enables the engine to quickly and accurately locate relevant information from a vast amount of healthy diet data. This not only improves search efficiency but also ensures the relevance and reliability of search results, providing users with high-quality healthy diet information.

[0062] The introduction of the personalized recommendation module enables the engine to generate tailored dietary recommendations based on the user's personal health information and retrieved healthy diet data. This personalized approach greatly improves the practicality and actionability of the recommendations, helping users better achieve their healthy diet goals.

[0063] The design of the feedback learning module enables the engine to self-optimize and continuously learn. By collecting user feedback and optimizing the processing logic of each module accordingly, the engine can continuously improve its performance and accuracy, adapting to the changing needs of different users, and providing increasingly accurate and effective healthy eating recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The accompanying drawings are provided for a better understanding of the present invention and are not intended to limit the present invention.

[0065] Figure 1 This is a functional block diagram of a healthy diet knowledge precision retrieval engine based on a large language model according to an embodiment of the present invention;

[0066] Figure 2 is a functional block diagram of a natural language understanding module according to an embodiment of the present invention;

[0067] Figure 3 is another functional block diagram of the natural language understanding module of an embodiment of the present invention;

[0068] Figure 4 is a functional block diagram of a precise search module according to an embodiment of the present invention;

[0069] Figure 5 is a functional block diagram of a personalized suggestion module according to an embodiment of the present invention;

[0070] Figure 6 is a functional block diagram of a feedback learning module according to an embodiment of the present invention;

[0071] Figure 7 This is a flow chart of a method for accurately retrieving healthy diet knowledge based on a large language model according to an embodiment of the present invention;

[0072] Figure 8 Schematic diagram of the structure of a computer system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0073] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0074] The purpose of this embodiment of the present invention is to provide a precise search engine for healthy dietary knowledge based on a large language model, addressing the existing issues of insufficient search accuracy, lack of personalized recommendations, and inadequate understanding of user intent. By leveraging the large language model's deep understanding of natural language, this invention enables efficient and accurate recommendations for healthy dietary knowledge and provides personalized dietary advice.

[0075] like Figure 1 As shown, the present invention provides a healthy diet knowledge accurate retrieval engine based on a large language model, which includes:

[0076] A user interface module for receiving questions related to healthy eating input by a user;

[0077] A natural language understanding module is used to process the healthy diet-related questions input by the user based on a large language model, analyze and extract user intentions and key information;

[0078] Healthy diet knowledge base module, used to store structured and unstructured data related to healthy diet;

[0079] A precise retrieval module, configured to retrieve relevant healthy diet data from the healthy diet knowledge base module based on the user intention and key information extracted by the natural language understanding module;

[0080] A personalized recommendation module, configured to generate personalized dietary recommendations based on the user's personal health information and the healthy diet data retrieved by the precise retrieval module; and

[0081] A feedback learning module is used to collect user feedback information on the personalized diet recommendations and optimize the processing logic of the natural language understanding module, the precise retrieval module, and the personalized recommendation module based on the feedback information.

[0082] In a specific embodiment, the user interface module can be a graphical user interface (GUI) that allows users to ask questions related to healthy eating through a text input box or voice input. For example, the user may enter "I am a 30-year-old male who wants to lose weight. What should I eat?"

[0083] The natural language understanding module uses a pre-trained large language model (such as GPT or BERT) to process user input. This module analyzes the user's question and extracts key information (such as age, gender, and goal of losing weight) and potential user intent (seeking dietary advice).

[0084] The Healthy Diet Knowledge Base module is a comprehensive database containing a variety of information related to healthy diets. This information can include scientific literature, nutrition research results, food composition data, dietary guidelines, etc. The data can be structured (such as food nutrient composition tables) or unstructured (such as dietary recommendations).

[0085] The precision search module uses the information extracted by the natural language understanding module as search criteria to retrieve relevant data from the healthy diet knowledge base. In this example, it retrieves weight loss diet plans suitable for 30-year-old men and a list of low-calorie, high-nutrition foods.

[0086] The personalized recommendation module combines the user's personal health information (such as height, weight, activity level, medical history, etc.) with the retrieved healthy diet data to generate corresponding dietary recommendations. For example, it will recommend a daily meal plan that includes appropriate calorie intake and balanced nutrition, and take into account the user's possible food preferences or restrictions.

[0087] The feedback learning module continuously optimizes the various components of the system by collecting user feedback on the generated dietary recommendations (such as satisfaction ratings and specific comments). For example, if users report that the recommendations are not practical enough, the system will adjust the natural language understanding module to more accurately capture user needs, or optimize the algorithm of the personalized recommendation module to generate more practical recommendations.

[0088] In this way, the system is able to provide highly personalized, scientifically accurate healthy eating recommendations, and its performance and user satisfaction will continue to improve with use.

[0089] like Figure 2 As shown, the natural language understanding module specifically includes: an intention classification submodule, which is used to utilize the text classification capability of the large language model to classify the healthy diet-related questions input by the user into one of a plurality of predefined user intention categories; an entity recognition submodule, which is used to utilize the named entity recognition capability of the large language model to identify entity information related to healthy diet from the healthy diet-related questions input by the user; a semantic relationship extraction submodule, which is used to utilize the semantic understanding capability of the large language model to analyze the semantic relationship between the identified entity information; and an information integration submodule, which is used to combine the user intention category of the intention classification submodule, the entity information of the entity recognition submodule and the semantic relationship of the semantic relationship extraction submodule to generate a structured query representation; wherein, the key information includes the entity information and the semantic relationship.

[0090] In one specific embodiment, the various submodules of the natural language understanding module work together to fully interpret the healthy diet-related questions input by the user. The functions and working methods of each submodule are described in detail below:

[0091] The intent classification submodule leverages the text classification capabilities of large language models (such as BERT or GPT) to categorize user input questions into predefined intent categories. For example, predefined intent categories may include "seeking dietary advice," "querying food nutritional information," and "learning about dietary considerations for specific diseases." For the user input "I have diabetes. What should I eat for dinner?", this submodule classifies it as "seeking dietary advice for a specific disease."

[0092] The entity recognition submodule leverages the Named Entity Recognition (NER) capabilities of the large language model to identify key entities related to healthy eating from user input. In the example above, it can identify "diabetes" (a disease entity) and "dinner" (a meal entity). This submodule can also recognize other entity types, including food names, nutrients, body parts, and symptoms.

[0093] The semantic relationship extraction submodule leverages the deep semantic understanding capabilities of the large language model to analyze the semantic relationships between identified entities. In a given example, it can extract the relationship between "diabetes" and "dinner" as "dietary recommendation target" and "dinner time." This relationship extraction helps the system more accurately understand the specific context and needs of user questions.

[0094] The information integration submodule integrates the outputs of the first three submodules to generate a structured query representation.

[0095] For the above example, the generated structured query example is as follows:

[0096]

[0097]

[0098] This structured query representation provides clear and specific retrieval conditions for the subsequent precise retrieval module, which helps to retrieve the most relevant information from the healthy diet knowledge base.

[0099] Through this multi-layered natural language understanding process, the engine system is able to deeply understand the healthy eating questions entered by users. This approach not only handles direct and clear questions, but also understands implicit or complex queries, thereby providing more accurate and personalized healthy eating recommendations.

[0100] like Figure 3As shown, the natural language understanding module further specifically includes: a user portrait construction submodule, which is used to construct a user portrait including the user's health status, physiological characteristics and eating habits based on the health diet-related questions input by the user and the personal information provided by the user; a nutritional needs analysis submodule, which is used to use a deep learning algorithm to analyze the user's personalized nutritional needs according to the user portrait; a health risk assessment submodule, which is used to assess the user's potential health risks based on the user portrait and the personalized nutritional needs using a pre-trained health risk model.

[0101] In a specific embodiment, the user portrait construction submodule constructs a comprehensive user health portrait by analyzing the healthy diet-related questions input by the user and the personal information actively provided by the user. The user portrait can comprehensively include four main aspects: health status, physiological characteristics, eating habits and lifestyle to comprehensively portray the user's personal characteristics. In terms of health status, the user's existing diseases, allergies and drug use are recorded; physiological characteristics include basic information such as age, gender, height, weight and body mass index (BMI); the eating habits section covers the user's dietary preferences, frequency of common food intake, and special dietary needs (such as vegetarians or other specific dietary requirements); lifestyle reflects factors such as the user's exercise habits, nature of work (such as sedentary or physical labor), and sleep quality. By integrating this information, users can be provided with personalized healthy diet recommendations and other related services.

[0102] For example, for a user who enters "I am a 35-year-old female office worker who wants to know how to improve the symptoms of mild anemia through diet," the system can construct the following user profile:

[0103]

[0104]

[0105] The nutritional needs analysis submodule uses deep learning algorithms to analyze users' personalized nutritional needs based on the constructed user profile. This process can include the following steps: first, through data input, the information in the user profile is converted into a format that can be processed by the deep learning model, such as a vectorized expression of numerical, categorical, or textual features; then, deep learning architectures such as convolutional neural networks (CNN) or recurrent neural networks (RNN) are used to extract features from the input data to obtain the complex relationships and high-dimensional features hidden in the user profile; finally, technologies such as fully connected layers or attention mechanisms are used to further process and analyze the extracted features to accurately predict the user's specific nutritional needs and provide support for personalized healthy diet recommendations.

[0106] For the above example of an anemic female user, this submodule can produce the following nutritional needs analysis results:

[0107]

[0108] The health risk assessment submodule uses a pre-trained health risk model to assess a user's potential health risks based on user profiles and personalized nutritional needs analysis. The health risk model can be a machine learning model trained on large-scale health data, such as a random forest, gradient boosting tree, or deep neural network.

[0109] Health risk assessment can include the following aspects: risk of worsening existing health problems, risk of developing potential diseases, risk of malnutrition or overnutrition, and risks associated with specific dietary behaviors.

[0110] For the above-mentioned female user with anemia, the health risk assessment results can be as follows:

[0111]

[0112]

[0113] The introduction of these three sub-modules significantly enhances the system's understanding of users' health status and needs. User profiling provides the system with a holistic understanding of the user's health, nutritional needs analysis specifically identifies nutrients that the user should focus on, and health risk assessment helps the system provide more cautious and comprehensive recommendations.

[0114] For example, when providing dietary advice to the aforementioned female user with anemia, the system will not only recommend foods rich in iron, but will also take into account the intake of vitamin C, which promotes iron absorption, while taking care to avoid foods that may affect iron absorption. In addition, since the risk of vitamin B12 deficiency is assessed to be moderate, the system will recommend a moderate increase in the intake of foods rich in vitamin B12, such as lean meat, fish, or fortified cereals.

[0115] Through this multi-dimensional analysis and evaluation, the natural language understanding module can provide more comprehensive and in-depth user information to the subsequent precision search and personalized recommendation modules, thereby generating more accurate, safe, and personalized healthy eating recommendations. This approach not only meets the user's immediate needs but also foresees and mitigates potential health risks, truly achieving the goal of precise healthy eating guidance.

[0116] In some embodiments, the healthy diet knowledge base module stores: disease-related medical literature data; nutritional guide data for different health conditions; food nutrient composition data; and healthy diet pattern data based on demographic characteristics of the population extracted from healthy diet data of the population through data mining algorithms.

[0117] Specifically, data mining algorithms can include cluster analysis (e.g., K-means, hierarchical clustering), association rule mining (e.g., the Apriori algorithm), decision trees, and random forests. These algorithms can identify underlying patterns and associations from massive amounts of dietary records, health check results, and demographic data. For example, cluster analysis can reveal that urban white-collar workers of a certain age group have similar dietary preferences, while association rule mining can reveal the relationship between these dietary patterns and specific health indicators.

[0118] Demographic characteristics of a population include factors such as age, gender, occupation, education level, geographic location, and income level. These characteristics not only influence individual dietary choices but are also closely related to their health status. By linking these characteristics with dietary patterns and health outcomes, more refined and personalized healthy dietary guidance can be obtained. For example, it was found that urban women aged 35-45 were more likely to maintain an ideal weight and good cardiovascular health when they adopted a high-protein, low-carbohydrate diet.

[0119] Healthy eating pattern data consists of several key components. First, a description of the eating pattern, including key food types, frequency of consumption, and cooking methods. Second, typical food combinations or meal structures, reflecting daily eating habits within this pattern. Third, nutritional characteristics, such as the ratios of major nutrients and the intake levels of specific trace elements. Finally, the potential health impacts of this eating pattern, including weight management, chronic disease risk, and physiological function, are included.

[0120] like Figure 4 As shown, the precise retrieval module specifically includes: a semantic vectorization unit, which is used to convert the user intention and the key information into a query semantic vector; a multimodal data processing unit, which is used to perform feature extraction, standardization and vectorization processing on the structured data and unstructured data in the healthy diet knowledge base module to generate a knowledge base semantic vector set; a similarity calculation unit, which is used to calculate the similarity between the query semantic vector and each vector in the knowledge base semantic vector set; a retrieval screening and sorting unit, which is used to screen out knowledge base entries with a similarity higher than a preset similarity threshold according to the similarity threshold; in combination with the user portrait and the personalized nutritional needs, the screened knowledge base entries are further filtered to obtain a candidate entry set that meets the user's personalized needs; the candidate entry set is sorted in descending order according to similarity, and a personalized healthy diet recommendation list is output.

[0121] Specifically, the semantic vectorization unit uses advanced natural language processing techniques, such as BERT or its variants, to convert user input into high-dimensional semantic vectors. The implementation steps include: segmenting and normalizing the user input; encoding the processed text using a pre-trained model to obtain a fixed-dimensional vector representation; and performing dimensionality reduction on the encoded vector to reduce computational complexity. For example, the user input "I want to find some low-sugar fruits suitable for diabetics" can be processed to generate a 768-dimensional floating-point array as the query semantic vector.

[0122] Specifically, the multimodal data processing unit is responsible for processing the various data types in the healthy diet knowledge base. Structured data is standardized, normalized, or one-hot encoded. For unstructured data, text is vectorized using the same language model used for query processing, and images are extracted using a pre-trained convolutional neural network. Finally, feature fusion technology is used to integrate different types of features into a unified knowledge base semantic vector. For example, the knowledge base entry for "apple" combines nutritional data, text descriptions, and image features to generate a unified semantic vector representation.

[0123] Specifically, the similarity calculation unit calculates the similarity between the query vector and each entry vector in the knowledge base. Calculation methods include cosine similarity and Euclidean distance. Cosine similarity calculates the cosine of the angle between two vectors, ranging from -1 to 1, with larger values ​​indicating greater similarity. Euclidean distance calculates the straight-line distance between two vectors in high-dimensional space, with smaller distances indicating greater similarity. In practical applications, you can select the appropriate method based on your needs or combine multiple methods to achieve more accurate results.

[0124] Specifically, the retrieval, screening and sorting unit is responsible for the final result screening and sorting. First, the knowledge base entries are screened according to a preset similarity threshold (for example, 0.7); then, based on the user portrait and personalized nutritional needs, a rule engine or machine learning model is used for further filtering; then, the candidate entries are sorted in descending order of similarity, and other factors such as user historical preferences can be introduced for weighting; finally, the top-N results are output as a personalized healthy diet recommendation list. For example, for the query "low-sugar fruits suitable for diabetics", the final recommendation list includes raspberries, blackberries, strawberries, etc., and each recommendation item is accompanied by a similarity score and related health information.

[0125] like Figure 5 As shown, the personalized recommendation module includes: a user health status analysis unit, which is used to generate a comprehensive analysis report on the user's health status based on the user's personal health information, and the user's personal health information includes age, gender, height, weight, activity level, past medical history and current health status; a diet plan generation unit, which is used to generate a preliminary personalized diet plan based on the comprehensive analysis report on the user's health status and the healthy diet data using a rule-based reasoning system; a nutritional balance assessment unit, which is used to determine the nutritional balance of the preliminary personalized diet plan based on nutritional standards and a nutritional balance algorithm, and obtain a nutritional balance analysis result, which includes macronutrient ratios, micronutrient intake, dietary fiber content and total energy intake; a recommendation optimization unit, which is used to optimize the preliminary diet plan using an iterative optimization algorithm based on the nutritional balance analysis result, and finally generate personalized diet recommendations.

[0126] Specifically, the user health status analysis unit is the basic component of the personalized recommendation module. It generates a comprehensive health status report by comprehensively analyzing the user's multi-dimensional health information. This unit uses a multi-factor assessment model to perform weighted calculations and risk assessments on the user's various health indicators. For example, for a 35-year-old female user with a height of 165cm, a weight of 60kg, a moderate activity level, and a history of mild hypertension, the system will generate the following analysis report: BMI index is 22.0, which is within the normal range; Basal Metabolic Rate (BMR) is approximately 1374 kcal / day; based on activity level, daily energy requirement is approximately 2061 kcal; the risk of hypertension is moderate, and it is recommended to control sodium intake; overall health is good, but attention should be paid to blood pressure management and maintaining a healthy weight.

[0127] Specifically, the diet plan generation unit uses a rule-based reasoning system to generate a preliminary personalized diet plan based on the user's health status analysis report and healthy diet database. The reasoning system contains a series of preset nutritional rules and decision trees for selecting appropriate food combinations based on the user's health characteristics. For example, for the above user, the system can generate the following preliminary plan: total daily calories are controlled at 1800-2000 kcal; carbohydrates account for 50-55% of total calories, with priority given to whole grains and low-GI foods; protein accounts for 20-25%, mainly high-quality lean meat, fish and soy products; fat accounts for 25-30%, mainly unsaturated fatty acids; control sodium intake to less than 5g; increase the intake of minerals such as potassium, magnesium, and calcium; and consume at least 25g of dietary fiber per day.

[0128] Specifically, the Nutritional Balance Assessment unit uses an advanced nutritional balance algorithm to comprehensively evaluate the initial diet plan. This algorithm calculates and analyzes various nutritional indicators within the diet plan based on the latest nutritional standards, such as the Chinese Dietary Guidelines (2022 edition) and the WHO dietary recommendations. The assessment includes: whether the macronutrient ratio (carbohydrate:protein:fat) meets the recommended ratio of 50-65%:10-20%:20-30%; whether micronutrients such as vitamins A, B complex, C, D, E, as well as calcium, iron, and zinc, meet the recommended intake; whether dietary fiber meets the recommended daily amount of 25-30g; and whether total energy intake matches the user's energy needs. The assessment results may be as follows: the macronutrient ratio is 53%:22%:25%, which is within the recommended range; vitamin C and calcium intake are slightly below the recommended amount; dietary fiber reaches 28g / day, which meets the requirement; and total energy intake is 1950 kcal, which is consistent with the user's energy needs.

[0129] Specifically, the recommendation optimization unit uses an iterative optimization algorithm to refine the initial diet plan based on the results of the nutritional balance analysis. This algorithm can employ heuristic methods such as genetic algorithms or simulated annealing to adjust food combinations and portion sizes through multiple iterations to achieve optimal nutritional balance. The optimization process considers multiple objective functions, such as minimizing deviations from ideal nutrient ratios, maximizing micronutrient compliance, and satisfying user taste preferences. For example, based on the aforementioned evaluation results, the optimization algorithm might increase vitamin C-rich fruits and calcium-rich dairy products, while appropriately adjusting the proportions of other foods to maintain the same total calorie count. The resulting personalized dietary recommendations include: specific recipes for three meals and two snacks daily, including food types, weights, and cooking methods; targeted nutritional supplement recommendations, such as increasing the intake of dark vegetables; dietary taboos and precautions, such as limiting high-salt foods; and alternative options tailored to the user's taste preferences. Such personalized recommendations not only meet the user's nutritional needs but also take into account practical feasibility and long-term adherence.

[0130] like Figure 6 As shown, the feedback learning module includes: a user satisfaction evaluation unit, which is used to collect and analyze user satisfaction feedback on personalized diet recommendations to obtain user feedback data; a long-term effect tracking unit, which is used to track changes in the user's health status after adopting diet recommendations, and obtain user health status change trend data by regularly collecting multiple health indicators including the user's weight, body fat percentage, blood pressure, and blood sugar; a model parameter adjustment unit, which is used to dynamically adjust the model parameters of the natural language understanding module, the precise retrieval module, and the personalized recommendation module according to the user feedback data and the user health status change trend data.

[0131] Specifically, the user satisfaction assessment unit utilizes a multi-dimensional evaluation system, collecting user satisfaction information on personalized dietary recommendations through questionnaires, a scoring system, and free text feedback. Evaluation dimensions include, but are not limited to, the practicality, feasibility, taste satisfaction, nutritional balance, and degree of personalization of dietary recommendations. The system then conducts quantitative analysis of this feedback, such as calculating the mean and standard deviation of each score, performing sentiment analysis and keyword extraction on the text feedback, and ultimately generating a user feedback data report.

[0132] Specifically, the long-term impact tracking unit has designed a scientific health indicator monitoring program. By regularly collecting various health data from users, it analyzes the long-term effects of dietary recommendations. Monitored indicators include, but are not limited to: weight, body fat percentage, BMI, waist circumference, blood pressure, fasting blood glucose, glycated hemoglobin, and four blood lipids (total cholesterol, triglycerides, high-density lipoprotein cholesterol, and low-density lipoprotein cholesterol). The frequency of data collection depends on the rate of change and importance of the indicator. For example, weight is recorded weekly, while blood indicators are tested every 3-6 months. The system compares this data with the user's baseline data, calculates the percentage change and rate of change, and evaluates the clinical significance of the changes based on medical standards. For example, if an overweight user, after adopting dietary recommendations for three months, reduces their weight from 80kg to 75kg, their body fat percentage from 28% to 25%, and their blood pressure from 140 / 90mmHg to 130 / 85mmHg, the system will flag these changes as significant health improvements. The system also analyzes the changing trends of these indicators and uses linear regression or more complex time series analysis methods to predict future health changes.

[0133] Specifically, the model parameter adjustment unit is the core of the feedback learning module. It dynamically optimizes each module of the system by analyzing user feedback data and health status trends. This unit uses machine learning techniques, especially reinforcement learning and online learning algorithms, to continuously adjust model parameters to improve system performance. Specifically:

[0134] In the natural language understanding module, the system adjusts the weights of the semantic understanding model based on the keywords and semantic analysis results in user feedback, improving the accuracy of understanding specific user expressions. For example, if the system frequently misunderstands users' definitions of "less oil," it can specifically enhance the semantic representation of such words.

[0135] For the precision search module, the system adjusts the weight or threshold for similarity calculation based on user satisfaction feedback. For example, if a user is highly satisfied with the recommendations for a certain type of food, the system will increase the weight of that type of food in the search results.

[0136] In the personalized recommendation module, the system dynamically adjusts nutritional ratios and food selection strategies based on the user's health status trends. For example, if it finds that a user has significantly lost weight after adopting a high-protein diet, the system will appropriately increase the protein ratio in future recommendations.

[0137] The model parameter adjustment unit also considers the overall performance of user groups, identifying similar user groups through cluster analysis and optimizing parameters at the group level. For example, the system may find that middle-aged female users are more receptive to low-fat diets, and thus tend to recommend low-fat recipes when generating recommendations for this group.

[0138] Through this continuous feedback and optimization mechanism, the system can continuously improve the accuracy and effectiveness of its personalized recommendations, while adapting to the dynamic changes in users' eating habits and health status, ultimately achieving the goal of providing accurate and practical healthy eating guidance.

[0139] In some embodiments, the nutritional needs analysis submodule is specifically used to: standardize multiple indicators in the user portrait, including age, gender, height, weight, activity level, and chronic disease history, to obtain standardized user portrait data; use a convolutional neural network to extract features from the standardized user portrait data to generate a user health feature vector; input the user health feature vector into a pre-trained multi-layer perceptron to obtain the user's preliminary nutritional needs estimation result; combine the user's contextual information including geographic location, season, and occupation, and use an attention mechanism to adjust the preliminary nutritional needs estimation result to obtain a context-related nutritional needs estimation result; based on the context-related nutritional needs estimation result, generate personalized nutritional recommendations that meet the user's taste preferences and health goals.

[0140] Standardization is a key step in data preprocessing, which can eliminate the dimensional differences between different indicators and make them comparable. Different standardization methods are used for each indicator in the user profile: age is standardized using Min-Max, mapping age to between 0 and 1; gender is encoded using One-Hot; height and weight are standardized using Z-score; activity level is represented by discrete values ​​from 1 to 5, which can be directly standardized using Min-Max; chronic disease history is encoded using Multi-Hot. For example, for a 35-year-old female user with a height of 170 cm, a weight of 65 kg, a moderate activity level (3), and a history of hypertension, the standardized data are as follows: [0.4, 0, 1, 0.5, 0.2, 0.5, 1, 0, 0].

[0141] Convolutional Neural Networks (CNNs) are used to extract high-level features from standardized user profile data. While CNNs are commonly used for image processing, here the user data is treated as one-dimensional images. The CNN architecture can include multiple convolutional layers, pooling layers, and fully connected layers. For example, the input layer receives a standardized user data vector, followed by a combination of two convolutional layers and a pooling layer, followed by a fully connected layer and an output layer. This CNN model is able to capture complex patterns and high-level features in the user data, and the output feature vector contains condensed information about the user's health status.

[0142] A pre-trained multilayer perceptron (MLP) is used to convert the user's health feature vector into a preliminary nutritional requirement estimate. The MLP structure may include an input layer, two hidden layers, and an output layer, where the input layer corresponds to the dimension of the user's health feature vector, and the output layer determines the number of neurons based on the type of nutrients that need to be estimated. The MLP pre-training process involves using a large amount of user data with known nutritional requirements and optimizing the network parameters through a backpropagation algorithm. The output preliminary nutritional requirement estimate can include specific values ​​for daily calories, protein, fat, carbohydrates, vitamins, minerals, etc.

[0143] The attention mechanism is used to integrate user contextual information and fine-tune the initial nutritional needs estimate. A multi-head self-attention mechanism is employed here. This process involves concatenating the initial nutritional needs estimate with the contextual information, generating query, key, and value matrices through linear transformations, calculating attention weights, applying multiple attention heads and concatenating the results, and finally processing through a feedforward network to obtain the final context-sensitive nutritional needs estimate.

[0144] Finally, based on the context-related nutritional needs estimation results, the system will generate personalized nutritional recommendations. This step involves the combination of a rule engine and a recommendation algorithm: first, the estimation results are compared with nutritional standards to determine the target intake range of each nutrient; then, considering the user's taste preferences, food combinations that meet nutritional needs and that the user may like are screened from the food database; a combinatorial optimization algorithm (such as a genetic algorithm) is used to generate a recipe plan that meets all constraints; finally, the generated plan is converted into natural language suggestions that are easy to understand and implement, such as specific meal plans, food substitution options, dietary precautions, etc. This method uses deep learning and attention mechanisms to achieve an end-to-end process from user data to personalized nutritional recommendations. It can fully consider the individual differences and environmental factors of users and provide accurate and practical dietary guidance.

[0145] In some embodiments, the nutritional balance assessment unit is specifically used to: receive the preliminary personalized diet plan; calculate the specific nutritional content of each ingredient in the preliminary personalized diet plan based on a preset ingredient nutritional database; summarize and calculate the total nutritional components of the preliminary personalized diet plan, which include macronutrients, micronutrients, dietary fiber and total energy intake; determine the user's daily recommended nutritional intake based on the user's personal characteristics and nutritional standards; compare the total nutritional components with the daily recommended nutritional intake, calculate the actual intake of each nutrient as a percentage of its recommended intake, and obtain nutrient intake ratio data; based on a preset nutritional balance algorithm, evaluate whether the macronutrient ratio, micronutrient intake, dietary fiber content and total energy intake meet the balance standard, and obtain a nutritional balance assessment result; generate a nutritional balance analysis result based on the nutrient intake ratio data and the nutritional balance assessment result, which includes the actual intake of each nutrient as a percentage of the recommended intake, and an assessment result of whether it meets the balance standard, and provides adjustment suggestions when nutritional imbalance is found.

[0146] In practice, a preliminary personalized diet plan can include a detailed meal plan for a day or a week, for example: "Breakfast: 2 slices of whole-wheat bread (60g), 1 egg (50g), 1 cup of milk (250ml), 1 apple (150g); Lunch: 1 bowl of brown rice (200g), 1 portion of steamed sea bass (100g), 1 portion of broccoli (100g), 1 portion of carrots (50g); Dinner: 1 bowl of oatmeal (40g), 1 portion of chicken breast (100g), 1 portion of mixed vegetable salad (150g)." The food nutrient composition database is an electronic database containing detailed nutritional information for various common ingredients, which can be implemented using SQL or NoSQL databases. For example, an entry for an egg (50g) in the database may contain the following information: protein 6.3g, fat 5.0g, carbohydrate 0.6g, vitamin A 270IU, vitamin B1 20.6μg, folic acid 22μg, iron 1.0mg, calcium 25mg, energy 72kcal, etc.

[0147] The system will traverse each ingredient in the diet plan, query the database to obtain its nutritional composition, and calculate the actual intake based on the weight of the ingredients. For example, for whole wheat bread (60g) in breakfast, the system calculates: protein 4.2g, carbohydrates 28.8g, dietary fiber 3.6g, energy 150kcal, etc. Then, the system will summarize the nutritional composition of all ingredients in a day or a week to obtain the total nutritional intake. Macronutrients here refer to protein, fat and carbohydrates, and micronutrients include vitamins and minerals, such as vitamin A, B vitamins, vitamin C, calcium, iron, etc.

[0148] The user's recommended daily nutrient intake is calculated based on personal characteristics (age, gender, weight, height, and activity level) and nutritional standards (Chinese Dietary Reference Intakes). For example, for a 30-year-old female adult weighing 60 kg and 165 cm tall with a moderate activity level, the system generates the following recommended intake: 2000 kcal of energy, 60 g of protein, no more than 30% of total energy from fat, 250-325 g of carbohydrates, 25 g of dietary fiber, 1000 mg of calcium, 20 mg of iron, and 100 mg of vitamin C.

[0149] The calculation of nutrient intake ratio data is to divide the actual intake by the recommended intake to get the percentage. For example, if the actual protein intake is 54g and the recommended intake is 60g, the protein intake ratio is 90%. The preset nutritional balance algorithm can be based on the following standards: the macronutrient ratio (protein: fat: carbohydrate) should be close to 15:30:55, micronutrient intake should not be less than 80% of the recommended amount or exceed the upper limit of intake, dietary fiber should reach 100% of the recommended amount, and total energy intake should be within 90-110% of the recommended amount.

[0150] The final nutritional balance analysis results can be as follows: "Protein intake reaches 90% of the recommended amount, which meets the balance standard; fat intake accounts for 28% of total energy, which meets the balance standard; carbohydrate intake reaches 105% of the recommended amount, which meets the balance standard; dietary fiber intake only reaches 72% of the recommended amount, which does not meet the balance standard, and it is recommended to increase the intake of whole grains, vegetables and fruits; calcium intake only reaches 65% of the recommended amount, which does not meet the balance standard, and it is recommended to increase the intake of dairy products or calcium-fortified foods; the intake of other micronutrients is within a reasonable range." This detailed analysis result can help users understand whether their diet is balanced and adjust their diet structure accordingly.

[0151] In some embodiments, the suggestion optimization unit is specifically configured to:

[0152] Receiving the nutritional balance analysis result;

[0153] Based on a preset iterative optimization algorithm, the preliminary personalized diet plan is optimized, specifically including:

[0154] Step a: Identify nutrients that do not meet the balance standards in the nutritional balance analysis results;

[0155] Step b: Adjust the types and amounts of relevant ingredients based on the unbalanced nutrients;

[0156] Step c: using the nutritional balance assessment unit to recalculate the nutrient intake ratio data and nutritional balance assessment results of the adjusted plan;

[0157] Step d: Compare the nutrient intake ratio data before and after the adjustment and the nutritional balance assessment results. If the overall balance is improved, keep the adjustment; otherwise, try other adjustment plans (other adjustment plans are not clearly expressed);

[0158] Step e: Repeat steps a to d until a preset nutritional balance standard is reached or a maximum number of iterations is reached;

[0159] Based on the final optimization results, personalized dietary recommendations are generated, including recommended ingredients, amounts, and cooking methods.

[0160] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0161] like Figure 7 As shown, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the following method when the program is executed by a processor:

[0162] A method for accurately retrieving healthy diet knowledge based on a large language model, comprising the following steps:

[0163] S110: receiving questions related to healthy eating input by the user;

[0164] S120: Processing the healthy diet-related question input by the user based on the large language model, analyzing and extracting the user's intention and key information;

[0165] S130: Retrieving relevant healthy diet data from a pre-stored healthy diet knowledge base containing healthy diet-related structured and unstructured data according to the extracted user intention and key information;

[0166] S140: Generate personalized diet recommendations based on the user's personal health information and the retrieved healthy diet data;

[0167] S150: Collecting user feedback on the personalized diet advice; and

[0168] S160: Optimizing the process of extracting user intention and key information, the process of retrieving healthy diet data, and the process of generating personalized diet recommendations based on the feedback information.

[0169] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. Of course, there are other ways of readable storage media, such as quantum memory, graphene memory, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0170] The present invention also provides an electronic device. The electronic device in an embodiment of the present invention includes: one or more processors; and a storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement a method for accurately retrieving healthy diet knowledge based on a large language model provided by the present invention, which includes the following steps:

[0171] Receive user input on healthy eating-related questions;

[0172] Processing the healthy diet-related questions input by the user based on the large language model, analyzing and extracting the user's intention and key information;

[0173] Retrieving relevant healthy diet data from a pre-stored healthy diet knowledge base containing healthy diet-related structured and unstructured data based on the extracted user intention and key information;

[0174] generating personalized diet recommendations based on the user's personal health information and the retrieved healthy diet data;

[0175] Collecting user feedback on the personalized dietary recommendations; and

[0176] The user intention and key information extraction process, the healthy diet data retrieval process, and the personalized diet recommendation generation process are optimized based on the feedback information.

[0177] Reference below Figure 8 , which shows a schematic structural diagram of a computer system 800 of an electronic device suitable for implementing an embodiment of the present invention. Figure 8 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.

[0178] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage unit 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the computer system 800 are also stored in the RAM 803. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0179] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, and the like; an output section 807 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 808 including a hard disk; and a communication section 809 including a network interface card such as a LAN card or a modem. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 810 as needed, so that computer programs read therefrom can be installed in the storage section 808 as needed.

[0180] In particular, according to embodiments disclosed herein, the processes described in the main step diagrams above can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for executing the methods shown in the main step diagrams. In the above embodiments, the computer program can be downloaded and installed from a network via the communication section 809 and / or installed from removable media 811. When the computer program is executed by the central processing unit 801, the above-described functions defined in the system of the present invention are performed.

[0181] It should be noted that the computer-readable medium described in the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical cable, RF, or any suitable combination thereof.

[0182] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0183] The units involved in the embodiments of the present invention may be implemented in software or hardware. The units described may also be provided in a processor, and the names of these units do not, in some cases, limit the units themselves.

[0184] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A precise search engine for healthy diet knowledge based on a large language model, characterized by: include: A user interface module for receiving questions related to healthy eating input by a user; A natural language understanding module is used to process the healthy diet-related questions input by the user based on a large language model, analyze and extract user intentions and key information; Healthy diet knowledge base module, used to store structured and unstructured data related to healthy diet; A precise retrieval module, configured to retrieve relevant healthy diet data from the healthy diet knowledge base module based on the user intention and key information extracted by the natural language understanding module; A personalized recommendation module, configured to generate personalized dietary recommendations based on the user's personal health information and the healthy diet data retrieved by the precise retrieval module; as well as A feedback learning module is used to collect user feedback information on the personalized diet recommendations and optimize the processing logic of the natural language understanding module, the precise retrieval module, and the personalized recommendation module based on the feedback information.

2. The healthy diet knowledge accurate search engine according to claim 1 is characterized in that: The natural language understanding module specifically includes: An intent classification submodule, which is used to leverage the text classification capabilities of the large language model to classify user-input questions related to healthy eating into one of multiple predefined user intent categories; The entity recognition submodule is used to use the named entity recognition capability of the large language model to identify entity information related to healthy diet from healthy diet-related questions input by users; The semantic relationship extraction submodule is used to analyze the semantic relationships between the identified entity information by leveraging the semantic understanding capabilities of the large language model; and The information integration submodule is used to combine the user intent category of the intent classification submodule, the entity information of the entity recognition submodule and the semantic relationship of the semantic relationship extraction submodule to generate a structured query representation; wherein the key information includes the entity information and the semantic relationship.

3. The healthy diet knowledge accurate search engine according to claim 2 is characterized in that: The natural language understanding module further specifically includes: The user profile building submodule is used to build a user profile that includes the user's health status, physiological characteristics, and eating habits based on the healthy eating-related questions input by the user and the personal information provided by the user; A nutritional needs analysis submodule, configured to analyze the user's personalized nutritional needs based on the user portrait using a deep learning algorithm; The health risk assessment submodule is used to assess the user's potential health risks based on the user portrait and the personalized nutritional needs using a pre-trained health risk model.

4. The healthy diet knowledge accurate search engine according to claim 1 is characterized in that: The healthy diet knowledge base module stores: disease-related medical literature data; nutritional guide data for different health conditions; food nutrient composition data; and healthy diet pattern data based on demographic characteristics of the population extracted from healthy diet data using a data mining algorithm.

5. The healthy diet knowledge accurate search engine according to claim 3 is characterized in that: The precise search module specifically includes: A semantic vectorization unit, configured to convert the user intent and the key information into a query semantic vector; A multimodal data processing unit, configured to perform feature extraction, standardization, and vectorization on the structured data and unstructured data in the healthy diet knowledge base module to generate a knowledge base semantic vector set; A similarity calculation unit, configured to calculate the similarity between the query semantic vector and each vector in the knowledge base semantic vector set; The retrieval, screening and sorting unit is used to screen out knowledge base entries with a similarity higher than a preset similarity threshold according to the similarity threshold; further filter the screened knowledge base entries in combination with the user portrait and the personalized nutritional needs to obtain a set of candidate entries that meet the user's personalized needs; sort the candidate entry set in descending order according to similarity, and output a personalized healthy diet recommendation list.

6. The healthy diet knowledge accurate search engine according to claim 1 is characterized in that: The personalized suggestion module includes: A user health status analysis unit, configured to generate a comprehensive analysis report on the user's health status based on the user's personal health information, wherein the user's personal health information includes age, gender, height, weight, activity level, past medical history, and current health status; A diet plan generating unit, configured to generate a preliminary personalized diet plan using a rule-based reasoning system based on the comprehensive analysis report of the user's health status and the healthy diet data; a nutritional balance assessment unit, configured to analyze and determine the nutritional balance of the preliminary personalized diet plan based on nutritional standards and using a nutritional balance algorithm, and obtain a nutritional balance analysis result, which includes macronutrient ratios, micronutrient intake, dietary fiber content, and total energy intake; The recommendation optimization unit is used to optimize the preliminary diet plan according to the nutritional balance analysis results using an iterative optimization algorithm, and finally generate personalized diet recommendations.

7. The healthy diet knowledge accurate search engine according to claim 1 is characterized in that: The feedback learning module includes: A user satisfaction evaluation unit is used to collect and analyze user satisfaction feedback on personalized diet recommendations to obtain user feedback data; The long-term effect tracking unit is used to track changes in the user's health status after adopting dietary recommendations. By regularly collecting multiple health indicators including the user's weight, body fat percentage, blood pressure, and blood sugar, the user's health status trend data is obtained; A model parameter adjustment unit is used to dynamically adjust the model parameters of the natural language understanding module, the precise retrieval module and the personalized suggestion module according to the user feedback data and the user health status change trend data.

8. The healthy diet knowledge accurate search engine according to claim 1 is characterized in that: The nutritional requirement analysis submodule is specifically used for: Standardize multiple indicators in the user profile, including age, gender, height, weight, activity level, and chronic disease history, to obtain standardized user profile data; Using a convolutional neural network to extract features from the standardized user portrait data to generate a user health feature vector; Inputting the user's health feature vector into a pre-trained multi-layer perceptron to obtain a preliminary nutritional requirement estimation result of the user; Incorporating contextual information such as the user's geographic location, season, and occupation, the attention mechanism is used to adjust the preliminary nutritional needs estimate to obtain a context-sensitive nutritional needs estimate. Based on the context-dependent nutritional needs estimation results, personalized nutritional recommendations that meet the user's taste preferences and health goals are generated.

9. The healthy diet knowledge accurate search engine according to claim 6, characterized in that: The nutritional balance assessment unit is specifically used for: receiving the preliminary personalized dietary plan; Calculating the specific nutrient content of each ingredient in the preliminary personalized diet plan based on a preset ingredient nutrient database; Summarizing and calculating the total nutritional composition of the preliminary personalized diet plan, which includes macronutrients, micronutrients, dietary fiber and total energy intake; Determine the user's recommended daily nutrient intake based on the user's personal characteristics and nutritional standards; Comparing the total nutritional content with the recommended daily nutritional intake, calculating the percentage of the actual intake of each nutrient to the recommended intake, and obtaining nutrient intake ratio data; Based on the preset nutritional balance algorithm, the system evaluates whether the macronutrient ratio, micronutrient intake, dietary fiber content, and total energy intake meet the balance standards and obtains the nutritional balance assessment results. Based on the nutrient intake ratio data and the nutritional balance assessment results, a nutritional balance analysis result is generated, which includes the percentage of the actual intake of each nutrient to the recommended intake, and the assessment result of whether it meets the balance standard, and provides adjustment suggestions when nutritional imbalance is found.

10. The healthy diet knowledge accurate search engine according to claim 6, characterized in that: The suggested optimization unit is specifically used for: Receiving the nutritional balance analysis result; Based on a preset iterative optimization algorithm, the preliminary personalized diet plan is optimized, specifically including: Step a: Identify nutrients that do not meet the balance standards in the nutritional balance analysis results; Step b: Adjust the types and amounts of relevant ingredients based on the unbalanced nutrients; Step c: using the nutritional balance assessment unit to recalculate the nutrient intake ratio data and nutritional balance assessment results of the adjusted plan; Step d: Compare the nutrient intake ratio data before and after the adjustment and the nutritional balance assessment results. If the overall balance is improved, keep the adjustment; otherwise, try other adjustment plans (other adjustment plans are not clearly expressed); Step e: Repeat steps a to d until a preset nutritional balance standard is reached or a maximum number of iterations is reached; Based on the final optimization results, personalized dietary recommendations are generated, including recommended ingredients, amounts, and cooking methods.

Citation Information

Patent Citations

  • Personalized intelligent recipe recommendation system based on personal diet record

    CN118248285A

  • Multi-dimensional disease diet recommendation method and computer program product

    CN119943284A

  • Personalized old people diet recommendation method based on large language model

    CN120032804A

Cited By

  • Dynamic pre-examination questionnaire generation method and device based on large language model, electronic equipment and readable storage medium

    CN121281719A