CN110391010B - Food recommendation method and system based on personal health perception - Google Patents

Food recommendation method and system based on personal health perception Download PDF

Info

Publication number
CN110391010B
CN110391010B CN201910502406.2A CN201910502406A CN110391010B CN 110391010 B CN110391010 B CN 110391010B CN 201910502406 A CN201910502406 A CN 201910502406A CN 110391010 B CN110391010 B CN 110391010B
Authority
CN
China
Prior art keywords
health
user
recipe
vector
category
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.)
Active
Application number
CN201910502406.2A
Other languages
Chinese (zh)
Other versions
CN110391010A (en
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.)
Shandong University
Original Assignee
Shandong University
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 Shandong University filed Critical Shandong University
Priority to CN201910502406.2A priority Critical patent/CN110391010B/en
Publication of CN110391010A publication Critical patent/CN110391010A/en
Application granted granted Critical
Publication of CN110391010B publication Critical patent/CN110391010B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/30ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for calculating health indices; for individual health risk assessment

Landscapes

  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Public Health (AREA)
  • Engineering & Computer Science (AREA)
  • Primary Health Care (AREA)
  • General Health & Medical Sciences (AREA)
  • Epidemiology (AREA)
  • Nutrition Science (AREA)
  • Biomedical Technology (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Pathology (AREA)
  • Medical Treatment And Welfare Office Work (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a food recommendation method and a system based on personal health perception, wherein the method comprises the following steps: determining selectable food material types, and performing recipe retrieval based on the recipe data set; acquiring text information related to the health of a user, and predicting the health condition according to the text information to obtain a user health portrait; and recommending the recipes for the user based on the retrieved recipes and the user health portrait. The invention can recommend the recipes according with the health state of the user.

Description

Food recommendation method and system based on personal health perception
Technical Field
The invention belongs to the technical field of big data information mining, and particularly relates to a food recommendation method and system based on personal health perception.
Background
The statements in this section merely provide background information related to the present disclosure and may not constitute prior art.
As society progresses and develops, people's basic needs for food have been substantially met, and more people have begun to choose to pursue healthier diets. Nowadays, countless people are being plagued by diseases caused by unhealthy diets. According to the 2018 report on world health, the incidence of many diet-related diseases such as diabetes, obesity and malnutrition is rapidly increasing worldwide. According to the health diet recommendation, people should select personalized health diet according to their health condition. For example, diabetics need to eat more whole wheat grain to avoid sweet foods.
In the field of food health recommendation, there are some food recommendation systems for performing the function of recommending food to users, and these food recommendation methods predict food which may be selected by a user in the future according to the historical taste preference of the user by modeling the user-recipe interaction in the history. However, these methods neglect a serious problem: user-preferred foods are often not the healthiest foods suitable for the user. In addition, as health foods become the focus of attention, some research works have started to incorporate caloric calculation into food recommendation methods for health food recommendation and replace the diet originally recommended to the user with a similar but healthier dish, but these studies do not take into account the health condition of the user himself or recommend a personalized health diet to the user from the viewpoint of food materials, and it is difficult to make the recommended food truly fit the health condition of the user.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a food recommendation method and system based on personal health perception, which can acquire the health condition of a user based on the state published by the user in daily life, and recommend a recipe for the user based on the available food materials and the health condition.
In order to achieve the above object, one or more embodiments of the present invention provide the following technical solutions:
a food recommendation method based on personal health perception comprises the following steps:
determining selectable food material types, and performing recipe retrieval based on the recipe data set;
acquiring text information related to the health of a user, and predicting the health condition according to the text information to obtain a user health portrait;
and recommending the recipes for the user based on the retrieved recipes and the user health portrait.
One or more embodiments provide a personal health perception-based food recommendation system, comprising:
the recipe acquisition module is used for determining the types of the optional food materials and searching the recipes based on the recipe data set;
the user health portrait module is used for acquiring text information related to the health of a user, and predicting the health condition according to the text information to obtain a user health portrait;
and the recipe recommending module is used for recommending recipes for the user based on the retrieved recipes and the user health portrait.
One or more embodiments provide an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the method for personal health perception based food recommendation when executing the program.
One or more embodiments provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the personal health perception-based food recommendation method.
The above one or more technical solutions have the following beneficial effects:
the invention provides a personalized food recommendation method based on a user health portrait, which realizes the functions of food material identification, recipe retrieval, user health portrait modeling, health food recommendation and the like, and can provide convenient health food recommendation for users.
The user health portrait is automatically extracted through related dynamic information published on a social network by a user, and the problem of sparse user health information on social media can be well solved based on a word level interaction text classification model.
The health food recommendation is carried out through a hierarchical memory network based on category perception, and the interaction between the user and the health recipe is learned, so that the difference between the user categories and the food categories and the similarity in the categories are captured, and the personalized food recommendation can be better completed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the invention and together with the description serve to explain the invention and not to limit the invention.
FIG. 1 is a flow diagram of a method for recommending food based on personal health perception according to one or more embodiments of the present invention.
Detailed Description
It is to be understood that the following detailed description is exemplary and is intended to provide further explanation of the invention as claimed. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
The embodiments and features of the embodiments of the present invention may be combined with each other without conflict.
Example one
We propose a personalized health-aware food recommendation scheme (Market2Dish) that transforms food materials that users can buy in the Market into personalized health nutritional packages.
The embodiment discloses a food recommendation method based on personal health perception, which comprises the following steps:
s1: determining the types of the optional food materials, and performing recipe retrieval;
the user firstly records various food materials on the market through a micro video, and then identifies the food materials through multi-label image classification by utilizing a pre-trained inclusion-v 3 network. Based on the ingredients available, we can retrieve from one large recipe data set many recipe data that can be cooked.
S2: constructing a user health portrait;
a plurality of health labels (such as insomnia, hypertension, obesity, malnutrition, etc.) are set to represent common health conditions. The method comprises the steps of capturing some text information related to health on a user social account (such as a microblog), and predicting a health label which a user may accord with. In order to solve the problem of sparse user health information on social media, a recursive convolutional neural network (WIRCNN) based on word-level interaction is provided for learning fine-grained association characteristics between each word in user dynamics and a preset health label. Considering the phenomenon that only a few keywords and health labels have strong relevance in user dynamics, an interaction mechanism is introduced to learn the fine-grained matching relationship between the keywords and the health labels. WIRCNN encodes the weighted word embedding using a Bi-directional recurrent neural network (Bi-RNN) and a Convolutional Neural Network (CNN), and then outputs probabilities on classes by matrix multiplication. The method specifically comprises the following steps:
1) given the many dynamics of a user, WIRCNN first concatenates them into an ordered sequence by several special delimiters (e.g., < eos > is used to represent the end of a period).
2) WIRCNN encodes a given sequence into an embedding matrix, and calculates an interaction matrix of two embedding matrices by using matrix multiplication according to the embedding matrix of the word sequence and the embedding matrix of each user class. Specifically, each word is encoded with a high-dimensional vector, and the vector encoding of the entire sequence of words constitutes the above-mentioned embedding matrix; the user classes are predefined health labels, each class has a high-dimensional vector code, and a plurality of classes form an embedded matrix of the user class.
3) And respectively applying a max boosting function to two different dimensions of the interaction matrix to obtain two vectors, and correspondingly weighting the two vectors as coefficients of the corresponding word coding vector and the category coding vector to respectively obtain the weighting results of the word sequence embedding matrix and the category embedding matrix.
4) And then the WIRCNN encodes the weighted word encoding vector step by step through the Bi-RNN and concatenates the hidden state of each step of the Bi-RNN and the weighted word vector of each step. At the convolutional layer, WIRCNN uses convolution kernels for a number of different window sizes to obtain multiple feature maps of the text feature, and then applies a max-override firing operation to each feature map, which takes the largest feature value as a representation of the feature map.
5) And finally, projecting the text features obtained in the step 4) from the pooling layer into a high-dimensional space with the size of the number of categories by using a full connection layer, wherein each dimension represents the prediction probability of the category of the user.
6) In this model, we use binary cross entry to calculate the loss function loss, and minimize the loss function by gradient descent algorithm to optimize the parameters of the whole neural network model, the specific formula is as follows:
Figure BDA0002090665450000051
where set U represents the set of all users, y+Set representing all candidate recipe good cases, y-Denotes all negative case sets, yu,iA tag value representing i this item for user u, i.e. y if itemi is a positive case for user uu,i1 is ═ 1; otherwise equal to zero, or else equal to zero,
Figure BDA0002090665450000052
is the label value predicted by the model (range is 0, 1)]In between).
S3: recipe recommendation
The recipe recommendation system aims to comprehensively consider the searched candidate recipes and the health portrait of the user and realize personalized food recommendation. To this end, we propose a hierarchical memory network based on class awareness to model the affinity between users with the same health label, the relationship between recipes with similar nutritional value, and the interaction information between users and recipes. In particular, the recommendation system classifies users and recipes into different categories based on the health labels and nutritional value of the users, then learns the differences between categories and the similarities within categories using the ratings of the categories and the ratings of the recipes to obtain better food recommendations, and finally outputs the recommended health recipes to the users.
Considering that not only the users with similar health labels have close correlation, but also the recipes with the same nutritional value have close correlation. Intuitively, users with similar health conditions often have similar healthy eating habits, and food made of similar food materials is also suitable for the same type of users. To make clear use of these correlations to improve the performance of food recommendations, we propose a class-aware hierarchical memory network to learn similarities within classes and differences between classes. All users are classified into several categories according to different health labels, and recipes are also classified into several categories according to different health requirements (such as low calorie and nutrition supplement types). Each user and recipe may belong to multiple categories, as there may be a certain link between multiple health labels or different nutritional values.
The recommendation system comprises four parts, namely a General Memory module (General Memory), a Personal Memory module (Personal Memory), a Category Embedding module (Category Embedding) and a Recipe Embedding module (Recipe Embedding). Wherein each user has a separate personal memory module and the same user health label corresponds to the same general memory module. The category embedding module and the recipe embedding module respectively encode the recipes and the recipe categories into vectors and store the vectors.
The personal memory module is used for recording health perception preference and menu preference of a user and comprises a high-level memory vector and a plurality of low-level memory vectors, wherein the high-level memory vector records the health perception preference of the user on the categories of the recipes, the low-level memory vectors record the preference of each recipe in the categories, and the number of the low-level vectors is consistent with the categories of the recipes. For example, the user a prefers to eat a weight-losing dish and prefers a weight-losing menu X, the high-level memory vector records the health perception preference of "weight loss", and the corresponding weight-losing category low-level memory vector records the health preference of "menu X" in the weight-losing dish, specifically, the similarity between the two is high, and the higher the similarity of the vectors is, the greater the preference degree is.
The general memory module has the same internal structure as the personal memory module, and also includes a high-level memory vector and a plurality of low-level memory vectors for learning common characteristics of users having the same health label.
All recipes and users in the data set have unique numbers, the corresponding relation between the recipes and the categories is stored, the numbers of the recipes are used for establishing association with the recipe embedding vectors, and the numbers of the users are used for establishing association with the personal memory module.
The hierarchical memory network modeling process based on the category perception comprises the following steps:
for the user, a recommendation score is calculated for each recipe:
when the recommended score of a menu is calculated for a certain user, determining a corresponding personal memory module according to the number of the user;
acquiring a corresponding recipe embedding vector from a recipe embedding module according to the serial number of the recipe;
obtaining a low-level memory vector corresponding to the category of the user from the personal memory module based on the category of the recipe;
calculating the similarity of the low-level memory vector to the recipe embedding vector (a variety of calculation similarity algorithms, such as cosine, inner product and MLP); at the same time, the user can select the desired position,
acquiring a corresponding category embedding vector from a category embedding module according to the category of the recipe;
acquiring a high-level memory vector corresponding to the category of the user from the personal memory module based on the category of the recipe;
calculating the similarity (MLP) between the high-level memory vector and the category embedding vector;
the two similarity calculation results are subjected to linear weighting to obtain the recommendation score of the user and the corresponding recipe;
and then calculating the loss value by using a cross entry loss function, and performing back propagation and optimization on the model by using a gradient descent algorithm.
In addition, in the process of recommending food, writing operation is also carried out on the personal memory module according to the label of the recipe, specifically, if the recipe is a positive example, the embedding vector of the recipe and the embedding vector of the category are multiplied by coefficients and are respectively added to the high-level memory vector and the low-level memory vector of the personal memory module of the user, and the similarity between the memory vector and the embedding vector of the recipe is increased, so that the personal memory module can be optimized; if the recipe is a negative example, the embedding vector of the recipe and the embedding vector of the category are multiplied by coefficients, which are subtracted from the high-level memory vector and the low-level memory vector of the user's personal memory module, respectively. Thereby reducing the similarity between the memory vector and the embedded vector of the recipe. Meanwhile, the model also maintains a single general memory module matrix for each type of users, the matrix is used for storing health characteristics and the same diet preference of the users of the same type, and the general memory module matrix can update the personal memory modules at a certain frequency in the training process, namely the general memory modules are multiplied by a fixed coefficient and added to the personal memory modules of the same type.
The scheme comprises three parts of recipe retrieval, user health portrait establishment and food recommendation. The goal of recipe retrieval, among other things, is to identify ingredients that a user can purchase from a short video that the user takes from the market, and then retrieve candidate recipes from a large-scale recipe dataset. The user health portrait is used for predicting the health condition of the microblog user by capturing text information related to health from a social network (e.g. microblog). In particular, in order to solve the problem that health-related information is extremely sparse, an interaction mechanism is introduced into the deep model so as to learn fine-grained association between microblog texts of users and predefined health labels. Aiming at the health food recommendation problem, a hierarchical memory network based on category perception is provided to realize personalized food recommendation, and better health food recommendation is realized by learning interaction between hierarchical users and recipes. In addition, a number of experiments demonstrate the effectiveness of our proposed personalized user health food recommendations.
Example two
The embodiment aims at providing a food recommendation system based on personal health perception.
In order to achieve the above object, the present embodiment provides a food recommendation system based on personal health perception, including:
determining selectable food material types, and performing recipe retrieval based on the recipe data set;
acquiring text information related to the health of a user, and predicting the health condition according to the text information to obtain a user health portrait;
and recommending the recipes for the user based on the retrieved recipes and the user health portrait.
EXAMPLE III
The embodiment aims at providing an electronic device.
In order to achieve the above object, this embodiment provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the following steps, including:
determining selectable food material types, and performing recipe retrieval based on the recipe data set;
acquiring text information related to the health of a user, and predicting the health condition according to the text information to obtain a user health portrait;
and recommending the recipes for the user based on the retrieved recipes and the user health portrait.
Example four
An object of the present embodiment is to provide a computer-readable storage medium.
To achieve the above object, the present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
determining selectable food material types, and performing recipe retrieval based on the recipe data set;
acquiring text information related to the health of a user, and predicting the health condition according to the text information to obtain a user health portrait;
and recommending the recipes for the user based on the retrieved recipes and the user health portrait.
The steps involved in the above second, third and fourth embodiments correspond to those in the first embodiment, and the detailed description thereof can be found in the relevant description section of the first embodiment. The term "computer-readable storage medium" should be taken to include a single medium or multiple media containing one or more sets of instructions; it should also be understood to include any medium that is capable of storing, encoding or carrying a set of instructions for execution by a processor and that cause the processor to perform any of the methods of the present invention.
One or more of the above embodiments have the following technical effects:
the invention provides a personalized food recommendation method based on a user health portrait, which realizes the functions of food material identification, recipe retrieval, user health portrait modeling, health food recommendation and the like, and can provide convenient health food recommendation for users.
The user health portrait is automatically extracted through related dynamic information published on a social network by a user, and the problem of sparse user health information on social media can be well solved based on a word level interaction text classification model.
The health food recommendation is carried out through a hierarchical memory network based on category perception, and the interaction between a user and a health recipe is learned, so that the difference between user categories and food categories and the similarity in the categories are captured, and the personalized food recommendation can be better completed.
Those skilled in the art will appreciate that the modules or steps of the present invention described above can be implemented using general purpose computer means, or alternatively, they can be implemented using program code that is executable by computing means, such that they are stored in memory means for execution by the computing means, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps of them are fabricated into a single integrated circuit module. The present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (5)

1. A food recommendation method based on personal health perception is characterized by comprising the following steps:
determining selectable food material types, and performing recipe retrieval based on the recipe data set;
acquiring text information related to the health of a user, and predicting the health condition according to the text information to obtain a user health portrait;
recommending recipes for the user based on the retrieved recipes and the user health profile;
performing health condition prediction according to the text information, and learning fine-grained association characteristics between each word in user dynamics and a preset health label based on a recursive convolutional neural network with word-level interaction;
determining the selectable food material categories includes:
acquiring the current optional food material image information;
identifying the food material types in the images based on the multi-label image classification identification model;
the recursive convolutional neural network construction method based on word level interaction comprises the following steps:
acquiring a plurality of text messages related to health and corresponding health labels as training data;
connecting a plurality of text messages into a sequence and encoding the sequence into an embedded matrix; encoding the corresponding health label into an embedded matrix;
calculating an interaction matrix of the two embedded matrixes by utilizing matrix multiplication;
respectively applying the maximum pooling function to two different dimensions of the interaction matrix to obtain two vectors, and taking the two vectors as weighting coefficients of the corresponding word encoding vector and the category encoding vector;
coding the weighted word coding vector through a bidirectional cyclic neural network, and cascading the hidden state of each step of the bidirectional cyclic neural network with the weighted word coding vector of each step;
obtaining a plurality of feature maps of the text features by using convolution kernels of a plurality of different window sizes, and then applying a maximum pooling operation to each feature map, wherein the operation takes the maximum feature value as the representation of the feature map;
projecting text features from the pooling layer into a high-dimensional space by using a full-connection layer, wherein the dimension size is consistent with the number of the health tags, and each dimension represents the prediction probability of the health tag of the user;
calculating a loss function by adopting a binary cross entropy in the model, and performing parameter optimization by minimizing the loss function through a gradient descent algorithm;
recommending recipes for the user based on the retrieved recipes and the user health profile includes: adopting a hierarchical memory network based on class perception, wherein the hierarchical memory network comprises:
the recipe embedding module is used for coding the recipes into vectors and storing the vectors;
the system comprises personal memory modules, a server and a server, wherein each personal memory module corresponds to a user and comprises a high-level memory vector and a low-level memory vector, the high-level memory vector is used for recording health perception preference of the corresponding user to a recipe category, each low-level memory vector corresponds to a recipe category, and each low-level memory vector is used for recording the recipe under the corresponding recipe category;
the hierarchical memory network modeling process based on the category perception comprises the following steps:
for a given user, calculating a recommendation score for each menu;
calculating a loss function by adopting cross entropy, and optimizing model parameters by minimizing the loss function through a gradient descent algorithm; the method for calculating the recommendation score of a certain menu for a certain user comprises the following steps:
determining a personal memory module corresponding to the user;
acquiring a recipe embedding vector corresponding to the recipe from a recipe embedding module;
acquiring a category embedding vector corresponding to the recipe from a category embedding module;
acquiring a high-level memory vector and a low-level memory vector corresponding to the category of the user from the personal memory module based on the category of the recipe;
respectively calculating the similarity between the low-level memory vector and the recipe embedding vector and the similarity between the high-level memory vector and the category embedding vector;
and performing linear weighting on the two similarities to obtain the recommendation score of the recipe for the user.
2. The personal health perception-based food recommendation method of claim 1, wherein the hierarchical memory network further comprises a general memory module for recording health perception preferences of users of the same class for the types of recipes and corresponding recipes under each type of recipe; the personal memory module is updated at a certain frequency during the model training process.
3. A system for recommending food based on personal health perception, comprising:
the recipe acquisition module is used for determining the types of the optional food materials and searching the recipes based on the recipe data set;
the user health portrait module is used for acquiring text information related to the health of a user, and predicting the health condition according to the text information to obtain a user health portrait;
the recipe recommending module is used for recommending recipes for the user based on the retrieved recipes and the user health portrait;
performing health condition prediction according to the text information, and learning fine-grained association characteristics between each word in user dynamics and a preset health label based on a recursive convolutional neural network with word-level interaction;
determining the selectable food material categories includes:
acquiring the current optional food material image information;
identifying the food material types in the images based on the multi-label image classification identification model;
the recursive convolutional neural network construction method based on word level interaction comprises the following steps:
acquiring a plurality of text messages related to health and corresponding health labels as training data;
connecting a plurality of text messages into a sequence and encoding the sequence into an embedded matrix; encoding the corresponding health label into an embedded matrix;
calculating an interaction matrix of the two embedded matrixes by utilizing matrix multiplication;
respectively applying the maximum pooling function to two different dimensions of the interaction matrix to obtain two vectors, and taking the two vectors as weighting coefficients of the corresponding word encoding vector and the category encoding vector;
coding the weighted word coding vector through a bidirectional cyclic neural network, and cascading the hidden state of each step of the bidirectional cyclic neural network with the weighted word coding vector of each step;
obtaining a plurality of feature maps of the text features by using convolution kernels of a plurality of different window sizes, and then applying a maximum pooling operation to each feature map, wherein the operation takes the maximum feature value as the representation of the feature map;
projecting text features from the pooling layer into a high-dimensional space by using a full-connection layer, wherein the dimension size is consistent with the number of the health tags, and each dimension represents the prediction probability of the health tag of the user;
calculating a loss function by adopting a binary cross entropy in the model, and performing parameter optimization by minimizing the loss function through a gradient descent algorithm;
recommending recipes for the user based on the retrieved recipes and the user health profile includes: adopting a hierarchical memory network based on class perception, wherein the hierarchical memory network comprises:
the recipe embedding module is used for encoding the recipes into vectors and storing the vectors;
the system comprises personal memory modules, a server and a server, wherein each personal memory module corresponds to a user and comprises a high-level memory vector and a low-level memory vector, the high-level memory vector is used for recording health perception preference of the corresponding user to a recipe category, each low-level memory vector corresponds to a recipe category, and each low-level memory vector is used for recording the recipe under the corresponding recipe category;
the hierarchical memory network modeling process based on the category perception comprises the following steps:
for a given user, calculating a recommendation score for each recipe;
calculating a loss function by adopting cross entropy, and optimizing model parameters by minimizing the loss function through a gradient descent algorithm; the method for calculating the recommendation score of a certain menu for a certain user comprises the following steps:
determining a personal memory module corresponding to the user;
acquiring a recipe embedding vector corresponding to the recipe from a recipe embedding module;
acquiring a category embedding vector corresponding to the recipe from a category embedding module;
acquiring a high-level memory vector and a low-level memory vector of the user corresponding to the category from the personal memory module based on the category of the recipe;
respectively calculating the similarity between the low-level memory vector and the recipe embedding vector and the similarity between the high-level memory vector and the category embedding vector;
and performing linear weighting on the two similarities to obtain the recommendation score of the recipe for the user.
4. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the method for personal health perception based food recommendation of any one of claims 1-2.
5. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method for personal health perception based food recommendation according to any one of claims 1-2.
CN201910502406.2A 2019-06-11 2019-06-11 Food recommendation method and system based on personal health perception Active CN110391010B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910502406.2A CN110391010B (en) 2019-06-11 2019-06-11 Food recommendation method and system based on personal health perception

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910502406.2A CN110391010B (en) 2019-06-11 2019-06-11 Food recommendation method and system based on personal health perception

Publications (2)

Publication Number Publication Date
CN110391010A CN110391010A (en) 2019-10-29
CN110391010B true CN110391010B (en) 2022-05-13

Family

ID=68285542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910502406.2A Active CN110391010B (en) 2019-06-11 2019-06-11 Food recommendation method and system based on personal health perception

Country Status (1)

Country Link
CN (1) CN110391010B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111489806A (en) * 2020-04-09 2020-08-04 南通大学 Intelligent diabetes heat management method and system
CN112562854A (en) * 2020-12-17 2021-03-26 山东大学 Accurate medical care service recommendation method and system for elderly people
CN114496165A (en) * 2022-01-27 2022-05-13 国家食品安全风险评估中心 Food diet recommendation method based on heteromorphic graph

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107423442A (en) * 2017-08-07 2017-12-01 火烈鸟网络(广州)股份有限公司 Method and system, storage medium and computer equipment are recommended in application based on user's portrait behavioural analysis
CN109062910A (en) * 2018-07-26 2018-12-21 苏州大学 Sentence alignment method based on deep neural network
CN109285597A (en) * 2018-10-08 2019-01-29 北京健康有益科技有限公司 A kind of dietotherapy recipe recommendation method, apparatus and readable medium
CN109492101A (en) * 2018-11-01 2019-03-19 山东大学 File classification method, system and medium based on label information and text feature

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9792534B2 (en) * 2016-01-13 2017-10-17 Adobe Systems Incorporated Semantic natural language vector space

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107423442A (en) * 2017-08-07 2017-12-01 火烈鸟网络(广州)股份有限公司 Method and system, storage medium and computer equipment are recommended in application based on user's portrait behavioural analysis
CN109062910A (en) * 2018-07-26 2018-12-21 苏州大学 Sentence alignment method based on deep neural network
CN109285597A (en) * 2018-10-08 2019-01-29 北京健康有益科技有限公司 A kind of dietotherapy recipe recommendation method, apparatus and readable medium
CN109492101A (en) * 2018-11-01 2019-03-19 山东大学 File classification method, system and medium based on label information and text feature

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于特征扩展的短文本分类;宋爽;《中国优秀硕士学位论文全文数据库信息科技辑》;20190228(第2期);第I138-2211页 *
基于自适应上下文多臂賭博机推荐算法研究;张佃磊;《中国优秀硕士学位论文全文数据库信息科技辑》;20190115(第12期);第I138-1780页 *

Also Published As

Publication number Publication date
CN110391010A (en) 2019-10-29

Similar Documents

Publication Publication Date Title
US10909459B2 (en) Content embedding using deep metric learning algorithms
CN107209762B (en) Visual interactive search
CN110391010B (en) Food recommendation method and system based on personal health perception
US5819245A (en) Method of organizing data into a graphically oriented format
CN110688482B (en) Multi-label identification method, training method and device
US20170039198A1 (en) Visual interactive search, scalable bandit-based visual interactive search and ranking for visual interactive search
CN110362723B (en) Topic feature representation method, device and storage medium
US10606883B2 (en) Selection of initial document collection for visual interactive search
CN110580278B (en) Personalized search method, system, equipment and storage medium according to user portraits
WO2016210268A1 (en) Selecting representative video frames for videos
CN110555753A (en) recommendation-based ranking control method and device, computer equipment and storage medium
Teng et al. Recognition of Chinese food using convolutional neural network
US11860932B2 (en) Scene graph embeddings using relative similarity supervision
CN112163149B (en) Method and device for recommending message
US11797624B2 (en) Personalized ranking using deep attribute extraction and attentive user interest embeddings
EP3847559A1 (en) System and method for improved content discovery
CN116775986A (en) Recipe recommendation method, electronic device and storage medium
US11967128B2 (en) Decompositional learning for color attribute prediction
CN115344698A (en) Label processing method, label processing device, computer equipment, storage medium and program product
CN109657154B (en) Resource sequencing device and resource sequencing method based on situation
CN113569130A (en) Content recommendation method, device, equipment and readable storage medium
US11830056B2 (en) Providing local recommendations based on images of consumable items
CN117312533B (en) Text generation method, device, equipment and medium based on artificial intelligent model
US20240071598A1 (en) Methods and systems for ordered food preferences accompanying symptomatic inputs
EP3758024A1 (en) Recommending content items to a user

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
GR01 Patent grant
GR01 Patent grant