CN111540438A - Resource allocation method and device, electronic equipment and storage medium - Google Patents

Resource allocation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111540438A
CN111540438A CN202010322749.3A CN202010322749A CN111540438A CN 111540438 A CN111540438 A CN 111540438A CN 202010322749 A CN202010322749 A CN 202010322749A CN 111540438 A CN111540438 A CN 111540438A
Authority
CN
China
Prior art keywords
user
food
target
information
calorie
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.)
Granted
Application number
CN202010322749.3A
Other languages
Chinese (zh)
Other versions
CN111540438B (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.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010322749.3A priority Critical patent/CN111540438B/en
Publication of CN111540438A publication Critical patent/CN111540438A/en
Application granted granted Critical
Publication of CN111540438B publication Critical patent/CN111540438B/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

Abstract

The present disclosure provides a resource allocation method, an apparatus, an electronic device and a storage medium, wherein the resource allocation method includes: acquiring a target picture, identifying target food contained in the target picture, and determining heat information of the target food; acquiring heat data information corresponding to a user, wherein the heat data information is determined based on the characteristic information of the user and/or target event data corresponding to the user; and allocating resources for the user based on the calorie information of the target food and the calorie data information corresponding to the user.

Description

Resource allocation method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a resource allocation method and apparatus, an electronic device, and a storage medium.
Background
With the improvement of living standard, more and more people begin to pay attention to healthy diet and healthy life, and at the same time, attention to exercise and food calorie intake, so healthy diet and reasonable fitness become a part of daily life.
In order to develop good eating habits, users generally rely on professional staff such as dieticians to know the daily calories of food, and the process is complicated and labor cost is high.
Disclosure of Invention
The embodiment of the disclosure provides at least one resource allocation scheme, so that the labor cost is reduced, and the resource allocation for a user is automated.
In a first aspect, an embodiment of the present disclosure provides a resource configuration method, including:
acquiring a target picture, identifying target food contained in the target picture, and determining heat information of the target food;
acquiring heat data information corresponding to a user, wherein the heat data information is determined based on the characteristic information of the user and/or target event data corresponding to the user;
and allocating resources for the user based on the calorie information of the target food and the calorie data information corresponding to the user.
In a possible embodiment, the acquiring a target picture, identifying a target food contained in the target picture, and determining caloric information of the target food includes:
identifying the food to be detected contained in the target picture to obtain at least one candidate food contained in the target picture and attribute information of each candidate food;
determining caloric information of the target food based on the attribute information of each candidate food and the probability of the user selecting each food at the current time period predicted by the characteristic information of the user.
In a possible implementation manner, the identifying the food to be detected included in the target picture to obtain at least one candidate food included in the target picture and attribute information of each candidate food includes:
identifying the food to be detected in the target picture to obtain at least one candidate food contained in the target picture, and the food type and specification information of each candidate food;
and taking the food type and specification information corresponding to each candidate food as the attribute information of the candidate food.
In one possible embodiment, the determining the caloric information of the target food based on the attribute information of each candidate food and the probability of each food selected by the user in the current time period predicted by the characteristic information of the user comprises:
determining a target food contained in the target picture among the at least one candidate food based on the food type of each candidate food and the probability of each food being selected by the user at the current time period predicted by the characteristic information of the user;
determining caloric information of the target food based on the food type and the specification information of the target food.
In one possible embodiment, the corresponding thermal data information of the user is determined as follows:
determining a heat recommendation range for the user at the current time period based on the feature information of the user and the target event data corresponding to the user;
and determining heat data information corresponding to the user based on the heat recommendation range and the heat target data which is set by the user and is taken at this time.
In a possible embodiment, the allocating resources for the user based on the caloric information corresponding to the target food and the caloric data information corresponding to the user includes:
determining whether the calorie target data which is set by the user and taken this time is matched with the calorie recommended range;
when it is determined that the calorie target data taken this time set by the user matches the recommended calorie range, determining difference information between calorie information of the target food contained in the target picture and the calorie target data taken this time set by the user;
allocating resources matched with the difference information to the user based on the difference information;
and when it is determined that the intake heat target data set by the user at this time is not matched with the heat recommendation range, configuring preset resources for the user.
In a second aspect, an embodiment of the present disclosure provides a resource configuration apparatus, including:
the first acquisition module is used for acquiring a target picture, identifying target food contained in the target picture and determining heat information of the target food;
the second acquisition module is used for acquiring heat data information corresponding to a user, and the heat data information is determined based on the characteristic information of the user and/or target event data corresponding to the user;
and the resource allocation module is used for allocating resources to the users based on the heat information of the target food and the heat data information corresponding to the users.
In a possible embodiment, the first obtaining module, when configured to obtain a target picture, identify a target food product included in the target picture, and determine caloric information of the target food product, includes:
identifying the food to be detected contained in the target picture to obtain at least one candidate food contained in the target picture and attribute information of each candidate food;
determining caloric information of the target food based on the attribute information of each candidate food and the probability of the user selecting each food at the current time period predicted by the characteristic information of the user.
In a possible implementation manner, when the first obtaining module is configured to identify food to be detected included in the target picture, and obtain at least one candidate food included in the target picture and attribute information of each candidate food, the first obtaining module includes:
identifying the food to be detected in the target picture to obtain at least one candidate food contained in the target picture, and the food type and specification information of each candidate food;
and taking the food type and specification information corresponding to each candidate food as the attribute information of the candidate food.
In one possible embodiment, the first obtaining module, when configured to determine the calorie information of the target food based on the attribute information of each candidate food and the probability of selecting each food by the user at the current time period predicted by the characteristic information of the user, comprises:
determining a target food contained in the target picture among the at least one candidate food based on the food type of each candidate food and the probability of each food being selected by the user at the current time period predicted by the characteristic information of the user;
determining caloric information of the target food based on the food type and the specification information of the target food.
In a possible implementation manner, the second obtaining module determines the thermal data information corresponding to the user according to the following manner:
determining a heat recommendation range for the user at the current time period based on the feature information of the user and the target event data corresponding to the user;
and determining heat data information corresponding to the user based on the heat recommendation range and the heat target data which is set by the user and is taken at this time.
In a possible embodiment, the resource allocation module, when configured to allocate resources to the user based on the caloric information corresponding to the target food and the caloric data information corresponding to the user, includes:
determining whether the calorie target data which is set by the user and taken this time is matched with the calorie recommended range;
when it is determined that the calorie target data taken this time set by the user matches the recommended calorie range, determining difference information between calorie information of the target food contained in the target picture and the calorie target data taken this time set by the user;
allocating resources matched with the difference information to the user based on the difference information;
and when it is determined that the intake heat target data set by the user at this time is not matched with the heat recommendation range, configuring preset resources for the user.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the resource configuration method according to the first aspect.
In a fourth aspect, the disclosed embodiments provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, performs the steps of the resource configuration method according to the first aspect.
The resource allocation method provided by the embodiment of the disclosure can identify the target food contained in the target picture after the target picture is acquired, and determining the calorie information of the target food, then acquiring the calorie data information corresponding to the user, the calorie data information may be determined based on the characteristic information of the user and/or the target event data corresponding to the user, for example, the characteristic information of the user may be weight, height, etc. information authorized to be disclosed for the user, and the target event data corresponding to the user may include data representing events such as weight loss, fat loss, muscle increase, etc., so that after obtaining the calorie information of the target food and the calorie data information corresponding to the user, namely, the resources can be allocated to the user according to the calorie information corresponding to the target food and the calorie data information corresponding to the user, namely, the embodiment of the disclosure can provide a scheme which has low cost and can automatically configure resources for users.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
Fig. 1 shows a flowchart of a resource configuration method provided by an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method for determining caloric information of a target food product according to an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a method for determining heat data information corresponding to a user according to an embodiment of the present disclosure;
FIG. 4 is a flow chart of a specific resource allocation method provided by the embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a resource configuration apparatus provided in an embodiment of the present disclosure;
fig. 6 shows a schematic diagram of an electronic device provided by an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
With the improvement of living standard, people are gradually concerned about diet health, for example, by relying on professionals such as dieticians to help to know the calorie of food eaten every day, the process of the mode is complicated, and the labor cost is high.
The term "and/or" herein merely describes an associative relationship, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Based on the above research, the present disclosure provides a resource allocation method, which, after a target picture is acquired, can identify the target food contained in the target picture, determine the calorie information of the target food, then acquire the calorie data information corresponding to the user, the calorie data information may be determined based on the characteristic information of the user and/or the target event data corresponding to the user, for example, the characteristic information of the user may be weight, height, etc. information authorized to be disclosed for the user, and the target event data corresponding to the user may include data representing events such as weight loss, fat loss, muscle increase, etc., so that after obtaining the calorie information of the target food and the calorie data information corresponding to the user, namely, the resources can be allocated to the user according to the calorie information corresponding to the target food and the calorie data information corresponding to the user, namely, the embodiment of the disclosure can provide a scheme which has low cost and can automatically configure resources for users.
To facilitate understanding of the present embodiment, first, a resource allocation method disclosed in the embodiments of the present disclosure is described in detail, where an execution subject of the resource allocation method provided in the embodiments of the present disclosure is generally a computer device with certain computing capability, and the computer device includes, for example: a terminal device, which may be a User Equipment (UE), a mobile device, or a server or other processing devices. In some possible implementations, the resource allocation method may be implemented by a processor calling computer readable instructions stored in a memory.
In addition, the feature information of the user, a large amount of data acquired when statistics is performed based on big data, portrait information of the user, and historical behavior data of the user, which are related to the following embodiments of the present disclosure, are all information or data authorized by the user.
Referring to fig. 1, a flowchart of a resource allocation method provided in the embodiment of the present disclosure is shown, where the resource allocation method may be applied to a client, and the resource allocation method includes steps S101 to S103, where:
s101, acquiring a target picture, identifying target food contained in the target picture, and determining heat information of the target food.
The target picture can be obtained by photographing food which is to be eaten by the user through the client side before the user eats food each time, and the target picture can be obtained by photographing the food to be eaten through the client side; or, the user may directly upload a target picture associated with the food to be eaten, for example, upload a picture containing the food to be eaten, which is taken in advance, as the target picture to the client.
The Client (Client) or called user side herein refers to a program corresponding to the server and providing local services for the Client, and is generally installed on a common Client, and needs to cooperate with the server to run, for example, some application apps.
After the target food contained in the target picture is identified, the calorie information of the target food may be further determined based on the identified target food, for example, the calorie information of the target food may be determined based on the food type and specification information of the target food, which will be described in detail later.
S102, acquiring heat data information corresponding to the user, wherein the heat data information is determined based on the characteristic information of the user and/or target event data corresponding to the user.
The acquiring of the thermal data information corresponding to the user may be to start to determine the thermal data information corresponding to the user based on the feature information of the user and/or the target event data corresponding to the user after receiving the target picture, or may be to determine the thermal data information based on the feature information of the user and/or the target event data corresponding to the user in advance, and the specific time when the thermal data information corresponding to the user is acquired is not limited herein.
The calorie data information herein may include a calorie recommendation range corresponding to the user determined by the client, that is, a calorie range that can be eaten by the user in the current time period is recommended to the user, for example, the calorie range that can be eaten by the user in the current time period is determined based on the feature information of the user and/or the target event data corresponding to the user, and in addition, the calorie data range corresponding to the user may also include the calorie target data set by the user for the intake this time.
Specifically, the characteristic information of the user may include user profile information authorized by the user, historical behavior data authorized by the user, and height and weight information authorized by the user, wherein the user profile information may include characteristic information of the sex, age group, location, and the like of the user, and the historical behavior data of the user may include historical diet records of the user, historically set caloric target information, and the like; the target event data corresponding to the user may include data set by the user to characterize a target body state of the user, such as data characterizing a weight gain state, a weight loss state, and a maintenance state, and may also include data characterizing a current body state of the user, such as data characterizing the current body state of the user as a pregnancy period, a pregnancy preparation period, or a lactation period.
Thus, based on the characteristic information of the user, such as the height, weight, age and sex of the user, the body mass index of the user can be determined, and then the calorie recommendation range corresponding to the user in the current time period can be recommended to the user in combination with the historical diet record of the user; or, the feature information of the user and the target event data corresponding to the user may also be combined, for example, the target body state set by the user is a weight gain state, and the heat recommendation range corresponding to the user in the current time period is recommended to the user together; still alternatively, the heat recommendation range corresponding to the user in the current time period may also be recommended to the user only through target event data corresponding to the user, for example, the target physical state set by the user is a weight gain state and the current physical state of the user is a pregnancy.
And S103, allocating resources to the user based on the calorie information of the target food and the calorie data information corresponding to the user.
As can be seen from the above, the calorie data information corresponding to the user herein may include a calorie recommendation range corresponding to the user and/or calorie target data set by the user for the intake of the current time, so that, after obtaining the calorie information of the target food, that is, resources can be allocated to the user based on the calorie information of the target food and the calorie data information corresponding to the user, such as, it may be determined that the caloric information corresponding to the target food item matches the caloric data information corresponding to the user, sending a red envelope, coupon, or other motivational resource to the user for motivation to the user, such as a fitness video, fitness article, fitness recipe, etc., to take advantage of the user's health, how to base the user's caloric information specifically on the target food, and the heat data information corresponding to the user, and how to allocate resources to the user will be described in detail later.
By the resource allocation method provided in S101 to S103, after the target picture is acquired, the target food contained in the target picture can be identified, and determining the calorie information of the target food, then acquiring the calorie data information corresponding to the user, the calorie data information may be determined based on the characteristic information of the user and/or the target event data corresponding to the user, for example, the characteristic information of the user may be weight, height, etc. information authorized to be disclosed for the user, and the target event data corresponding to the user may include data representing events such as weight loss, fat loss, muscle increase, etc., so that after obtaining the calorie information of the target food and the calorie data information corresponding to the user, namely, the resources can be allocated to the user according to the calorie information corresponding to the target food and the calorie data information corresponding to the user, namely, the embodiment of the disclosure can provide a scheme which has low cost and can automatically configure resources for users.
The above-mentioned S101 to S103 will be described in detail with reference to specific embodiments.
As for the above S101, when the target picture is acquired, the target food contained in the target picture is identified, and the calorie information of the target food is determined, as shown in fig. 2, the method includes the following S201 to S202:
s201, identifying the food to be detected contained in the target picture to obtain at least one candidate food contained in the target picture and attribute information of each candidate food;
and S202, determining the calorie information of the target food based on the attribute information of each candidate food and the probability of selecting each food in the current time period of the user predicted by the characteristic information of the user.
Here, the food to be detected included in the target picture may be identified by an image identification technique, such as based on a pre-trained neural network, so as to identify at least one candidate food included in the target picture.
Specifically, for the above S201, when identifying the food to be detected included in the target picture to obtain at least one candidate food and attribute information of each candidate food included in the target picture, the method may include:
(1) identifying the food to be detected in the target picture to obtain at least one candidate food contained in the target picture, and the food type and specification information of each candidate food;
(2) and taking the food type and specification information corresponding to each candidate food as the attribute information of the candidate food.
The attribute information of the candidate food may include a food type of the candidate food and specification information of the candidate food, and the specification information may include weight information, quantity information, volume information, or the like of the candidate food, and specifically, based on the identification of the target picture, the specification information of the candidate food may include multiple determination manners, for example, when the specification information of the candidate food is included in the target picture, the specification information of the candidate food may be directly obtained based on picture identification, and when the specification information of the candidate food is not included in the target picture, the user may be prompted to manually input the specification information of the candidate food.
In addition, in S202, the probability of selecting each food in the current time period by the user predicted by the feature information of the user may be a probability of selecting each food in the current time period by the user predicted in advance by the client based on the user profile information and the historical behavior data authorized by the user.
The gender, age and location of the user contained in the portrait information of the user have certain influence on the dietary preference of the user, for example, the staple food eaten by the user in the southern area is preferred to rice, while the staple food eaten by the user in the northern area is preferred to wheaten food, that is, the corresponding relation between the portrait information of the user and various food types can be determined through big data statistics.
In addition, the historical behavior data of the user may also reflect the eating habits of the user, for example, if the number of times of the sweet foods in the historical eating records of the user is large, the user may be presumed to prefer the sweet foods, if the user eats a certain type of food in the historical simultaneous time period with a high probability, the probability that the user selects the type of food in the current time period may be predicted to be high, in addition, the historical behavior data may further include the calorie target data of the historical simultaneous time period set by the user, and if the calorie target data set by the user in the historical simultaneous time period are all low, the probability that the food type of the candidate food in the target picture uploaded by the user is a low-calorie food type may be predicted to be high.
In summary, the feature information such as the sex, age, and region of the user included in the user figure information, and the feature information such as the historical diet record included in the historical behavior data of the user, and the calorie target data set by the user in the historical period of time may be used as the feature information for predicting the probability corresponding to the selection of each food by the user in the current period of time.
For example, the probability that the user selects each food type in the current time period can be predicted through a pre-trained neural network, and the probability that the user selects each food type in the current time period can be predicted by inputting user portrait information of the user and feature information included in historical behavior data into the pre-trained neural network.
Specifically, the neural network trained in advance here may be trained for different time periods each day, for example, when the neural network corresponding to the noon time period (11: 00-13: 00) each day is trained, a large number of sample data may be collected, where the sample data includes user image sample information of users, historical behavior sample data (for example, historical behavior sample data corresponding to the noon time period in the last year) corresponding to the historical noon time periods of the users, and a probability corresponding to each food sample type selected by the users, which is determined based on the food sample types eaten by the users on the training day.
During training, user portrait sample information and historical behavior sample data of a user are used as network input features, the probability corresponding to each food sample type selected by the user is used as a network output feature, the neural network is trained, and the trained neural network is obtained and can predict the probability corresponding to each food selected by the user in the current time period based on the user portrait information and the historical behavior data of the user.
After obtaining at least one candidate food contained in the target food and the probability of each food selected by the user in the current time period, the method may further determine the calorie information of the target food contained in the target picture based on the obtained calorie information, and specifically, when determining the calorie information of the target food based on the attribute information of each candidate food and the probability of each food selected by the user in the current time period predicted by the characteristic information of the user, may include:
(1) determining a target food contained in the target picture in the at least one candidate food based on the food type of each candidate food and the probability of each food selected by the user in the current time period predicted by the characteristic information of the user;
(2) and determining the calorie information of the target food based on the food type and the specification information of the target food.
Specifically, the food type of the target food contained in the target picture is determined based on the food type of each candidate food and the probability of each food selected by the user in the current time period, and then the caloric information of the target food is determined together according to the specification information of the target food.
For example, after the target picture is identified, the food types of the candidate foods included in the target picture are obtained to include a type a, a type B and a type C, and in the predicted probability that the user selects each food type in the current time period, if the probability corresponding to the food with the selected type a is the highest, the food type of the target food included in the target picture is determined to be the type a.
Then, after the food type of the target food is obtained, based on the food type and the specification information of the target food, the calorie information of the target food can be determined, for example, if the determined food type of the target food is potato and the specification information of the potato is 500g, the calorie information of the target food contained in the target picture can be determined based on a pre-stored food calorie table.
In particular, if the food type of the target food cannot be determined based on the food types of the candidate food and the predicted corresponding probability of selecting each food by the user in the current time period, the user may be prompted to manually input the food type of the target food contained in the target picture.
For the above S102, as shown in fig. 3, the heat data information corresponding to the user may be specifically determined in the following manner:
s301, determining a heat recommendation range for a user in the current time period based on the characteristic information of the user and target event data corresponding to the user;
s302, determining heat data information corresponding to the user based on the heat recommendation range and the heat target data which is set by the user and is taken at this time.
Here, the feature information of the user and the target event data corresponding to the user are already explained above, and are not repeated here, specifically, how to determine the recommended range of the heat for the user in the current time period based on the feature information of the user and the target event data corresponding to the user is mainly described here, specifically:
taking the characteristic information of the user including the sex, age, height and weight of the user as an example, taking the target event data corresponding to the user as the data representing the target body state of the user, for example, the target event data is the data representing the target body state of the user as a weight loss state, so that the body quality index of the user can be determined based on the sex, age, height and weight of the user, then the initial calorie recommendation range for the user in the current time period can be determined based on the body quality index of the user, the standard body quality index given by the national relevant nutrition and health departments, and the food calories of the users with a large number of standard body indexes ingested in the history period corresponding to the current time period, then the initial calorie recommendation range can be adjusted according to the weight loss state set by the user, and the upper limit and the lower limit of the calorie recommendation range determined in the current time period for the user can meet the health standard, if the body quality index is lower, but if the change state of the health index expected by the user is weight loss, the lowest value of the caloric recommendation range is the lower limit without damaging the human health standard, and the highest value of the initial caloric recommendation range may be the highest value of the health index expected by the user, otherwise, if the body quality index of the user is higher, but if the change state of the health index expected by the user is weight gain, the lowest value of the caloric recommendation range may be the lowest value of the initial caloric recommendation range, and the highest value of the health index expected by the user is the upper limit without damaging the human health standard.
In S302, the calorie target data set by the user and taken this time refers to the calorie of the food set by the user before the meal this time, and the calorie target data may be set by the user according to the characteristic information of the user, such as the height and the weight of the user; the calorie data information here includes the recommended calorie range for the user at the current time period and the calorie target data of the intake set by the user this time.
In addition, the calorie target data taken this time set by the user may be manually input by the user before the meal this time, or may be determined by the client according to the calorie target data input by the user in the historical same time period corresponding to the current time period, for example, if the current time period is noon, if the calorie target data input by the user at noon every day in the past week is a joule, the a joule may be used as the calorie target data taken this time set by the user.
Next, allocating resources to the user based on the calorie information of the target food, the recommended range of calories for the user in the current time period, and the calorie target data set by the user for the intake of this time, as shown in fig. 4, may specifically include the following S401 to S404:
s401, determining whether the calorie target data which is set by the user and taken this time is matched with the recommended range of calories;
s402, when it is determined that the calorie target data which are set by the user and taken this time are matched with the recommended calorie range, determining difference information between calorie information of the target food contained in the target picture and the calorie target data which are set by the user and taken this time;
s403, distributing resources matched with the difference information for the user based on the difference information;
s404, when it is determined that the heat target data which is set by the user and is ingested this time is not matched with the heat recommended range, preset resources are configured for the user.
Here, the matching of the calorie target data taken this time set by the user and the calorie recommended range means that the calorie target data taken this time set by the user is within the calorie recommended range, and then difference information between the calorie information of the target food contained in the target picture and the calorie target data taken this time set by the user is further determined.
After the difference information is obtained, the difference information may be classified, for example, a plurality of gears are preset, the incentive resource corresponding to each gear is different, after the difference information is obtained, the gear to which the difference information belongs is determined, then the incentive resource is allocated to the user according to the gear, for example, the user is allocated with a red envelope amount or a coupon amount corresponding to the gear, for example, when the calorie information in the embodiment of the present disclosure is represented by calories, if a difference between calories of the target food and calorie target data set by the user and taken this time is less than a first difference threshold, the difference information is determined to belong to a first gear, if the difference is greater than or equal to a first difference threshold and less than a second difference threshold, the difference information is determined to belong to a second gear, if the difference is greater than or equal to a third difference threshold, the difference information is determined to belong to a third gear, the first difference threshold is smaller than the second difference threshold, the second difference threshold is smaller than the third difference threshold, the excitation resource of the first gear is larger than the excitation resource of the second gear, and the excitation resource of the second gear is larger than the excitation resource of the third gear.
Of course, when it is determined that the intake target data set by the user at this time does not match the recommended calorie range, a preset incentive resource may be configured for the user.
For example, if the calorie target data taken this time set by the user is not within the recommended calorie range, resource allocation may be performed for the user according to a preset incentive resource, for example, a red packet quota contained in the preset incentive resource is 0, that is, a red packet is not issued to the user; or recommend videos or science popularization articles about healthy diet to the user to help the user establish the habit of healthy diet.
In another embodiment, if the acquired calorie data information corresponding to the user only includes a calorie recommendation range, preset incentive resources may also be configured for the user according to the calorie information of the target food and the calorie recommendation range, for example, when it is determined that the calorie information of the target food belongs to the calorie recommendation range, a first preset resource, such as a red packet, a coupon, and the like, is allocated to the user, and if it is determined that the calorie information of the target food is not within the calorie recommendation range, a second preset resource, such as a video or a science popularization article, is allocated to the user about healthy diet.
In addition, in order to continuously stimulate the habit of the user for forming reasonable meal, increase the adhesiveness between the user and the client, and along with the increase of the matching times of the calorie target data and the calorie recommended range, increasing the distributed excitation resources, for example, within a set time length from the current moment, if the number of times of continuous matching of the heat target data and the heat recommendation range reaches a set number threshold, when allocating resources matching with the difference information for the user, the incentive resources may be adjusted to incentive resources matching with the set number threshold, for example, if the set number threshold is N, when the number of consecutive matches of the caloric target data with the caloric recommendation range reaches N, the number of the incentive resources can be adjusted to be n times of the original number, wherein n is larger than 1, for example, the red envelope limit is adjusted to be n times of the original number, and here, the user can be encouraged to develop good healthy eating habits.
In summary, the present disclosure provides a resource allocation method, after a target picture is obtained, a target food contained in the target picture can be identified, and determining the calorie information of the target food, then acquiring the calorie data information corresponding to the user, the calorie data information may be determined based on the characteristic information of the user and/or the target event data corresponding to the user, for example, the characteristic information of the user may be weight, height, etc. information authorized to be disclosed for the user, and the target event data corresponding to the user may include data representing events such as weight loss, fat loss, muscle increase, etc., so that after obtaining the calorie information of the target food and the calorie data information corresponding to the user, namely, the resources can be allocated to the user according to the calorie information corresponding to the target food and the calorie data information corresponding to the user, namely, the embodiment of the disclosure can provide a scheme which has low cost and can automatically configure resources for users.
In addition, the embodiment of the disclosure can guide the user to eat reasonably by configuring the incentive resources, and help the user to develop a healthy eating habit.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same technical concept, a resource configuration device corresponding to the resource configuration method is also provided in the embodiments of the present disclosure, and since the principle of solving the problem of the device in the embodiments of the present disclosure is similar to the resource configuration method in the embodiments of the present disclosure, the implementation of the device may refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 5, a schematic diagram of a resource configuration apparatus 500 according to an embodiment of the present disclosure is shown, where the resource configuration apparatus 500 includes: a first obtaining module 501, a second obtaining module 502 and a resource configuring module 503.
The first obtaining module 501 is configured to obtain a target picture, identify target food contained in the target picture, and determine heat information of the target food;
a second obtaining module 502, configured to obtain heat data information corresponding to a user, where the heat data information is determined based on feature information of the user and/or target event data corresponding to the user;
and the resource configuration module 503 is configured to allocate resources to the user based on the calorie information of the target food and the calorie data information corresponding to the user.
In one possible implementation, the first obtaining module 501, when configured to obtain the target picture, identify the target food contained in the target picture, and determine the caloric information of the target food, includes:
identifying the food to be detected contained in the target picture to obtain at least one candidate food contained in the target picture and attribute information of each candidate food;
and determining the calorie information of the target food based on the attribute information of each candidate food and the probability of selecting each food by the user in the current time period predicted by the characteristic information of the user.
In a possible implementation manner, the first obtaining module 501, when configured to identify food to be detected included in the target picture, and obtain at least one candidate food included in the target picture and attribute information of each candidate food, includes:
identifying the food to be detected in the target picture to obtain at least one candidate food contained in the target picture, and the food type and specification information of each candidate food;
and taking the food type and specification information corresponding to each candidate food as the attribute information of the candidate food.
In one possible implementation, the first obtaining module 501, when configured to determine the caloric information of the target food based on the attribute information of each candidate food and the probability of selecting each food by the user in the current time period, which is predicted by the feature information of the user, includes:
determining a target food contained in the target picture in the at least one candidate food based on the food type of each candidate food and the probability of each food selected by the user in the current time period predicted by the characteristic information of the user;
and determining the calorie information of the target food based on the food type and the specification information of the target food.
In one possible implementation, the second obtaining module 502 determines the corresponding thermal data information of the user according to the following manner:
determining a heat recommendation range for the user in the current time period based on the characteristic information of the user and the target event data corresponding to the user;
and determining heat data information corresponding to the user based on the heat recommendation range and the heat target data which is set by the user and is taken at this time.
In a possible embodiment, the resource configuration module 503, when configured to allocate resources to the user based on the caloric information corresponding to the target food and the caloric data information corresponding to the user, includes:
determining whether the calorie target data which is set by the user and taken this time is matched with the calorie recommendation range;
when the fact that the calorie target data which are set by the user and taken this time are matched with the calorie recommended range is determined, determining difference information between calorie information of the target food contained in the target picture and the calorie target data which are set by the user and taken this time;
allocating resources matched with the difference information to the user based on the difference information;
and when it is determined that the calorie target data which is set by the user and taken this time is not matched with the calorie recommended range, configuring preset resources for the user based on the calorie information and the calorie recommended range of the target food.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
Corresponding to the resource allocation method in fig. 1, an embodiment of the present disclosure further provides an electronic device 600, as shown in fig. 6, which is a schematic structural diagram of the electronic device 600 provided in the embodiment of the present disclosure, and includes:
a processor 61, a memory 62, and a bus 63; the memory 62 is used for storing execution instructions and includes a memory 621 and an external memory 622; the memory 621 is also referred to as an internal memory, and is used for temporarily storing the operation data in the processor 61 and the data exchanged with the external memory 622 such as a hard disk, the processor 61 exchanges data with the external memory 622 through the memory 621, and when the electronic device 600 operates, the processor 61 communicates with the memory 62 through the bus 63, so that the processor 61 executes the following instructions: acquiring a target picture, identifying target food contained in the target picture, and determining heat information of the target food; acquiring heat data information corresponding to a user, wherein the heat data information is determined based on the characteristic information of the user and/or target event data corresponding to the user; and allocating resources for the user based on the calorie information of the target food and the calorie data information corresponding to the user.
The embodiments of the present disclosure also provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the resource allocation method described in the above method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The computer program product of the resource allocation method provided in the embodiments of the present disclosure includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute steps of the resource allocation method in the above method embodiments, which may be referred to specifically for the above method embodiments, and are not described herein again.
The embodiments of the present disclosure also provide a computer program, which when executed by a processor implements any one of the methods of the foregoing embodiments. The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A method for resource allocation, comprising:
acquiring a target picture, identifying target food contained in the target picture, and determining heat information of the target food;
acquiring heat data information corresponding to a user, wherein the heat data information is determined based on the characteristic information of the user and/or target event data corresponding to the user;
and allocating resources for the user based on the calorie information of the target food and the calorie data information corresponding to the user.
2. The resource allocation method according to claim 1, wherein the acquiring a target picture, identifying a target food contained in the target picture, and determining caloric information of the target food comprises:
identifying the food to be detected contained in the target picture to obtain at least one candidate food contained in the target picture and attribute information of each candidate food;
determining caloric information of the target food based on the attribute information of each candidate food and the probability of the user selecting each food at the current time period predicted by the characteristic information of the user.
3. The resource allocation method according to claim 2, wherein the identifying the food to be detected included in the target picture to obtain at least one candidate food included in the target picture and attribute information of each candidate food comprises:
identifying the food to be detected in the target picture to obtain at least one candidate food contained in the target picture, and the food type and specification information of each candidate food;
and taking the food type and specification information corresponding to each candidate food as the attribute information of the candidate food.
4. The resource allocation method according to claim 3, wherein the determining of the calorie information of the target food based on the attribute information of each candidate food and the probability of each food selected by the user in the current time period predicted by the characteristic information of the user comprises:
determining a target food contained in the target picture among the at least one candidate food based on the food type of each candidate food and the probability of each food being selected by the user at the current time period predicted by the characteristic information of the user;
determining caloric information of the target food based on the food type and the specification information of the target food.
5. The resource allocation method according to claim 1, wherein the thermal data information corresponding to the user is determined as follows:
determining a heat recommendation range for the user at the current time period based on the feature information of the user and the target event data corresponding to the user;
and determining heat data information corresponding to the user based on the heat recommendation range and the heat target data which is set by the user and is taken at this time.
6. The resource allocation method according to claim 5, wherein the allocating resources to the user based on the caloric information corresponding to the target food and the caloric data information corresponding to the user comprises:
determining whether the calorie target data which is set by the user and taken this time is matched with the calorie recommended range;
when it is determined that the calorie target data taken this time set by the user matches the recommended calorie range, determining difference information between calorie information of the target food contained in the target picture and the calorie target data taken this time set by the user;
allocating resources matched with the difference information to the user based on the difference information;
and when it is determined that the intake heat target data set by the user at this time is not matched with the heat recommendation range, configuring preset resources for the user.
7. A resource allocation apparatus, comprising:
the first acquisition module is used for acquiring a target picture, identifying target food contained in the target picture and determining heat information of the target food;
the second acquisition module is used for acquiring heat data information corresponding to a user, and the heat data information is determined based on the characteristic information of the user and/or target event data corresponding to the user;
and the resource allocation module is used for allocating resources to the users based on the heat information of the target food and the heat data information corresponding to the users.
8. The resource allocation device according to claim 7, wherein the first obtaining module, when configured to obtain the target picture, identify the target food contained in the target picture, and determine the caloric information of the target food, comprises:
identifying the food to be detected contained in the target picture to obtain at least one candidate food contained in the target picture and attribute information of each candidate food;
determining caloric information of the target food based on the attribute information of each candidate food and the probability of the user selecting each food at the current time period predicted by the characteristic information of the user.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the resource configuration method of any of claims 1 to 6.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, is adapted to carry out the steps of the resource allocation method according to any one of claims 1 to 6.
CN202010322749.3A 2020-04-22 2020-04-22 Resource allocation method and device, electronic equipment and storage medium Active CN111540438B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010322749.3A CN111540438B (en) 2020-04-22 2020-04-22 Resource allocation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010322749.3A CN111540438B (en) 2020-04-22 2020-04-22 Resource allocation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111540438A true CN111540438A (en) 2020-08-14
CN111540438B CN111540438B (en) 2023-05-09

Family

ID=71980138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010322749.3A Active CN111540438B (en) 2020-04-22 2020-04-22 Resource allocation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111540438B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106663137A (en) * 2014-04-28 2017-05-10 耶达研究及发展有限公司 Method of predicting a response of a subject to food
CN107731278A (en) * 2017-09-04 2018-02-23 广东数相智能科技有限公司 A kind of food recognition methods, nutrient health analysis method, system and device
CN108292420A (en) * 2015-11-25 2018-07-17 三星电子株式会社 Subscriber terminal equipment and its control method
CN108630298A (en) * 2018-05-09 2018-10-09 南京邮电大学 Healthy diet management method and system, computer readable storage medium, terminal
CN108682451A (en) * 2018-04-28 2018-10-19 上海与德科技有限公司 Information-pushing method, device, equipment based on intelligent refrigerator and storage medium
CN109767825A (en) * 2019-01-31 2019-05-17 北京卡路里信息技术有限公司 Diet control method, apparatus, equipment and storage medium
CN110867239A (en) * 2019-11-07 2020-03-06 北京理工大学 Diet suggestion generation method and device, computer device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106663137A (en) * 2014-04-28 2017-05-10 耶达研究及发展有限公司 Method of predicting a response of a subject to food
CN108292420A (en) * 2015-11-25 2018-07-17 三星电子株式会社 Subscriber terminal equipment and its control method
CN107731278A (en) * 2017-09-04 2018-02-23 广东数相智能科技有限公司 A kind of food recognition methods, nutrient health analysis method, system and device
CN108682451A (en) * 2018-04-28 2018-10-19 上海与德科技有限公司 Information-pushing method, device, equipment based on intelligent refrigerator and storage medium
CN108630298A (en) * 2018-05-09 2018-10-09 南京邮电大学 Healthy diet management method and system, computer readable storage medium, terminal
CN109767825A (en) * 2019-01-31 2019-05-17 北京卡路里信息技术有限公司 Diet control method, apparatus, equipment and storage medium
CN110867239A (en) * 2019-11-07 2020-03-06 北京理工大学 Diet suggestion generation method and device, computer device and storage medium

Also Published As

Publication number Publication date
CN111540438B (en) 2023-05-09

Similar Documents

Publication Publication Date Title
JP6725619B2 (en) System and method for user-specific adjustment of nutritional intake
JP6149233B1 (en) Meal management system, meal management method, server device, and program
CN107658001B (en) Household oil health management method and system
KR20010106218A (en) Information recommendation apparatus and information recommendation system
CN107731281A (en) A kind of method for recommending dining
KR102169661B1 (en) System and method for recommending food menus based on disease gene backtracking and cooking the food menus
CN108121974A (en) A kind of display module structure and terminal device
CN111666893A (en) Ordering processing method and device
JP2012128798A (en) Information provision apparatus, information provision method and computer program
KR102326540B1 (en) Methods for management of nutrition and disease using food images
CN110852299A (en) Method and device for determining eating habits of customers
CN113343003A (en) Dining nutrition construction recording system and method
CN111540438A (en) Resource allocation method and device, electronic equipment and storage medium
EP3772738A1 (en) An apparatus and method for providing dietary recommendation
KR101971712B1 (en) A method of goal management for improving nutrition problem based on survey
JP2001101157A (en) Device and system for diet management and recording medium
KR102431226B1 (en) Method and apparatus for providing personalized nutrition management service based on artificial intelligence
CN109461502A (en) Health control method, system, Human fat balance and mobile terminal
JP2002123612A (en) Health promotion support service center
CN110349358B (en) Catering settlement method, device, terminal and readable medium based on health management
US20120219931A1 (en) System, method, and program product for modifying eating behavior
KR101732495B1 (en) A meal information entry system by customized sampling
CN110931110A (en) Diet recommendation method and equipment
KR102612596B1 (en) Metaverse-based dietary information management, recommendation and sharing system and method
JP7411176B2 (en) Information processing system, information processing method and program

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
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder