Diet recommendation method and device, electronic equipment and storage medium
By obtaining historical health data and preset exercise plans, combined with Pearson correlation coefficient, accurately recommending food and its weight, the problem of inaccurate calculation of calories required in the prior art is solved, and an individualized healthy diet recommendation is achieved.
Patent Information
- Application Number
- CN202411019770.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-12-06
AI Technical Summary
Existing health management applications fail to reflect individual differences in calculating the required calories, resulting in inaccurate recommended foods and food weights.
By obtaining the target user's historical health data, weight change goals and preset exercise plans, we determine daily calorie consumption and recommend food based on Pearson's correlation coefficient to ensure the correlation between food intake and weight changes, so as to accurately Recommended food and its weight.
Improve the accuracy of food recommendations and individualized differences, improve the accuracy of calories required for the day, and thus improve the accuracy of recommended food weight.
Smart Images

Figure CN119092050A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of big data analysis, and in particular to a diet recommendation method, device, electronic device and storage medium. Background Art
[0002] As people pay more attention to health, health management applications have been widely used.
[0003] Currently, the required calorie intake calculated by health management applications cannot reflect individual differences, resulting in inaccurate calculation of required calorie intake, inaccurate recommended foods and inaccurate weights of recommended foods. Summary of the invention
[0004] The present invention provides a diet recommendation method, device, electronic device and storage medium to improve the accuracy of recommended food and the weight of the recommended food.
[0005] According to one aspect of the present invention, there is provided a method for recommending a diet, comprising:
[0006] Obtain the target user's historical health data, weight change goals, and preset exercise plans;
[0007] Determine the daily normal calorie consumption based on the historical health data of the target user, and determine the required calorie intake for the day based on the daily normal calorie consumption, the preset exercise plan and the weight change target;
[0008] determining a Pearson correlation coefficient between various food intakes and weight changes based on the historical health data of the target user;
[0009] The recommended food for the day is determined based on the Pearson correlation coefficient between the intake of the various foods and the change in body weight, and the weight of the recommended food for the day is determined based on the required calorie intake for the day.
[0010] According to another aspect of the present invention, there is provided a diet recommendation device, comprising:
[0011] A health data acquisition module is used to obtain the historical health data, weight change target and preset exercise plan of the target user;
[0012] A module for determining the daily required calorie intake, for determining the daily normal calorie consumption based on the historical health data of the target user, and determining the daily required calorie intake based on the daily normal calorie consumption, the preset exercise plan and the weight change target;
[0013] A Pearson correlation coefficient determination module, used to determine the Pearson correlation coefficient between various food intakes and weight changes based on the historical health data of the target user;
[0014] The food recommendation module is used to determine the recommended food for the day based on the Pearson correlation coefficient between the intake of various foods and the change in body weight, and to determine the weight of the recommended food for the day based on the required calorie intake for the day.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] at least one processor;
[0017] and a memory communicatively coupled to the at least one processor;
[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the diet recommendation method described in any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the diet recommendation method described in any embodiment of the present invention when executed.
[0020] The technical solution of the embodiment of the present invention obtains the historical health data, weight change target and preset exercise plan of the target user, and then determines the daily normal calorie consumption based on the historical health data of the target user, and determines the required calorie intake for the day based on the daily normal calorie consumption, weight change target and preset exercise plan; determines the Pearson correlation coefficient between various food intakes and weight changes based on the historical health data of the target user, and then determines the recommended food for the day based on the Pearson correlation coefficient between various food intakes and weight changes, and determines the weight of the recommended food for the day based on the required calorie intake for the day. The above technical solution makes food recommendations through the Pearson correlation coefficient between various food intakes and weight changes, which effectively improves the accuracy of the recommended food, and by introducing the daily normal calorie consumption, it realizes the consideration of individual differences, thereby improving the accuracy of the required calorie intake for the day, and then improving the accuracy of the weight of the recommended food.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flow chart of a diet recommendation method provided according to Embodiment 1 of the present invention;
[0024] Figure 2 is a flow chart of a diet recommendation method provided according to Embodiment 2 of the present invention;
[0025] Figure 3 is a flow chart of a diet recommendation method provided according to Embodiment 3 of the present invention;
[0026] Figure 4 is a flow chart of a diet recommendation method provided according to Embodiment 4 of the present invention;
[0027] Figure 5 is a structural schematic diagram of a diet recommendation device provided according to Embodiment 5 of the present invention;
[0028] Figure 6 It is a schematic diagram of the structure of an electronic device for implementing the diet recommendation method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0031] Embodiment 1
[0032] Figure 1 This is a flow chart of a diet recommendation method provided in the first embodiment of the present invention. This embodiment is applicable to the case where diet recommendations are made through a health management application. The method can be performed by a diet recommendation device, which can be implemented in the form of hardware and / or software. The diet recommendation device can be configured in a mobile terminal such as a mobile phone or a tablet computer. Figure 1 As shown, the method includes:
[0033] S110: Obtain historical health data, weight change target, and preset exercise plan of the target user.
[0034] In this embodiment, the target user refers to the user for whom a diet recommendation is to be made. The historical health data refers to the basic health data of the user for whom a diet recommendation is to be made, from which information including but not limited to the sum of calories consumed by diet over multiple days, the sum of calories consumed by exercise over multiple days, the difference between energy intake and energy consumption over multiple days, the daily intake of various foods, and the daily calculated weight can be extracted.
[0035] Specifically, the historical health data of the target user can be obtained in response to the user's data input operation in the interactive interface, and the historical health data of the target user collected by a wearable device that is communicatively connected to the current electronic device can also be received, which is not specifically limited here.
[0036] S120, determining a normal daily calorie consumption based on the historical health data of the target user, and determining a required calorie intake for the day based on the normal daily calorie consumption, the preset exercise plan and the weight change target.
[0037] In this embodiment, the daily normal calorie consumption refers to the normalized daily calorie consumption of the target user, including the calorie consumption of the normalized behavior of the target user in work and life, which can be calculated based on a variety of historical health data. The daily calorie intake refers to the target user's predicted daily calorie intake target, which can be used to determine the weight of the recommended food for the day.
[0038] Specifically, the normal daily calorie consumption can be calculated based on various historical health data of the target user, and then the required calorie intake for the day can be predicted based on the normal daily calorie consumption, preset exercise plan and weight change target.
[0039] S130. Determine the Pearson correlation coefficient between various food intakes and weight changes based on the historical health data of the target user.
[0040] In this embodiment, the historical health data of the target user may be substituted into the Pearson correlation coefficient calculation formula to obtain the Pearson correlation coefficient between various food intakes and weight changes.
[0041] S140. Determine the recommended food for the day based on the Pearson correlation coefficient between the intake of the various foods and the change in body weight, and determine the weight of the recommended food for the day based on the required calorie intake for the day.
[0042] In this embodiment, the recommendation probability of food can be updated according to the Pearson correlation coefficient between the intake of various foods and the change in body weight, and then one or more food recommendations are randomly made according to the updated recommendation probability of food to obtain the recommended food of the day. For example, the recommended food of the day can be one or more of beef, pork, rice, cabbage, broccoli, etc.
[0043] Specifically, the weight of the recommended food for the day can be solved according to a linear programming algorithm so that the total calorie intake is closest to the target user's daily calorie intake required while meeting the minimum nutrient element intake standard.
[0044] The technical solution of the embodiment of the present invention obtains the historical health data, preset exercise plan and weight change target of the target user, and then determines the daily normal calorie consumption based on the historical health data of the target user, and determines the required calorie intake for the day based on the daily normal calorie consumption, weight change target and preset exercise plan; determines the Pearson correlation coefficient between various food intakes and weight changes based on the historical health data of the target user, and then determines the recommended food for the day based on the Pearson correlation coefficient between various food intakes and weight changes, and determines the weight of the recommended food for the day based on the required calorie intake for the day. The above technical solution makes food recommendations through the Pearson correlation coefficient between various food intakes and weight changes, which effectively improves the accuracy of the recommended food, and by considering the daily normal calorie consumption, it realizes the consideration of individual differences, thereby improving the accuracy of the required calorie intake for the day, and then improving the accuracy of the weight of the recommended food.
[0045] Embodiment 2
[0046] Figure 2 This is a flow chart of a diet recommendation method provided in Embodiment 2 of the present invention. The method of this embodiment can be combined with the various optional schemes in the diet recommendation method provided in the above embodiments. The diet recommendation method provided in this embodiment has been further optimized. Optionally, the historical health data of the target user includes the sum of multi-day dietary calorie intake, the sum of multi-day exercise calorie consumption, and the multi-day intake and consumption energy difference; accordingly, determining the daily normal calorie consumption based on the historical health data of the target user includes: determining the daily normal calorie consumption based on the sum of multi-day dietary calorie intake, the sum of multi-day exercise calorie consumption, and the multi-day intake and consumption energy difference.
[0047] like Figure 2 As shown, the method includes:
[0048] S210, obtaining historical health data, preset exercise plan and weight change target of the target user, wherein the historical health data of the target user includes the sum of calorie intake from diet for multiple days, the sum of calorie consumption from exercise for multiple days and the difference between energy intake and consumption for multiple days.
[0049] S220, determining the daily normal calorie consumption based on the sum of the multi-day dietary calorie intake, the sum of the multi-day exercise calorie consumption and the multi-day energy intake and consumption difference, and determining the required calorie intake for the day based on the daily normal calorie consumption, the weight change target and the preset exercise plan.
[0050] Specifically, the calculation formula for determining the daily normal calorie consumption data is: daily normal calorie consumption = (sum of calorie intake from multiple days of diet - sum of calorie consumption from multiple days of exercise - difference between energy intake and energy consumption over multiple days) / T;
[0051] Among them, the relationship between the known net calorie intake E and the weight change ΔW is E=ΔW×7700, where 7700 is a commonly used empirical coefficient, which represents the relationship between body weight and calories. For example, reducing 1 kg of body weight requires about 7700 kcal of calories. According to the formula E=ΔW×7700, it can be seen that the difference between energy intake and consumption over multiple days = the weight change over multiple days × 7700. The weight change over multiple days can be obtained by taking the difference between the weight measured at the same time on the first and last dates in the weight record. T represents the number of days.
[0052] Optionally, the required calorie intake for the day is determined based on the daily normal calorie consumption, the weight change target and the preset exercise plan, including: determining the required calorie intake for the day based on the daily normal calorie consumption, the difference between the energy intake and consumption required for the day and the calorie consumption from the planned exercise for the day; wherein the difference between the energy intake and consumption required for the day is determined by the weight change target, according to the relationship between the net calorie intake E and the weight change ΔW, the formula is E=ΔW×7700, the difference between the energy intake and consumption required for the day=weight change target×7700, and the calorie consumption from the planned exercise for the day is determined based on the preset exercise plan.
[0053] For example, the calculation formula for the required daily calorie intake can be:
[0054] The calorie intake required for the day = normal daily calorie consumption + the difference between daily energy intake and consumption + the calorie consumption from planned exercise on the day.
[0055] The difference between energy intake and energy consumption required for the day = weight change target × 7700, where the weight change target is set in advance by the target user. For example, if the weight change target is to reduce 1 kg of body weight, the difference between energy intake and energy consumption required for the day is -7700 kcal.
[0056] S230: Determine the Pearson correlation coefficient between various food intakes and weight changes based on the historical health data of the target user.
[0057] S240. Determine the recommended food for the day based on the Pearson correlation coefficient between the intake of the various foods and the change in body weight, and determine the weight of the recommended food for the day based on the required calorie intake for the day.
[0058] The technical solution of the embodiment of the present invention determines the daily normal calorie consumption based on the total calorie intake from multiple days of diet, the total calorie consumption from multiple days of exercise, and the difference between energy intake and consumption over multiple days, thereby taking individual differences into consideration, thereby improving the accuracy of the calorie intake required for the day, and further improving the accuracy of the recommended food weight.
[0059] Embodiment 3
[0060] Figure 3This is a flow chart of a diet recommendation method provided in Embodiment 3 of the present invention. The method of this embodiment can be combined with the various optional schemes in the diet recommendation method provided in the above embodiments. The diet recommendation method provided in this embodiment is further optimized. Optionally, the historical health data of the target user includes daily food intake and daily calculated weight; accordingly, the Pearson correlation coefficient between various food intakes and weight changes is determined based on the historical health data of the target user, including: determining the Pearson correlation coefficient between various food intakes and weight changes based on the various daily food intakes and the daily calculated weight.
[0061] like Figure 3 As shown, the method includes:
[0062] S310, obtaining historical health data, weight change target, and preset exercise plan of the target user, wherein the historical health data of the target user includes daily intake of various foods and daily calculated weight.
[0063] S320: Determine the normal daily calorie consumption based on the historical health data of the target user, and determine the required calorie intake for the day based on the normal daily calorie consumption, the weight change target and the preset exercise plan.
[0064] S330: Determine the Pearson correlation coefficient between various food intakes and body weight changes based on the daily various food intakes and the daily calculated body weight.
[0065] In this embodiment, the daily intake of various foods refers to the daily intake of various foods by the target user. The daily calculated weight refers to the daily calculated weight of the target user, and the weight at the same time period of each day is usually selected.
[0066] For example, the daily food intake can be extracted from the target user's diet record, and the daily calculated weight = daily measured weight + weight change caused by exercise, and the weight change caused by exercise = energy consumed by exercise / 7700. The energy consumed by exercise refers to the sum of calories consumed obtained from the exercise record. Furthermore, the daily food intake and daily calculated weight can be substituted into the Pearson correlation coefficient calculation formula to obtain the Pearson correlation coefficient between various food intakes and weight changes. The Pearson correlation coefficient calculation formula is as follows:
[0067]
[0068] Among them, X i represents the intake of one food on day i, Y i represents the calculated body weight on day i, represents the average daily intake of this food. It means calculating the average value of body weight, and the Pearson correlation coefficient between various foods and weight changes can be calculated separately.
[0069] S340: Determine the recommended food for the day based on the Pearson correlation coefficient between the intake of the various foods and the change in body weight, and determine the weight of the recommended food for the day based on the required calorie intake for the day.
[0070] The technical solution of the embodiment of the present invention determines the Pearson correlation coefficient between various food intakes and weight changes based on daily food intake and daily calculated body weight, and then makes food recommendations based on the Pearson correlation coefficient between various food intakes and weight changes, thereby effectively improving the accuracy of recommended foods.
[0071] Embodiment 4
[0072] Figure 4 This is a flow chart of a diet recommendation method provided in Embodiment 4 of the present invention. The method of this embodiment can be combined with the various optional schemes in the diet recommendation method provided in the above embodiments. The diet recommendation method provided in this embodiment has been further optimized. Optionally, determining the weight of the recommended food for the day based on the required calorie intake for the day includes: determining the target intake value of the nutrient element for the day; based on the target intake value of the nutrient element for the day and the required calorie intake for the day, calculating the weight of each recommended food for the day through a linear programming algorithm.
[0073] like Figure 4 As shown, the method includes:
[0074] S410: Obtain historical health data, weight change target, and preset exercise plan of the target user.
[0075] S420: Determine the normal daily calorie consumption based on the historical health data of the target user, and determine the required calorie intake for the day based on the normal daily calorie consumption, the weight change target and the preset exercise plan.
[0076] S430: Determine the Pearson correlation coefficient between various food intakes and weight changes based on the historical health data of the target user.
[0077] S440, determining the recommended food for the day based on the Pearson correlation coefficient between the various food intakes and the weight changes.
[0078] Specifically, the food recommendation probability is determined based on the Pearson correlation coefficient between the various food intakes and the weight changes: and the recommended food for the day is determined based on the food recommendation probability.
[0079] For example, a list of recommended foods can be compiled in advance based on dietary nutrition recipes, and then the default recommendation probability of the food is added to the Pearson correlation coefficient between food intake and weight change to obtain the food recommendation probability, and then the recommended food of the day is randomly selected according to the food recommendation probability. Among them, the default recommendation probability of the food can be set according to the food list recommended by the Dietary Nutrition Association, and the default recommendation probability is usually set for each food according to the nutritional priority.
[0080] S450, determining the target intake value of nutrients for the day; and calculating the weight of each recommended food for the day through a linear programming algorithm based on the target intake value of nutrients for the day and the required caloric intake for the day.
[0081] For example, the recommended food for the day may include food 1, food 2, and food 3. The nutritional elements corresponding to the three foods are shown in Table 1 below:
[0082] Table 1
[0083]
[0084] The target nutrient intake values for the recommended food of the day can be determined based on the dietary standards. The target nutrient intake values for the recommended food of the day can be: 10g fat, 50g protein, and 20g sugar. The required daily calorie intake can be 600kcal. Based on the above data, the following linear programming model can be established:
[0085] 4x1+6x2+3x3=600
[0086] 0.1x1+0.2x2+0.05x3=10
[0087] 0.5x1+0.3x2+0.4x3=50;
[0088] 0.05x1+0.1x2+0.02x3=20
[0089] x1,x2,x3>0
[0090] By solving the above linear programming model, we can get x1=57g, x2=10g, x3=47g, that is, the weight of food 1 is 57g, the weight of food 2 is 10g, and the weight of food 3 is 47g.
[0091] The technical solution of the embodiment of the present invention determines the target intake value of nutrients for the day; based on the target intake value of nutrients for the day and the required calorie intake for the day, the weight of each recommended food for the day is calculated through a linear programming algorithm, thereby achieving accurate calculation of the weight of recommended food, thereby improving the accuracy of the weight of recommended food, making the recommended food and food weight more in line with the target user, and improving the adaptability of recommended food and food weight.
[0092] Embodiment 5
[0093] Figure 5 This is a schematic diagram of the structure of a dietary recommendation device provided in Embodiment 5 of the present invention. Figure 5 As shown, the device comprises:
[0094] The health data acquisition module 510 is used to acquire the historical health data, weight change target and preset exercise plan of the target user;
[0095] The daily required calorie intake determination module 520 is used to determine the daily normal calorie consumption based on the historical health data of the target user, and determine the daily required calorie intake based on the daily normal calorie consumption, the weight change target and the preset exercise plan;
[0096] A Pearson correlation coefficient determination module 530, for determining the Pearson correlation coefficient between various food intakes and weight changes based on the historical health data of the target user;
[0097] The food recommendation module 540 is used to determine the recommended food for the day based on the Pearson correlation coefficient between the intake of various foods and the change in body weight, and to determine the weight of the recommended food for the day based on the required calorie intake for the day.
[0098] The technical solution of the embodiment of the present invention obtains the historical health data, weight change target and preset exercise plan of the target user, and then determines the daily normal calorie consumption based on the historical health data of the target user, and determines the required calorie intake for the day based on the daily normal calorie consumption, weight change target and preset exercise plan; determines the Pearson correlation coefficient between various food intakes and weight changes based on the historical health data of the target user, and then determines the recommended food for the day based on the Pearson correlation coefficient between various food intakes and weight changes, and determines the weight of the recommended food for the day based on the required calorie intake for the day. The above technical solution makes food recommendations through the Pearson correlation coefficient between various food intakes and weight changes, which effectively improves the accuracy of the recommended food, and by considering the daily normal calorie consumption, it realizes the consideration of individual differences, thereby improving the accuracy of the required calorie intake for the day, and then improving the accuracy of the weight of the recommended food.
[0099] In some optional embodiments, the historical health data of the target user includes the sum of calories consumed by diet over multiple days, the sum of calories consumed by exercise over multiple days, and the difference between energy intake and energy consumption over multiple days;
[0100] Accordingly, the daily required calorie intake determination module 520 can also be specifically used for:
[0101] The daily normal calorie consumption is determined based on the sum of the calorie intake from the diet over multiple days, the sum of the calorie consumption from exercise over multiple days, and the difference between the energy intake and consumption over multiple days.
[0102] In some optional implementations, the calculation formula for determining the daily normal calorie consumption data is:
[0103] Daily normal calorie consumption = (sum of calorie intake from diet for multiple days - sum of calorie consumption from exercise for multiple days - difference between energy intake and energy consumption for multiple days) / T;
[0104] Among them, the difference between energy intake and consumption over multiple days = multi-day weight change value × 7700. The multi-day weight change value refers to the difference in weight measured at the same time on the first and last dates in the weight record. 7700 represents the relationship between weight and calories; T represents the number of days.
[0105] In some optional implementations, the daily required calorie intake determination module 520 may also be specifically used to:
[0106] Determine the required daily calorie intake based on the daily normal calorie consumption, the difference between the required daily calorie intake and calorie consumption, and the planned daily exercise calorie consumption;
[0107] Among them, the difference between the energy intake and consumption required for the day = the weight change target × 7700, and the calories consumed by the planned exercise for the day are determined based on the preset exercise plan.
[0108] In some optional embodiments, the historical health data of the target user includes daily food intake and daily calculated weight;
[0109] Accordingly, the Pearson correlation coefficient determination module 530 can also be specifically used for:
[0110] The Pearson correlation coefficients between various food intakes and body weight changes were determined based on the daily food intakes and the daily calculated body weight.
[0111] In some optional implementations, the food recommendation module 540 may also be specifically used for:
[0112] The probability of food recommendation is determined based on the Pearson correlation coefficient between the intake of various foods and weight change:
[0113] The recommended food for the day is determined based on the food recommendation probability.
[0114] In some optional implementations, the food recommendation module 540 may also be specifically used for:
[0115] Determine the target nutrient intake for the day; and calculate the weight of each recommended food for the day through a linear programming algorithm based on the target nutrient intake for the day and the required caloric intake for the day.
[0116] The diet recommendation device provided in the embodiment of the present invention can execute the diet recommendation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0117] Embodiment 6
[0118] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0119] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The I / O interface 15 is also connected to the bus 14.
[0120] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0121] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a diet recommendation method, which includes:
[0122] Obtain the target user's historical health data, weight change goals, and preset exercise plans;
[0123] Determine the normal daily calorie consumption based on the historical health data of the target user, and determine the required calorie intake for the day based on the normal daily calorie consumption, weight change target and preset exercise plan;
[0124] determining a Pearson correlation coefficient between various food intakes and weight changes based on the historical health data of the target user;
[0125] The recommended food for the day is determined based on the Pearson correlation coefficient between the intake of the various foods and the change in body weight, and the weight of the recommended food for the day is determined based on the required calorie intake for the day.
[0126] In some embodiments, the dietary recommendation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the dietary recommendation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the dietary recommendation method in any other appropriate manner (e.g., by means of firmware).
[0127] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0128] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0129] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0130] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0131] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0132] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0133] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0134] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A diet recommendation method, characterized in that: include: Obtain the target user's historical health data, weight change goals, and preset exercise plans; Determine the normal daily calorie consumption based on the historical health data of the target user, and determine the required daily calorie intake based on the normal daily calorie consumption, the preset exercise plan and the weight change target; determining a Pearson correlation coefficient between various food intakes and weight changes based on the historical health data of the target user; The recommended food for the day is determined based on the Pearson correlation coefficient between the intake of the various foods and the change in body weight, and the weight of the recommended food for the day is determined based on the required calorie intake for the day.
2. The method according to claim 1, characterized in that The historical health data of the target user includes the sum of calories consumed by diet over multiple days, the sum of calories consumed by exercise over multiple days, and the difference between energy intake and energy consumption over multiple days; Accordingly, determining the daily normal calorie consumption based on the historical health data of the target user includes: The daily normal calorie consumption is determined based on the sum of the calorie intake from the diet over multiple days, the sum of the calorie consumption from exercise over multiple days, and the difference between the energy intake and consumption over multiple days.
3. The method according to claim 2, characterized in that The calculation formula for determining the daily normal calorie consumption data is: Daily normal calorie consumption = (sum of calorie intake from diet for multiple days - sum of calorie consumption from exercise for multiple days - difference between energy intake and energy consumption for multiple days) / T; Among them, the difference between energy intake and consumption over multiple days = multi-day weight change value × 7700. The multi-day weight change value refers to the difference in weight measured at the same time on the first and last dates in the weight record. 7700 represents the relationship between weight and calories; T represents the number of days.
4. The method according to claim 1, characterized in that The determining of the required daily calorie intake based on the daily normal calorie consumption, the preset exercise plan and the weight change target includes: Determine the required daily calorie intake based on the daily normal calorie consumption, the difference between the required daily calorie intake and calorie consumption, and the planned daily exercise calorie consumption; Among them, the difference between the energy intake and consumption required for the day = the weight change target × 7700, and the calories consumed by the planned exercise for the day are determined based on the preset exercise plan.
5. The method according to claim 1, characterized in that The historical health data of the target user includes daily food intake and daily calculated weight; Accordingly, the Pearson correlation coefficient between various food intakes and weight changes is determined based on the historical health data of the target user, including: The Pearson correlation coefficient between each food intake and the weight change is determined based on the daily each food intake and the daily calculated body weight.
6. The method according to claim 1, characterized in that The method of determining the recommended food for the day based on the Pearson correlation coefficient between the various food intakes and the weight changes includes: The probability of food recommendation is determined based on the Pearson correlation coefficient between the intake of various foods and weight change: The recommended food for the day is determined based on the food recommendation probability.
7. The method according to claim 1, characterized in that Determining the weight of the recommended food for the day based on the required calorie intake for the day includes: Determine the target nutrient intake for the day; Based on the target nutrient intake value for the day and the required caloric intake for the day, the weight of each recommended food for the day is calculated by a linear programming algorithm.
8. A diet recommendation device, characterized in that: include: A health data acquisition module is used to obtain the historical health data, weight change target and preset exercise plan of the target user; A module for determining the daily required calorie intake, for determining the daily normal calorie consumption based on the historical health data of the target user, and determining the daily required calorie intake based on the daily normal calorie consumption, the preset exercise plan and the weight change target; A Pearson correlation coefficient determination module, used to determine the Pearson correlation coefficient between various food intakes and weight changes based on the historical health data of the target user; The food recommendation module is used to determine the recommended food for the day based on the Pearson correlation coefficient between the intake of various foods and the change in body weight, and to determine the weight of the recommended food for the day based on the required calorie intake for the day.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the dietary recommendation method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the diet recommendation method according to any one of claims 1 to 7 when executed.
