User diet preference prediction method and device and electronic equipment
Through HSV color space and Hu rectangular features identification, combined with linear regression model and graph neural network, the recommendation mismatch problem caused by seasonal changes and regional differences in traditional user preference prediction systems is solved, and the precise quantification of seasonings and the balance of dietary preferences in multi-person dining scenarios is achieved.
Patent Information
- Application Number
- CN202510580209.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-15
AI Technical Summary
The traditional user preference prediction system fails to effectively consider dynamic factors such as seasonal changes and regional differences, resulting in mismatch in recommendation results, unable to convert abstract dietary taste descriptions into specific seasoning weights, and lacks an effective multi-user preference conflict resolution mechanism in multi-person dining scenarios.
The ingredients are identified through HSV color space and Hu rectangular features, combined with user information and linear regression model, accurate quantization output of seasoning weight is achieved, and graph neural network is used to explore the preference propagation laws in user social relationships to balance multi-user conflicts.
It improves the accuracy of ingredients classification, realizes the precise quantitative output of seasonings, solves the problem of uneven ingredient maturity, and provides a compromise solution that takes into account nutritional balance and taste diversity in multi-person dining scenarios.
Smart Images

Figure CN120492727A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data prediction technology, and in particular to a method, device and electronic equipment for predicting user dietary preferences. Background Art
[0002] Traditional user preference prediction relies on fixed historical data and does not consider dynamic factors such as seasonal changes and regional differences. This leads to scenario mismatch problems such as "recommended cold food in winter" and "high-frequency recommendation of seafood for inland users" in recommendation results. Existing systems mostly stay at the level of qualitative recommendation of taste preferences. They are unable to convert abstract descriptions such as "light" and "heavy" into specific seasoning weights or cooking parameters, and users still need to rely on experience. For multi-person dining scenarios, there is a lack of an effective mechanism to resolve conflicts in multi-user preferences, which often leads to recommended dishes deviating from the actual needs of most members.
[0003] Therefore, a method, device and electronic device for predicting user dietary preferences are proposed. Summary of the Invention
[0004] This manual provides a method, device, and electronic device for predicting user dietary preferences, which improves the accuracy of classifying complex food ingredients, maps user taste preferences to seasoning weight through a linear regression model, and achieves accurate quantitative output of seasonings.
[0005] This specification provides a method for predicting a user's dietary preferences, including:
[0006] Get food pictures and user information;
[0007] Identify the food image and determine the name and category of the food;
[0008] Combining the user information and the food classification, the user's dietary preferences corresponding to the food names are predicted.
[0009] Optionally, identifying the food image and determining the food name and food category includes:
[0010] Extracting the hue histogram features of the food image through HSV color space conversion and establishing a color feature vector;
[0011] The Canny edge detection algorithm is used to extract the outline shape of the food in the food image, and the shape feature vector is generated by the Hu moment algorithm;
[0012] The color feature vector and the shape feature vector are feature fused and input into a pre-trained multi-layer convolutional neural network classification model to determine the name and classification of the food.
[0013] Optionally, combining the user information and the ingredient classification to predict the user's dietary preferences corresponding to the ingredient name includes:
[0014] The user information includes the user's historical dietary preference information, seasonal adjustment coefficient, and regional weight;
[0015] The user's historical dietary preference data, the seasonal adjustment coefficient, the regional weight, and the food classification are weighted and spliced, and the user's dietary preference corresponding to the food name is predicted through a Softmax function.
[0016] Optionally, also include:
[0017] Get the weight of ingredients;
[0018] The weight of the ingredients is bound to the name of the ingredients, and based on the user's dietary preferences, the name of the ingredients and the weight of the ingredients, a recommended weight range of each seasoning is calculated and output through a linear regression model.
[0019] Optionally, also include:
[0020] Determine the recommended heating time and temperature threshold according to the food classification and cutting shape;
[0021] The recommended heating time and the temperature threshold are modified based on the user's dietary preference information to obtain cooking equipment control information.
[0022] Optionally, also include:
[0023] Create user groups based on social relationship graphs or device sharing records, and build collaborative preference prediction models for each group;
[0024] Graph neural networks are used to mine the preference propagation paths of users within a group and identify the preference influence weights of leading users and following users;
[0025] Perform multi-dimensional alignment of historical dietary data of users in the group to provide differentiated dietary preference predictions for users with different roles.
[0026] Optionally, the multi-dimensional alignment of historical dietary data of users in the group includes:
[0027] Matching common dining records by timestamps to extract overlapping food preference features;
[0028] The attention mechanism is used to dynamically assign user weights. When a new user is detected, the initial fusion coefficient is calculated based on its historical data and the similarity within the group.
[0029] Generate compromise solutions for conflicting preferences and seek Pareto optimal solutions in the dimensions of taste intensity and nutritional balance through constrained optimization algorithms.
[0030] This specification provides a user dietary preference prediction device, comprising:
[0031] Acquisition module, used to obtain food pictures and user information;
[0032] An identification module is used to identify the food image and determine the food name and food category;
[0033] The prediction module is used to combine the user information and the food classification to predict the user's dietary preferences corresponding to the food name.
[0034] Optionally, the identification module includes:
[0035] Extracting the hue histogram features of the food image through HSV color space conversion and establishing a color feature vector;
[0036] The Canny edge detection algorithm is used to extract the outline shape of the food in the food image, and the shape feature vector is generated by the Hu moment algorithm;
[0037] The color feature vector and the shape feature vector are feature fused and input into a pre-trained multi-layer convolutional neural network classification model to determine the name and classification of the food.
[0038] Optionally, the prediction module includes:
[0039] The user information includes user's historical dietary preference information, seasonal adjustment coefficient, and regional weight;
[0040] The user's historical dietary preference data, the seasonal adjustment coefficient, the regional weight, and the food classification are weighted and spliced, and the user's dietary preference corresponding to the food name is predicted through a Softmax function.
[0041] Optionally, also include:
[0042] Get the weight of ingredients;
[0043] The weight of the ingredients is bound to the name of the ingredients, and based on the user's dietary preferences, the name of the ingredients and the weight of the ingredients, a recommended weight range of each seasoning is calculated and output through a linear regression model.
[0044] Optionally, also include:
[0045] Determine the recommended heating time and temperature threshold according to the food classification and cutting shape;
[0046] The recommended heating time and the temperature threshold are modified based on the user's dietary preference information to obtain cooking equipment control information.
[0047] Optionally, also include:
[0048] Create user groups based on social relationship graphs or device sharing records, and build collaborative preference prediction models for each group;
[0049] Graph neural networks are used to mine the preference propagation paths of users within a group and identify the preference influence weights of leading users and following users;
[0050] Perform multi-dimensional alignment of historical dietary data of users in the group to provide differentiated dietary preference predictions for users with different roles.
[0051] Optionally, the multi-dimensional alignment of historical dietary data of users in the group includes:
[0052] Matching common dining records by timestamps to extract overlapping food preference features;
[0053] The attention mechanism is used to dynamically assign user weights. When a new user is detected, the initial fusion coefficient is calculated based on its historical data and the similarity within the group.
[0054] Generate compromise solutions for conflicting preferences and seek Pareto optimal solutions in the dimensions of taste intensity and nutritional balance through constrained optimization algorithms.
[0055] This specification also provides an electronic device, wherein the electronic device includes:
[0056] processor; and,
[0057] A memory storing computer executable instructions, which, when executed, cause the processor to perform any of the above methods.
[0058] This specification also provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, any of the above methods is implemented.
[0059] In the present invention, the dual-modal recognition of HSV color space and Hu rectangular features is combined to improve the classification accuracy of complex-shaped ingredients; the seasonal adjustment coefficient, regional weight and LSTM time series prediction are integrated to construct a dynamic user portrait, so that the recommendation results can adapt to environmental changes; the user's taste preference is mapped to the gram weight of the seasoning through a linear regression model to achieve accurate quantitative output of the seasoning; the cooking parameters are dynamically adjusted based on the heat conduction model and PID control algorithm to solve the problem of uneven cooking of ingredients; the graph neural network is used to explore the preference propagation rules in user social relationships and identify the dominant influencing factors of the group; the Pareto optimal solution and the attention mechanism are used to balance multi-user conflicts, and a compromise solution that takes into account nutritional balance and taste diversity is output. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0061] Figure 1 A schematic diagram of the principle of a method for predicting user dietary preferences provided in an embodiment of this specification;
[0062] Figure 2 A schematic diagram of the structure of a device for predicting user dietary preferences provided in an embodiment of this specification;
[0063] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification;
[0064] Figure 4 A schematic diagram of a computer-readable medium provided in accordance with an embodiment of this specification. DETAILED DESCRIPTION
[0065] The following description is intended to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are for illustrative purposes only, and those skilled in the art will readily appreciate other obvious variations. The basic principles of the present invention defined in the following description may be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the present invention.
[0066] The following is combined with Figure 1-4 The exemplary embodiments of the present invention are described more fully. However, the exemplary embodiments can be implemented in various forms, and the present invention should not be construed as being limited to the embodiments set forth herein. On the contrary, providing these exemplary embodiments enables the present invention to be more comprehensive and complete, and more conveniently conveys the inventive concept to those skilled in the art. In the figures, the same reference numerals represent the same or similar elements, components, or parts, and thus their repeated description will be omitted.
[0067] Under the premise of being consistent with the technical concept of the present invention, the features, structures, characteristics or other details described in a specific embodiment do not exclude that they can be combined in one or more other embodiments in a suitable manner.
[0068] In the description of specific embodiments, the features, structures, characteristics, or other details of the present invention are described to enable those skilled in the art to fully understand the embodiments. However, this does not preclude those skilled in the art from practicing the technical solutions of the present invention without one or more of the specific features, structures, characteristics, or other details.
[0069] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.
[0070] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0071] The term "and / or" or "and / or" includes all combinations of any one or more of the associated listed items.
[0072] Figure 1 This is a schematic diagram of the principle of a method for predicting user dietary preferences provided in an embodiment of this specification. The method may include:
[0073] S110: Obtain food pictures and user information;
[0074] S120: Identify the food image and determine the food name and food category;
[0075] Optionally, the S120 includes:
[0076] Extracting the hue histogram features of the food image through HSV color space conversion and establishing a color feature vector;
[0077] The Canny edge detection algorithm is used to extract the outline shape of the food in the food image, and the shape feature vector is generated by the Hu moment algorithm;
[0078] The color feature vector and the shape feature vector are feature fused and input into a pre-trained multi-layer convolutional neural network classification model to determine the name and classification of the food.
[0079] In a specific embodiment of the present specification, the hue distribution features are extracted by converting the food image into the HSV color space, and the color feature vector is constructed by grid division and histogram statistics, followed by normalization and dimensionality reduction processing to optimize the feature expression; at the same time, the Canny edge detection algorithm is used to extract the food contour, and the shape feature vector is generated by combining Hu invariant moments and geometric shape parameters, and the color and shape features are spliced into a multimodal input through a dynamic weight fusion strategy; the fused features are sent to a pre-trained two-branch convolutional neural network for classification learning, wherein the color branch uses a residual structure to enhance local texture capture, and the shape branch extracts abstract features through a fully connected layer, and an attention mechanism is introduced to optimize feature interaction; in the model training stage, a large-scale food data set is used for transfer learning, combined with data enhancement technology to improve generalization ability, and a focal loss function is used to alleviate the category imbalance problem, and finally the food name and classification results are output.
[0080] S130: Combining the user information and the ingredient classification, predicting the user's dietary preferences corresponding to the ingredient names.
[0081] Optionally, the S130 includes:
[0082] The user information includes the user's historical dietary preference information, seasonal adjustment coefficient, and regional weight;
[0083] The user's historical dietary preference data, the seasonal adjustment coefficient, the regional weight, and the food classification are weighted and spliced, and the user's dietary preference corresponding to the food name is predicted through a Softmax function.
[0084] In a specific embodiment of the present specification, a dynamic user portrait is constructed by integrating the user's historical dietary preference data, seasonal adjustment coefficient and regional weight, wherein the historical preference data uses sliding window statistics to extract quantitative scores of high-frequency ingredients and taste tendencies, the seasonal coefficient is divided into hot and cold intervals according to real-time climate data and associated with preset taste intensity adjustment rules, and the regional weight is based on the user's geographical location to match the regional dietary feature library to generate a differentiated correction factor; after normalizing the above-mentioned multidimensional features and the ingredient classification results, the features are spliced according to the preset weight ratio, wherein the seasonal coefficient and the regional weight use a dynamic attenuation factor to adjust the intensity of the impact on short-term preferences, and the fused feature vector is input into the Softmax classifier for multi-dimensional preference probability calculation, and finally the user's taste preference distribution and recommendation priority ranking for the current ingredient are output. For example, for the identified "lamb" ingredient, the recommendation weight of "braised / heavy taste" is automatically increased in combination with the user's northern region and winter scene.
[0085] Optionally, also include:
[0086] Get the weight of ingredients;
[0087] The weight of the ingredients is bound to the name of the ingredients, and based on the user's dietary preferences, the name of the ingredients and the weight of the ingredients, a recommended weight range of each seasoning is calculated and output through a linear regression model.
[0088] In a specific embodiment of the present specification, the weight of the ingredients is obtained through a weighing device or user input and a data association is established with the identified ingredient name. Based on the taste intensity score and ingredient classification results in the user's dietary preferences, the unit weight seasoning adaptation parameters of the ingredient are retrieved from the nutrition database. The mapping relationship between historical seasoning data and actual user feedback is analyzed in combination with a linear regression model, and a multivariate fitting equation between ingredient weight, taste preference and seasoning attributes is dynamically constructed. The model input includes the normalized value of the ingredient weight, the quantitative score of the user preference, and standardized indicators such as the saltiness and sweetness of the seasoning. The output is the recommended gram weight range of different seasonings, and the quantitative control system or interactive interface of the smart kitchen appliance pushes addition suggestions accurate to grams. For example, when "500 grams of chicken" is identified, a quantitative guide of "2-3 grams of table salt, 5-8 milliliters of light soy sauce" is automatically generated according to the user's light preference.
[0089] Optionally, also include:
[0090] Determine the recommended heating time and temperature threshold according to the food classification and cutting shape;
[0091] The recommended heating time and the temperature threshold are modified based on the user's dietary preference information to obtain cooking equipment control information.
[0092] In a specific embodiment of the present specification, a preset heating reference parameter library is matched with the food classification results and cutting shapes. For example, when "block beef" is identified, the corresponding high-temperature quick-roasting initial parameters are called. At the same time, the reference parameters are dynamically corrected in combination with the taste tendencies in the user's preferences (such as tender or crispy). The fuzzy logic algorithm is used to convert the preference keywords into heating time adjustment coefficients and temperature offsets. When the user selects the healthy mode, the high-temperature stage duration is simultaneously reduced to retain nutrients. The corrected parameters are verified by the thermodynamic model to generate device control instructions, including oven staged temperature gradient settings or induction cooker power cycle strategies. For complex dishes containing multiple ingredients, independent heating area parameters are calculated based on the thermal conductivity and target degree of doneness of different ingredients, and the time-sharing temperature control logic is triggered. For example, in "beef and potato stew", potatoes are softened over medium heat first, and then the heat is increased to collect the beef, ensuring that each ingredient reaches the best edible state.
[0093] Optionally, also include:
[0094] Create user groups based on social relationship graphs or device sharing records, and build collaborative preference prediction models for each group;
[0095] Graph neural networks are used to mine the preference propagation paths of users within a group and identify the preference influence weights of leading users and following users;
[0096] Perform multi-dimensional alignment of historical dietary data of users in the group to provide differentiated dietary preference predictions for users with different roles.
[0097] In a specific embodiment of the present specification, users are grouped based on social relationship graphs or device sharing records, and users with close social connections or shared device usage habits are classified into the same group. Then, a collaborative preference prediction model is constructed for each group. The model comprehensively considers the dietary preference information of users in the group and forms a group preference prediction by aggregating individual preferences. Subsequently, a graph neural network is used to deeply analyze the preference propagation path between users in the group, identify the dominant users who play a leading role in preference propagation and the follower users influenced by the dominant users, and quantify the preference influence weights between them. Finally, the historical dietary data of users in the group are aligned in multiple dimensions, and different dietary preference predictions are provided for dominant users and follower users based on the differences in the roles of users in preference propagation. The prediction results of dominant users will more reflect their influence on group preferences, while the prediction results of follower users will more consider the influence of other users on them.
[0098] Optionally, the multi-dimensional alignment of historical dietary data of users in the group includes:
[0099] Matching common dining records by timestamps to extract overlapping food preference features;
[0100] The attention mechanism is used to dynamically assign user weights. When a new user is detected, the initial fusion coefficient is calculated based on its historical data and the similarity within the group.
[0101] Generate compromise solutions for conflicting preferences and seek Pareto optimal solutions in the dimensions of taste intensity and nutritional balance through constrained optimization algorithms.
[0102] In a specific embodiment of the present specification, the common dining records of different users are matched by timestamps to identify the ingredients consumed by multiple users in the same time period, and then the preference features of these overlapping ingredients are extracted to form a group-level ingredient preference representation. Subsequently, an attention mechanism is introduced to dynamically assign weights to each user based on the user's historical dietary data and current common dining records, so that users whose historical preferences are more consistent with the current group preferences have greater influence in ingredient preference decisions. When a new user is detected joining a group, an initial fusion coefficient is calculated based on the similarity between the new user's historical dietary data and the existing users in the group. This coefficient determines the speed and degree of integration of the new user's preferences into the group preferences. Finally, for conflicting ingredient preferences that may arise within the group, for example, some users prefer heavy flavors while others prefer light flavors, a constrained optimization algorithm is used to weigh the two dimensions of taste intensity and nutritional balance, seek a Pareto optimal solution, and generate a compromise diet plan that satisfies the taste preferences of most users and ensures nutritional balance.
[0103] In the present invention, the dual-modal recognition of HSV color space and Hu rectangular features is combined to improve the classification accuracy of complex-shaped ingredients; the seasonal adjustment coefficient, regional weight and LSTM time series prediction are integrated to construct a dynamic user portrait, so that the recommendation results can adapt to environmental changes; the user's taste preference is mapped to the gram weight of the seasoning through a linear regression model to achieve accurate quantitative output of the seasoning; the cooking parameters are dynamically adjusted based on the heat conduction model and PID control algorithm to solve the problem of uneven cooking of ingredients; the graph neural network is used to explore the preference propagation rules in user social relationships and identify the dominant influencing factors of the group; the Pareto optimal solution and the attention mechanism are used to balance multi-user conflicts, and a compromise solution that takes into account nutritional balance and taste diversity is output.
[0104] Figure 2 This is a schematic diagram of the principle of a user dietary preference prediction device provided in an embodiment of this specification. The system may include:
[0105] Acquisition module 10, used to obtain food pictures and user information;
[0106] Identification module 20, for identifying the food image, determining the food name and food category;
[0107] The prediction module 30 is used to combine the user information and the ingredient classification to predict the user's dietary preferences corresponding to the ingredient name.
[0108] Optionally, the identification module 20 includes:
[0109] Extracting the hue histogram features of the food image through HSV color space conversion and establishing a color feature vector;
[0110] The Canny edge detection algorithm is used to extract the outline shape of the food in the food image, and the shape feature vector is generated by the Hu moment algorithm;
[0111] The color feature vector and the shape feature vector are feature fused and input into a pre-trained multi-layer convolutional neural network classification model to determine the name and classification of the food.
[0112] Optionally, the prediction module 30 includes:
[0113] The user information includes the user's historical dietary preference information, seasonal adjustment coefficient, and regional weight;
[0114] The user's historical dietary preference data, the seasonal adjustment coefficient, the regional weight, and the food classification are weighted and spliced, and the user's dietary preference corresponding to the food name is predicted through a Softmax function.
[0115] Optionally, also include:
[0116] Get the weight of ingredients;
[0117] The weight of the ingredients is bound to the name of the ingredients, and based on the user's dietary preferences, the name of the ingredients and the weight of the ingredients, a recommended weight range of each seasoning is calculated and output through a linear regression model.
[0118] Optionally, also include:
[0119] Determine the recommended heating time and temperature threshold according to the food classification and cutting shape;
[0120] The recommended heating time and the temperature threshold are modified based on the user's dietary preference information to obtain cooking equipment control information.
[0121] Optionally, also include:
[0122] Create user groups based on social relationship graphs or device sharing records, and build collaborative preference prediction models for each group;
[0123] Graph neural networks are used to mine the preference propagation paths of users within a group and identify the preference influence weights of leading users and following users;
[0124] Perform multi-dimensional alignment of historical dietary data of users in the group to provide differentiated dietary preference predictions for users with different roles.
[0125] Optionally, the multi-dimensional alignment of historical dietary data of users in the group includes:
[0126] Matching common dining records by timestamps to extract overlapping food preference features;
[0127] The attention mechanism is used to dynamically assign user weights. When a new user is detected, the initial fusion coefficient is calculated based on its historical data and the similarity within the group.
[0128] Generate compromise solutions for conflicting preferences and seek Pareto optimal solutions in the dimensions of taste intensity and nutritional balance through constrained optimization algorithms.
[0129] The functions of the device in the embodiment of the present invention have been described in the above method embodiment. Therefore, for details not fully described in this embodiment, please refer to the relevant description in the above embodiment and will not be repeated here.
[0130] Based on the same inventive concept, an embodiment of this specification also provides an electronic device.
[0131] The following describes an electronic device embodiment of the present invention, which can be considered a specific physical implementation of the method and apparatus embodiments of the present invention described above. Details described in the electronic device embodiment of the present invention should be considered supplementary to the above-mentioned method or apparatus embodiments; details not disclosed in the electronic device embodiment of the present invention can be implemented with reference to the above-mentioned method or apparatus embodiments.
[0132] Figure 3 This is a schematic diagram of the structure of an electronic device provided in the embodiment of this specification. Figure 3 The electronic device 300 according to this embodiment of the present invention will be described. Figure 3 The electronic device 300 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0133] like Figure 3 As shown, electronic device 300 is implemented as a general-purpose computing device. Components of electronic device 300 may include, but are not limited to, at least one processing unit 310, at least one storage unit 320, a bus 330 connecting various system components (including storage unit 320 and processing unit 310), a display unit 340, and the like.
[0134] The storage unit stores program codes that can be executed by the processing unit 310, so that the processing unit 310 performs the steps according to various exemplary embodiments of the present invention described in the above processing method section of this specification. For example, the processing unit 310 can perform the following steps: Figure 1 Steps shown.
[0135] The storage unit 320 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 3201 and / or a cache memory unit 3202 , and may further include a read-only memory unit (ROM) 3203 .
[0136] The storage unit 320 may also include a program / utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.
[0137] Bus 330 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0138] The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable viewers to interact with the electronic device 300, and / or any device that enables the electronic device 300 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 350. Furthermore, the electronic device 300 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 360. The network adapter 360 may communicate with other modules of the electronic device 300 through the bus 330. It should be understood that although Figure 3 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 300, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0139] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the exemplary embodiments described in the present invention can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the present invention. When the computer program is executed by a data processing device, the computer-readable medium is enabled to implement the above method of the present invention, that is: Figure 1 The method shown.
[0140] Figure 4 A schematic diagram of a computer-readable medium provided in accordance with an embodiment of this specification.
[0141] accomplish Figure 1 The computer program of the method shown can be stored on one or more computer-readable media. The computer-readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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 thereof.
[0142] The computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. The data signal propagated may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or component. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0143] The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the viewer computing device, partially on the viewer device, as a stand-alone software package, partially on the viewer computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the viewer computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0144] In summary, the present invention can be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that general data processing equipment such as a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing a part or all of the methods described herein. Such a program for implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0145] The specific embodiments described above further illustrate the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the present invention is not inherently related to any specific computer, virtual device, or electronic device, and various general-purpose devices can also implement the present invention. The above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.
[0146] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0147] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A method for predicting user dietary preferences, characterized in that: include: Get food pictures and user information; Identify the food image and determine the food name and food category; Combining the user information and the food classification, the user's dietary preferences corresponding to the food names are predicted.
2. The method for predicting user dietary preferences according to claim 1, wherein: The step of identifying the food image and determining the food name and food classification includes: Extracting the hue histogram features of the food image through HSV color space conversion and establishing a color feature vector; The Canny edge detection algorithm is used to extract the outline shape of the food in the food image, and the shape feature vector is generated by the Hu moment algorithm; The color feature vector and the shape feature vector are feature fused and input into a pre-trained multi-layer convolutional neural network classification model to determine the name and classification of the food.
3. The method for predicting user dietary preferences according to claim 2, wherein: The combining of the user information and the food classification to predict the user's dietary preferences corresponding to the food names includes: The user information includes the user's historical dietary preference information, seasonal adjustment coefficient, and regional weight; The user's historical dietary preference data, the seasonal adjustment coefficient, the regional weight, and the food classification are weighted and spliced, and the user's dietary preference corresponding to the food name is predicted through a Softmax function.
4. The method for predicting user dietary preferences according to claim 3, wherein: Also includes: Get the weight of ingredients; The weight of the ingredients is bound to the name of the ingredients, and based on the user's dietary preferences, the name of the ingredients and the weight of the ingredients, a recommended weight range of each seasoning is calculated and output through a linear regression model.
5. The method for predicting user dietary preferences according to claim 4, wherein: Also includes: Determine the recommended heating time and temperature threshold according to the food classification and cutting shape; The recommended heating time and the temperature threshold are modified based on the user's dietary preference information to obtain cooking equipment control information.
6. The method for predicting user dietary preferences according to claim 5, wherein: Also includes: Create user groups based on social relationship graphs or device sharing records, and build collaborative preference prediction models for each group; Graph neural networks are used to mine the preference propagation paths of users within a group and identify the preference influence weights of leading users and following users; Perform multi-dimensional alignment of historical dietary data of users in the group to provide differentiated dietary preference predictions for users with different roles.
7. The method for predicting user dietary preferences according to claim 6, wherein: The multi-dimensional alignment of the historical dietary data of users in the group includes: Matching common dining records by timestamps to extract overlapping food preference features; The attention mechanism is used to dynamically assign user weights. When a new user is detected, the initial fusion coefficient is calculated based on its historical data and the similarity within the group. Generate compromise solutions for conflicting preferences and seek Pareto optimal solutions in the dimensions of taste intensity and nutritional balance through constrained optimization algorithms.
8. A user dietary preference prediction device, characterized in that: include: Acquisition module, used to obtain food pictures and user information; An identification module is used to identify the food image and determine the food name and food category; The prediction module is used to combine the user information and the food classification to predict the user's dietary preferences corresponding to the food name.
9. An electronic device, wherein: The electronic device includes: processor; and, A memory storing computer executable instructions which, when executed, cause the processor to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, wherein: The computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method of any one of claims 1 to 7 is implemented.