Nothing Special   »   [go: up one dir, main page]

CN114388102A - Diet recommendation method and device and electronic equipment - Google Patents

Diet recommendation method and device and electronic equipment Download PDF

Info

Publication number
CN114388102A
CN114388102A CN202111617290.0A CN202111617290A CN114388102A CN 114388102 A CN114388102 A CN 114388102A CN 202111617290 A CN202111617290 A CN 202111617290A CN 114388102 A CN114388102 A CN 114388102A
Authority
CN
China
Prior art keywords
dietary
diet
information
user
basic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111617290.0A
Other languages
Chinese (zh)
Inventor
汪蒙
龚辉
练恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ali Health Technology China Co ltd
Original Assignee
Ali Health Technology China Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ali Health Technology China Co ltd filed Critical Ali Health Technology China Co ltd
Priority to CN202111617290.0A priority Critical patent/CN114388102A/en
Publication of CN114388102A publication Critical patent/CN114388102A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H20/00ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance
    • G16H20/60ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance relating to nutrition control, e.g. diets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Nutrition Science (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The embodiment of the specification provides a diet recommendation method and device and electronic equipment. The method comprises the following steps: acquiring diet information uploaded by a user; inputting the diet information into the diet knowledge map, and acquiring diet basic information matched with the diet information in the diet knowledge map and diet basic information corresponding to the diet information under the diet label; inputting the diet basic information and the health information of the user into a prediction model for calculation to obtain a diet analysis result output by the prediction model; recommending a healthy diet plan to the user based on the diet analysis results.

Description

饮食推荐方法及装置和电子设备Diet recommendation method and device and electronic device

技术领域technical field

本说明书实施例涉及计算机技术领域,尤其涉及一种饮食推荐方法及装置和电子设备。The embodiments of this specification relate to the field of computer technology, and in particular, to a method and apparatus for recommending a diet, and an electronic device.

背景技术Background technique

随着物质生活的富余,人们越来越多的关注个人的身体健康状况。医疗手段作为最终的选择,更多的还是需要人们在日常生活中预防疾病的发生或者病情的加重。With the abundance of material life, people pay more and more attention to their physical health. As the final choice of medical means, more people need to prevent the occurrence of disease or the aggravation of the disease in daily life.

而在日常生活中饮食状况的健康与否对疾病预防有着很大的影响。The health of the diet in daily life has a great impact on disease prevention.

然而,对于大多数的普通人来说,并不具备相关的专业知识来鉴别自身的饮食状况,因此也就无法获取符合自身健康需要的饮食方案。However, for most ordinary people, they do not have the relevant professional knowledge to identify their own dietary status, so they cannot obtain a dietary plan that meets their own health needs.

发明内容SUMMARY OF THE INVENTION

本说明书实施例提供的一种饮食推荐方法及装置和电子设备,用于解决用户无法获取符合自身健康需要的饮食方案的问题。A diet recommendation method, device, and electronic device provided by the embodiments of this specification are used to solve the problem that users cannot obtain a diet plan that meets their own health needs.

根据本说明书实施例的第一方面,提供一种饮食推荐方法,所述方法应用于饮食管理系统,所述饮食管理系统包括用于确定饮食基础信息的饮食知识图谱,所述方法包括:According to a first aspect of the embodiments of the present specification, a method for recommending a diet is provided. The method is applied to a diet management system, where the diet management system includes a diet knowledge graph for determining basic diet information, and the method includes:

获取用户上传的饮食信息;Obtain dietary information uploaded by users;

将所述饮食信息输入到所述饮食知识图谱中,获取所述饮食知识图谱中与所述饮食信息匹配的饮食基础信息;Inputting the dietary information into the dietary knowledge graph, and obtaining basic dietary information that matches the dietary information in the dietary knowledge graph;

将所述饮食基础信息和所述用户的健康信息输入到预测模型中进行计算,得到所述预测模型输出的饮食分析结果;Inputting the basic dietary information and the health information of the user into a prediction model for calculation, and obtaining a dietary analysis result output by the prediction model;

基于所述饮食分析结果向所述用户推荐健康的饮食方案。A healthy diet plan is recommended to the user based on the diet analysis result.

可选的,所述获取用户上传的饮食信息,包括:Optionally, the obtaining dietary information uploaded by the user includes:

获取用户上传的包含饮食餐品的图像;Obtain user-uploaded images containing food and beverages;

基于图像识别技术,从所述图像中识别出所述饮食餐品对应的饮食信息。Based on the image recognition technology, the dietary information corresponding to the dietary meal is identified from the image.

可选的,所述饮食信息包括所述用户扫描饮食餐品上的图形码以获取的饮食信息。Optionally, the dietary information includes dietary information obtained by the user scanning a graphic code on a dietary meal.

可选的,所述基于所述饮食分析结果向所述用户推荐健康的饮食方案,包括:Optionally, recommending a healthy diet plan to the user based on the diet analysis result includes:

将所述饮食分析结果输入到深度知识感知网络中进行计算,将所述深度知识感知网络输出的健康的饮食方案推荐给所述用户。The diet analysis result is input into the deep knowledge perception network for calculation, and the healthy diet plan output by the deep knowledge perception network is recommended to the user.

可选的,所述健康的饮食方案包括将用户上传饮食信息中不健康饮食替换为健康饮食。Optionally, the healthy diet plan includes replacing unhealthy diet with healthy diet in the diet information uploaded by the user.

可选的,所述获取所述饮食知识图谱中与所述饮食信息匹配的饮食基础信息,包括:Optionally, the obtaining basic dietary information matching the dietary information in the dietary knowledge graph includes:

获取所述饮食知识图谱中所述饮食信息所属的饮食标签;Obtain the dietary label to which the dietary information in the dietary knowledge graph belongs;

获取所述饮食标签下与所述饮食信息对应的饮食基础信息。Obtain basic dietary information corresponding to the dietary information under the dietary label.

可选的,所述饮食标签包括类目、属性、营养、主题中的至少一种;其中,所述类目是指饮食信息所属的饮食类型,所述属性是指饮食信息的基本信息,所述营养是指饮食信息的营养元素,所述主题是指饮食信息的食疗功能。Optionally, the diet label includes at least one of category, attribute, nutrition, and theme; wherein, the category refers to the diet type to which the diet information belongs, and the attribute refers to the basic information of the diet information. The nutrition refers to the nutritional elements of the dietary information, and the topic refers to the therapeutic function of the dietary information.

可选的,所述饮食类型包括主食、蔬菜、水果、饮品中的至少一种;所述基本信息包括食材、烹饪方式、口味、荤素、菜系中的至少一种;所述营养元素包括蛋白质、脂肪、维生素、卡路里中的至少一种;所述食疗功能包括健康餐、控糖、减肥、补钙、补血、减脂中的至少一种。Optionally, the diet type includes at least one of staple food, vegetables, fruits, and beverages; the basic information includes at least one of ingredients, cooking methods, tastes, meat and vegetables, and cuisines; the nutritional elements include protein , at least one of fat, vitamins, and calories; and the diet therapy function includes at least one of healthy meals, sugar control, weight loss, calcium supplementation, blood supplementation, and fat reduction.

可选的,所述用户的健康信息包括用户健康档案中的用户体征数据。Optionally, the user's health information includes user physical sign data in the user's health profile.

可选的,所述用户体征数据包括疾病史。Optionally, the user sign data includes disease history.

可选的,所述预测模型包括决策树模型。Optionally, the prediction model includes a decision tree model.

根据本说明书实施例的第二方面,提供一种饮食推荐装置,所述装置应用于饮食管理系统,所述饮食管理系统包括用于确定饮食基础信息的饮食知识图谱,所述装置包括:According to a second aspect of the embodiments of the present specification, there is provided a diet recommendation device, which is applied to a diet management system, where the diet management system includes a diet knowledge graph for determining basic diet information, and the device includes:

获取单元,获取用户上传的饮食信息;an acquisition unit to acquire the dietary information uploaded by the user;

匹配单元,将所述饮食信息输入到所述饮食知识图谱中,获取所述饮食知识图谱中与所述饮食信息匹配的饮食基础信息;a matching unit, which inputs the dietary information into the dietary knowledge graph, and obtains basic dietary information that matches the dietary information in the dietary knowledge graph;

计算单元,将所述饮食基础信息和所述用户的健康信息输入到预测模型中进行计算,得到所述预测模型输出的饮食分析结果;a calculation unit, which inputs the basic dietary information and the health information of the user into a prediction model for calculation, and obtains a dietary analysis result output by the prediction model;

推荐单元,基于所述饮食分析结果向所述用户推荐健康的饮食方案。A recommending unit, which recommends a healthy diet plan to the user based on the diet analysis result.

可选的,所述获取单元,包括:Optionally, the obtaining unit includes:

获取用户上传的包含饮食餐品的图像,基于图像识别技术,从所述图像中识别出所述饮食餐品对应的饮食信息。An image uploaded by the user including the food and drink is acquired, and based on the image recognition technology, the dietary information corresponding to the food and drink is identified from the image.

可选的,所述饮食信息包括所述用户扫描饮食餐品上的图形码以获取的饮食信息。Optionally, the dietary information includes dietary information obtained by the user scanning a graphic code on a dietary meal.

可选的,所述推荐单元,包括:Optionally, the recommendation unit includes:

将所述饮食分析结果输入到深度知识感知网络中进行计算,将所述深度知识感知网络输出的健康的饮食方案推荐给所述用户。The diet analysis result is input into the deep knowledge perception network for calculation, and the healthy diet plan output by the deep knowledge perception network is recommended to the user.

可选的,所述健康的饮食方案包括将用户上传饮食信息中不健康饮食替换为健康饮食。Optionally, the healthy diet plan includes replacing unhealthy diet with healthy diet in the diet information uploaded by the user.

可选的,所述匹配单元,包括:Optionally, the matching unit includes:

第一匹配子单元,将所述饮食信息输入到所述饮食知识图谱中,获取所述饮食知识图谱中所述饮食信息所属的饮食标签;a first matching subunit, which inputs the dietary information into the dietary knowledge graph, and obtains a dietary label to which the dietary information in the dietary knowledge graph belongs;

第二匹配子单元,获取所述饮食标签下与所述饮食信息对应的饮食基础信息。The second matching subunit acquires basic dietary information corresponding to the dietary information under the dietary label.

可选的,所述饮食标签包括类目、属性、营养、主题中的至少一种;其中,所述类目是指饮食信息所属的饮食类型,所述属性是指饮食信息的基本信息,所述营养是指饮食信息的营养元素,所述主题是指饮食信息的食疗功能。Optionally, the diet label includes at least one of category, attribute, nutrition, and theme; wherein, the category refers to the diet type to which the diet information belongs, and the attribute refers to the basic information of the diet information. The nutrition refers to the nutritional elements of the dietary information, and the topic refers to the therapeutic function of the dietary information.

可选的,所述饮食类型包括主食、蔬菜、水果、饮品中的至少一种;所述基本信息包括食材、烹饪方式、口味、荤素、菜系中的至少一种;所述营养元素包括蛋白质、脂肪、维生素、卡路里中的至少一种;所述食疗功能包括健康餐、控糖、减肥、补钙、补血、减脂中的至少一种。Optionally, the diet type includes at least one of staple food, vegetables, fruits, and beverages; the basic information includes at least one of ingredients, cooking methods, tastes, meat and vegetables, and cuisines; the nutritional elements include protein , at least one of fat, vitamins, and calories; and the diet therapy function includes at least one of healthy meals, sugar control, weight loss, calcium supplementation, blood supplementation, and fat reduction.

可选的,所述用户的健康信息包括用户健康档案中的用户体征数据。Optionally, the user's health information includes user physical sign data in the user's health profile.

可选的,所述用户体征数据包括疾病史。Optionally, the user sign data includes disease history.

可选的,所述预测模型包括决策树模型。Optionally, the prediction model includes a decision tree model.

根据本说明书实施例的第三方面,提供一种电子设备,包括:According to a third aspect of the embodiments of the present specification, an electronic device is provided, including:

处理器;processor;

用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;

其中,所述处理器被配置为上述任一项饮食推荐方法。Wherein, the processor is configured to any one of the above-mentioned diet recommendation methods.

本说明书实施例,提供了一种饮食推荐方案,通过构建饮食知识图谱,针对性地对用户上传的饮食信息进行分析,结合用户的健康信息从而可以推荐符合用户健康需要的饮食方案。The embodiments of this specification provide a diet recommendation scheme. By constructing a diet knowledge graph, the diet information uploaded by the user can be analyzed in a targeted manner, and a diet scheme that meets the user's health needs can be recommended in combination with the user's health information.

附图说明Description of drawings

图1是本说明书一实施例提供的饮食推荐方法的流程图;1 is a flowchart of a method for recommending a diet provided by an embodiment of the present specification;

图2是本说明书一实施例提供的饮食标签的示意图;2 is a schematic diagram of a diet label provided by an embodiment of the present specification;

图3是本说明书一实施例提供的饮食知识图谱的示意图;3 is a schematic diagram of a dietary knowledge graph provided by an embodiment of this specification;

图4是本说明书一实施例提供的饮食分析和饮食推荐的示意图;4 is a schematic diagram of dietary analysis and dietary recommendation provided by an embodiment of the present specification;

图5是本说明书一实施例提供的饮食推荐装置的硬件结构图;FIG. 5 is a hardware structure diagram of a diet recommendation device provided by an embodiment of the present specification;

图6是本说明书一实施例提供的饮食推荐装置的模块。FIG. 6 is a module of a diet recommendation device provided by an embodiment of the present specification.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this specification. Rather, they are merely examples of apparatus and methods consistent with some aspects of this specification as recited in the appended claims.

在本说明书使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书。在本说明书和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terms used in this specification are for the purpose of describing particular embodiments only and are not intended to limit the specification. As used in this specification and the appended claims, the singular forms "a," "the," and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

应当理解,尽管在本说明书可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information, without departing from the scope of the present specification. Depending on the context, the word "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determining."

以下结合图1介绍本说明书提供的饮食推荐方法的实施例,应用于饮食管理系统,所述饮食管理系统包括用于确定饮食基础信息的饮食知识图谱,所述方法包括:The following describes an embodiment of the diet recommendation method provided by the present specification with reference to FIG. 1, which is applied to a diet management system, where the diet management system includes a diet knowledge map for determining basic diet information, and the method includes:

步骤210:获取用户上传的饮食信息;Step 210: Obtain the dietary information uploaded by the user;

步骤220:将所述饮食信息输入到所述饮食知识图谱中,获取所述饮食知识图谱中所述饮食信息所属的饮食标签,以及所述饮食标签下所述饮食信息对应的饮食基础信息;Step 220: Input the dietary information into the dietary knowledge graph, and obtain a dietary label to which the dietary information in the dietary knowledge graph belongs, and basic dietary information corresponding to the dietary information under the dietary label;

步骤230:将所述饮食基础信息和所述用户的健康信息输入到预测模型中进行计算,得到所述预测模型输出的饮食分析结果;Step 230: Input the basic dietary information and the health information of the user into a prediction model for calculation, and obtain a dietary analysis result output by the prediction model;

步骤240:基于所述饮食分析结果向所述用户推荐健康的饮食方案。Step 240: Recommend a healthy diet plan to the user based on the diet analysis result.

在本说明书中,上述饮食管理系统,是指用于管理饮食方案的任何形式的机器或机器集群。In this specification, the above-mentioned diet management system refers to any form of machine or machine cluster for managing a diet plan.

例如,在实际应用中,上述饮食管理系统,具体可以为用于饮食推荐的部署于云端的机器或集群。For example, in practical applications, the above-mentioned diet management system may specifically be a machine or cluster deployed in the cloud for diet recommendation.

在本说明书中,上述饮食管理系统包括用于确定饮食基础信息的饮食知识图谱。In the present specification, the above-mentioned diet management system includes a diet knowledge graph for determining diet basic information.

例如,在实际应用中,上述饮食管理系统在后台的数据库中存储有用于确定饮食基础信息的饮食知识图谱,上述饮食管理系统具体还可以通过web页面或对接的APP软件等方式,向用户提供饮食推荐服务。比如:当用户通过持有的终端接入至上述饮食管理系统后,上述饮食管理系统可以与用户持有终端的客户端进行交互,包括上述用户通过客户端展示的操作界面上传饮食信息等等。For example, in practical applications, the above-mentioned diet management system stores a diet knowledge map used to determine basic dietary information in a database in the background. The above-mentioned diet management system can also provide users with diet through web pages or docked APP software. Recommended service. For example, after the user accesses the above-mentioned diet management system through the terminal held by the user, the above-mentioned diet management system can interact with the client terminal held by the user, including the above-mentioned user uploading diet information through the operation interface displayed by the client terminal.

在一示例性的实施例中,上述步骤210获取用户上传的饮食信息,可以包括:In an exemplary embodiment, the above step 210 to obtain the dietary information uploaded by the user may include:

获取用户上传的包含饮食餐品的图像;Obtain user-uploaded images containing food and beverages;

基于图像识别技术,从所述图像中识别出所述饮食餐品对应的饮食信息。Based on the image recognition technology, the dietary information corresponding to the dietary meal is identified from the image.

例如,在实际应用中,用户可以通过上述终端搭载的摄像装置(例如摄像头)拍摄包含饮食物品的图像,然后将拍摄的图像上传给饮食管理系统。而饮食管理系统则可以基于图像识别技术,从接收到的图像中识别出饮食餐品对应的饮食信息。For example, in practical applications, a user may use a camera device (eg, a camera) mounted on the above-mentioned terminal to capture images including food and drink items, and then upload the captured images to the food and beverage management system. The diet management system can identify the diet information corresponding to the diet meal from the received image based on the image recognition technology.

在本说明书中,上述饮食信息可以包括饮食餐品的名称。例如,米饭、牛奶、鸡蛋、面、青菜、鱼、肉等等In the present specification, the above-mentioned dietary information may include the names of dietary items. For example, rice, milk, eggs, noodles, vegetables, fish, meat, etc.

在本说明书中,上述图像识别技术可以基于卷积神经网络(ConvolutionalNeural Networks,CNN)算法构建的图像识别模型。In this specification, the above-mentioned image recognition technology may be based on an image recognition model constructed by a convolutional neural network (Convolutional Neural Networks, CNN) algorithm.

在一示例性的实施例中,上述饮食信息包括所述用户扫描饮食餐品上的图形码以获取的饮食信息。In an exemplary embodiment, the above-mentioned dietary information includes dietary information obtained by the user by scanning a graphic code on a dietary item.

该示例中,用户不是上传图像,而是通过终端搭载的扫描装置(例如扫码器、摄像头等)扫描饮食餐品上喷涂的图形码,从而获取饮食餐品的饮食信息,进而将饮食信息上传给上述饮食管理系统。In this example, instead of uploading an image, the user scans the graphic code sprayed on the food and drink through the scanning device (such as a code scanner, camera, etc.) mounted on the terminal, so as to obtain the dietary information of the food and drink, and then upload the dietary information Give the above diet management system.

在本说明书中,上述图形码可以包括条形码或二维码。In this specification, the above-mentioned graphic codes may include barcodes or two-dimensional codes.

在介绍了上述饮食信息之后,接着来介绍本说明书中的知识图谱。为了方便理解,这里简单介绍下知识图谱,知识图谱是一种将人类对客观世界的认知映射到计算机世界中的一种信息技术。以客观世界中的对象作为计算机世界中的实体,以客观世界中的对象的属性或对象之间关系作为计算机世界中的实体属性或者实体间关系,用来通过计算机世界描述客观世界的对象、对象属性及对象关系。After introducing the above dietary information, let's introduce the knowledge graph in this manual. In order to facilitate understanding, here is a brief introduction to the knowledge graph, which is an information technology that maps human cognition of the objective world to the computer world. Taking objects in the objective world as entities in the computer world, and using the attributes of objects in the objective world or the relationships between objects as entity attributes or relationships between entities in the computer world, it is used to describe objects and objects in the objective world through the computer world. properties and object relationships.

在实现时,知识图谱的构成核心是三元组:实体(Entity)、属性(Attribute)和关系(Relation);客观世界中的对象的属性或对象之间关系,可以被表示为<实体,关系,实体>或<实体,属性,属性值>。At the time of implementation, the core of the knowledge graph is a triple: entity (Entity), attribute (Attribute) and relationship (Relation); the attributes of objects in the objective world or the relationship between objects can be expressed as <entity, relationship , entity> or <entity, attribute, attribute value>.

例如:“牛奶的蛋白质含量是3.5g/100ml”这是人类的认知,在计算机世界中通过知识图谱的三元组方式进行描述时,可以使用三元组<牛奶,蛋白质,3.5g/ml>表达;其中,“牛奶”都为实体,“蛋白质”表征“牛奶”实体的实体属性,“3.5g/ml”表征“蛋白质”实体属性的属性值。For example: "The protein content of milk is 3.5g/100ml" This is human cognition. In the computer world, when describing the triplet of the knowledge graph, you can use the triplet <milk, protein, 3.5g/ml >Expression; wherein, "milk" is an entity, "protein" represents the entity attribute of the "milk" entity, and "3.5g/ml" represents the attribute value of the "protein" entity attribute.

由此,通过构建海量的知识图谱的三元组数据,可以将人类认知在计算机世界中形成海量数据的知识图谱数据,该知识图谱数据可以通过图数据库进行存储,具体图数据库的类型及原理,请参见图数据库技术说明,这里不再赘述。Therefore, by constructing massive triple data of knowledge graph, human cognition can be formed into massive data knowledge graph data in the computer world, and the knowledge graph data can be stored by graph database. , please refer to the technical description of graph database, which will not be repeated here.

在本说明书中,饮食知识图谱将上述实体属性称为饮食标签,将属性值称为饮食基础信息。In this specification, the dietary knowledge graph refers to the above entity attributes as diet labels, and the attribute values as diet basic information.

在一示例性的实施例中,上述饮食标签包括类目、属性、营养、主题中的至少一种;In an exemplary embodiment, the above-mentioned diet label includes at least one of categories, attributes, nutrition, and topics;

其中,上述类目是指饮食信息所属的饮食类型,上述属性是指饮食信息的基本信息,上述元素是指饮食信息的营养元素,上述主题是指饮食信息的食疗功能。The above category refers to the type of diet to which the dietary information belongs, the above attribute refers to the basic information of the dietary information, the above element refers to the nutritional element of the dietary information, and the above topic refers to the therapeutic function of the dietary information.

请参见图2,图2是本说明书一实施例提供的一种饮食标签的示意图。Please refer to FIG. 2, which is a schematic diagram of a diet label provided by an embodiment of the present specification.

在该示例中,上述饮食标签可以分为类目、属性、营养和主题这四大标签,并且每种标签下还细分了很多子标签。In this example, the above diet tags can be divided into four categories: category, attribute, nutrition, and topic, and each tag is also subdivided into many sub-tags.

例如,图2中的类目标签表示的饮食类型可以包括主食、蔬菜、水果、饮品、菜品等;属性标签表示的基本信息可以包括食材、烹饪方式、口味、荤素、菜系等;营养标签表示的营养元素可以包括蛋白质、脂肪、维生素、卡路里、GI(Glycemic Index,血糖生成指数)、GL(Glycemic Load,血糖负载)等;主题标签表示的食疗功能可以包括健康餐、控糖、减肥、补钙、补血、减脂等等。For example, the type of diet represented by the category label in FIG. 2 may include staple food, vegetables, fruits, drinks, dishes, etc.; the basic information represented by the attribute label may include ingredients, cooking methods, tastes, meat and vegetables, cuisine, etc.; the nutrition label indicates The nutritional elements can include protein, fat, vitamins, calories, GI (Glycemic Index, glycemic index), GL (Glycemic Load, glycemic load), etc; Calcium, blood replenishment, fat loss, etc.

需要说明的是,上述饮食标签之间还存在一定的关联关系;一般的,根据饮食信息的类目不同,对应的饮食信息的属性也会不同;而饮食的属性进一步又会影响饮食的营养;而饮食的属性和营养最终又是确定主题的依据。It should be noted that there is a certain correlation between the above diet labels; in general, according to different categories of diet information, the attributes of the corresponding diet information will also be different; and the attributes of the diet will further affect the nutrition of the diet; The attributes and nutrition of the diet are ultimately the basis for determining the theme.

另外,上述饮食知识图谱的数据来源可以公开渠道获取的例如从食谱、科学常识或互联网;也可以是在系统运行过程中逐步完善的。In addition, the data source of the above-mentioned dietary knowledge graph can be obtained from public channels, such as recipes, scientific knowledge or the Internet; it can also be gradually improved during the operation of the system.

例如,上述基于图像识别技术从所述图像中识别出所述饮食餐品对应的饮食信息,或者通过用户扫描饮食餐品上的图形码上传的饮食信息,就可以作为饮食信息记录到饮食知识图谱中,对于缺失的饮食基础信息则可以由人工标注后更新到知识图谱中,也可以基于相关算法从公开渠道自动获取以更新到知识图谱中。For example, the above-mentioned diet information corresponding to the diet meal is identified from the image based on the image recognition technology, or the diet information uploaded by the user scanning the graphic code on the diet meal can be recorded as the diet information in the diet knowledge map For the missing basic dietary information, it can be manually annotated and updated to the knowledge map, or automatically obtained from public channels based on related algorithms to update the knowledge map.

在一示例性的实施例中,上述步骤220中获取所述饮食知识图谱中与所述饮食信息匹配的饮食基础信息,包括:In an exemplary embodiment, obtaining basic dietary information in the dietary knowledge graph that matches the dietary information in step 220 includes:

获取所述饮食知识图谱中所述饮食信息所属的饮食标签,以及进一步获取所述饮食标签下与所述饮食信息对应的饮食基础信息。Obtain the dietary label to which the dietary information in the dietary knowledge graph belongs, and further acquire basic dietary information corresponding to the dietary information under the dietary label.

请参见图3,图3是本说明书一实施例提供的一种饮食知识图谱的示意图。Please refer to FIG. 3 , which is a schematic diagram of a dietary knowledge graph provided by an embodiment of the present specification.

在图3中,输入到饮食知识图谱中的饮食信息为羊肉荞麦面,获取饮食知识图谱中与羊肉荞麦面匹配的类目标签为菜品,进一步菜品下与羊肉荞麦面对应的饮食基础信息为面食。In Figure 3, the dietary information input into the dietary knowledge graph is mutton soba, and the category tag that matches the mutton soba in the dietary knowledge graph is obtained as a dish, and the basic dietary information corresponding to the mutton soba under the dish is: pasta.

类似的,该饮食知识图谱中与羊肉荞麦面匹配的属性标签为荤素、食材和烹饪方式;进一步荤素下与羊肉荞麦面对应的饮食基础信息为荤;食材下与羊肉荞麦面对应的饮食基础信息为羊肉、荞麦面;烹饪方式下与羊肉荞麦面对应的饮食基础信息为煮。Similarly, the attribute tags matching mutton soba in the dietary knowledge map are meat and vegetables, ingredients and cooking methods; further, the basic dietary information corresponding to mutton soba under meat and vegetables is meat; under ingredients, it corresponds to mutton soba. The basic dietary information of mutton and soba is mutton and soba; the basic dietary information corresponding to mutton soba under the cooking mode is boiled.

该饮食知识图谱中与羊肉荞麦面匹配的营养标签为卡路里、GI、GE、脂肪、维生素、蛋白质;进一步卡路里下与羊肉荞麦面对应的饮食基础信息为1200千卡;GI下与羊肉荞麦面对应的饮食基础信息为59;GL下与羊肉荞麦面对应的饮食基础信息为11.3;脂肪下与羊肉荞麦面对应的饮食基础信息为5.41;维生素下与羊肉荞麦面对应的饮食基础信息为1.47;蛋白质下与羊肉荞麦面对应的饮食基础信息为9.52;The nutrition labels matching mutton soba in the dietary knowledge map are calorie, GI, GE, fat, vitamin, protein; the basic dietary information corresponding to mutton soba under further calories is 1200 kcal; The corresponding basic dietary information is 59; the basic dietary information corresponding to mutton buckwheat noodles under GL is 11.3; the basic dietary information corresponding to mutton soba under GL is 5.41; the basic dietary information corresponding to mutton buckwheat noodles under vitamin The information is 1.47; the basic dietary information corresponding to mutton soba under protein is 9.52;

该饮食知识图谱中与羊肉荞麦面匹配的主题标签为健康餐;进一步健康餐下与羊肉荞麦面对应的饮食基础信息为糖尿病。The subject tag matching the mutton soba in the dietary knowledge map is a healthy meal; the basic dietary information corresponding to the mutton soba under the further healthy meal is diabetes.

需要说明的是,图3中的标签与数值仅为示例,特别是数值可能与实际存在偏差,可以理解该示例并非对本说明书提供的实施例进行的具体限定。It should be noted that the labels and numerical values in FIG. 3 are only examples, especially the numerical values may deviate from the actual ones, and it can be understood that the examples do not specifically limit the embodiments provided in this specification.

在一示例性的实施例中,在获取到饮食基础信息之后,进一步可以将所述饮食基础信息和所述用户的健康信息输入到预测模型中进行计算,得到所述预测模型输出的饮食分析结果。In an exemplary embodiment, after the basic dietary information is obtained, the basic dietary information and the user's health information may be further input into a prediction model for calculation to obtain a dietary analysis result output by the prediction model. .

在实际应用中,所述用户的健康信息可以包括用户健康档案中的用户体征数据。例如,用户体检后生成的体检报告。In practical applications, the user's health information may include the user's sign data in the user's health profile. For example, the physical examination report generated after the user's physical examination.

以下结合图4所述的饮食分析和饮食推荐的示意图加以说明。The following description will be given in conjunction with the schematic diagram of the dietary analysis and dietary recommendation described in FIG. 4 .

在图4中可见,上述用户体征数据至少可以包括用户的疾病史。另外也可以包括用户的基本身体信息例如年龄、体重、身高等等。As can be seen in FIG. 4 , the above-mentioned user sign data may at least include the user's disease history. In addition, the user's basic physical information such as age, weight, height, etc. may also be included.

在实现过程中,可以将饮食基础信息(如图4中所示的卡路里338千卡、主题控糖减脂,GI34),和用户的健康信息(如图4中所示的年龄60岁、体重45kg、身高170厘米、疾病史糖尿病)输入到预测模型中进行计算,得到饮食分析结果为:不适合糖尿病人群食用。In the implementation process, basic dietary information (as shown in Figure 4, calorie 338 kcal, subject of sugar control and fat reduction, GI34), and the user's health information (as shown in Figure 4, age 60, weight 45kg, height 170cm, history of diabetes) was input into the prediction model for calculation, and the result of dietary analysis was: not suitable for people with diabetes.

其中,上述预测模型可以包括图4中所示的决策树(Decision Tree)。通过将饮食基础信息和用户的健康信息输入到决策树,由于决策树对其进行计算,最终可以通过数据化的形式展示,例如可以是以分数制、等级制的形式输出饮食分析结果。Wherein, the above-mentioned prediction model may include a decision tree (Decision Tree) shown in FIG. 4 . By inputting the basic dietary information and the user's health information into the decision tree, since the decision tree calculates it, it can finally be displayed in the form of data, for example, the dietary analysis results can be output in the form of a score system and a hierarchical system.

再次结合图4,在图4中就例举了几种不同形式(以分数、颜色绿灯黄灯红灯、等级A/B/C)的输出的。Combining again with Fig. 4, in Fig. 4, the output of several different forms (in points, color green light yellow light red light, grade A/B/C) is exemplified.

在以分数形式的示例中,决策树对输入的饮食基础信息和用户的健康信息进行计算,可以计算得到一个反应饮食健康程度的分数;如果这个分数位于100到70之间,则表示饮食信息对应的饮食餐品没有问题,用户可以放心食用;如果分数位于70至50之间,则表示用户只能少量食用;如果分数低于50之间,则表示用户不能食用。In the example in the form of scores, the decision tree calculates the input basic dietary information and the user's health information, and can calculate a score that reflects the health of the diet; if the score is between 100 and 70, it means that the dietary information corresponds to If the score is between 70 and 50, it means that the user can only eat a small amount; if the score is lower than 50, it means that the user cannot eat it.

应用上述实施例,可以在饮食基础信息的基础上结合用户的健康信息后进行饮食分析,得到用户饮食情况是否满足其实际健康需求。By applying the above embodiment, it is possible to carry out a diet analysis based on the basic dietary information in combination with the user's health information, to obtain whether the user's diet meets the actual health needs of the user.

在一示例性的实施例中,在确定了饮食分析结果后,进一步可以基于饮食分析结果向所述用户推荐健康的饮食方案。In an exemplary embodiment, after the dietary analysis result is determined, a healthy dietary plan may be recommended to the user based on the dietary analysis result.

在本说明书中,可以基于饮食分析结果结合推荐算法来向用户推荐健康的饮食方案。In this specification, a healthy diet plan can be recommended to the user based on the diet analysis result in combination with the recommendation algorithm.

以下结合图4所述的饮食分析和饮食推荐的示意图加以说明。The following description will be given in conjunction with the schematic diagram of the dietary analysis and dietary recommendation described in FIG. 4 .

在图4中可见,上述推荐算法可以采用DKN算法(Deep Knowledge-Aware Network,深度知识感知网络)。As can be seen in FIG. 4 , the above recommendation algorithm may adopt the DKN algorithm (Deep Knowledge-Aware Network, deep knowledge awareness network).

具体地,可以将所述饮食分析结果输入到深度知识感知网络中进行计算,将所述深度知识感知网络输出的健康的饮食方案推荐给所述用户。Specifically, the diet analysis result may be input into a deep knowledge perception network for calculation, and a healthy diet plan output by the deep knowledge perception network is recommended to the user.

如图4中所示,推荐的饮食方案包括符合用户健康信息的饮食内容,例如,由于用户患有糖尿病,因此向用户推荐的食品为豆腐,推荐理由为豆腐适合糖尿病人群;再例如由于用户体重偏重达到85kg,因此向用户推荐的食品为牛肉,推荐理由为牛肉适合减脂人群;以及由于用户年龄达到60岁,因此向用户推荐的食品为南瓜汤,推荐理由为南瓜汤适合60岁以以上人群。由此可见,向用户推荐的饮食方案都是符合用户健康需求的健康的饮食内容。As shown in FIG. 4 , the recommended diet plan includes diet content that conforms to the user’s health information. For example, since the user suffers from diabetes, the recommended food to the user is tofu, and the reason for the recommendation is that tofu is suitable for people with diabetes; for example, due to the user’s weight The weight reaches 85kg, so the recommended food to the user is beef, and the reason for the recommendation is that beef is suitable for people who lose fat; and because the user is 60 years old, the food recommended to the user is pumpkin soup, and the reason for the recommendation is that pumpkin soup is suitable for people over 60 years old. crowd. It can be seen that the dietary plans recommended to the user are all healthy dietary content that meets the user's health needs.

应用上述示例,由于DKN算法是一种适用于知识图谱的推荐算法,因此在本说明书中采用DKN算法可以根据饮食知识图谱快速计算出需要推荐的健康的饮食方案,相比于一般的推荐算法处理效率更高。Using the above example, since the DKN algorithm is a recommendation algorithm suitable for knowledge graphs, the DKN algorithm used in this specification can quickly calculate the recommended healthy diet plan based on the dietary knowledge graph. Compared with the general recommendation algorithm processing higher efficiency.

在一示例性的实施例中,上述健康的饮食方案包括将用户上传饮食信息中不健康饮食替换为健康饮食。In an exemplary embodiment, the above-mentioned healthy diet plan includes replacing unhealthy diet with healthy diet in the diet information uploaded by the user.

在实际应用中,将用户当前饮食内容中的不健康饮食替换为健康饮食,这样用户可以更为合理的搭配符合健康要求的饮食,降低了用户饮食管理的成本;对于具有慢性疾病的用户来说可以有效提高饮食纠偏的能力,从而起到疾病预防的目的。In practical applications, the unhealthy diet in the user's current diet content is replaced with a healthy diet, so that the user can more reasonably match the diet that meets the health requirements, reducing the cost of the user's diet management; for users with chronic diseases, it can be Effectively improve the ability of diet correction, so as to achieve the purpose of disease prevention.

与前述饮食推荐方法实施例相对应,本说明书还提供了饮食推荐装置的实施例。所述装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在设备的处理器将非易失性存储器中对应的计算机程序读取到内存中运行形成的。从硬件层面而言,如图5所示,为本说明书饮食推荐装置所在设备的一种硬件结构图,除了图5所示的处理器、网络接口、内存以及非易失性存储器之外,实施例中装置所在的设备通常根据饮食推荐实际功能,还可以包括其他硬件,对此不再赘述。Corresponding to the foregoing embodiments of the dietary recommendation method, the present specification also provides embodiments of the dietary recommendation device. The apparatus embodiments may be implemented by software, or may be implemented by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by reading the corresponding computer program in the non-volatile memory into the memory through the processor of the device where it is located. From the perspective of hardware, as shown in FIG. 5 , a hardware structure diagram of the equipment where the diet recommendation device is located in this specification, in addition to the processor, network interface, memory and non-volatile memory shown in FIG. In the example, the device where the device is located usually recommends actual functions according to the diet, and may also include other hardware, which will not be repeated here.

请参见图6,为本说明书一实施例提供的饮食推荐装置的模块图,所述装置对应了图1所示实施例,应用于饮食管理系统,所述饮食管理系统包括用于确定饮食基础信息的饮食知识图谱,所述装置包括:Please refer to FIG. 6 , which is a block diagram of a diet recommendation device provided in an embodiment of the present specification. The device corresponds to the embodiment shown in FIG. 1 and is applied to a diet management system. The diet management system includes basic information for determining diet. The dietary knowledge graph, the device includes:

获取单元310,获取用户上传的饮食信息;The obtaining unit 310 obtains the dietary information uploaded by the user;

匹配单元320,将所述饮食信息输入到所述饮食知识图谱中,获取所述饮食知识图谱中与所述饮食信息匹配的饮食基础信息;A matching unit 320, which inputs the dietary information into the dietary knowledge graph, and obtains basic dietary information that matches the dietary information in the dietary knowledge graph;

计算单元330,将所述饮食基础信息和所述用户的健康信息输入到预测模型中进行计算,得到所述预测模型输出的饮食分析结果;The calculation unit 330 inputs the basic dietary information and the health information of the user into a prediction model for calculation, and obtains a dietary analysis result output by the prediction model;

推荐单元340,基于所述饮食分析结果向所述用户推荐健康的饮食方案。The recommending unit 340 recommends a healthy diet plan to the user based on the diet analysis result.

在一示例性的实施例中,所述获取单元310,包括:In an exemplary embodiment, the obtaining unit 310 includes:

获取用户上传的包含饮食餐品的图像,基于图像识别技术,从所述图像中识别出所述饮食餐品对应的饮食信息。An image uploaded by the user including the food and drink is acquired, and based on the image recognition technology, the dietary information corresponding to the food and drink is identified from the image.

在一示例性的实施例中,所述饮食信息包括所述用户扫描饮食餐品上的图形码以获取的饮食信息。In an exemplary embodiment, the dietary information includes dietary information obtained by the user scanning a graphic code on a dietary item.

在一示例性的实施例中,所述推荐单元340,包括:In an exemplary embodiment, the recommending unit 340 includes:

将所述饮食分析结果输入到深度知识感知网络中进行计算,将所述深度知识感知网络输出的健康的饮食方案推荐给所述用户。The diet analysis result is input into the deep knowledge perception network for calculation, and the healthy diet plan output by the deep knowledge perception network is recommended to the user.

在一示例性的实施例中,所述健康的饮食方案包括将用户上传饮食信息中不健康饮食替换为健康饮食。In an exemplary embodiment, the healthy diet plan includes replacing unhealthy diets with healthy diets in the diet information uploaded by the user.

在一示例性的实施例中,所述匹配单元320,包括:In an exemplary embodiment, the matching unit 320 includes:

第一匹配子单元,将所述饮食信息输入到所述饮食知识图谱中,获取所述饮食知识图谱中所述饮食信息所属的饮食标签;a first matching subunit, which inputs the dietary information into the dietary knowledge graph, and obtains a dietary label to which the dietary information in the dietary knowledge graph belongs;

第二匹配子单元,获取所述饮食标签下与所述饮食信息对应的饮食基础信息。The second matching subunit acquires basic dietary information corresponding to the dietary information under the dietary label.

在一示例性的实施例中,所述饮食标签包括类目、属性、营养、主题中的至少一种;其中,所述类目是指饮食信息所属的饮食类型,所述属性是指饮食信息的基本信息,所述营养是指饮食信息的营养元素,所述主题是指饮食信息的食疗功能。In an exemplary embodiment, the diet label includes at least one of category, attribute, nutrition, and theme; wherein, the category refers to the diet type to which the diet information belongs, and the attribute refers to the diet information The basic information of , the nutrition refers to the nutritional elements of the dietary information, and the subject refers to the therapeutic function of the dietary information.

在一示例性的实施例中,所述饮食类型包括主食、蔬菜、水果、饮品中的至少一种;所述基本信息包括食材、烹饪方式、口味、荤素、菜系中的至少一种;所述营养元素包括蛋白质、脂肪、维生素、卡路里中的至少一种;所述食疗功能包括健康餐、控糖、减肥、补钙、补血、减脂中的至少一种。In an exemplary embodiment, the diet type includes at least one of staple food, vegetables, fruits, and beverages; the basic information includes at least one of ingredients, cooking methods, tastes, meat and vegetables, and cuisines; The nutritional elements include at least one of protein, fat, vitamins, and calories; and the therapeutic function includes at least one of healthy meals, sugar control, weight loss, calcium supplementation, blood supplementation, and fat reduction.

在一示例性的实施例中,所述用户的健康信息包括用户健康档案中的用户体征数据。In an exemplary embodiment, the user's health information includes user vitals data in the user's health profile.

在一示例性的实施例中,所述用户体征数据包括疾病史。In an exemplary embodiment, the user sign data includes disease history.

在一示例性的实施例中,所述预测模型包括决策树模型。In an exemplary embodiment, the predictive model includes a decision tree model.

上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The systems, devices, modules or units described in the above embodiments may be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation device, email sending and receiving device, game control desktop, tablet, wearable device, or a combination of any of these devices.

上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。For details of the implementation process of the functions and functions of each unit in the above device, please refer to the implementation process of the corresponding steps in the above method, which will not be repeated here.

对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本说明书方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。For the apparatus embodiments, since they basically correspond to the method embodiments, reference may be made to the partial descriptions of the method embodiments for related parts. The device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in this specification. Those of ordinary skill in the art can understand and implement it without creative effort.

以上图6描述了饮食推荐装置的内部功能模块和结构示意,其实质上的执行主体可以为一种电子设备,包括:Figure 6 above describes the internal functional modules and structural schematic diagrams of the diet recommendation device, and its substantial executive body can be an electronic device, including:

处理器;processor;

用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;

其中,所述处理器被配置为执行上述任一饮食推荐方法的实施例。Wherein, the processor is configured to execute any of the above embodiments of the dietary recommendation method.

在上述电子设备的实施例中,应理解,该处理器可以是中央处理单元(英文:Central Processing Unit,简称:CPU),还可以是其他通用处理器、数字信号处理器(英文:Digital Signal Processor,简称:DSP)、专用集成电路(英文:Application SpecificIntegrated Circuit,简称:ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,而前述的存储器可以是只读存储器(英文:read-only memory,缩写:ROM)、随机存取存储器(英文:random access memory,简称:RAM)、快闪存储器、硬盘或者固态硬盘。结合本发明实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。In the above embodiments of the electronic device, it should be understood that the processor may be a central processing unit (English: Central Processing Unit, CPU for short), or other general-purpose processors, digital signal processors (English: Digital Signal Processor) , referred to as: DSP), application specific integrated circuit (English: Application Specific Integrated Circuit, referred to as: ASIC) and so on. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., and the aforementioned memory can be a read-only memory (English: read-only memory, abbreviation: ROM), random access memory (English: read-only memory, abbreviation: ROM), random access memory (English : random access memory, referred to as: RAM), flash memory, hard disk or solid state disk. The steps of the method disclosed in conjunction with the embodiments of the present invention may be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于电子设备实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the electronic device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for related parts, please refer to the partial descriptions of the method embodiments.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本说明书的其它实施方案。本说明书旨在涵盖本说明书的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本说明书的一般性原理并包括本说明书未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本说明书的真正范围和精神由下面的权利要求指出。Other embodiments of this specification will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This description is intended to cover any variations, uses, or adaptations of this specification that follow the general principles of this specification and include common knowledge or conventional techniques in the art not disclosed in this specification . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the specification being indicated by the following claims.

应当理解的是,本说明书并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本说明书的范围仅由所附的权利要求来限制。It should be understood that this specification is not limited to the precise structures described above and illustrated in the accompanying drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of this specification is limited only by the appended claims.

Claims (13)

1.一种饮食推荐方法,所述方法应用于饮食管理系统,所述饮食管理系统包括用于确定饮食基础信息的饮食知识图谱,所述方法包括:1. A dietary recommendation method, the method is applied to a dietary management system, the dietary management system comprising a dietary knowledge graph for determining basic dietary information, the method comprising: 获取用户上传的饮食信息;Obtain dietary information uploaded by users; 将所述饮食信息输入到所述饮食知识图谱中,获取所述饮食知识图谱中与所述饮食信息匹配的饮食基础信息;Inputting the dietary information into the dietary knowledge graph, and obtaining basic dietary information that matches the dietary information in the dietary knowledge graph; 将所述饮食基础信息和所述用户的健康信息输入到预测模型中进行计算,得到所述预测模型输出的饮食分析结果;Inputting the basic dietary information and the health information of the user into a prediction model for calculation, and obtaining a dietary analysis result output by the prediction model; 基于所述饮食分析结果向所述用户推荐健康的饮食方案。A healthy diet plan is recommended to the user based on the diet analysis result. 2.根据权利要求1所述的方法,所述获取用户上传的饮食信息,包括:2. The method according to claim 1, wherein the obtaining dietary information uploaded by the user comprises: 获取用户上传的包含饮食餐品的图像;Obtain user-uploaded images containing food and beverages; 基于图像识别技术,从所述图像中识别出所述饮食餐品对应的饮食信息。Based on the image recognition technology, the dietary information corresponding to the dietary meal is identified from the image. 3.根据权利要求1所述的方法,所述饮食信息包括所述用户扫描饮食餐品上的图形码以获取的饮食信息。3. The method according to claim 1, wherein the dietary information comprises dietary information obtained by the user scanning a graphic code on a dietary item. 4.根据权利要求1所述的方法,所述基于所述饮食分析结果向所述用户推荐健康的饮食方案,包括:4. The method of claim 1, wherein recommending a healthy diet plan to the user based on the diet analysis result, comprising: 将所述饮食分析结果输入到深度知识感知网络中进行计算,将所述深度知识感知网络输出的健康的饮食方案推荐给所述用户。The diet analysis result is input into the deep knowledge perception network for calculation, and the healthy diet plan output by the deep knowledge perception network is recommended to the user. 5.根据权利要求1或4所述的方法,所述健康的饮食方案包括将用户上传饮食信息中不健康饮食替换为健康饮食。5. The method of claim 1 or 4, wherein the healthy diet plan comprises replacing unhealthy diets with healthy diets in the diet information uploaded by the user. 6.根据权利要求1所述的方法,所述获取所述饮食知识图谱中与所述饮食信息匹配的饮食基础信息,包括:6. The method according to claim 1, wherein the acquiring basic dietary information matched with the dietary information in the dietary knowledge graph comprises: 获取所述饮食知识图谱中所述饮食信息所属的饮食标签;Obtain the dietary label to which the dietary information in the dietary knowledge graph belongs; 获取所述饮食标签下与所述饮食信息对应的饮食基础信息。Obtain basic dietary information corresponding to the dietary information under the dietary label. 7.根据权利要求6所述的方法,所述饮食标签包括类目、属性、营养、主题中的至少一种;其中,所述类目是指饮食信息所属的饮食类型,所述属性是指饮食信息的基本信息,所述营养是指饮食信息的营养元素,所述主题是指饮食信息的食疗功能。7. The method according to claim 6, wherein the diet label includes at least one of categories, attributes, nutrition, and topics; wherein, the category refers to the diet type to which the diet information belongs, and the attribute refers to The basic information of the dietary information, the nutrition refers to the nutritional elements of the dietary information, and the topic refers to the therapeutic function of the dietary information. 8.根据权利要求7所述的方法,所述饮食类型包括主食、蔬菜、水果、饮品中的至少一种;所述基本信息包括食材、烹饪方式、口味、荤素、菜系中的至少一种;所述营养元素包括蛋白质、脂肪、维生素、卡路里中的至少一种;所述食疗功能包括健康餐、控糖、减肥、补钙、补血、减脂中的至少一种。8 . The method according to claim 7 , wherein the diet type includes at least one of staple food, vegetables, fruits, and beverages; and the basic information includes at least one of ingredients, cooking methods, tastes, meat and vegetables, and cuisines. 9 . ; the nutrient elements include at least one of protein, fat, vitamins, and calories; and the therapeutic function includes at least one of healthy meals, sugar control, weight loss, calcium supplementation, blood supplementation, and fat reduction. 9.根据权利要求1所述的方法,所述用户的健康信息包括用户健康档案中的用户体征数据。9. The method of claim 1, the user's health information comprising user vital data in a user's health profile. 10.根据权利要求9所述的方法,所述用户体征数据包括疾病史。10. The method of claim 9, the user sign data comprising disease history. 11.根据权利要求1所述的方法,所述预测模型包括决策树模型。11. The method of claim 1, the predictive model comprising a decision tree model. 12.一种饮食推荐装置,所述装置应用于饮食管理系统,所述饮食管理系统包括用于确定饮食基础信息的饮食知识图谱,所述装置包括:12. A diet recommendation device, the device being applied to a diet management system, the diet management system comprising a diet knowledge graph for determining basic diet information, the device comprising: 获取单元,获取用户上传的饮食信息;an acquisition unit to acquire the dietary information uploaded by the user; 匹配单元,将所述饮食信息输入到所述饮食知识图谱中,获取所述饮食知识图谱中与所述饮食信息匹配的饮食基础信息;a matching unit, which inputs the dietary information into the dietary knowledge graph, and obtains basic dietary information that matches the dietary information in the dietary knowledge graph; 计算单元,将所述饮食基础信息和所述用户的健康信息输入到预测模型中进行计算,得到所述预测模型输出的饮食分析结果;a calculation unit, which inputs the basic dietary information and the health information of the user into a prediction model for calculation, and obtains a dietary analysis result output by the prediction model; 推荐单元,基于所述饮食分析结果向所述用户推荐健康的饮食方案。A recommending unit, which recommends a healthy diet plan to the user based on the diet analysis result. 13.一种电子设备,包括:13. An electronic device comprising: 处理器;processor; 用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions; 其中,所述处理器被配置为执行上述权利要求1-11中任一项所述的方法。wherein the processor is configured to perform the method of any of the preceding claims 1-11.
CN202111617290.0A 2021-12-27 2021-12-27 Diet recommendation method and device and electronic equipment Pending CN114388102A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111617290.0A CN114388102A (en) 2021-12-27 2021-12-27 Diet recommendation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111617290.0A CN114388102A (en) 2021-12-27 2021-12-27 Diet recommendation method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114388102A true CN114388102A (en) 2022-04-22

Family

ID=81198144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111617290.0A Pending CN114388102A (en) 2021-12-27 2021-12-27 Diet recommendation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114388102A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116825286A (en) * 2023-08-31 2023-09-29 北京四海汇智科技有限公司 Food ingredient identification and nutrition recommendation system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110223759A (en) * 2019-06-13 2019-09-10 上海智美颜和医疗美容门诊部有限公司 A kind of dietary management system and method
WO2021120891A1 (en) * 2019-12-18 2021-06-24 深圳数字生命研究院 Diet data generation method and device, and storage medium and electronic device
CN113486234A (en) * 2021-05-06 2021-10-08 南京大学 Recommendation system based on knowledge graph representation learning
CN113782150A (en) * 2020-06-10 2021-12-10 阿里健康信息技术有限公司 Diet recommendation method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110223759A (en) * 2019-06-13 2019-09-10 上海智美颜和医疗美容门诊部有限公司 A kind of dietary management system and method
WO2021120891A1 (en) * 2019-12-18 2021-06-24 深圳数字生命研究院 Diet data generation method and device, and storage medium and electronic device
CN113782150A (en) * 2020-06-10 2021-12-10 阿里健康信息技术有限公司 Diet recommendation method and device
CN113486234A (en) * 2021-05-06 2021-10-08 南京大学 Recommendation system based on knowledge graph representation learning

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116825286A (en) * 2023-08-31 2023-09-29 北京四海汇智科技有限公司 Food ingredient identification and nutrition recommendation system
CN116825286B (en) * 2023-08-31 2023-11-14 北京四海汇智科技有限公司 Food ingredient identification and nutrition recommendation system

Similar Documents

Publication Publication Date Title
US9977980B2 (en) Food logging from images
US12048531B2 (en) Glucose management recommendations based on nutritional information
US11521734B2 (en) Recipe generation based on neural network
CN110504019A (en) User individual dietary recommendations continued method, apparatus, electronic equipment and storage medium
US10832094B2 (en) Generating hyperspectral image database by machine learning and mapping of color images to hyperspectral domain
CN104809164A (en) Healthy diet recommendation method based on mobile terminal and mobile terminal
CN111883230A (en) Method and device for generating diet data, storage medium and electronic device
KR102326540B1 (en) Methods for management of nutrition and disease using food images
WO2021044696A1 (en) Device for estimating nutritional intake amount, health management assistance device, method for estimating nutritional intake amount, health management assistance method, program, and system for estimating nutritional intake amount
Sudo et al. Estimating nutritional value from food images based on semantic segmentation
CN104216939A (en) Diet control and management system and method
CN113782150A (en) Diet recommendation method and device
CN110675389A (en) Food recommendation method, storage medium and intelligent household equipment
CN114388102A (en) Diet recommendation method and device and electronic equipment
CN114360690A (en) Method and system for managing diet nutrition of chronic disease patient
Nagarajan et al. Nutritional monitoring in older people prevention services
US20230170071A1 (en) Systems and methods for providing personalized nutritional information and recommendations
Brenna et al. A survey of automatic methods for nutritional assessment
TWI700595B (en) Method of nutrition counseling and dietary advising
KR20220145006A (en) Dietary Compliance Assessment System Using Artificial Intelligence
CN115335914A (en) Indicating dependency nutrient calculation and preservation platform
US20250069417A1 (en) Health management method based on image recognition
JP2009003905A (en) Recording medium for storing health state measuring program using menu information, health state measuring method and system using this program
WO2023162822A1 (en) Information provision device, information provision system, information provision method, and program
Raju Energy Content and Portion Size Estimation Using Sensor-Based Methods

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination